![]() |
Footer Template
I am trying to do a str_replace in the footer so my edit shows up on every page but vB doesn't seem to like it. The function works fine on every page as long as it's not in the footer.
Is there a way to do this on all pages or is there a more simple way to str_replace in the footer? Example Code:
$vbulletin->templatecache['FORUMHOME'] = str_replace($find, $replace, $vbulletin->templatecache['FORUMHOME']); |
Well first off, you are doing the replace on th forumhome template, not the footer.
|
Quote:
|
Well then you need to show exactly what it is you are trying to do, as providing some random example don't help to figure out what the issue is. :)
|
What hook are you using? If you want to do a replacement on the footer in the template cache then you pretty much need to use hook parse_templates for it to always work right.
|
I'm using process_templates_complete I think. Not sure as I'm on my phone at the moment.
|
Quote:
|
Quote:
|
The same way you do it for the template cache, except you use $footer instead of $vbulletin->templatecache['footer']. But it's been rendered at that point so the "find" might not be the same as it is for the cache.
But that was just an option. It's probably easier to just change the hook location to parse_templates. |
OK, cool.
I have made my own hook like this using hook: process_templates_complete Code:
global $vbulletin; |
All times are GMT. The time now is 05:26 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|