View Full Version : Solved Langtitle not parsed

17-05-10, 20:55
I have a custom modification that shows recent user posts in the user cp based on these two queries:

$getposts = $db->query_read("SELECT distinct b.threadid FROM ". TABLE_PREFIX . "post a, ". TABLE_PREFIX . "thread b WHERE a.userid = " . $vbulletin->userinfo['userid'] . " AND b.visible = 1 AND a.threadid = b.threadid ORDER BY a.postid DESC LIMIT 5");

Then based off of that query's thread id,
$getthreadid = $db->query_read("SELECT * FROM ". TABLE_PREFIX . "thread WHERE threadid = $tid");

When we print this thread's title from the database, the langtitle tag is not parsed. Is there a function I can require + invoke in the plugin on the title in order to parse it?

18-05-10, 16:57
Which vBET version are you using? Last release have global langtitle parsing functionality.

19-05-10, 17:14
Latest version, 3.3.3, which is why I was puzzled.

I figured it out, however. Added this to my plugin:

if (strpos($rpthread['title'], '[/langtitle]')) {
require_once(DIR. '/includes/vbenterprisetranslator_functions_bbcode.php');
$rpthread['title'] = vbet_parseTitle($rpthread['title']);

AfrikaansAlbanianArabicBelarusianBulgarianCatalanChineseCroatianCzechDanishDutchEnglishEstonianFilipinoFinnishFrenchGalicianGermanGreekHaitian CreoleHebrewHindiHungarianIcelandicIndonesianIrishItalianJapaneseKoreanLatvianLithuanianMacedonianMalayMalteseNorwegianPersianPolishPortugueseRomanianRussianSerbianSlovakSlovenianSpanishSwahiliSwedishTaiwaneseThaiTurkishUkrainianVietnameseWelshYiddish
vBET 4.9.99 supports automatic translations