Welcome, Guest. Please login or register.
Did you miss your activation email?
February 12, 2012, 12:38:39 PM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
149636 Posts in 21099 Topics by 7538 Members
Latest Member: ionline
* Home Help Search Login Register
Pages: [1] 2 3   Go Down
Print
Author Topic: addon (2.6.0): Template Edit  (Read 26490 times)
pcwacht
Guest
« on: November 05, 2005, 07:32:44 PM »

My first addon for wb260 Wink

Template Edit let you edit your temaplte files online from admin -> settings -> advanced

please test and let me know if and how to improve

John


New version at this post: http://forum.websitebaker.org/index.php/topic,1729.msg10636.html#msg10636
« Last Edit: November 07, 2005, 10:39:32 AM by pcwacht » Logged
Woudloper
Guest
« Reply #1 on: November 05, 2005, 11:24:26 PM »

The addon is looking very nice. I need to further test it and investigate how it precisly works, but the first impression is OK!

I needed some time to find the 'addon' as I expected to find it in the 'addon'  section or in the template section when viewing the template details and not in the advanced administration settings. Can this be changed? Or will this include a whole rewrite of the addon logic (by either Ryan or Stefan?)....
Logged
Roway

Offline Offline

Posts: 2


« Reply #2 on: November 06, 2005, 05:37:47 AM »

I have downloaded and installed the template edit, but I can't find it. I've looked under setting > advanced. Not there. Do you know what I'm doing wrong. Thanks
Logged
pcwacht
Guest
« Reply #3 on: November 06, 2005, 11:32:05 AM »

1st, you need wb260
then after installing, goto admin -> settings -> click the advanced settings -> look at bottom
you should see, backup, reload and template edit

John
Logged
ruebenwurzel
WebsiteBaker Org e.V.

Offline Offline

Posts: 7661



WWW
« Reply #4 on: November 06, 2005, 07:20:32 PM »

Hello John,

tried your templateedit tool with the last version of WB from trunk. Install is ok and all template files are shown, but when i mark a file and hit "Choose file" nothing happens. What's wrong?

I tested on a local machine (Apache 2.0.55, Mysql 4.0.26, PHP 5.0.5) with a clean new installation.

Matthias
Logged
pcwacht
Guest
« Reply #5 on: November 06, 2005, 09:16:59 PM »

I really don't know


It should work, I've tested it with both php4 and php5 to make sure
It doesn't use mysql (I merely look at the files Wink )

What you can do:
Fetch the attached file, unzip, place in root of wb, same dir as config.php
It is basicly the same code.

test it, (after testing make sure to delete it again, there are no checks what so ever!)
and let me know what it does or doesn't


John

« Last Edit: November 06, 2005, 09:43:12 PM by pcwacht » Logged
ruebenwurzel
WebsiteBaker Org e.V.

Offline Offline

Posts: 7661



WWW
« Reply #6 on: November 06, 2005, 09:36:34 PM »

Thanks for the fast response. Tested it like you describe and got the same result. Hit "choose file" and nothing happens.

Matthias
Logged
pcwacht
Guest
« Reply #7 on: November 06, 2005, 09:42:33 PM »

Looks like the choosen file is not posted

Added a check

This should show chosen filename on top after you choose the file ofcourse Wink

John
« Last Edit: November 07, 2005, 01:16:33 AM by pcwacht » Logged
ruebenwurzel
WebsiteBaker Org e.V.

Offline Offline

Posts: 7661



WWW
« Reply #8 on: November 06, 2005, 09:49:57 PM »

nothing happens. No file is shown

Matthias
Logged
pcwacht
Guest
« Reply #9 on: November 06, 2005, 10:13:53 PM »

The first form gives selectionbox 'file' the chosen value when submitting and calls himself

This doesn't happen at your install

I have read somewhere when using forms it is best to use 2 files allways, so when you hit submit the action is not PHP_SELF but another php file.
Maybe some php guru can help me on this behaviour to make it work with one file anyway ??

