The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Issues with modifying templatecache
Hello, all.
I'm attempting to replace a string in the footer template, and I'm running into an issue. Code:
$z_name = 'footer'; if (isset($vbulletin->templatecache[$z_name])) { $z_temp = $vbulletin->templatecache[$z_name]; $str_search = "injected_data"; $str_replace = "fubar_123"; // This works: $z_temp = str_replace($str_search, $str_replace, $z_temp); // This doesn't: $vbulletin->templatecache[$z_name] = $z_temp; } Any help would be appreciated! |
#2
|
||||
|
||||
Where do you have your plugin hooked?
|
#3
|
|||
|
|||
It's hooked to global_complete - is that too late in the process?
|
#4
|
||||
|
||||
I usually hook auto-template edits at "process_templates_complete". I can't say your hook is wrong per se, but give that one a try and see if you get the desired result.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|