vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Upgrade templates on a hacked board (https://vborg.vbsupport.ru/showthread.php?t=36432)

Jawelin 03-22-2002 08:28 PM

Upgrade templates on a hacked board
 
When upgrading an hacked vbulletin using upgradeXX.php, only default templates are updated, but not modified ones.
Well; how could I manage by hand the new templates and apply all the differences just I could do with the php code ?
Tried to use for example TBS Hack (see here), but my customized templates aren't touched at all; so I haven't a FULL UPGRADE of the board, loosing some little fix or new feature, this way.

Thank you for any help.
:tired:

FWC 03-23-2002 01:55 AM

You can compare the default templates and the modified ones with a file compare utility just like the PHP files. That's the easiest way to do it if there are extensive changes.

Jawelin 03-23-2002 07:48 AM

Yeh. Of course.
The problem is : how could I upgrade the default templates if they are 'marked' as modified ?

All those templates listed as :
[edit] [revert to original] [view original] aren't upgraded at all...
Let's say: I'm on v2.2.2, now. How could I see 'how they should have been' in an UNhacked v2.2.4 board ?
How could I backup the original UPGRADED templates (parallel branch than mine hacked...) with TBS, for instance ?

Thanks

pogo 03-23-2002 08:24 AM

I don't know if the TBS hack is able to save the master templates as well. But you need them to compare them.

This is how I do template upgrades:
  • I save the original old master templates to text files
  • I save the original new master templates to text files
  • I use a file compare utility to compare the old and new template files
  • I insert the changes I find into my modified templates

I never used the TBS hack so it is possible that it can save the master templates.

I use this script: Save template to textfile

Admin 03-23-2002 08:26 AM

My hack does save master templates.

Jawelin 03-23-2002 08:53 AM

Quote:

Originally posted by FireFly
I'm thinking about writing a piece of code that can:
a) Write all templates to text files (kinda like this)
and more important
b) Can read all templates from text files and update database accordingly.

Why?
This would be great for upgrading. You can make two folders, one of the new templates (let's say the original v2.2.0 template), and another one for your customized template (let's say your own v2.0.3 template).
Now you can use something like Araxis or Beyond Compare to compare the files, update, and save everything to the database with ease!

Great, Chen!
As asked here, how could I with TBS:
- backup all master and modified templates
- upgrade all original templates with upgradeXX.php
- re-backup all master upgraded templates
- compare them each other (this is easier to me... :p)

????

Thanks

Admin 03-23-2002 09:11 AM

Open up tbs.php, and backup all templates to /before. Then upgrade vBulletin, and again backup all templates to /after. Now use Araxis Merge or Beyond Compare to compare these two folders, and save changes to the text files. After that, go to tbs.php again and this time import all templates from the /after folder.

Jawelin 03-23-2002 12:02 PM

Yes, easy.... ;)
... but:

when I save /before templates, all custom and default templates would be saved; only ONE copy for each template, even those modified... I.e. I save only the last version of everyone, I guess.

When I upgradeXX.php, only DEFAULT ORIGINAL templates are updated, not my customized version.

So, when I write them to /after dir, again I'd have only the lastest version of everyone. Not modified by me would be upgraded to 2.2.4, those customized by me, NOT !

Is it true ? What should be the utility to compare already upgraded templates ?

If it was right, I'm now searching a way to make all the original templates upgraded, then compare all of them with my customized one branch.
Not found till now... unless I use Araxis Merge against vbulletin.style checking one by one all templates modified between 222->223->224 ...
:confused:

Thanks again, FF.

Jawelin 03-23-2002 09:23 PM

This is what I mean (it comes from vb.com announcements )

Quote:

Originally posted by John
Changed Templates

Note: Upgrading will not overwrite any of your custom templates. If you have customized any template that is listed as 'modified' below, we seriously recommend using the 'revert' option to return them to the default template, then re-applying your customizations.

Actually, SHOULD I
- backup (tbs) all my templates
- find all changed ones on db and revert them to the original
- run upgrade16 and upgrade17 (2.2.2->2.2.4)
- backup (tbs) all original upgraded templates
- find (Araxis Merge) and reapply all differences
???

I definetively think a compare between the two or three .style file should be more efficient.... :D

:ermm: :ermm: :ermm:

Jawelin 03-24-2002 12:49 PM

Quote:

Originally posted by Jawelin
I definetively think a compare between the two or three .style file should be more efficient.... :D

:speechless:
NO! Too expensive !! :(
Too many differences... sob!

Let's try with template table on db... :) What's the exact meaning of templatesetid field and all the allowed (special) values ???

Well. I'm in the right middle of the 2.2.2 -> 2.2.4 upgrade procedure (successfully updated all the code and all the un-customized templates) ...
But loose as said all upgrades to my hacked templates... Please don't let me alone... now !!!! :p :p :p


Ahhh! Forgot to add this simple query to find all the customized templates (better, the version counter) directly into db:

Code:

SELECT title, count(*) as moltep
FROM `template`
WHERE 1=1
GROUP BY title
ORDER BY moltep DESC, title ASC

Thnx


All times are GMT. The time now is 10:00 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.01092 seconds
  • Memory Usage 1,739KB
  • 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
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete