PDA

View Full Version : Solved vBET 3.3.2 breaks daily/weekly digests for vBSEO users



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

vBET
17-04-10, 17:33
Thanks for note we will check it and fix it :)

moman
17-04-10, 18:42
BTW, should you find a more elegant fix, please let me know! :)

vBET
18-04-10, 22:55
No problem :) We will find more elegant solution and it will be notified if any changes in vBSEO integration will be necessary.

tavenger5
19-04-10, 19:36
thanks for pointing this out!

vBET
03-05-10, 22:43
More elegant solution found - will be included in next release. It will not require any additional vBSEO files edition.

For quick fix:
1. Edit file /includes/vbenterprisetranslator_functions_vbseo.php
2. Find:

function vbet_vbseo_filter_replace_text($text, $allowchars = null, $filter_stop_words = true, $reversable = false) {
3. Put AFTER:


if(isset($GLOBALS['FIX_EMAILS'])) {
return vbseo_filter_replace_text ($text, $allowchars, $filter_stop_words, $reversable);
}

AfrikaansAlbanianArabicBelarusianBulgarianCatalanChineseCroatianCzechDanishDutchEnglishEstonianFilipinoFinnishFrenchGalicianGermanGreekHaitian CreoleHebrewHindiHungarianIcelandicIndonesianIrishItalianJapaneseKoreanLatvianLithuanianMacedonianMalayMalteseNorwegianPersianPolishPortugueseRomanianRussianSerbianSlovakSlovenianSpanishSwahiliSwedishTaiwaneseThaiTurkishUkrainianVietnameseWelshYiddish
Translations supported by vBET 4.10.1