PDA

View Full Version : Rewrite vb3 to vb4 templatecache


heugabel
07-26-2011, 05:41 PM
$search_text = '<!-- end logged-in users -->';
$vbulletin->templatecache['FORUMHOME'] = str_replace($search_text, $search_text . fetch_template('forumhome_xyz'), $vbulletin->templatecache['FORUMHOME']);

how i can rewrite this for vb4?

thank you

Badshah93
07-26-2011, 08:11 PM
Plugin Hook: forumhome_complete

$myvar = vB_Template::create('lastpages')->render();
vB_Template::preRegister('FORUMHOME',array('myvar' => $myvar));
$vbulletin->templatecache['FORUMHOME'] = str_replace('<!-- end logged-in users -->','<!-- end logged-in users -->\' . $myvar . \'',$vbulletin->templatecache['FORUMHOME']);

heugabel
07-26-2011, 08:37 PM
thank you