The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
cache_templates & $globaltemplates?
Hello everyone, I started making xml products a few days ago, I have learned alot from our amazing coders and designers on here! Pretty much everyone has been amazingly helpfull. And thanks to all of you!
Ok here we go, I am here to ask about a few things, like using the caching & hook code for creating products, and the $globaltemplates variable.... I have had a lot of help with the caching, but about the $globaltemplates I feel kinda lost! I tried to use the replacement code and the <hookname> for cache_templates, and then I moved to the phpcode, and while I was writing the phpcode using the hookname and cache_templates for my footer or header template, what i found out was.... that my replacement code could not replace the codes in my header and footer template, and same thing using it to replace codes in my navbar template. Still didnt work! What am I doing wrong? I will past my code so you can take a look: Here is the HOOK for caching my template below: Code:
<hookname>cache_templates</hookname> and my PHPCODE: Code:
$globaltemplates = array_merge($globaltemplates, array('MYCODENAME')); Code:
if ($vbulletin->options['social_five_on']) { $replace = '$ad_location[ad_footer_start]'; $vbulletin->templatecache['footer'] = str_replace($replace,$replace.fetch_template('MYCODENAME'),$vbulletin->templatecache['footer']); It suppose to Replace a code in my footer called $ad_location[ad_footer_start] with my code, is this done right? Thank you very much in advance for your responses! |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|