Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Reply
 
Thread Tools
Details »»

Version: , by Admin (Coder) Admin is offline
Developer Last Online: Nov 2024 Show Printable Version Email this Page

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:
Code:
makenavoption("Add Template Set","template.php?action=addset");
and replace it with this:
Code:
[high]makenavoption("Add Template Set","template.php?action=addset","<br>");
makenavoption("Template Backup System","tbs.php?action=modify");[/high]
Save admin/index.php and upload back to your server.

Now edit cp.css (in the main forums folder). Now here's a file you don't edit often, huh?
Find this:
Code:
.cc { /* custom color */
	COLOR: darkblue;
}
and add this right after it:
Code:
[high].rc { /* custom color */
	COLOR: darkred;
} [/high]
Save cp.css and upload back to your server.

And last but not least, download tbs.php (attached to this post) and upload to your admin folder on your server.

That's it, installation is done.

[hr=white][/hr]
A few notes.

You can add new groups for template listing by editing tbs.php.
At the top, you will see something like this:
Code:
$groups['calendar']='Calendar';
$groups['emailsubject']='Email Subject';
and much more. To add your own group, simply add this:
Code:
$groups['[high]template_identifier[/high]']='[high]Group Name[/high]';
[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.

Comments
  #132  
Old 09-01-2002, 10:59 PM
N9ne N9ne is offline
 
Join Date: Feb 2002
Posts: 1,495
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

bah i'm gonna wait on a ported version to 2.2.7 before I install I guess

I was hoping to install this flawlessly on my 2.2.7 yet I will need it for a lot of things and if it has bugs, I won't install it
Reply With Quote
  #133  
Old 09-04-2002, 07:14 PM
GsxrTony GsxrTony is offline
 
Join Date: Apr 2002
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Warning: fopen("./templates/09-04-2002_P_themesidebox_right.html", "w") - Permission denied in /home/hsphere/local/home/gsxrtony/chicagolandsportbikes.com/forums/admin/adminfunctions.php on line 158

Warning: Supplied argument is not a valid File-Handle resource in /home/hsphere/local/home/gsxrtony/chicagolandsportbikes.com/forums/admin/adminfunctions.php on line 160

Warning: Supplied argument is not a valid File-Handle resource in /home/hsphere/local/home/gsxrtony/chicagolandsportbikes.com/forums/admin/adminfunctions.php on line 162
P_activetopics_sidebox [edit]
P_activetopic_centerbox [edit]
P_activetopic_centerboxbit [edit]
P_banners [edit]
P_breadcrumb [edit]
P_calendar [edit]
P_ForumLeftColumn [edit]
P_home [edit]
P_logincode [edit]
P_logoutcode [edit]
P_newsbits [edit]
P_newspastbit [edit]
P_newsselecttopic [edit]
P_newsselecttopic_list [edit]
P_newthreadheader [edit]
P_polloption [edit]
P_polloption_mult [edit]
P_pollresult [edit]
P_showarticle [edit]
P_showarticlebits [edit]
P_showarticle_commentbits [edit]
P_showarticle_commentbox [edit]
P_themecenterbox [edit]
P_themecentercolumn [edit]
P_themefooter [edit]
P_themeheader [edit]
P_thememenu_downloads [edit]
P_thememenu_faq [edit]
P_thememenu_forum [edit]
P_thememenu_homepage [edit]
P_thememenu_undefined [edit]
P_thememenu_weblinks [edit]
P_themerightcolumn [edit]
P_themesidebox_left [edit]
P_themesidebox_right [edit]

Done exporting created templates!

Ok I'm getting the thousands of errors but then Its telling me that they are all complete. So which is it? I see these templates in my template folder but all the rest of the default and modded ones are missing. And ok everyone keeps saying Chmod. But what the heck IS a chmod777 and how do I do it? and Is that what I need to do for sure? I am running 2.2.6
Reply With Quote
  #134  
Old 09-04-2002, 07:22 PM
GsxrTony GsxrTony is offline
 
Join Date: Apr 2002
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok disregaurd after a little more playing around I figured out what I needed to do. Chmod is done and After deleting the contents of the template folder that were there from before the chmod change it started to capture all of the templates.
Reply With Quote
  #135  
Old 09-05-2002, 05:03 PM
Floris Floris is offline
 
Join Date: Jan 2002
Posts: 1,898
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very nice

I finally have some use for this, so I am trying to install this on vB 2.2.7 If things go wrong, you will hear from me soon :P
Reply With Quote
  #136  
Old 09-22-2002, 01:22 PM
ddesigns ddesigns is offline
 
Join Date: Sep 2002
Location: Florida, USA
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What a great hack, we will definaly be using this on the forums!
Reply With Quote
  #137  
Old 10-02-2002, 11:09 AM
Areku Areku is offline
 
Join Date: Feb 2002
Posts: 540
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

/me installed it onto vB 2.2.0!

Works smooth! Tu!!
Reply With Quote
  #138  
Old 10-13-2002, 11:54 AM
Kars10's Avatar
Kars10 Kars10 is offline
 
Join Date: Jun 2002
Location: Germany/Franken
Posts: 748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This Hack is so helpful!!
Thank you FireFly for sharing with us!!

[high]* Minifreunde klicks install.[/high]
Reply With Quote
  #139  
Old 10-14-2002, 12:49 AM
mli mli is offline
 
Join Date: Nov 2001
Posts: 49
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Alright, I have a problem. I have two templates. RPG and Default3. Whenever I import it only imports into Default3. I can never get it to import to RPG. Could someone help me out?
Reply With Quote
  #140  
Old 10-15-2002, 09:12 AM
ontherun ontherun is offline
 
Join Date: Sep 2002
Location: 3rd Stone From The Sun
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed

But, when I do a export, the templates folder is created but there is never a file there, of any kind.

Where did I go wrong................there is no errors in the ACP

Win2K Advanced Server
vB 2.2.8
PHP 4.2.3
Reply With Quote
  #141  
Old 10-16-2002, 12:43 PM
geniuscrew's Avatar
geniuscrew geniuscrew is offline
 
Join Date: Nov 2001
Location: UK
Posts: 346
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If we import the templates back into a different style, will they override they colours for that style?

This is one of the best hack i've installed! Great work FireFly!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:52 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.12712 seconds
  • Memory Usage 2,311KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (6)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete