Page 1 of 2

Enhancement -> copy templates

Posted: Wed 8. Jun 2005, 13:36
by erich_k4
[IMPORTEND]

"copy templates" now is included in the latest CVS-Release...

So you don't have to install it manually if you install CVS-Version 1.2.6 -14.12.2005 and up...


----------------------------------------------------------


Hello phpwcms-friends!

Here is my little contribution to this great cms and forum:

With this enhancement it's possible to copy templates in the Backend in a very simple way.

Image

Image

To install this enhancement download

http://www.kmedv.at/phpwcms/admin.templates.tmpl.zip

unzip it and replace the original admin.templates.tmpl.php with the new one.
The admin.templates.tmpl.php is located in "include\inc_tmpl".

Only one thing to change left -> the language files:

Code: Select all

#
#-----[ OPEN ]------------------------------------------
#

include\inc_lang\backend\en\lang.inc.php

#
#-----[ FIND ]------------------------------------------
#

// admin.templates.tmpl.php
$BL['be_admin_tmpl_title']              = 'frontend setup: templates';
$BL['be_admin_tmpl_default']            = 'default';
$BL['be_admin_tmpl_add']                = 'add template';
$BL['be_admin_tmpl_edit']               = 'edit template';
$BL['be_admin_tmpl_new']                = 'create new';
$BL['be_admin_tmpl_css']                = 'css file';
$BL['be_admin_tmpl_head']               = 'html head';
$BL['be_admin_tmpl_js']                 = 'js onload';
$BL['be_admin_tmpl_error']              = 'error';
$BL['be_admin_tmpl_button']             = 'save template';
$BL['be_admin_tmpl_name']               = 'name';

#
#-----[ ADD ]------
#

$BL['be_admin_tmpl_copy']               = 'copy template'; 


Repeat the above steps for each preferred language.

Tested with version 1.2.1-DEV, should also work with the newer versions.

Thats all....

Erich

Posted: Wed 8. Jun 2005, 14:16
by Kosse
Hi Erich,

just tested it, very nice! Saves a lot of time (instead of copy paste the templates manually...). Works ok in 1.2.1 and 1.2.2 (tested both).
Only thing; when you copy and create the new template it seems you have to set the new template as default or it doesn't create it (but that is not really a "bug" because just by unclicking it after it's ok --> so still does the job)

Really nice little enhancement. Great hack!
Should warn brans to update list of MOD/hacks.
OG, this could be added to next dev version, don't you think?

Cheers

Posted: Wed 8. Jun 2005, 15:25
by brans
hi erich_k4 would you mind adding your hack to --...--/index.php/board,1.0.html ?

Please keep inline with the template that can be found under
--...--/index.php/topic,4.0.html

Posted: Wed 8. Jun 2005, 21:04
by dbaron
Hai all

Should have the same for "page layout", no?

Posted: Wed 8. Jun 2005, 22:03
by frold
dbaron wrote:Hai all

Should have the same for "page layout", no?
why?

Posted: Thu 9. Jun 2005, 08:46
by dbaron
Because I have several page layout

Posted: Thu 9. Jun 2005, 10:41
by frold
dbaron wrote:Because I have several page layout
well you can reuse the same page layout...

Posted: Thu 9. Jun 2005, 10:47
by dbaron
Right :?

Posted: Thu 9. Jun 2005, 11:23
by trip
coool...looks very nice

TriP

well very nice but

Posted: Thu 5. Jan 2006, 14:03
by Drakaina
Hello board,
I tried the Hack as I was tired of manualy copying but when i try to validate the new template get the following error message
"Fatal error: Call to undefined function: update_cache() in /home/ariockco/public_html/drakainasite/2006/include/inc_tmpl/admin.templates.tmpl.php on line 145"
as i am a beginner to php I have no clue what they mean by undefined fonction :(
now i cannot create anymore templates at all
Can anybody help me make this wonderfull CMs work again?
Thanks in advance
Drakaina

Posted: Thu 5. Jan 2006, 14:16
by cyrano
Hi, this feature is integrated in dev release 1.2.6

Posted: Thu 5. Jan 2006, 14:22
by Drakaina
Hi Cyrano
thanks for the info : i am actually using version 1.1 -RC4 (this is the version offered to download by my webhost)
I guess I need to update version.. But does that mean I wll lose the website stucture I've created so far?

Posted: Thu 5. Jan 2006, 14:34
by jscholtysik
Hi Drakaina,

this enhancement is already included in the latest CVS-Release... :-)

So you don't have to install it manually if you install CVS-Version 1.2.6 -14.12.2005... ;-)


Joachim

Posted: Thu 5. Jan 2006, 14:43
by Drakaina
Hello Joachim and thanks for your help.
I am a little shy of updating a new version since last time I tried to update another database on with my host (integrahost) it messed up everything and they where unable to help me fix it..
What I need to know is (after downloading the new version to my hard drive and then uploading it with ftp) how do i update the database (all i have done to the website so far is site structure (page layout, templates..) which I do not want to lose when updating new version.. I am really having a hard time understanding how mysql base works therefor I am scared of losing everything when updating to new version :(
Or how do I install the lates CVS release ?
Thank you for your time
Drakaina

Posted: Thu 5. Jan 2006, 15:36
by pico
Hi

for Databes Upgrade use the upgrade.php Script in ../setup/ and do all the SQL-Upgrades Step-by-Step form the Version you had before. Also do the three Upgrades on Top of the Upgrade-Site ( Filestorage, Article-Content etc.)
Before uploading the new Version you should make a Backup of all Files and the Database.