The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Templatecache vB 3.8 to vB 4.0
Im in the process of upgrading my custom plugins from vB 3.8 to 4.0 and the fetch_template doesnt exist anymore. Not a problem but replacing/modifying templates that are cached is now a problem. There are no hooks where I need them so this still has to be the way I have to do it. It works in 3.8
This is a simplified example of a plugin in parse_templates: Code:
$find = '{vb:rawphrase all_times_are_gmt_x_time_now_is_y}'; $replace = ' Blah'; $vbulletin->templatecache['footer'] = str_replace($find, $find.$replace, $vbulletin->templatecache['footer'])); |
#2
|
||||
|
||||
Wow, a whole day and not a single response. This site really isnt what t used to be.
Ive been searching and reading and the examples dont work for me. |
#3
|
||||
|
||||
Do you want to elaborate how they are not working? Any reason you you can't just piggy back the phrase and add more information to it?
|
#4
|
||||
|
||||
Thanks for the reply.
It wasnt matching on the phrase like posted. Which template field should I be using to match upon? The "template" field or the "template_un" field as the phrase constant is in different format between the two? I tried both. I got around it for now by matching some html instead but Im sure I cant rely upon that for the other plugins. Phrase replacement variables are better place markers. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|