View Full Version : how to add new var to exist template
YsTyle
02-20-2010, 07:32 AM
Hello,
i want to insert a variable to exists template (formhome_level1_nopost)
how can I do it?
thanks.
Vaupell
02-20-2010, 08:52 AM
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.
YsTyle
02-20-2010, 08:59 AM
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.
Thanks for commenting.
there is no other way to get the variables?
Vaupell
02-20-2010, 09:41 AM
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.
TalkVirginia
03-03-2010, 01:54 PM
... 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.
Any examples on doing this? particularly with the footer. It appears the footer is cached so how do you append to a cached template?
ChopSuey
03-03-2010, 02:02 PM
You can check this great article
https://vborg.vbsupport.ru/showthread.php?t=228078
And
https://vborg.vbsupport.ru/showthread.php?t=233973
TalkVirginia
03-03-2010, 02:23 PM
You can check this great article
https://vborg.vbsupport.ru/showthread.php?t=228078
And
https://vborg.vbsupport.ru/showthread.php?t=233973
Thanks for your suggestions.. but I've read and re-read these articles still I'm just about bleeding from my eyes, nose and ears.. and still no success.
So basically what you're telling me is that there is no way to do it in the plugin?
Did this ever get solved? I think I have the same problem with setting a variable in the footer template (with preregister..)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.