I will see if I can change this ie break it in 2 files



Sorry for the mean time,
John



Logged
ruebenwurzel
WebsiteBaker Org e.V.

Offline Offline

Posts: 7661



WWW
« Reply #10 on: November 06, 2005, 10:27:22 PM »

Hope there is found a solution. Templateediting from admin is one of my favorite wishes for WB. Thanks for your work.

Matthias
Logged
pcwacht
Guest
« Reply #11 on: November 07, 2005, 01:17:48 AM »

@Ruebenwurzel


Changed the code to 3 bits, I think  this should work. Let me know.

Updated zip in first post.

uninstall - install for update.


John


Logged
ruebenwurzel
WebsiteBaker Org e.V.

Offline Offline

Posts: 7661



WWW
« Reply #12 on: November 07, 2005, 07:15:31 AM »

Thanks,

but what do you wanna hear first, the good or the bad news cheesy

Good news: If I hit "choose File" i got another page  grin
Bad news: On this Page I only see the "Back" Button  cry

Matthias
Logged
pcwacht
Guest
« Reply #13 on: November 07, 2005, 10:01:03 AM »

@Ruebenwurzel,

Do you have 'registerglobals' = off ??


Changed the select box to input type radio.

John

« Last Edit: November 07, 2005, 10:15:38 AM by pcwacht » Logged
pcwacht
Guest
« Reply #14 on: November 07, 2005, 10:38:37 AM »

@Ruebenwurzel: I have tested it with register_globals off and got the same error.

Fixed it Wink

changed :
select box to input type radio for a better layout
regiter_globals off or on works.




Happy baking,
John

[attachment deleted because of being too old]
« Last Edit: November 07, 2005, 10:40:50 AM by pcwacht » Logged
ruebenwurzel
WebsiteBaker Org e.V.

Offline Offline

Posts: 7661



WWW
« Reply #15 on: November 07, 2005, 07:53:21 PM »

Yes, register_globals Off was it.  evil  evil forget to set it "on" as i upgraded from php 4 to php 5.0.5. Sorry for maybe wasting your time  wink

The tool works very good and is the one i looked for a long time. Thank you very much. Only two Questions:

Is it possible to make it multilangual with a language File?
Is "Administrations Tools" in "Advanced Options" the only place where you can find this tool or is it possible to get this on another place (Like Woudloper wrote in his post)?

Oh I forget, i had a third question  grin  grin  grin

Is it possible to write this for WB 2.5.2 too?  grin  grin  grin

Matthias
Logged
pcwacht
Guest
« Reply #16 on: November 07, 2005, 08:32:12 PM »

register_globals Off was it - sorry for maybe wasting your time 
You diddn't waste my time, I learned a lot on how to deal with variables in php Wink


Is it possible to make it multilangual with a language File?
Yes

Is "Administrations Tools" in "Advanced Options" the only place where you can find this tool
Yes, it is the place for the addons (in wb260)

Is it possible to get this on another place
Maybe code page, or something, dunnoh, haven't tried

Is it possible to write this for WB 2.5.2 too?
Not as addon! Maybe as codepage?
But since 260 will be released any day now, and is 99% compatible, why bother?

Is it possible to 'plug' addons on another place?
I'll leave that to Ryan and or Stephan.

Glad you like it.
It works with register_globals on or off now Wink

John
Logged
skidrash

Offline Offline

Posts: 70


« Reply #17 on: December 14, 2005, 05:51:42 PM »

I downloaded and installed this module in 2.6 and tried it out but I don't think it's working right for me.  I go into it, and select the file I want to edit and hit "choose file" and when it goes to the next page all I have is a text-area box with one line in it......
        <?=$fileread?>

Does this mean that it's not reading the file in correctly?  I'm using PHP5 and IIS6 on Win2003.  Also if you are looking for suggestions, I was thinking it'd be nice if you could "copy" a template, so that you could work on the copy instead of the original.  It also be nice if the module would install the copy in the templates section, and maybe provide a way to download it...

