vBulletin Mods

The Official vBulletin Modifications Site

Template Modification System
by Andreas
21 Jul 2007 14:13

10 Attachment(s)
Template Modification System
This modification allows easy management of template modifications.
Hack authors can define the necessary template modifications for their products.
When exporting a product, all template modifications assigned to this product
in MASTER style will be embedded into the product XML and imported on the
end-user vBulletin installation automatically if TMS is available.
Alternatively, it is also possible to create separate XML files for template modifications.
This way, 3rd parties can provide Template-Modification XML files for existing hacks.
Hack authors can also export standard template modification instructions as
textfiles to package them with their hacks, which allows users that do not
have TMS to also install them

In case the author defined modifications do not work (eg. the user uses a custom style),
the users can easily customize the modifications for their style(s).

TMS modified templates transparently, e.g. all Templates can still be modified
manually in style manager - they will appear unchanged there.

System Requirements
This Modification requires MySQL 4.1 or higher - it does not work with MySQL 4.0!
If you use MySQL 4.1 series, MySQL 4.1.10 or higher is required
If you use MySQL 5.0 series, MySQL 5.0.3 or higher is required
TMS 1.2.0 Beta 1 or higher requires vBulletin 4.1.5 or higher

vBulletin Compatibility
Versions up to and including 1.1.5 are compatible with vBulletin 3.6.X, 3.7.X and 3.8.X
Version 1.1.5 is partly compatible with vBulletin 4.0.X and 4.1.X
Version 1.2.0 Beta 1 or higher is compatible with vBulletin 4.1.5 or higher
vBulletin 4.1.11 or higher is currently not fully supported by TMS. If you use this version please apply the following patch: Attachment 136973

Please note that TMS puts a small branding/copyright notice in footer - see readme.txt for further details.

Version History
1.2.0 Beta 4
  • Bugfix: Database error when trying to add a template modification (this bug was introduced in TMS 1.2.0 Beta 3)

1.2.0 Beta 3
  • Changed: Converted hardcoded text to phrases
  • New Feature: Added doubleclick for editing style variables
  • Bugfix: Database error when trying to add a template modification with an existing varname to a different style
  • Changed: Fixed formatting of templateedits.php
  • Bugfix: Fixed erors when manually modifying a template with template modifications

1.2.0 Beta 2
  • Bugfix: Fixed errors in style variable editing code

1.2.0 Beta 1
  • Changed: Ported to vBulletin 4.1
  • New Feature: If an error occurs while trying to compile a template this error is now being disaplayed when trying to save the template modification
  • New Feature: Styles variables used in templates can be edited via AJAX from the modify template screen

  • Fixed Bug: Fixed incorrect variable type
  • New Feature: Box 'Template-Modifications' (shown on editing a template) can now be collapsed/expanded

  • Fixed Bug: Fixed HTML error/XSS in Template Modifications Manager

  • Fixed Bug: Added missing phrase on ACP home

  • Fixed Bug: Fixed Error with conflicting Template Modifications when importing a product
  • Fixed Bug: Removed Pre-Selection of processing mode when adding new modifications
  • Fixed Bug: Fixed Bug with zlib.output_compression AND vBulletin internal gzip being both turned on
  • Fixed Bug: Display search results correctly
  • Fixed Bug: Added missing phrase 'varname_x_already_exists'
  • New Feature: Automatically rebuild template modifications after vBulletin Upgrade

  • Changed: Several files renamed
  • Fixed Bug: Fixed incorrect handling of product ids that contain only numbers
  • New Feature: Search text can be search in template when editing a Template-Modification in Style Manager
  • Changed: Multiple Template-Modifications can be loaded via AJAX
  • First Release on vBulletin.org

1.0.0 RC 1
  • Fixed Bug: All Bugs reported for Beta 4 have been fixed
  • Changed: Display of modified Templates with HTML comments has been modified
  • Changed: Debug-Mode is no longer required
  • New Feature: It is now possible to export/import style-specific Template-Modifications

