TBDragon
Active member
how r u guys
i have a small issue that i need to get phrase text by title of phrase
for example
this one return for me the title of prefix 4 in my forum !!
but for me i want to show many prefix
so i try to do this code
but i got an error
so how i can solve this ?
i think there was a problem with the geting value from the array
as line 32 is this
i have a small issue that i need to get phrase text by title of phrase
for example
PHP:
$phrase = new XenForo_Phrase("thread_prefix_4");
$phrase = $phrase->render(true);
this one return for me the title of prefix 4 in my forum !!
but for me i want to show many prefix
so i try to do this code
PHP:
foreach ($prefixIds as $prefixId ) {
$phrase = new XenForo_Phrase('thread_prefix_ . $prefixIds[$prefixId]');
$phrase = $phrase->render(true);
self::$PrefixHtml .= "<li> prefix ? = " . $phrase . "</li>";
}
but i got an error
Code:
Server Error
Illegal offset type
[LIST=1]
[*]XenForo_Application::handlePhpError() in TBDragon/PrefixList/PrefixListCallback.php at line 32
[*]TBDragon_PrefixList_PrefixListCallback::formatPrefix() in TBDragon/PrefixList/PrefixListCallback.php at line 50
[*]TBDragon_PrefixList_PrefixListCallback::respond()
[*]call_user_func_array() in XenForo/ControllerPublic/Page.php at line 46
[*]XenForo_ControllerPublic_Page->actionIndex() in XenForo/FrontController.php at line 347
[*]XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
[*]XenForo_FrontController->run() in C:/wamp/www/xen/index.php at line 13
[/LIST]
so how i can solve this ?
i think there was a problem with the geting value from the array
as line 32 is this
PHP:
$phrase = new XenForo_Phrase('thread_prefix_ . $prefixIds[$prefixId]');