View Full Version : Auto Template Edit - Question
crazyace
03-18-2010, 10:03 PM
Hello Everyone,
I'm new to working with vB code. I have worked with phpBB for about 4 years now and am in love with the fact that vB can let users upload xml files to install mods. I would like to start working on making xml files for users to use and not do manual edits. The only problem, is that I don't know where to start. So I would like the community for some help on how to start this process.
For my first one, I want to create a product file to do a template change. The mod that I created can be found here -> https://vborg.vbsupport.ru/showthread.php?t=238554
So any help would be awesome :)
Vaupell
03-18-2010, 11:08 PM
In general changeing the templates is a bad idea,
cause updates = reverts, template changes etc etc..
I personally prefer makeing a plugin, and inside the plugin
i find the place where i want the code inside the original template
and then use php via str replace to add my new content.
And then when vbulletin is updated, i donot have to worry about people
updateing, cause if vb changes the template it simple stops working without
creating major errors, and i can update my modification with minor changes to the plugin.
I made a mod extremely simple, without editing templates
i used str replace and added code into forumhome template via vbulletins cache..
exsample Costum tos (https://vborg.vbsupport.ru/showthread.php?t=236484)
check out the plugins this modification adds.
it looks like alot, but thats becourse my entire template code is placed in the plugin
instead of in a template..
i render a blank template, cause some boards wont show the mod otherwise.
so thats "just in case"
crazyace
03-19-2010, 02:02 AM
In general changeing the templates is a bad idea,
cause updates = reverts, template changes etc etc..
I personally prefer makeing a plugin, and inside the plugin
i find the place where i want the code inside the original template
and then use php via str replace to add my new content.
And then when vbulletin is updated, i donot have to worry about people
updateing, cause if vb changes the template it simple stops working without
creating major errors, and i can update my modification with minor changes to the plugin.
I made a mod extremely simple, without editing templates
i used str replace and added code into forumhome template via vbulletins cache..
exsample Costum tos (https://vborg.vbsupport.ru/showthread.php?t=236484)
check out the plugins this modification adds.
it looks like alot, but thats becourse my entire template code is placed in the plugin
instead of in a template..
i render a blank template, cause some boards wont show the mod otherwise.
so thats "just in case"
Thanks for the advice man. Now I just need to find out how to really do that. I know that some mods are based off of hooks in vB from what I have been reading. So my mob that I have, is about adding Twitter to vBSEO Social Bookmarking. So I guess I need to think of a new mod to come up with. Because, you add some code to vBSEO and then do the small template edit to tell vBSEO where to put the bookmarks. Could I make my own template and add the vBSEO code to that and then have that some how work into the postbit?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.