vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Template Backup System! (https://vborg.vbsupport.ru/showthread.php?t=33072)

WildWayz 01-08-2002 04:17 AM

Yes, you can do that, or just use it as a backup.

Each template is exported to it's own .html file so you can download them, edit them and re-import it.
I have not tried the import part - but export works :)

--James

samtha25 01-08-2002 05:11 AM

Bang.

Jawelin 01-08-2002 06:30 AM

Excuse. What would be the difference from a phpMyAdmin or backup.php exporting / importing ?

Thanks Firefly.
Bye

WildWayz 01-08-2002 07:13 AM

Not much really - well for backing up.

phpMyAdmin is also used as an SQL query tool and general database management, whereas backup.php just exports your data to a .sql file - makes it easier when updating forums - plus not everyone has phpMyAdmin installed.

James

Silviu 01-08-2002 12:43 PM

Yeap, excellent work. Very useful tool.

Jawelin 01-08-2002 03:01 PM

Excuse again.
What about
PHP Code:

if ($debug==1) {
    
makenavoption("Download Set","template.php?action=downloadset","<br>");
    
makenavoption("Upload Set","template.php?action=uploadset","<br>");
    
makenavoption("Do <img> Tags","template.php?action=imgtags");


just below ?


:confused:

Thnx

aldamon 01-08-2002 04:30 PM

I don't mean to be crude, but OMFG!!!

Firefly and Hooper, I bought vB last year and have been reading the vB forums for over a year. COUNTLESS people have complained about template maintenance with each release. This one feature will save people, at a minimum, hours of work and vB is truly lucky to have you around.

I have seen all sorts of hacks around here, but this one really takes the cake.

Thanks!

StarBuG 01-08-2002 07:22 PM

WOW!!

VERY USEFULL!!!!!

Mybe sometimes this tool safes my ass! :D

Greetings

StarBuG

Admin 01-09-2002 08:34 AM

Thank you aldamon and StarBuG. :)

Jawelin - huh?

WildWayz 01-09-2002 08:44 AM

Want me to see if I can knock up an enhancement so it tar/gzips up the template dir and emails it to you?

--James

Admin 01-09-2002 08:46 AM

Sure... keep in mind it won't work on all servers though, which is why I didn't put it in in the first place.

WildWayz 01-09-2002 08:51 AM

Might leave it then - save on the confusion :)

--James

Jawelin 01-09-2002 09:16 AM

:p

Original (I forgot it, after +30 hacks... :) ) admin/index.php file.
Lines 330...334 .... ;)
What's it ?

Thanks a lot and many compliments for your hard and complete work...
(p.s.: on a linux server, it doesn't manage to create the template directory... :eek: )

Stretchr 01-09-2002 08:33 PM

This is a must for the next vB edition. Thanks, Chen!

Dade 01-09-2002 08:40 PM

Awesome Chen, thanks for this! :)

Aaow AnD wHiTe 01-11-2002 10:29 AM

This hack is just AMAZING O_O

Thank you so much, Chen!!

kippesp 01-29-2002 03:46 PM

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_boundary "----=" md5(uniqid(time()));
$mail_headers "";
$subject "vBulletin templates file for $bbtitle";
$mail_headers .= "From: \"vBulletin Mailer\" <$webmasteremail>\r\n";
$mail_headers .= "MIME-Version: 1.0\r\n";
$mail_headers .= "Content-type: multipart/mixed; boundary=\"$mail_boundary\"\r\n\r\n";
$mail_headers .= "This is a multi-part message in MIME format.\r\n\r\n";
$fp fopen("$tmppath/$zipfile""r");
$file fread($fpfilesize("$tmppath/$zipfile"));
$file chunk_split(base64_encode($file));
$mail_body "--$mail_boundary\r\n";

$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";

$mail_body .= "Content-type:unknown/unknown; name=$zipfile\r\n";
$mail_body .= "Content-transfer-encoding: base64\r\n\r\n";
$mail_body .= $file "\r\n\r\n";
$mail_body .= "--$mail_boundary--";

mail("$email",$subject,$mail_body,$mail_headers); 


Jawelin 01-29-2002 10:15 PM

[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.
[...]

Admin 01-30-2002 04:40 AM

Sure.
  • 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. :)

Jawelin 01-30-2002 08:28 AM

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).

wajones 01-31-2002 02:18 AM

Thank You for this hack, makes my life sooooo much easier :)

kippesp 02-01-2002 05:31 AM

Great, great utility!

