PDA

View Full Version : Template Backup System!


Admin
12-08-2001, 10:00 PM
Hi everyone. :)

Here's my newest hack, called Template Backup System (TBS). :D
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.


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! :)


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:
makenavoption("Add Template Set","template.php?action=addset");
and replace it with this:
makenavoption("Add Template Set","template.php?action=addset","<br>");
makenavoption("Template Backup System","tbs.php?action=modify");
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:
.cc { /* custom color */
COLOR: darkblue;
}
and add this right after it:
.rc { /* custom color */
COLOR: darkred;
}
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. :D


A few notes.

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


That's all I have to say.
Feedback and feature requests are welcomed as always! :)

Have fun! :D

Admin
12-09-2001, 12:32 PM
Selecting templates to export...

Admin
12-09-2001, 12:32 PM
And selecting templates to import...

Admin
12-09-2001, 12:32 PM
And of course the main intro screen...

Syphin
12-09-2001, 01:07 PM
ooo... bootyfull. . . O_O lol

This will be alot of help on my boards... Im ganna go install it now..

Thnx, and good job guys... :)


-Syphin

Syphin
12-09-2001, 01:16 PM
I get this when i go to the admin index page... =/

Parse error: parse error in /***/***/admin/index.php on line 338


hmm


Edit: Nevermind.. works perfectly... ^^

*note to self: Dont code php when havnt slept in over 24 hours*

Great work.. :p

-Syphin

FWC
12-09-2001, 05:18 PM
Wow, Chen!! I thought the beta release was great. This is very cool! :D

holev
12-09-2001, 05:18 PM
great hack!
but one question..
why save it as .html's on the server? visitors can go around stealing your templates. why not export as a .zip to your pc?

Mike Gaidin
12-09-2001, 05:25 PM
Very sweet FireFly!! Nice hack indeed. :D

squawell
12-09-2001, 05:27 PM
nice hack u do FireFly~~~

it's a pretty good and useful hack

TheComputerGuy
12-09-2001, 07:16 PM
nice work nice work, FireFly deserves title "Hacker That Makes Life Easier"

All in favor use the hack like me :)

Hooper
12-09-2001, 07:35 PM
[QUOTE]Originally posted by holev
great hack!
but one question..
why save it as .html's on the server? visitors can go around stealing your templates. why not export as a .zip to your pc?

Crinos
12-09-2001, 07:37 PM
or you can just rename the folder where you store your templates into something else only "you" know ... it doesn't have to be /templates for the hack to work ;)

Axel Foley
12-10-2001, 11:44 PM
Chen, in tbs.php line 569 there is:

makeyesnocode("Choose templates to export selectively?<br>(otherwise all templates will be exported)","selecttemplates",1);


Should be:

makeyesnocode("Choose templates to import selectively?<br>(otherwise all templates will be imported)","selecttemplates",1);



And I also wanted to ask you a question. If I set NO to "Choose templates to import selectively?" will it import ALL the templates or will it import only modified templates?

Could you explain a little bit what Initially Check means?

Thanks for the great hack! It saves LOTS of time...;)

VirtueTech
12-10-2001, 11:47 PM
finally:)

Great job FireFly!

Hooper
12-11-2001, 12:48 AM
Hmmm. I didn't catch that Import /Export line :( . You may have just mentioned that one word needed changing. At least it's Not a bug. ;)

I believe on import if select all is checked it will import all templates that you exported as such. So if you check all the default as well as Custom templates but not changed templates, It will import as such.

Parker Clack
12-11-2001, 12:51 AM
I nominate this for hack of the year. This is such a timesaver. It imports as well as exports without a hitch.

Great job Chen and Hooper!

Axel Foley
12-11-2001, 12:54 AM
[QUOTE]Originally posted by Hooper
Hmmm. I didn't catch that Import /Export line :( . You may have just mentioned that one word needed changing. At least it's Not a bug. ;)

I believe on import if select all is checked it will import all templates that you exported as such. So if you check all the default as well as Custom templates but not changed templates, It will import as such.

Hooper
12-11-2001, 01:03 AM
[QUOTE]Originally posted by Axel Foley


You haven't read my post carefully. Where have you read the word BUG? Look at the subject of my post, it says TYPO. ;)

Regarding your explanation, it's not very clear what you mean, I think you didn't catch what I'm asking. And since this hack deals with templates (a delicate matter ;)) I think it's better if Chen (or Hooper which is the betatester) replies to my post.

C'ya...

Axel Foley
12-11-2001, 01:45 AM
That's what happens when you don't sleep for 24hrs...;)

Sorry Hooper... :rolleyes:

Anyway...I didn't understand the explanation...;)

Hooper
12-11-2001, 01:59 AM
[QUOTE]Originally posted by Axel Foley
That's what happens when you don't sleep for 24hrs...;)

Sorry Hooper... :rolleyes:

Anyway...I didn't understand the explanation...;)

Admin
12-11-2001, 05:06 AM
Obviously Hooper is trying to give me a head ache with his long explanations, so I'll answer. LOL j/k Hooper you're da man! :)

Anyhow, if "Choose templates to import selectively" is set to NO, the script will import all templates that are in the folder.
If "Choose templates to export selectively" is set to NO, it will export ALL your templates, including created template, changed templates and even default templates.

The "Initially check..." selections means what check boxes will be selected by default if you set "Choose templates to xxx selectively" to YES. This is done for ease of use.

EXAMPLE:
Let's say you only want to export ALL created templates and ONE changed template. So you set the "Initially check..." to NO except for the Create Templates controller.
Then when you proceed, only created templates will be checked, and all you'd need to do is check the one modified template you wanna export.

Clear? :)

Hooper
12-11-2001, 05:15 AM
:rolleyes:

eva2000
12-20-2001, 11:59 PM
just awesome :D

bira
12-21-2001, 08:18 AM
wow, how did I miss this one!

Bloody amazing and useful, Thanks FireFly!

bira
12-21-2001, 08:40 AM
ok, I just tried it out and I must say I am thoroughly impressed. I even dared and selected ALL and the backup took a few seconds!

One trivial thing (and I mean it when I say it's completely trivial): .htt is actually the best extension (HyperText Template). Especially if you have .html parsed as PHP on your server, in which case it would be more secore. .htt is also a recognized Windows extension, so for all intent and purposes it's just like HTML (eg if you dbl-click on a file it will open in your browser) but, as I said, more secure and designated for exactly what we're using it: as an html template :)

Chen ata gever :D

Admin
12-21-2001, 11:57 AM
Thanks George and bira. :)

[QUOTE]Originally posted by bira
Chen ata gever :D

Lucky
01-01-2002, 10:34 PM
I see everything in my admin cp and all looks good, until I try to export.
I get hundreds of the different errors.
Here is one of them.

Warning: fopen("./templates/chatloggedin.html","w") - Permission denied in D:\Inetpub\users\mysite\forums\admin\adminfunction s.php on line 158

Any ideas?
TIA

Hooper
01-01-2002, 11:33 PM
Folders must be chmodded writable 777 or you'll get a bunch of errors. Either that or a path problem. Check both.

Rick

Lucky
01-02-2002, 07:25 AM
I have a folder in the forum/admin called templates.
I have the path to go to templates.
I have contacted the server and he said that chmod777 is linux but has done this for me on nt.
I still have problems, any ideas?

Hooper
01-02-2002, 05:12 PM
There is nothing wrong with having the folder in the Admin. Then when you try to backup be sure not to put /admin/templates for the path. Try just /templates. See if that works.

I have 2 backup folders in my admin and it works flawlessly.

Rick

Lucky
01-02-2002, 07:33 PM
Well I still can not get this going.

I have a folder in forums called templates.
I also have a folder in forums/admin called templates.

I had the server change to 777 on nt.

I am running 2.2.1

I am lost as to why it will not write to one of those folders.
I have it setup to go to templates in admincp.

Any more ideas as to how to correct the problem I am having?

Lucky
01-02-2002, 08:05 PM
Okay,

I got it.

It was the server at fault as the permissions had to be changed.

Great Hack Firefly old buddy old pal!

Hooper
01-02-2002, 08:08 PM
You're welcome lucky. Glad it's working for you.

WildWayz
01-07-2002, 01:24 PM
Oh my god!

This is fantastic!

Can it be hacked to create a new dir with 777 permissions in a templates folder?

So then we can just specify
templates/newfoldername
and if it doesn't exist and 'templates' is 777, it will create it

Failing that, how about being able to prefix the export like
07012001_filename.html

Nice tho :)

--James

Admin
01-07-2002, 02:30 PM
[QUOTE]Originally posted by WildWayz
Can it be hacked to create a new dir with 777 permissions in a templates folder?

So then we can just specify
templates/newfoldername
and if it doesn't exist and 'templates' is 777, it will create it

Failing that, how about being able to prefix the export like
07012001_filename.html

WildWayz
01-07-2002, 02:35 PM
oh my!

You are a star :)

--James

Admin
01-07-2002, 03:05 PM
BTW this is not tested, which is why I attached it to the last post.
Let me know if it works, will ya? Thanks. :)

inetd
01-07-2002, 10:28 PM
Excuse for a silly question but how to use this hack? Admit I has made upgrade vB. How to me to compare former and present templates? Or I have not understood something?

samtha25
01-08-2002, 03:42 AM
Am I understanding this correctly? Would this hack let me export templates to individual files, download the files for editing, upload the edited templates to an import directory, and then import the edited templates without having to go through the dreaded copy-paste routine?

If so, I may shoot myself.

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

// 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($fp, filesize("$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 (www.araxis.com)) 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 (https://vborg.vbsupport.ru/showthread.php?s=&threadid=34258)), 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/showthread.php?s=&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

