Quote:
Originally Posted by Vaupell
are your phrases in global or in a group, if in a group you need to register them
// get special phrase groups
$phrasegroups = array();
And i call phrases in templates like this {vb:raw vbphrase:phrasename}
|
Yap they are global.
And no i dont want to call them in template. It works when i call 'em in template.
But here is the situation :
test/test.php contains :
PHP Code:
<?php
$ab="I'm in php file.";
?>
i have registered above variable $ab in /test.php file outside "test" folder.
It also includes call for include("test/test.php")
In template "custom_test" i'm rendering data as :
{vb:raw ab}
Now what i want is :
PHP Code:
<?php
$tmpaa=$vbphrase['testXxx'];
$ab="I'm in php file.";
$ab.="Phrase contents=".$tmpaa;
?>
I dont understand understand how do i capture phrase data in custom php file (outside vbulletin template) and yeah file does have include(global.php);
--------------- Added [DATE]1261483354[/DATE] at [TIME]1261483354[/TIME] ---------------
somebody please help
--------------- Added [DATE]1261484666[/DATE] at [TIME]1261484666[/TIME] ---------------
I just got it sorted out..
Posting solution for future troubles :
PHP Code:
<?php
include(./global.php);
$aa=sprintf($vbphrase['my_phrase_name']);
echo $aa;
?>
Now you can directly use phrase contents outside vbulletin's template.