Thanks for all your hard work!
Logged
pcwacht
Guest
« Reply #18 on: December 14, 2005, 07:49:07 PM »

<?=$fileread?>
is a short open tag (should read <?php=$fileread?> )

I have changed it. This one should work, if it doesn't, let me know.

Copying a template isn't custom in wb, it is standard that the template is installed from admin->addon->template

This addon was made by me for 2 purposes,
1 - learning the new addon trick in wb26x Wink
2 - much easier to change little things in the template / css etc then downing, editing, upping, trying etc (though I have root acces at my own servers Tongue )

So I don't think there will be more added values to this script by me. Maybe someone else might take it from here.

John
« Last Edit: December 14, 2005, 09:28:17 PM by pcwacht » Logged
skidrash

Offline Offline

Posts: 70


« Reply #19 on: December 14, 2005, 09:17:43 PM »

Ok I uninstalled it, downloaded it from your previous post, and installed it but it does that same exact thing.  Did I grab the wrong file, being as I got it from your previous post?
Logged
pcwacht
Guest
« Reply #20 on: December 14, 2005, 09:28:58 PM »

Sorry, forgot the attachment, it is there now, two posts up.

John
Logged
skidrash

Offline Offline

Posts: 70


« Reply #21 on: December 15, 2005, 12:27:49 PM »

Alright, I tried the new version, but it still wouldn't work for me.  So I worked on it a bit, and ended up changing that line for "<?php echo $fileread; ?>" and now it works great!  While I was at it, I got a little caught up and decided to add some stuff myself...(I hope you don't mind John!)

I reformatted the file selection page, and added the option to download a compressed/installable copy of an entire template.  I figured this would be a nice feature for when you've made a lot of changes to a custom template and you want a full backup copy.  Unfortunately it means I had to restructure most of the Template Edit code to get it to integrate (again, I hope you don't mind).

I think Template Edit is a very useful module, and if its alright with you John, I'd like to post it in the 'completed modules' thread so everyone can benefit?  Here is my updated package, which I re-titled as version 1.1.  Please take a look and let me know what you think.

« Last Edit: December 16, 2005, 09:27:14 AM by skidrash » Logged
pcwacht
Guest
« Reply #22 on: December 15, 2005, 01:00:18 PM »

Ofcourse I don't mind, silly you Tongue

I am glad you invested your time to improve and enhance the features.

Please post it as completed. I think it sure does look good.

John
Logged
skidrash

Offline Offline

Posts: 70


« Reply #23 on: December 16, 2005, 09:26:41 AM »

I found a few bugs in TE v1.1.   :|  So I fixed the bugs that I could...
        Added the ability to edit the info.php file, so authors can update template info
        Fixed issue where files in compressed template were stored with full directory path
        Fixed code comment displaying on tool_save screen

and explained the ones that I couldn't (I put a revision history in info.ph p file)...
       [bug] Template compression includes the 'thumbs.db' file in the archive when used on Windows servers
       [bug] Editor cannot "see" files in templates root directory if template contains a subdirectory
               {workaround = don't use subdirectories in your templates}

Here is the new version...  1.2.  I'm also updating it on the 'completed module' thread.
« Last Edit: February 04, 2006, 06:33:11 PM by skidrash » Logged
ruebenwurzel
WebsiteBaker Org e.V.

Offline Offline

Posts: 7661



WWW
« Reply #24 on: December 31, 2005, 04:58:40 PM »

Here is template Edit Version 1.3

Changelog
Quote
1.3   Added multilanguage support
   Changed the layout
   Fixed html code issues

There is now a languages dir, where you can store your own language file. The modul automaticly chooses the language from your homepage. If your language is not in the languages dir, EN is the default.

To make this addon multilangual i had to rewrite the most of the layout. But I think its now smaller, clearer and better. I hope you like it as much as I.  This is one of the best additions since WB 2.6.1. And if you like it, please post it in completed modules. Thanks

Happy new year

Matthias
Logged
Pages: [1] 2 3   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!