1.0.0 Beta 4
  • Fixed Bug: All Bugs reported for Beta 3 have been fixed
  • Changed: Sorting in Template Modifications Manager has been changed
  • New Feature: When adding or editing a Template-Modification, the Template can now be displayed and searched via AJAX
  • Changed: When exporting as Text, the original instructions (eg. insert below/above) are retained
  • New Feature: It is now possible to test each Template-Modification
  • New Feature: Testing improved. It is now being display if a Template is OK after applying a Template Modification
  • New Feature: When editing a Template, it is possible to activate/deactvate multiple Template-Modifications
  • New Feature: Template-Modifications can now also be exported and tested from withing Product Manager
  • New Feature: Function to display a template with all Modifications applied.
    This function can also display embedded comments to make it easier to identify changed parts

1.0.0 Beta 3
  • Fixed Bug: All Bugs reported for Beta 2 have been fixed
  • New Feature: Simplified adding Template-Modifications by allowing to select how to handle replacement text (eg. replace or insert above/below)
  • New Feature: Each Template-Modification can now be disabled
  • Changed: Testing Template-Modifications has been reworked:
    Column ordering can now be set through vBulletin Options; column headers are clickable to sort results
    Output has been separated by styles
    It is now possible to test only selcted products
  • New Feature: TMS now integrates with 'Style Manager' and 'Product Manager'
  • New Feature: The language can be selected when exporting Template-Modifications
  • New Feature: Weh TMS gets deactivated, all Template-Modifications will be deactivated too
  • New Feature: Display of Template-Modifications while editing a Template in Style Manager has been improved:
    It is now being display if a Template-Modification could be applied
    Template-Modifications can be edited via AJAX

1.0.0 Beta 2
First public Beta

Frequently Asked Questions (FAQ)
by Andreas
21 Jul 2007 14:14

Why should I use TMS? Most products modify templates automatically.
Many product nowadys do not require manual template edits any longer - they automatically modify templates during runtime.
This is easy for the user - as long as the author-defined serch texts can be found.
If this is not the case, the user must manually edit templates, or modify the plugins of the product.
Both options have drawbacks: If you manually modify templates, those templates are not automatically updated upon vBulletin updates.
Modifying the plugins means that you have to do this every time you update the product.
Furthermore, modifying the templates at runtime costs performance.

TMS does not have these disadvantages: The User can easily customize author-defined template modifications.
Those modifications are kept on vBulletin updates and continue to work - as long as the part of the template
the modification is refering to is not modified.
TMS also does not execute any code in the frontend at runtime, eg. there is no overhead at all.

I tried to customize a Template modification but I got an error that the template is not customized?
TMS can only operate on custom/customized templates. If a Template is inherited from a parent style and you
want to customize a Template-Modification for this Template, you must either customize the template in the
destination style or customize the Template-Modification for the template in the parent style it was inherited from.

I tested template modifications, but all modifications seem to be missing in my styles - there are only results for MASTER
As said before, TMS can only operate on custom/customized templates.
If templates in a certain style are inherited from parent styles, you will get no results for these template in the child style.

I tried to import a Template Modification XML but got an error that this is not a valid product?
Template Modification XML files are no products.
You must import them through ACP / Styles & Template / Template-Modifications Manager

How can I use TMS for already installed hacks for which I have manually modified templates?
If a Template-Modifications XML is already available for this hack, just undo the template edits you did manually.
Afterwards, go to ACP / Styles & Template / Template-Modifications Manager.
Click Up-/Download Template-Modifications and import the XML.
If you want to test if everything is OK, got to ACP / Products & Plugins / Manage Products and
select Template-Modifications / Test from the dropdown

If no Template-Modifications XML does exist, you must add the modifications to TMS yourself.

How can I add Template-Modifications to TMS?
Go to ACP / Styles & Templates / Template-Modifications Manager
In the style where you want to add the Template-Modification, select 'Add Template-Modification' form the dropdown.
If you want to add a Template-Modification to all styles add them to the MASTER style.
Please note that you can only add Template-Modifications for templates that are custom/cusomized in the choosen style.
On the next page, select the product and template for which you want to add a template modification.
Enter a short, descriptive tilte and chose a varname.
The varname must be uniqe and can only consist of alpha-numeric characters (eg. a-z, A-Z, 0-9, - and _);
you can choose any varname you want - it is just used to identify Template-Modifications internally.
Make sure that active is set to 'Yes'.
Search order can normally be left at the default value (5); this only needs to be changed if
several modifications operate on the same position in the template and thus their order is important.
Copy the text that should be searched into textarea 'Search for Text', copy the text that should replace
the previous text (or get inserteb below or above it) into the following textarea and choose the
appropriate mode (eg. Replace, Isert Below or Insert Above).
If you still have the installation instructions for you hacks, this can be mostly done with copy & paste.