N!ck
03-21-2002, 02:30 AM
bump. i want to - have to - use this (it's really neat if it works for me in the end)...help!

N!ck
03-21-2002, 02:53 AM
ummmmmmmmmmmmm...well...chmodded 777 and it worked. it didn't work BEFORE on 777 though...my host sucks :P

Jawelin
03-25-2002, 09:26 AM
FireFly , I still have some problems with the import feature, as said on post #64 (https://vborg.vbsupport.ru/showthread.php?postid=218121#post218121) .... :bored:

After upgrading board, i tried to import the just-exported templates (with today's date) were deleted by the upgradeXX.php (we have another thread open about in General Discussion (https://vborg.vbsupport.ru/showthread.php?threadid=36432&s=) ... Do you remember ? :bandit: )

Well. I put in the import form the exact formatted date I used above to export templates, but as you can see in the attached screenshot, their name wasn't adjusted (truncating the date prefix), but were imported just with their actual filename ...

I saw also a php error at the top of the selection list when I had to choose one or all of them before the import.

Note: as suggested, I used '.htt' filenames ....

What do you think about ?
What could I check in TBS to solve the problem ?

Thanks


P.S.: I solved my problem updating the DB with a query like this:
UPDATE `template`
SET title = SUBSTRING(title,12,100)
WHERE title LIKE "2002-%"
... but I though better a tbs.php upgrade.... :ermm:

Thank you very much, again.


P.P.S.: comparing the dbs (before and after the above ops), I noticed first those templates were listed in the Default section. After the import (and the db correction) they were listed in the Custom section. Does it mean that, since now, when upgrading again I shouldn't have any more the problem they are deleted by the upgradeXX.php ... Is it true ?

Bye

Jawelin
03-26-2002, 10:35 AM
[QUOTE]Originally posted by Jawelin
FireFly , I still have some problems with the import feature, [...]
Well. I put in the import form the exact formatted date I used above to export templates, but as you can see in the attached screenshot, their name wasn't adjusted (truncating the date prefix), but were imported just with their actual filename ...

I saw also a php error at the top of the selection list when I had to choose one or all of them before the import.

Note: as suggested, I used '.htt' filenames ....

Jawelin
03-28-2002, 04:14 PM
:(
This went too down without an answer !!
Bump!
:bandit:

Lesane
03-30-2002, 10:17 PM
Just installed the hack in one minute. Works perfect, thanks.

Jawelin
03-31-2002, 10:05 AM
Yes, of course.... Less than 1 minute installing.
But I found that problem in the import feature...
Nobody found the same ?
Is it mine a correct workaround ?
Thnx

Darren Lewis
04-16-2002, 11:03 AM
Chen this is a fantastic hack. Installed quickly with clear instructions. Fixed the typo and all is working perfectly.

I can export and import templates without any problems.

212rikanmofo
04-19-2002, 05:29 PM
not sure why this isnt working, but i installed this hack on vb 2.2.5, when i hit export it doesnt give me a list like in your screen shot, it just goes back to the main tbs menu and then i check my templates folder and its empty. Im running on windows xp by the way and not unix. this hack use to work for me when i ran vb2.2.1, not sure if its incompatibility problem or what. but i made a templates folder in my root, my forum root and in my admin root folder jus to be safe, and i checked each one, and all empty... =( whats going on... i installed the hack and checked over many times to see if i installed it right and i did....

GuruXL
04-19-2002, 10:07 PM
this is a wonderful Hack FireFly...

212rikanmofo
04-27-2002, 09:28 AM
great hack, works great, except after i export, and then its done, i try hittint the [edit] button and i get a db error: it says this

Database error in vBulletin Control Panel 2.2.5:

Invalid SQL: SELECT templateid,templatesetid,title,template FROM template WHERE templateid=
mysql error: You have an error in your SQL syntax near '' at line 1

mysql error number: 1064

Date: Saturday 27th of April 2002 05:22:41 AM
Script: http://localhost/forum/forum/admin/template.php?action=edit&templateid=
Referer: http://192.168.0.2/forum/admin/tbs.php


whats wrong? it only happens when i try to edit the original templates. but the ones in red and orange i can edit, just not the originals, why?

SWFans.net
04-29-2002, 04:15 PM
One small thing I would like to see added to this hack, is the ability to delete exported files from the server that it creates. (This only applies when it creates its own folder. If I created the fodler and chmod it to 777 first through FTP I have no problem. But I made a typo in the destination folder once and it created its own folder which I am having a lot of difficulty removing)

Mainly because my FTP access gives me permission denied when I try to delete them myself after downloading them all.

It seems this program creates the templates and gives ownership to "web" on my server and on my virtial shared server, I don't have access to the "web" account, so removing the files is almost impossible.

Maybe it could be modified to create folders with 777 permissions?

Droopy
05-03-2002, 09:33 AM
Installed and backup all my templates.
Works fine on my 2.2.5
Thanks

Keyser S?ze
05-18-2002, 01:29 AM
when i try to export the templates i get this error

Warning: fopen("./templates/chat.html", "w") - Permission denied in /usr/home/emusa/emusanet.com/public_html/forums/admin/adminfunctions.php on line 158

Warning: Supplied argument is not a valid File-Handle resource in /usr/home/emusa/emusanet.com/public_html/forums/admin/adminfunctions.php on line 160

Warning: Supplied argument is not a valid File-Handle resource in /usr/home/emusa/emusanet.com/public_html/forums/admin/adminfunctions.php on line 162

Warning: fopen("./templates/chatmain.html", "w") - Permission denied in /usr/home/emusa/emusanet.com/public_html/forums/admin/adminfunctions.php on line 158

Warning: Supplied argument is not a valid File-Handle resource in /usr/home/emusa/emusanet.com/public_html/forums/admin/adminfunctions.php on line 160

Warning: Supplied argument is not a valid File-Handle resource in /usr/home/emusa/emusanet.com/public_html/forums/admin/adminfunctions.php on line 162

Warning: fopen("./templates/chatnoreg.html", "w") - Permission denied in /usr/home/emusa/emusanet.com/public_html/forums/admin/adminfunctions.php on line 158

Warning: Supplied argument is not a valid File-Handle resource in /usr/home/emusa/emusanet.com/public_html/forums/admin/adminfunctions.php on line 160

goes on for ages, i guess its every template gives a error msg

FWC
05-18-2002, 02:38 AM
Make sure the folder you are backing the templates up to is set to 777.

Wolf42
05-29-2002, 11:58 AM
Ops...
Since upgrade to PHP 4.2.0 the template-names are gone @ TBS like they do before patching the template.php freddie mentioned here (http://www.vbulletin.com/forum/showthread.php?s=&threadid=44820) @ vbulletin.com.

What do I have to do to fix that.

Admin
05-29-2002, 12:04 PM
I'll release a fix shortly.

Wolf42
05-29-2002, 12:11 PM
Just wondering nobody else found this "bug". Hhmmm... :D

Admin
05-30-2002, 09:49 AM
Should be fixed now.

X3ON
05-30-2002, 10:26 AM
verry nice :up:

* X3ON clicks install button

Wolf42
05-30-2002, 05:48 PM
Thanks FireFly! :D

www.tourc.ca
05-31-2002, 02:35 PM
I just switched servers and the template backup system doesn't work the same on the new server....

if there are no files in the templates directory, the backup system work fine.

but if there are existing files with the same name and I try to do a backup to overwrite the files I get the following messages!

Warning: SAFE MODE Restriction in effect. The script whose uid is 503 is not allowed to access ./templates/alinks.html owned by uid 0 in /home/virtual/site1/fst/var/www/html/forums/admin/adminfunctions.php on line 150

Warning: SAFE MODE Restriction in effect. The script whose uid is 503 is not allowed to access ./templates/alinks.html owned by uid 0 in /home/virtual/site1/fst/var/www/html/forums/admin/adminfunctions.php on line 158

Warning: fopen("./templates/alinks.html","w") - Success in /home/virtual/site1/fst/var/www/html/forums/admin/adminfunctions.php on line 158

Warning: Supplied argument is not a valid File-Handle resource in /home/virtual/site1/fst/var/www/html/forums/admin/adminfunctions.php on line 160

Warning: Supplied argument is not a valid File-Handle resource in /home/virtual/site1/fst/var/www/html/forums/admin/adminfunctions.php on line 162

this repeats over and over for each file it seems!

any ideas would be appreciated. for now I just ftp and delete all previous files before doing backup

-dave

Admin
05-31-2002, 02:41 PM
Seems to be caused by running in safe mode, ask your host to turn it off.

www.tourc.ca
05-31-2002, 02:49 PM
what happens if I am my host... is it easy to turn off or do I start searchin the net..

BTW great hack (like all of your hacks) and talk about support! I was barley done the post :)

thanks

Admin
05-31-2002, 02:55 PM
This is the part that controls Safe Mode in php.ini:
;
; Safe Mode
;
safe_mode = Off

; By default, Safe Mode does a UID compare check when
; opening files. If you want to relax this to a GID compare,
; then turn on safe_mode_gid.
safe_mode_gid = Off

; When safe_mode is on, UID/GID checks are bypassed when
; including files from this directory and its subdirectories.
; (directory must also be in include_path or full path must
; be used when including)
safe_mode_include_dir =

; When safe_mode is on, only executables located in the safe_mode_exec_dir
; will be allowed to be executed via the exec family of functions.
safe_mode_exec_dir =

; open_basedir, if set, limits all file operations to the defined directory
; and below. This directive makes most sense if used in a per-directory
; or per-virtualhost web server configuration file.
;
;open_basedir =

; Setting certain environment variables may be a potential security breach.
; This directive contains a comma-delimited list of prefixes. In Safe Mode,
; the user may only alter environment variables whose names begin with the
; prefixes supplied here. By default, users will only be able to set
; environment variables that begin with PHP_ (e.g. PHP_FOO=BAR).
;
; Note: If this directive is empty, PHP will let the user modify ANY
; environment variable!
safe_mode_allowed_env_vars = PHP_

; This directive contains a comma-delimited list of environment variables that
; the end user won't be able to change using putenv(). These variables will be
; protected even if safe_mode_allowed_env_vars is set to allow to change them.
safe_mode_protected_env_vars = LD_LIBRARY_PATH
You can either turn it completely off by setting safe_mode to Off:
safe_mode = Off

Or leave it on, but turn this setting off:
safe_mode_gid = Off
This should fix the errors you are getting.

Henry-RS
06-03-2002, 01:13 AM
VERY USEFUL! Just installed lesane's hack with it. :D

Jawelin
06-03-2002, 08:17 AM
Hi, Chen.
A (simple) request: could it be possible to export - export only (not needed import...) - ALL TEMPLATES including default ones, for example with a differend prefix, suffix or directory ?
I mean, if a template exists with more templatesetids (tipically 1 and -1), could it be possible to export both to different targets ?

Obviously, this feature should be very very useful when upgrading VB, to perform an easier check of changes in the '-1' set, otherwise not exported...

Thanks a lot.
LMK

Bye

kippesp
06-03-2002, 02:57 PM
[QUOTE]Originally posted by Jawelin
Hi, Chen.
A (simple) request: could it be possible to export - export only (not needed import...) - [b]ALL TEMPLATES including default ones, for example with a differend prefix, suffix or directory ?
I mean, if a template exists with more templatesetids (tipically 1 and -1), could it be possible to export both to different targets ?

Jawelin
06-03-2002, 03:07 PM
[QUOTE]Originally posted by kippesp
Default templates can already be exported. After you've upgraded your PHP files, add a new template set. Then export the new set.

Darren Lewis
06-03-2002, 09:44 PM
Just reinstalled this hack (with the new tbs.php) and all works fine on V2.2.6 with PHP4.1.2.

Darren.

Sinecure
06-10-2002, 01:48 AM
I installed this on 2.2.5 as well, it went flawlessly :)
However, I do have one MAJOR request, that would really make this hack usefull. If this hack had the ability to create folders, with the appropriate templates following those groups, that would make things a lot easier when sorting them out :(

For example, for the postbit group:
<--- POSBIT Group -->
<----------postbit.html
<----------postbit_attatchment.html
<----------postbit_attatchmentimage.html

And for each template group a new template would be made with the corresponding templates. I suggest doing that for the TBS, chen. It would definatly make this a much more worthy hack for Hotm :)

Admin
06-10-2002, 09:30 AM
Maybe when vB3 is out, I am not going to hack anymore until it's released. :)

Jawelin
06-10-2002, 02:43 PM
[QUOTE]Originally posted by FireFly
Maybe when vB3 is out, I am not going to hack anymore until it's released. :)

grog6
06-18-2002, 03:42 PM
Thx a lot, really helpfull when you have a lot of templates to install (Lesane Store Hack ;) )

Great Job Firefly

Henry-RS
06-23-2002, 05:35 PM
Chen: I noticed that on vBulletin 2.2.6 on 4.2.1, this hack doesn't work properly. When you go to export a lot of screwy errors happen, and it doesn't export all of the templates. There is nothing wrong on my part, that I know of, as I've chmodded the folder in which it is exported to, and all the other steps needed.

If you could fix this, it would be most appreciated.

Dark_Wizard
06-25-2002, 06:17 PM
[QUOTE]Originally posted by Henry-RS
Chen: I noticed that on vBulletin 2.2.6 on 4.2.1, this hack doesn't work properly. When you go to export a lot of screwy errors happen, and it doesn't export all of the templates. There is nothing wrong on my part, that I know of, as I've chmodded the folder in which it is exported to, and all the other steps needed.

If you could fix this, it would be most appreciated.

Link14716
06-27-2002, 01:43 AM
Kickass hack, FireFly, thanks.

/me installs.....

Jawelin
06-29-2002, 08:29 AM
[QUOTE]Originally posted by Henry-RS
Chen: I noticed that on vBulletin 2.2.6 on 4.2.1, this hack doesn't work properly. When you go to export a lot of screwy errors happen, and it doesn't export all of the templates. There is nothing wrong on my part, that I know of, as I've chmodded the folder in which it is exported to, and all the other steps needed.

If you could fix this, it would be most appreciated.

chr@nox
07-02-2002, 08:10 PM
wow....been searching for this for like weeks! thanx!!

Darren Lewis
07-07-2002, 01:26 PM
At the very top of the page when exporting the template I have this text. The colours for the original and the default templates seem to be the wrong way around.

Templates with this color are templates you have created from scratch.
Templates with this color are original templates you have edited.
Templates with this color are the default templates that come with vBulletin.

In the tick box selection list of the templates the colours are correct (green for original and blue for edited and red for new).

The code at the bottom of my cp.css file is this

/* global and custom color definitions */
.gc { /* global color */
COLOR: darkgreen;
}

.cc { /* custom color */
COLOR: darkblue;
}
.rc { /* custom color */
COLOR: darkred;
}

Jawelin
07-10-2002, 03:23 PM
[QUOTE]Originally posted by Jawelin
default templates still are missing ... :/ :( :( :(
Thanks a lot.

bandersen
07-21-2002, 06:24 PM
I finally got around to installing.... export works just great for all templates... using 2.2.6, 4.2.1
Off to test the import... and make a "ground zero style set" including default and created templates! This hack should be great for that right? :)

Thank you for a nice hack.

Dean C
08-21-2002, 06:36 PM
i get all these errors when i try to make a backup :(:


Warning: fopen("./templates/awards.html", "w") - Permission denied in /www/www.rapsearch.com/public_html/board/admin/adminfunctions.php on line 158

Warning: fwrite(): supplied argument is not a valid File-Handle resource in /www/www.rapsearch.com/public_html/board/admin/adminfunctions.php on line 160

Warning: fclose(): supplied argument is not a valid File-Handle resource in /www/www.rapsearch.com/public_html/board/admin/adminfunctions.php on line 162

Warning: fopen("./templates/changeuser.html", "w") - Permission denied in /www/www.rapsearch.com/public_html/board/admin/adminfunctions.php on line 158

Warning: fwrite(): supplied argument is not a valid File-Handle resource in /www/www.rapsearch.com/public_html/board/admin/adminfunctions.php on line 160

Warning: fclose(): supplied argument is not a valid File-Handle resource in /www/www.rapsearch.com/public_html/board/admin/adminfunctions.php on line 162

Warning: fopen("./templates/contact.html", "w") - Permission denied in /www/www.rapsearch.com/public_html/board/admin/adminfunctions.php on line 158

Warning: fwrite(): supplied argument is not a valid File-Handle resource in /www/www.rapsearch.com/public_html/board/admin/adminfunctions.php on line 160

Warning: fclose(): supplied argument is not a valid File-Handle resource in /www/www.rapsearch.com/public_html/board/admin/adminfunctions.php on line 162

Warning: fopen("./templates/contact_error.html", "w") - Permission denied in /www/www.rapsearch.com/public_html/board/admin/adminfunctions.php on line 158

Warning: fwrite(): supplied argument is not a valid File-Handle resource in /www/www.rapsearch.com/public_html/board/admin/adminfunctions.php on line 160


and it goes on and on and on....... :(

Dean C
08-21-2002, 06:37 PM
never mind :D i fixed it hehe

Darren Lewis
08-21-2002, 06:37 PM
Mist, set the CHMOD of your templates directory to 777.

Hooper
08-21-2002, 06:48 PM
We need a new hack Chen. A "floating instructions" box that scrolls with the posts. An example of this for this particular thread is the chmod instructions posted throughtout. Give the post writer the option to enable a popup text scroller box that can be input with instructions.

This would allow the scroller box to scroll post to post. Not a big box, just a small 2X2 box.

BrAinZ
08-23-2002, 09:31 PM
Can anyone confirm if the "defaul templates missing" bug has been fixed in this yet please?

slashboy
08-27-2002, 10:32 AM
i still can't get the default templates out.
Using 2.2.6 with php 2.2
:(

NexDog
08-31-2002, 11:24 AM
Bloody Hell, talk about a life saver! Only saved me about a million hours of hard work as I'm doing a clean install on a new server.

I bow to you, Firefly! Good job!

/me most definately clicks INSTALL

FinalFantasy289
08-31-2002, 06:14 PM
I have the same default templete problem on with 2.2.7

N9ne
09-01-2002, 10:59 PM
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 :(

GsxrTony
09-04-2002, 07:14 PM
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

GsxrTony
09-04-2002, 07:22 PM
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.

Floris
09-05-2002, 05:03 PM
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

ddesigns
09-22-2002, 01:22 PM
What a great hack, we will definaly be using this on the forums!

Areku
10-02-2002, 11:09 AM
/me installed it onto vB 2.2.0!

Works smooth! Tu!!

Kars10
10-13-2002, 11:54 AM
This Hack is so helpful!!
Thank you FireFly for sharing with us!! :)

* Minifreunde klicks install.

mli
10-14-2002, 12:49 AM
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?

ontherun
10-15-2002, 09:12 AM
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

geniuscrew
10-16-2002, 12:43 PM
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!

geniuscrew
10-16-2002, 12:50 PM
OK it doesn't ^^

Littlebit
10-17-2002, 11:07 PM
wow..I used it to aid in the store hack install...it worked wonderfully! Thanks :)

LightBringer
11-08-2002, 03:22 PM
Hey Firefly, quick question.

My default or unchanged templates aren't getting exported.

Created and edited work just fine but the default ones are not.

Any advice?

ethics
11-12-2002, 09:00 PM
Superb job, Firefly. Made my StoreHack importing of 60 templates a breeze. Thank you so much!

Dynamic One
11-14-2002, 07:55 PM
Thanks for this super hack. Can realy use this 1.

Axel Foley
11-15-2002, 09:14 PM
Chen, I always used this hack and it worked fine.

I then moved to a new host, just reinstalled the hack and everything seems to work fine (all the templates are shown correctly, even default ones during export).

Once I export in the templates dir I only find CREATED & EDITED templates, not the default ones, even though I selected ALL the templates.

My configuration is:

vB 2.2.8

Server Type
Linux / PHP v4.1.2

MySQL
v3.23.41

I noticed that other users are having these problems, could you please take a look at this Chen?

I appreciate the support I'm sure you'll give all of us for this hack, it is a real time-saver and a must for every busy vB admin.

penna2k
11-17-2002, 07:14 AM
[QUOTE]Originally posted by ontherun
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

Visionray
11-21-2002, 03:54 PM
this is a great hack, definite timesaver.

spazeman
11-23-2002, 06:02 AM
great hack. :) this should be a part of vB.

themonarch
11-26-2002, 02:46 AM
Whoa! Awesome hack! Huge props to FireFly!

Jawelin
12-17-2002, 08:11 AM
Has anybody modified the Template select to work with PHP v4.2.x ?
I'm gonna getting crazy with the update to 2.2.9 !

Thanks a lot.
Bye

Xer
12-19-2002, 03:06 AM
Cool... it is working on my 2.2.9

Automated
12-22-2002, 07:04 PM
Great Hack

* Automated clicks install :p

kippesp
12-25-2002, 07:26 AM
[QUOTE]Originally posted by Jawelin
Has anybody modified the Template select to work with PHP v4.2.x ?
I'm gonna getting crazy with the update to 2.2.9 !

Thanks a lot.
Bye

Jawelin
12-28-2002, 09:12 PM
[QUOTE]Originally posted by kippesp
What is it not doing?

a43079
01-03-2003, 11:47 AM
very very nice hack

Logik
01-05-2003, 08:12 PM
THis hack is good. Saves time ;o)

kippesp
01-06-2003, 04:11 AM
[QUOTE]Originally posted by Jawelin


:( It exports only the modified templates, not everyone ! Please see
Post#118 (https://vborg.vbsupport.ru/showthread.php?postid=267196#post267196) in this thread.

Thanks a lot for any help.
This is one of the best admin-purpose hacks, but I can't manage to update it to
newer releases of php, I fear.

Thnx

Rose
01-25-2003, 02:30 PM
Thanks, kippesp!!

I recently installed this on a new board and have never experienced any problems with it. However, on the latest install I was only able to export four templates - header/footer/something/soemthing. After much frustration I checked back in here and downloaded your fix - which fixed it! :)

Thanks again!

JakeC
01-25-2003, 02:34 PM
Fixed me up as well. Thanks!!

JakeC

Axel Foley
01-25-2003, 09:02 PM
Kippesp...you're the man...;)

I used your version, and it fixed the problems I had, but I noticed some little glitches on template-colors in the list (they differed from the legenda) and some textual inaccuracies. I also changed the default file extension to .htt (as suggested by Bira long ago). I've attached this final version to this post.

Thank you very much for your help.

Marzas
01-30-2003, 05:54 AM
mine doesnt work, it always has this error

Warning: OpenDir: No such file or directory (errno 2) in /home/viraxco/public_html/admin/tbs.php on line 128

Fatal error: Call to a member function on a non-object in /home/viraxco/public_html/admin/tbs.php on line 129

what the hell is that? lol

Marzas
02-02-2003, 06:57 AM
bump

Marzas
02-02-2003, 07:14 AM
spoke too soon, i fixed it, it was supposed to be in a folder called templates, well anyway i did it and click import, click expand, nothing there?
how come, all the files are uplaoded
please i need this quick
cheerz

marzas

kippesp
02-02-2003, 06:26 PM
The script must be located in the admin directory (i.e. the same spot as config.php and all the other admin files). There must be a directory for the script to read/write files from/to named 'templates' (or whatever is entered in the form). On a Unix file system server, that directory must have writable permission by the webserver (a chmod 777 does the trick).

So basic file structure is this:
forums/admin/config.php
forums/admin/tbs.php
forums/admin/templates/[templates stored here]

And I know this is a rather long thread. But when the original author does not support his/her hack, you really should read the entire thread (a good idea anyway). This has been posted before and discussed as well.

Darkwaltz4
02-07-2003, 01:37 AM
wow. very, very much wow. im amazed, --this is exactly what i am looking for..

story time:

having 5 different styles (soon to be 6) i got into the habit of not updating the styles that were no longer new....so consequently, there were always a slew of styles that were not as good....when it came time to update all of them, downloading and uploading full styles led to problems....so...i turned to here, and look what i found....amazing...excellent--very wow, thats all i can say. thanks firefly a definate "install" for this.

phd
02-11-2003, 06:19 PM
"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!"

can I create my own? CHMODed 0777

scsa20
02-13-2003, 06:01 AM
@phd - wha?? if you mean making your own folder, that's what you so'pose to do, go into the admin folder (/forumroot/admin/) and make a new folder called templates (even tho you could name it something else if you please, but nameing it templates is more easyer) and then CHMOD it 777... doing that is easy, just right click on it and choosed either (depends on what FTP program your using) CHMOD or Properties or if your FTP program has a command line, type in SITE CHMOD templates 0777 (I think that's the code, it's been awhile) and that'll make the folder writeable, meaning that a script can write in that folder.

dstruct2k
03-08-2003, 04:01 PM
And how would you go about setting permissions on a folder on your local computer? Here's my problem: I am running Windows XP Pro I am my own webhost, through Apache HTTPD Server I have absolutely no clue how to do a CHMOD on a local directory Most of my scripts work anyways, even without doing a CHMOD.Could someone explain to me what the CHMOD is supposed to do in the first place? Or how I could do it?

Any help would be appreciated.

______________

PS: Amazing hack, Chen! This will be great for keeping all of my styles updated! Thanks!

LilDragonWings
04-14-2003, 08:19 PM
For the love that is all holy and godlike.

THANK YOU for this hack.

The_Wanderer
04-14-2003, 10:05 PM
great hack, firefly :)

vB-Host.com
04-19-2003, 10:43 PM
I receive no templates to import but if you look at http://www.vb-host.com/forum/admin/templates/ all 60 of the store templates are there and the templates folder is chmod to 777 also.. Ok here is a screenshot to show you my settings and error

gmarik
04-21-2003, 03:50 PM
A very useful one.
Thanks, great job!

Mike Gaidin
04-21-2003, 04:20 PM
[QUOTE]04-19-03 at 06:43 PM Slapshot Harry said this in Post #172 (https://vborg.vbsupport.ru/showthread.php?postid=384376#post384376)
I receive no templates to import but if you look at http://www.vb-host.com/forum/admin/templates/ all 60 of the store templates are there and the templates folder is chmod to 777 also.. Ok here is a screenshot to show you my settings and error

vB-Host.com
04-21-2003, 06:24 PM
[QUOTE]Today at 09:20 AM Mike Gaidin said this in Post #174 (https://vborg.vbsupport.ru/showthread.php?postid=385180#post385180)
It's because your templates are in .txt form while you are trying to import .html

Just change the html in your import settings to txt

Mike Gaidin
04-21-2003, 06:45 PM
Glad I could help. :)

pdatoon
04-27-2003, 01:42 AM
Hi,

I accidentally import some templates in my default set instead of another one. Do you know how to delete all those imported templates at once? doing [remove] on by one is such a pain :(

Mike Gaidin
04-27-2003, 02:33 AM
Hi,

I accidentally import some templates in my default set instead of another one. Do you know how to delete all those imported templates at once? doing [remove] on by one is such a pain :(

The only way I know of is to install this hack here by Xenon.

https://vborg.vbsupport.ru/showthread.php?s=&threadid=49041

It's not a default vB option.

trafix
04-27-2003, 06:27 AM
A hackers delight!

I should have installed this earlier, Its going to save me heaps of time when I go to pack a hack ready to release :)

o0oKARo0o
05-21-2003, 02:59 PM
The best Hack I have ever seen, amazing hack really, it?s a must have and I hope it will be in the VB 3.0 cos it?s damn good...
Firefly, you are my idol, thanks mate ;)

Smoothie
05-27-2003, 01:02 AM
Mint script!

Ryan McBain
05-27-2003, 01:23 AM
I keep getting this error

Warning: dir(./templates/.) [function.dir]: failed to open dir: No such file or directory in /home/ryanmcba/public_html/forums/admin/tbs.php on line 127

Fatal error: Call to a member function on a non-object in /home/ryanmcba/public_html/forums/admin/tbs.php on line 128

What am I doing wrong?

Erwin
05-27-2003, 01:34 AM
did you make the templates subdirectory in the admin folder, and chmod it 777

Ryan McBain
05-27-2003, 01:35 AM
yes, im trying to install lesane's store hack, and i figured this hack would save me some time, but im kinda lost

Smoothie
05-27-2003, 02:17 AM
what are you putting as the directory for the templates?

Ryan McBain
05-27-2003, 02:19 AM
[QUOTE]Today at 08:17 PM Smoothie said this in Post #185 (https://vborg.vbsupport.ru/showthread.php?postid=400401#post400401)
what are you putting as the directory for the templates?

Smoothie
05-27-2003, 03:00 AM
works for me

Erwin
05-27-2003, 03:56 AM
Yup, I can see your templates there. Quite insecure actually, you should .htaccess password protect your admin folder.

Ryan McBain
05-27-2003, 04:51 AM
Well the only reason i even added this hack was to install the store hack, and i cant get that to work either....go figure

Ryan McBain
05-28-2003, 06:15 AM
I keep getting this error when i try to add templates....

Warning: dir(./admin/templates/.) [function.dir]: failed to open dir: No such file or directory in /home/ryanmcba/public_html/forums/admin/tbs.php on line 127

Fatal error: Call to a member function on a non-object in /home/ryanmcba/public_html/forums/admin/tbs.php on line 128

Erwin
05-28-2003, 06:40 AM
The directory path:

/admin/templates/

is not being found by tbs.php - you need to make sure it's present, and make sure tbs.php points to it properly.

Ryan McBain
05-28-2003, 06:42 AM
[QUOTE]Today at 12:40 AM Erwin said this in Post #191 (https://vborg.vbsupport.ru/showthread.php?postid=400996#post400996)
The directory path:

/admin/templates/

is not being found by tbs.php - you need to make sure it's present, and make sure tbs.php points to it properly.

Smoothie
05-28-2003, 07:36 AM
Folder of files:
No prefix or suffix slashes! Relative to admin folder. templates!

Ryan McBain
05-28-2003, 02:40 PM
cool got it to work thanks

Christine
05-31-2003, 08:32 PM
Just upgraded to 2.3.0 and this is still going strong.

Cheers!

ap0c
06-02-2003, 12:37 AM
installed and working great..... now to upgrade the portal:(

dantech30
06-04-2003, 06:59 PM
I need some help - I havedone everything you said and now when I try to go to my admin panel - I get this error here:

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /var/www/forums/admin/index.php on line 3

Parse error: parse error, unexpected T_STRING in /var/www/forums/admin/index.php on line 3

Can someone please help me?

[Fx]AssAssiN
06-05-2003, 04:24 AM
very nice.
Helped a TON with installing the store hack!
Very Nice and Easy

jackyhow
06-09-2003, 05:55 AM
i donno y, but it is not working on my site, when i am trying to export templates, it seems like everything is fine. but there is no files created under templates folder.....anyone tell me y plz????

jackyhow
06-11-2003, 06:07 AM
no one can answer my quesion??

Phoenix_Fighter
06-26-2003, 06:00 PM
Warning: dir(./templates/.) [function.dir]: failed to open dir: No such file or directory in /home/zeta/public_html/admin/tbs.php on line 127

Fatal error: Call to a member function on a non-object in /home/zeta/public_html/admin/tbs.php on line 128

i get that everytime i click upload and i click expand i get that error what should i do

midnightz
07-01-2003, 07:19 PM
[QUOTE]06-11-03 at 02:07 AM jackyhow said this in Post #200 (https://vborg.vbsupport.ru/showthread.php?postid=407409#post407409)
no one can answer my quesion??

Hostc
07-04-2003, 03:25 AM
[QUOTE]06-26-03 at 08:00 PM Phoenix_Fighter said this in Post #201 (https://vborg.vbsupport.ru/showthread.php?postid=413036#post413036)
Warning: dir(./templates/.) [function.dir]: failed to open dir: No such file or directory in /home/zeta/public_html/admin/tbs.php on line 127

Fatal error: Call to a member function on a non-object in /home/zeta/public_html/admin/tbs.php on line 128

i get that everytime i click upload and i click expand i get that error what should i do

RixiuS
07-27-2003, 04:17 AM
wow. thanks

Oblivion Knight
07-28-2003, 10:55 AM
Wow.. Just wow.. This has saved me SO much time.

One of your finest mods it has to be said Chen :)

cindyd
08-10-2003, 09:36 PM
Chen: you are my hero! No more C&P! Yippee

* clicks install

Oblivion Knight
08-11-2003, 11:58 AM
Thankyou very much to kippesp and Axel Foley for their fix.
I was just going to post about a problem I was experiencing whereby only the created templates were being exported and not the original ones, but I searched the thread, found that edited file to fix a similar problem and it fixed mine.. :)

Thanks guys!

Destiny Islands
10-24-2003, 03:33 PM
Hey Chen Thanks for this great addition to my vB! I think that I might go ahead and install Arcade now that this is out! Thanks again ... great hack.

/me Clicks Install!

VirtualHogwarts
11-30-2003, 08:09 PM
/me clicks insatll! thanks hell of a lot of help with Store lol!

Fargo
01-31-2004, 05:18 AM
Could it possibly get any easier than this???? Great hack bud - works perfectly :)

Christine
02-09-2004, 12:26 PM
Does anyone have this working on 3.0?

weirdpixels
05-10-2004, 05:12 PM
great, *installs*

David Coutts
06-28-2004, 04:06 AM
Thanks so much, Chen. Such a simple, yet useful hack. 'Twas a breeze to install, and it saves me a hell of a lot of time. 10/10!

KW802
08-04-2004, 06:08 PM
[QUOTE=Christine]Does anyone have this working on 3.0?

TeenageWorld
08-06-2004, 09:10 PM
Simple, and effective for big hacks, great idea and really easy install.. Clicks Install

- Teenage World

spence2
08-07-2004, 04:40 PM
Any notion of re-releasing this for vB3? Specifically vB3.03 now?

NietzscheKid
08-07-2004, 04:48 PM
[QUOTE=spence2]Any notion of re-releasing this for vB3? Specifically vB3.03 now?

roxics
09-18-2004, 04:22 AM
It was working great fo me. But then I moved my vb 2.6 to a different domain name. Now all I get when I go to backup templates are error messages that say:

can't open stream,
invalid stream
failed to open stream
permission denied in adminfunctions.php on line whatever (158, 160 , ect)

All the errors for every template all have to do with adminfunctions.php and how it doesn't have permission. fclose, fopen, fwrite. But it does have permission.

powelly
11-12-2004, 02:57 PM
Does anyone think Chen will release a vB3 version of this hack??

powelly
11-12-2004, 03:00 PM
[QUOTE=KW802]:nervous:

ChAiN LeTtEr
06-20-2005, 03:48 AM
Hi all, I hope someone can help! Here's the error I'm getting:

Warning: fopen(./templates/forumhome_dropdownbit.html): failed to open stream: Permission denied in /home/****/public_html/forum/admin/adminfunctions.php on line 157

Warning: fwrite(): supplied argument is not a valid stream resource in /home/****/public_html/forum/admin/adminfunctions.php on line 159

Warning: fclose(): supplied argument is not a valid stream resource in /home/****/public_html/forum/admin/adminfunctions.php on line 161

and it continues with more of those for different things.

We have a templates folder int he admin folder, but it's empty. Why is it empty and should it not be? Is that what could be causing the errors? :(

Thanks in advance!

ChAiN LeTtEr
06-20-2005, 05:07 PM
Oh yay! We fixed it! Just the permission problem and setting the folder to 777 worked. :D