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)

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

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/t...it&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 @ 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:

[high]* X3ON clicks install button[/high]

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:
Code:

;
; 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:
Code:

safe_mode = Off
Or leave it on, but turn this setting off:
Code:

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
[B]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 ?

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
Code:

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

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



All times are GMT. The time now is 07:37 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.01503 seconds
  • Memory Usage 1,833KB
  • 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
  • (5)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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