Version: , by Admin (Coder)
Developer Last Online: Nov 2024
Version: 2.2.x
Rating:
Released: 12-08-2001
Last Update: Never
Installs: 248
No support by the author.
Hi everyone.
Here's my newest hack, called Template Backup System (TBS).
This is a very powerful tool for backing up and restoring your templates, especially good for upgrades.
I know you can do this using vBulletin's buil in style manager, but the beauty in this hack is that it exports only templates, and further more - they are saved to individual files in a folder you choose.
Why you ask? This could help a lot when upgrading to a new version of vBulletin. Just like you can compare files using programs such as Araxis Merge or Beyone Compare, you can now also compare templates, and easily keep track of changes that were done between versions.
After you save all changes to the template files, you use this script again only this time in the opposite directions - restoring the templates back into the system.
[hr=white][/hr]
This hack was in testing process for quite some time now, over a week and a half actually.
It has been tested extensively by the magnificent Hooper, and I truly believe it's 99% bug-free.
Most of the features in the hack are actually his ideas, so thanks a lot Rick!
[hr=white][/hr]
Before I continue, I need to say the expanding / collapsing feature will only work on Internet Explorer. It was only tested on it really, but I think the style.display thing is only supported by it.
Anyway, let's install this baby.
First of all, we need to edit admin/index.php a little bit.
Find this:
[high]template_identifier[/high] is the beginning of each template in this group, and [high]Group Name[/high] is the name of this group.
When saying "Using this requires a minimum amount of RAM." I am not kidding. If you don't have enough memory your browser will simply crash when clicking the Check All box. Trust me.
Make sure the folder you are saving templates into is CHMODed 0777, or PHP will not be able to create files in it. Also, the folder is a relative path to the admin folder, not the forums folder!
[hr=white][/hr]
That's all I have to say.
Feedback and feature requests are welcomed as always!
Have fun!
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
My Linux server prevents the export function from working. I also don't own the server. So I made modifications to email the templates. I won't post my entire modification since it is so system specific. Once the zip file is created on a particular system, this code will ship it out.
PHP Code:
// Prepare email
echo "Preparing email and attaching file $zipfile...";
$mail_body .= "Content-type:text/plain; charset=ISO-8859-1\r\n\r\n";
$mail_body .= "The attached file '$zipfile' contains the vBulletin templates\r\n";
$mail_body .= "from the '$setinfo[title]' set of $bbtitle.\r\n\r\n";
$mail_body .= "--$mail_boundary\r\n";
[QUOTE]Originally posted by FireFly [...]
Why you ask? This could help a lot when upgrading to a new version of vBulletin. Just like you can compare files using programs such as Araxis Merge or Beyone Compare, you can now also compare templates, and easily keep track of changes that were done between versions.
After you save all changes to the template files, you use this script again only this time in the opposite directions - restoring the templates back into the system.
[...]
Add a new Template Set, that will use the default templates from vBulletin. Call it Before Upgrade.
Complete the upgrade (this includes the step where you install all the new templates - don't worry, your customized templates will not be damaged!).
Add a new Template Set, that will use the default templates from vBulletin. Call it After Upgrade.
Use this hack to import both template sets (Before and After) to different folders.
Use a comparing program (such as Araxis Merge) to compare the two folders, and then commit every change you find to your live template set (the one you are really using).
That should be it I think, don't forget to backup everything before you do this.
Thank you very much...
Sorry, but didn't understand.
Now I have only the 'default' template set: how could I assign all the templates simply adding a new set 'before upgrade' ?
Much probably I lack some basic information about templates and sets (and styles ... see here), but where could I read some FAQ or introduction about the VB concept of this matter ?
[QUOTE]and then commit every change you find to your live template set (the one you are really using).