I didn't realize until this evening that blank templates were ignored during importing. Thought others may be interested to know this. (This was probably decided because the writetofile doesn't create null files.)

At any rate, I've since changed the logic in my copy so that blank templates are considered like every other template. I won't post any code since it was very clear this was intended. But if you want my changes, just ask.

alsakher 02-01-2002 12:30 PM

Great hack (y)

Jawelin 02-04-2002 02:56 PM

Hi, Chen!
Finally trying to use the 'import' feature after the upgrade, I found a couple of problems:
- Filenames (2002-02-02_.... etc.) aren't correctly managed
- I got an error in the script while trying to replace one existing template
- typo error 'export' instead 'import' in second section near "Choose templates to export selectively?"

Thanks a lot.
Bye

Lucky 02-05-2002 02:54 AM

Got vbp3.0pr7 and vb2.2.2 and all is working great!

Thanks. again Firefly :p

Admin 02-05-2002 07:11 AM

ROFL Lucky...

Thomas P 02-06-2002 12:34 AM

Hi,

just want to let you know that I use a similar hack since nearly one year :china:

https://vborg.vbsupport.ru/showthrea...threadid=15693

Export/Backup only.
Together with Beyond Compare a nice setup to localize and maintain updates to vB.

Good news that the idea is improved further ;)
cu,
-Tom

Admin 02-06-2002 06:40 AM

I see... but his script doesn't import templates. ;) :)

Jawelin 02-06-2002 06:48 AM

[QUOTE]Originally posted by Jawelin
Hi, Chen!
Finally trying to use the 'import' feature after the upgrade, I found a couple of problems:
- Filenames (2002-02-02_.... etc.) aren't correctly managed
- I got an error in the script while trying to replace one existing template
- typo error 'export' instead 'import' in second section near "Choose templates to export selectively?"

Thomas P 02-11-2002 12:00 AM

[QUOTE]Originally posted by FireFly
I see... but his script doesn't import templates. ;) :)

Jawelin 02-26-2002 12:02 PM

[QUOTE]Originally posted by Jawelin
Hi, Chen!
Finally trying to use the 'import' feature after the upgrade, I found a couple of problems:
- Filenames (2002-02-02_.... etc.) aren't correctly managed
- I got an error in the script while trying to replace one existing template
- typo error 'export' instead 'import' in second section near "Choose templates to export selectively?"

Thanks a lot.
Bye

Wolf42 03-01-2002 06:32 AM

Yesterday I used this hack to copy some new templates from one style to an other.

Backup custom templates from one style, import to the other style. Worked fine, no probs. :D

Stretchr 03-01-2002 11:32 AM

I've used this a number of times with great results and no problems at all. Also, a tip: Read Bira's post earlier in the thread about changing the extension to .htt

This makes it easy to open your backup file in a browser if you need to for previewing mods, etc. HTH

[QUOTE]Originally posted by Jawelin
Has anybody tried the import feature ????
:pirate: How does it work with the export-date prefix ?
Thanks

Jawelin 03-02-2002 10:30 AM

[QUOTE]Originally posted by Stretchr
I've used this a number of times with great results and no problems at all. Also, a tip: Read Bira's post earlier in the thread about changing the extension to .htt


xug 03-02-2002 06:04 PM

FireFly, a super hack, thanks for sharing your talent with us.

freehtml 03-09-2002 09:36 AM

Well .. Installed and backup all my templates..

Karri 03-12-2002 07:55 PM

Oh how cool!!! What a nifty little hack. :) I haven't installed many hacks yet (ok so this is my second one) but now I have my templates and stuff all backed up just in case.

Firefly you should get a cookie!!! :)

TTFN

Tim Wheatley 03-16-2002 08:05 AM

Works perfect - thanks. Now I can install 2.2.4 ;)

N!ck 03-20-2002 02:42 PM

i always get an error that the directory i want to put the templates in doesn't exist and then an error that it can't be created...:/...any advice?

Jawelin 03-20-2002 05:50 PM

Hi. The same question months ago noone answered... :)
Well. When I run an upgradeXX.php, all templates upgraded are the default ones, not the modified.
I.e. if I edited someone for hacks or similar, THEY WILL NOT BE UPDATED to the newer release.
Well: how could I manage the differences between the original template branch and the hacked one, to apply these differences by hand for example to the html/htt files coming from this hack ?

Thanks for any answer.
Bye


All times are GMT. The time now is 10:36 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.01427 seconds
  • Memory Usage 1,828KB
  • 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
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (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