Welcome, Guest. Please login or register.
November 22, 2008, 01:38:03 PM

Login with username, password and session length
Search:     Advanced search
Website Baker 2.7.0 (stable) veröffentlicht!
Nähere Informationen findet ihr hier.
Das Diskussionsboard findet ihr hier.
68083 Posts in 10810 Topics by 6527 Members
Latest Member: borut
* Home Help Search Login Register
+  Website Baker Community Forum
|-+  English
| |-+  Modules
| | |-+  addon (2.6.0): Template Edit
Pages: [1] 2 3 4 Go Down Print
Author Topic: addon (2.6.0): Template Edit  (Read 16705 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
Pending Apprentice Baker
**
Offline Offline

Posts: 2


Email
« 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
Leaders Team
A Baker's Baker
*****
Offline Offline

Posts: 6513


Keep on Rockin


WWW Email
« 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

You search for help, please look here: Help-Page
You search for Modules, Templates or Languages, please look here: Addons-Page
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
Leaders Team
A Baker's Baker
*****
Offline Offline

Posts: 6513


Keep on Rockin


WWW Email
« 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

You search for help, please look here: Help-Page
You search for Modules, Templates or Languages, please look here: Addons-Page
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
Leaders Team
A Baker's Baker
*****
Offline Offline

Posts: 6513


Keep on Rockin


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

nothing happens. No file is shown

Matthias
Logged

You search for help, please look here: Help-Page
You search for Modules, Templates or Languages, please look here: Addons-Page
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
Leaders Team
A Baker's Baker
*****
Offline Offline

Posts: 6513


Keep on Rockin


WWW Email
« 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

You search for help, please look here: Help-Page
You search for Modules, Templates or Languages, please look here: Addons-Page
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
Leaders Team
A Baker's Baker
*****
Offline Offline

Posts: 6513


Keep on Rockin


WWW Email
« 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

You search for help, please look here: Help-Page
You search for Modules, Templates or Languages, please look here: Addons-Page
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
Leaders Team
A Baker's Baker
*****
Offline Offline

Posts: 6513


Keep on Rockin


WWW Email
« 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

You search for help, please look here: Help-Page
You search for Modules, Templates or Languages, please look here: Addons-Page
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
Apprentice Baker
***
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
Apprentice Baker
***
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
Pages: [1] 2 3 4 Go Up Print 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!