View Full Version : Best way to backup and restore templates if you mess up ?
eva2000
Tue 27th Jun '00, 5:14am
Okay.. i have only started using vbulletin 4 days ago and now i have everything running i want to edit some of the templates...
my problem is knowing which templates to edit as well as the best way to restore a template if i mess up a template.
Should i make a duplicate of the template and rename it with bk extension and if i mess up just overwrite the bad copy with the good ?
NgtCrwlr
Wed 28th Jun '00, 11:45am
Start off by backing up your whole template table using Telnet. Note: you may not need -hyoursqlserver if you have direct access to your MySQL server
mysqldump -q -uyourusername -p -hyoursqlserver yourdbname template >/your/path/to/backupfilename.sql
What I have done is create a sub directory in /admin named templates. Then fire up vB control panel to copy, paste, and save each template to a separate file in /admin/templates/ using the template name as the file name.
I use UltraEdit and HomeSite so each file was saved with a .html extension. This makes editing the files with an HTML editor easier because of HTML syntax highlighting, if you save them as .txt you won't have highlighting.
After you have saved all of the templates to separate files make a backup of these originals. This way you won't have to go through the copy/paste routine if you mess up along the way. (I wish I would have done that!)
Another TIP... while you are modifying each template add a comment using the template name <-- template-name --> to each template. This way you can use your browsers View Source and easily identify which templates are used to make up the page you are viewing. For an example of how nice commenting works take a peek at the source of this page:
http://www.mis-forums.com/vbbs/index.php
Now you are ready to start modifying till your hearts content. :)
Larry "NgtCrwlr" Mingus
http://www.mis-forums.com/vbbs/
[Edited by NgtCrwlr on 06-28-2000 at 10:52 PM]
WebStyles
Wed 28th Jun '00, 1:48pm
Do you know what I do eva... It's not very glamorous, but it works. :)
I copy the HTML from the original template into Notepad before I make any changes, then I make the changes I need to, look at the forum really fast to make sure it works, and if it does... Cool, if it doesn't I can just drop the old HTML back in. :)
Powered by vBulletin™ Version 4.0.0 Beta 4 Copyright © 2009 vBulletin Solutions, Inc. All rights