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)

aharown07 10-07-2008 01:10 PM

Quote:

Originally Posted by flypaper (Post 1638478)
Have you ever done a template edit for a hack? Find this, replace with that? Find this, enter this below it? etc?

Mostly I've commented out code, pasted in new code, etc. But when I did that in the situation I described above, I still got "Please select the processing mode."
What's that?

aharown07 10-10-2008 01:35 AM

Quote:

Originally Posted by aharown07 (Post 1639363)
Mostly I've commented out code, pasted in new code, etc. But when I did that in the situation I described above, I still got "Please select the processing mode."
What's that?

I think I figured out what "processing mode" is. It's maybe the blank dropdown that appears on the left side of the Edit Template Modification form above the "Large Edit Box" button? Seems that if I select something there before I click Save, I don't get the error.
But the template doesn't seem to be modified either... at least, when I display it afterwards, it looks the same as it did before.
I'm afraid I'm not finding the form intuitive at all. A step by step guide would sure be helpful.

fly 10-10-2008 01:44 AM

But thats the point, the template itself remains the same, so upgrades happen flawlessly. I'm really not sure how it could be explained better. Maybe you should stick to template edits... :P

dartho 10-10-2008 04:00 AM

TMS (Template Modification System" is a tool for making modifications to existing templates.

Lets say you have a vbulletin template which had the following line in it:

HTML Code:

<div>This is the title!</div>
and you wanted to modify this template so that the phrase "This is the title!" was bolded.

You could simple edit the template and add appropriate tags, and viola - it would be done. However, a future version of vbulletin may update that template and then you would need to re-apply the edits.

Using TMS, you can 'Search for Text' <div>This is the title!</div> and choose to 'Replace with Text' <div><strong>This is the title!</strong></div>

and TMS will edit your template for you.

If a future release of vBulletin modifies that template, your edit will remain - if it modifies the section of teh template you have edited, you will be alerted to this and will then be able to easily update your TMS edits.

I have a heavily customised site based on the default style - ALL of it is done with TMS - my last upgrade required zero additional effort other than uploading files and running the upgrade script.

Learn how to use it - you'll be glad you did!

aharown07 10-10-2008 02:06 PM

Thanks for your patience! I think I get it now... but really this time. http://www.freesmileys.org/smileys/basic/dunce.gif

You don't really change the templates, you store your changes and TMS applies them as though you changed the template.
So... TMS doesn't actually "modify templates." That's what was tripping me up... I'm just way, way too literal at times (ADHD? autism? Nah... just a nutcase). Seriously though, who would have thought "Template Modification System" was a "system for avoiding actual modifications to templates"?

I definitely see that avoiding actually changing the templates is the advantage though.
So... since I have a number of templates already edited, what I could do now is put those edits in text files temporarily, revert all the templates and then use TMS to faux-modify them. Then, going forward, vBulletin just sees unmodified templates and upgrades them normally while TMS continues applying my "modifications."

A couple questions though: what happens if...
1. My "insert after" string is not unique... will TMS apply my new code more than once?
2. A future template upgrade by vB removes/alters the string I placed my modification in place of/after/before?

aharown07 10-10-2008 02:10 PM

Quote:

Originally Posted by aharown07 (Post 1641952)
2. A future template upgrade by vB removes/alters the string I placed my modification in place of/after/before?

This one's already been answered... it notifies you at upgrade time.

Black Tiger 10-10-2008 02:26 PM

1.) I'm not sure about that, but if it's not unique, just paste more code in the "search for" window (the upper window) so that it -is- unique. If done that way, you are always sure it only changes the one thing you want changed.

2.) vB upgrade will change nothing of your TMS system. If a template get changed by vBulletin this is what happens:
a.) You upgrade your vbulletin
b.) You login to your admincp
c.) TMS system will doe a check automatically or at least if you refresh your screen once. Then it will see things are changed, you get a list of OK templates which you changed in TMS, but the templates which are change by vBulletin will get a sign that it's not oke, you will get notified.
d.) You check the original vB template for the changed code and change the changed code in your TMS system.
e.) Rerun the template check from TMS and all will be fine.

lgnd 10-12-2008 08:24 PM

Thanks for this great mod! Installed and nominated!

fly 10-12-2008 08:35 PM

Quote:

Originally Posted by flypaper (Post 1634910)
Instead of setting a hard limit, I just set it to 'On' and I also tried 128k. When I did that, I got even weirder results: A white page with text, but no templates at all. Since I can't get it working with this latest update, and I can't live without TMS, I have disabled output buffering. If you have any other suggestions, I'd love to hear em. Thanks!

Okay, even with output buffering disabled, I am unable to add a new style. If you have any time to look at this, I'd really appreciate it. In the meantime, it looks like I can disable the hack, add a new style, and reenable it.

aharown07 10-17-2008 05:34 PM

I think I have the concept now, but some how-to is still eluding me.
I want to change the way the private message quota progress bar displays. I'm told this is in the pm_messagelist template.

So I go to the Template Modifications Manager and select "Add Template Modification" under Default style.
Problem: the Template dropdown doesn't show pm_messagelist as an opition... in fact it only shows a dozen or so templates.
This must have something to do w/what I was discussing earlier... can only modify customized templates? But I got the impression there was no need to create a new style, so not sure where to go next.


All times are GMT. The time now is 12:15 AM.

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.04605 seconds
  • Memory Usage 1,750KB
  • 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
  • (1)bbcode_html_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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