The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
how to add new var to exist template
Hello,
i want to insert a variable to exists template (formhome_level1_nopost) how can I do it? thanks. |
#2
|
||||
|
||||
using to the Preregister is the item your looking for..
I use it in my photobucket mod, just rendering a empty template to get the variable into existing templates, such as newthread, etc.. I also made a small mod with costum Terms of service showing on forumhome also used preregister there on Forumhome template. There is an article on its use in vb4 articles. |
#3
|
|||
|
|||
Quote:
there is no other way to get the variables? |
#4
|
||||
|
||||
well ofcourse manual edit the template, and the php file
And adding the normal register into the existing php file, then editing the template where you want to use the var. but hardly a way to go, cause when updateing the files might be updated aswell. and not shareable if makeing a shared mod, but if its just for your own site then manual editing is fine, templates will let you know when changed so you can edit them when upgrading versions. But if i where you, i would create a plugin, and run the preregister from there, then also add a Str replace to add the var into use in the template. its proberly to most "clean" way, plus easy to disable if theres problems. |
#5
|
||||
|
||||
Any examples on doing this? particularly with the footer. It appears the footer is cached so how do you append to a cached template?
|
#6
|
|||
|
|||
You can check this great article
https://vborg.vbsupport.ru/showthread.php?t=228078 And https://vborg.vbsupport.ru/showthread.php?t=233973 |
#7
|
||||
|
||||
Quote:
So basically what you're telling me is that there is no way to do it in the plugin? |
#8
|
|||
|
|||
Did this ever get solved? I think I have the same problem with setting a variable in the footer template (with preregister..)
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|