Where can I get Template Modifiction XML files?
There are several XMLs already available at vBHacks-Germany.org.
Also, some products released on vBuleltin.org by Surviver, Stoebi (and maybe some other german authors too) already do have TMS data in their product XML files.

Surviver 21 Jul 2007 14:14

3 Attachment(s)
Thank you Andreas, Great Add-On :)

Installed & Nominated for MotM

PS: Some TMS-XML Files attached

Yours Truly 21 Jul 2007 14:15


Originally Posted by Andreas (Post 1297359)
*** reserved for FAQ ***

Wow your 1st 3.6.x would be awesome to see some 3.5.x ports =]

Kihon Kata 21 Jul 2007 14:54

I'll try this soon, I've DL'ed it.

I can tell you one thing, I am afraid of this:


The maintenance function 'Rebuild all Styles' MUST NOT be executed when the Plugin System or TMS is disabled!
What happens if one does this?

Hellboys 21 Jul 2007 15:28

One of the best Hack on VB !

Many Thanks Andreas for providing this great work.

Andreas 21 Jul 2007 15:57


Originally Posted by Kihon Kata (Post 1297398)
What happens if one does this?

You wil get database errors becasue a necessary field will be deleted if you tick "Renumber all Templates".

TCattitude 21 Jul 2007 20:45

Welcome back to "the dot org", Andreas.
Thanks for all your releases (and, of course, TMS) ;)

4number8 21 Jul 2007 22:54

Nice work Andreas, many thanks for this!

hcmagix 22 Jul 2007 00:40


Originally Posted by Hellboys (Post 1297418)
One of the best Hack on VB !

Many Thanks Andreas for providing this great work.

We use this hack some months ago and its the best hack ever seen. Fine that the english speaking world can use the hack now :)

Have fun and no more stress by vbulletin upgrade :)

special thanks to Andreas aka Kirby

Paul M 22 Jul 2007 02:31


TMS can only operate on custo/customized templates.
Perhaps I'm not understanding this - are you saying that if I am using a style (let's call it 'My-Style') that is a child of the MASTER STYLE then TMS will not work on any of the 'My-Style' templates unless they are customised versions in My-Style (i.e. not inherited from MASTER) ?

This seems to be a bit of a big drawback as that's how most forums I've seen are set-up.

alessai 22 Jul 2007 02:42

:confused: hmmmm i didnt get it?!!!
so what does it do exactly? it make the changes for certain style into another ? or what?!!

:p sorry if i sound stuiped

Andreas 22 Jul 2007 09:05


Originally Posted by Paul M (Post 1297856)
Perhaps I'm not understanding this - are you saying that if I am using a style (let's call it 'My-Style') that is a child of the MASTER STYLE then TMS will not work on any of the 'My-Style' templates unless they are customised versions in My-Style (i.e. not inherited from MASTER) ?

No. It means:
If your postbit template is not customized in style 'My Style' (which inherits from MASTER), you can't apply modifications to this template that are different from the modification applied to MASTER postbit template.
Technical background: Templates that are inherited only exist as references.


so what does it do exactly?
Basically: It allows you to modify templates without customizing them.
This means, that your modifications will still work after vBulletin updates - vBulletin will not 'complain' about outdated templates.
It means that you don't have to edit templates manually if the product support TMS - just install/uninstall/activate/deactivate, the template stuff will be done automatically.
All this is done without any overhead at frontend runtime.

If you are using this modification and have added template-modifications for products released on vBulletin.org to your installation - feel free to export your XMLs and share them with others here.

D&Y 22 Jul 2007 09:09

Excellent !! Works Great !!

D&Y Clicks Install !

MrZeropage 22 Jul 2007 09:13

Fantastic thing, good to see it is final 1.0.0 now :)

Thanks for this handy tool !

All times are GMT. The time now is 14:17.

Powered by vBulletin® Version 3.8.12
Copyright © 2019, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.