consolegaming
12-18-2009, 11:00 PM
I am in the process of trying to upgrade a plugin of mine for vb4 and I'm trying to reproduce the effect of the following code:
eval('$activeonlineusers[\'team\'] .= ", ' . fetch_template('forumhome_loggedinuser') . '";');
I have tried two different things:
$activeonlineusers['team'] .= ", ". $vbulletin->templatecache["forumhome_loggedinuser"];
and:
$activeonlineusers['team'] .= ", ".$templater->render();
$templater = vB_Template::create('forumhome_loggedinuser');
The latter just shows the commas and the former shows something resembling the below:
# Hello $final_rendered = ' ' . vB_Template_Runtime::fetchStylevar("dirmark") . ' ' . $loggedin['musername'] . '' . $loggedin['invisiblemark'] . '' . $loggedin['buddymark'] . '
# ';Hello $final_rendered = ' ' . vB_Template_Runtime::fetchStylevar("dirmark") . ' ' . $loggedin['musername'] . '' . $loggedin['invisiblemark'] . '' . $loggedin['buddymark'] . '
';
Hello = what I put in, instead of the comma's to make sure the seperator was being added.
I'm probably just missing something really obvious but sometimes you get to the point where you just can't see the answer lol. It's not an issue with registering variables because it does output (another plugin uses this array to replace the one that is outputted).
eval('$activeonlineusers[\'team\'] .= ", ' . fetch_template('forumhome_loggedinuser') . '";');
I have tried two different things:
$activeonlineusers['team'] .= ", ". $vbulletin->templatecache["forumhome_loggedinuser"];
and:
$activeonlineusers['team'] .= ", ".$templater->render();
$templater = vB_Template::create('forumhome_loggedinuser');
The latter just shows the commas and the former shows something resembling the below:
# Hello $final_rendered = ' ' . vB_Template_Runtime::fetchStylevar("dirmark") . ' ' . $loggedin['musername'] . '' . $loggedin['invisiblemark'] . '' . $loggedin['buddymark'] . '
# ';Hello $final_rendered = ' ' . vB_Template_Runtime::fetchStylevar("dirmark") . ' ' . $loggedin['musername'] . '' . $loggedin['invisiblemark'] . '' . $loggedin['buddymark'] . '
';
Hello = what I put in, instead of the comma's to make sure the seperator was being added.
I'm probably just missing something really obvious but sometimes you get to the point where you just can't see the answer lol. It's not an issue with registering variables because it does output (another plugin uses this array to replace the one that is outputted).