Thread: Administrative and Maintenance Tools - Template Modification System
View Single Post
  #3  
Old 07-21-2007, 01:14 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
http://vbhacks-germany.org/showthread.php?t=5584
http://vbhacks-germany.org/showthread.php?t=5833
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.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02286 seconds
  • Memory Usage 1,789KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete