moman
16-04-10, 21:56
This code swap in functions_vbseo_creaturl breaks daily/weekly digests:
// FIND
$vbseo_gcache_thread['seotitle'] = vbseo_filter_replace_text ($ttl);
// REPLACE it with this code:
$vbseo_gcache_thread['seotitle'] = vbet_vbseo_filter_replace_text ($ttl);
Fix:
In plugin vBSEO Email Send, replace full contents with:
require_once(DIR . '/includes/functions_vbseo.php');
$GLOBALS['VBSEO_REWRITE_TEXTURLS'] = 1;
$GLOBALS['FIX_EMAILS'] = 1;
if(function_exists('make_crawlable') && VBSEO_REWRITE_EMAILS)
$message = make_crawlable($message);
unset($GLOBALS['VBSEO_REWRITE_TEXTURLS']);
unset($GLOBALS['FIX_EMAILS']);
In functions_vbseo_createurl.php:
Find:
$vbseo_gcache_thread['seotitle'] = vbet_vbseo_filter_replace_text ($ttl);
Replace with:
if(isset($GLOBALS['FIX_EMAILS'])) {
$vbseo_gcache_thread['seotitle'] = vbseo_filter_replace_text ($ttl);
}
else {
$vbseo_gcache_thread['seotitle'] = vbet_vbseo_filter_replace_text ($ttl);
}
}
Obviously this is a quick and dirty fix, as there must be something wrong with the vbet_vbseo_filter_replace_text function.
I found this by:
1. recognizing that daily and weekly forum subscription emails weren't working
2. checking all hooks in vBulletin's digest files, which led to the mail class
3. disabling matching vBSEO mail_send plugin & confirming that everything now worked
// FIND
$vbseo_gcache_thread['seotitle'] = vbseo_filter_replace_text ($ttl);
// REPLACE it with this code:
$vbseo_gcache_thread['seotitle'] = vbet_vbseo_filter_replace_text ($ttl);
Fix:
In plugin vBSEO Email Send, replace full contents with:
require_once(DIR . '/includes/functions_vbseo.php');
$GLOBALS['VBSEO_REWRITE_TEXTURLS'] = 1;
$GLOBALS['FIX_EMAILS'] = 1;
if(function_exists('make_crawlable') && VBSEO_REWRITE_EMAILS)
$message = make_crawlable($message);
unset($GLOBALS['VBSEO_REWRITE_TEXTURLS']);
unset($GLOBALS['FIX_EMAILS']);
In functions_vbseo_createurl.php:
Find:
$vbseo_gcache_thread['seotitle'] = vbet_vbseo_filter_replace_text ($ttl);
Replace with:
if(isset($GLOBALS['FIX_EMAILS'])) {
$vbseo_gcache_thread['seotitle'] = vbseo_filter_replace_text ($ttl);
}
else {
$vbseo_gcache_thread['seotitle'] = vbet_vbseo_filter_replace_text ($ttl);
}
}
Obviously this is a quick and dirty fix, as there must be something wrong with the vbet_vbseo_filter_replace_text function.
I found this by:
1. recognizing that daily and weekly forum subscription emails weren't working
2. checking all hooks in vBulletin's digest files, which led to the mail class
3. disabling matching vBSEO mail_send plugin & confirming that everything now worked