vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Administrative and Maintenance Tools - Template Modification System (https://vborg.vbsupport.ru/showthread.php?t=152931)

Andreas 07-20-2007 10:00 PM

Template Modification System
 
1 Attachment(s)
Template Modification System
Description
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

Branding:
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

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

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

1.1.3
  • Fixed Bug: Added missing phrase on ACP home

1.1.1
  • 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

1.0.0
  • 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

Andreas 07-21-2007 01:14 PM

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.

Surviver 07-21-2007 01:14 PM

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

Installed & Nominated for MotM

PS: Some TMS-XML Files attached

Yours Truly 07-21-2007 01:15 PM

Quote:

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 07-21-2007 01:54 PM

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

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

Quote:

Warning
-------
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 07-21-2007 02:28 PM

One of the best Hack on VB !

Many Thanks Andreas for providing this great work.

Andreas 07-21-2007 02:57 PM

Quote:

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 07-21-2007 07:45 PM

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

4number8 07-21-2007 09:54 PM

Nice work Andreas, many thanks for this!

hcmagix 07-21-2007 11:40 PM

Quote:

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


All times are GMT. The time now is 02:36 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01786 seconds
  • Memory Usage 1,786KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete