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.

fly 10-17-2008 06:10 PM

Sounds like you're running into the same problem that I had. My output_buffer was set too low. iirc, thats a apache config, check with your host...

I'm still having problems with it when adding styles, but I just disable TMS, add the style, and re-enable TMS.

dartho 10-17-2008 09:02 PM

You should make template modifications under MASTER STYLE

dodjer42 10-24-2008 06:52 AM

Can this be used after templates have already been modified? Or is it meant for a fresh install?

fly 10-24-2008 09:18 AM

Check one or two pages back for a whole conversation on that. Yes.

Black Tiger 10-24-2008 10:43 AM

Quote:

Can this be used after templates have already been modified?
This is the "yes" part.:)

Mondi 11-04-2008 06:13 AM

1 Attachment(s)
Hey all:

Two things:

Thanks for great mod - just installed it and I can see this working for us at GBLCG.com.

However - thing II - I am now receiving the following error message on all pages:

Quote:

Unexpected Call to Method or Property Access
See Attachment.

Any wisdom on how to tackle this pesky little issue welcomed with joy!

Cheers!

dartho 11-07-2008 09:56 PM

I'm testing a 3.8 beta2 upgrade. I had had TMS 1.0.0 installed, after upgrading the site to 3.8b2 (from 3.7.2 PL1) editing a Template Modification resulted in it disappearing/being deleted without warning

I exported the template edits from my live site, upgraded test site to TMS to 1.1.4, truncated the "templateedit" table in the DB, imported template edits (ignoring version and allowing overwrite) and tried again. The same thing happens.

Edit: I've got Mysql Version 5.0.51a. I noticed on vb-germany that you mention that it only with MySQL 4.1.x version 4.1.10 and MySQL 5.0.x version 5.0.3. Could this be the issue?

Andreas 11-15-2008 11:40 AM

No, it's a 3.8 issue.
An updated package will be released soon.

dartho 11-15-2008 10:23 PM

Excellent, thank you.

Vinyljunky 11-18-2008 02:30 PM

Great mod installed and working for some time now :up:

Id like to use it for the VBStatus template mods such as:


PHP Code:

    Template Edit 1headinclude
    
    Add the Following HTML code to the BOTTOM of your template
:
    
<!--
BEGIN VBSTATUS-->
<!--
BEGIN VBSTATUS-->
<!--
BEGIN VBSTATUS-->
<if 
condition="$vbulletin->options['vbstatus_active']">
<
div id='mypopup' name='mypopup' style='z-index:1000; position: absolute; background: none; border: none;'></div>
<
script type="text/javascript" src="vbstatus/ajax_wrapper.js"></script>

<
script type="text/javascript" src="vbstatus/headerjavascript.js"></script>
</if>
<!--
END VBSTATUS-->
<!--
END VBSTATUS-->
<!--
END VBSTATUS--> 

How do I get TMS to add the code at the bottom?

Thanks :o

thincom2000 11-21-2008 05:07 PM

Quote:

Originally Posted by Andreas (Post 1666063)
No, it's a 3.8 issue.
An updated package will be released soon.

Yeah, they aren't deleted, they are just saved with a styleid = 0. In the update GPC list, ismaster was TYPE_NOOL, and styleid was TYPE_UINT. I had made a few changes to the product a while back to fix some content encoding issues I was having, but I don't think I messed with this.

Changing these to TYPE_BOOL and TYPE_INT respectively fixed any further "disappearances" in 3.8 for me.

fly 11-21-2008 05:16 PM

Quote:

Originally Posted by Andreas (Post 1666063)
No, it's a 3.8 issue.
An updated package will be released soon.

Any chance you've seen my posts and think its something you might be able to fix in this next version?

https://vborg.vbsupport.ru/showpost....&postcount=409

momo2 11-27-2008 05:30 PM

Also how do i get rid of the footer advertising for tms

Vinyljunky 11-28-2008 09:37 AM

Quote:

Originally Posted by Vinyljunky (Post 1668096)
Great mod installed and working for some time now :up:

Id like to use it for the VBStatus template mods such as:


PHP Code:

    Template Edit 1headinclude
    
    Add the Following HTML code to the BOTTOM of your template
:
    
<!--
BEGIN VBSTATUS-->
<!--
BEGIN VBSTATUS-->
<!--
BEGIN VBSTATUS-->
<if 
condition="$vbulletin->options['vbstatus_active']">
<
div id='mypopup' name='mypopup' style='z-index:1000; position: absolute; background: none; border: none;'></div>
<
script type="text/javascript" src="vbstatus/ajax_wrapper.js"></script>

<
script type="text/javascript" src="vbstatus/headerjavascript.js"></script>
</if>
<!--
END VBSTATUS-->
<!--
END VBSTATUS-->
<!--
END VBSTATUS--> 

How do I get TMS to add the code at the bottom?

Thanks :o

Any ideas to answer the above would be very welcome :)

In short: How do I get TMS to add stuff to the bottom of a template?

Thanks

VJ

K4GAP 12-01-2008 02:41 PM

I am like so many vb'ers in that I frequent this board looking for something to make my life easier as both a license holder and fan of Vbulletin.

My question is this...

I have a heavily modded style that I have played with and tweaked for months. I also have a bunch of mods installed. If I install this "TMS" what problems are there that I am likely to encounter?

dartho 12-02-2008 08:58 AM

1 Attachment(s)
Andreas - is there a manual work around to the 3.8 incompatibility?

Quote:

Originally Posted by Vinyljunky (Post 1674475)
Any ideas to answer the above would be very welcome :)

In short: How do I get TMS to add stuff to the bottom of a template?

Thanks

VJ

Search for
Code:

<!-- logo -->
and add below

-or-

I've attached my vBstatusTMS edits - try importing this

Deepdog009 12-02-2008 10:57 PM

Great Mod Andreas... Updating templates without it,,, is a pain in the A$$...;)

drsli 12-07-2008 10:13 AM

I simply love this modification and for me it?s definitely the most important enhancement for any vb-upgrade. I just can say "Thankyou so much" for giving us this tool.

Quote:

Originally Posted by thincom2000 (Post 1670173)
Changing these to TYPE_BOOL and TYPE_INT respectively fixed any further "disappearances" in 3.8 for me.

Could you please explain the steps to do this for a non-programmer, if it?s not too much striking out? I don?t fear to change any code, but I don?t know where to search for this type-variants.

I came across the same issues with diminishing template-edits, searched my database and found the described styleid-variable in the database. But in the end I made a switch back to 3.74pl1 to be safe with TMS.

dartho 12-07-2008 11:07 PM

I've not tested this personally yet, but thincom2000 was referring to the templateedits.php file. TO apply his/her 'fixes' for version 1.1.4:

Edit the admincp/templateedits.php file, search for :
PHP Code:

// update a modified templateedit
if ($_REQUEST['do'] == 'update')
{
    
$vbulletin->input->clean_array_gpc('p', array(
        
'searchorder' => TYPE_UINT,
        
'searchstr' => TYPE_NOTRIM,
        
'replacestr' => TYPE_NOTRIM,
        
'styleid' => TYPE_UINT,
        
'oldtemplate' => TYPE_STR,
        
'template' => TYPE_STR,
        
'title' => TYPE_NOHTML,
        
'oldproduct' => TYPE_STR,
        
'product' => TYPE_STR,
        
'varname' => TYPE_STR,
        
'oldvarname' => TYPE_STR,
        
'templateeditid' => TYPE_INT,
        
'templateeditlocationid' => TYPE_INT,
        
'method' => TYPE_STR,
        
'active' => TYPE_BOOL,
        
'ismaster' => TYPE_NOOL
    
)); 

and replace with

PHP Code:

// update a modified templateedit
if ($_REQUEST['do'] == 'update')
{
    
$vbulletin->input->clean_array_gpc('p', array(
        
'searchorder' => TYPE_UINT,
        
'searchstr' => TYPE_NOTRIM,
        
'replacestr' => TYPE_NOTRIM,
        
'styleid' => TYPE_INT,
        
'oldtemplate' => TYPE_STR,
        
'template' => TYPE_STR,
        
'title' => TYPE_NOHTML,
        
'oldproduct' => TYPE_STR,
        
'product' => TYPE_STR,
        
'varname' => TYPE_STR,
        
'oldvarname' => TYPE_STR,
        
'templateeditid' => TYPE_INT,
        
'templateeditlocationid' => TYPE_INT,
        
'method' => TYPE_STR,
        
'active' => TYPE_BOOL,
        
'ismaster' => TYPE_BOOL
    
)); 


dartho 12-08-2008 03:21 AM

After initial testing on a NOT LIVE site, the above change by Thincom2000 appears to address the issues under 3.8RC1.

drsli 12-08-2008 11:01 AM

Thank you very much, dartho, for these infos! :)

fly 12-17-2008 07:55 PM

Quote:

Originally Posted by flypaper (Post 1670179)
Any chance you've seen my posts and think its something you might be able to fix in this next version?

https://vborg.vbsupport.ru/showpost....&postcount=409

BTW if you care, I changed a bunch of things and now everything seems to work. Don't know what fixed it.

- Upgraded to 3.7PL1
- Upgraded TMS
- Disabled output_buffering (According to this it should be off if I have gzip enabled)
- Prolly some other stuff that I forget

fly 12-17-2008 08:28 PM

Can anyone confirm or deny this bug?

Attempt to create a new template mod (under vBulletin), select a template (I used navbar), click 'View Template', when the template shows up at the bottom - attempt to use the search feature and look for 'hello'. I get the following error:

Not Found

The requested URL /admincp/.php was not found on this server.

dartho 12-17-2008 11:02 PM

not happening under TMS 1.1.4

momo2 12-21-2008 03:43 AM

this does not work at my forums, can it be it does not work on 3.7 versions ? also the footer showing ur site !!! how to get rid of it !!! its not like saying about ur hack, its more that driving traffic to ur site !!!! its not like saying your copy right but its more like getting 1 million visitors heading ur site.. hacked removed !!!!

MrZeropage 12-21-2008 05:58 PM

TMS is the most useful thing I ever met.

You can buy a branding-free-license to remove the (linked) copyright-footer.

It works fine on vBulletin 3.7.4PL1 :)

Andreas 12-23-2008 06:56 PM

@flypaper
Hmm, I havn't been able to reproduce this yet, but sounds like a JavaScript problem.

@momo2
It works just fine with 3.6.x, 3.7.x - I used it on dozens of production sites (both 3.6 and 3.7).
I did not extensively test it (yet), but it should also work just fin with 3.8 RC 2

momo2 01-04-2009 12:02 AM

Adereas, it does work but not with all the skins, but my main, complaint is why u have tm showing in my footer, which i have no problem with as long it goes to this post, or to ur hack post in ur site, but than again u what i am saying..

Andreas 01-04-2009 03:34 PM

TMS works with any style. However, if there are customized templates in your style you might have to customize the template modifications as well.

Stoebi 01-04-2009 03:36 PM

Works fine with 3.8 RC2 also.


All times are GMT. The time now is 10:38 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.02040 seconds
  • Memory Usage 1,872KB
  • 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_code_printable
  • (1)bbcode_html_printable
  • (4)bbcode_php_printable
  • (12)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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