Welcome, Guest. Please login or register.
August 20, 2008, 05:20:02 PM

Login with username, password and session length
Search:     Advanced search
Website Baker 2.7.0 (stable) released!
For more information look here.
The announcement board can be found here.
60556 Posts in 9791 Topics by 5824 Members
Latest Member: blubb
* Home Help Search Login Register
+  Website Baker Community Forum
|-+  English
| |-+  Archive
| | |-+  [ADDON - 2.6.x] Page Cloner
Pages: [1] 2 Go Down Print
Author Topic: [ADDON - 2.6.x] Page Cloner  (Read 6597 times)
pcwacht
Guest
« on: January 09, 2006, 10:02:45 PM »

Ever got a page with multiple sections and different blocks and you need one just like it?


install pagecloner, this is a tool visible at -> admin -> settings -> advanced settings

choose your page, set the new name and parent page and the page will be cloned
it clones:
- all page settings
- all sections of that page with the settings
- all the content from the modules wysiwyg, code and form

This is version 0.3, as far as I know stable.
The idea came from Bradnickel


John

9-jan updated version = 0.4
« Last Edit: January 09, 2006, 11:20:11 PM by pcwacht » Logged
Woudloper
Guest
« Reply #1 on: January 09, 2006, 10:10:01 PM »

Wow, this is really a great module!! I currrently building a website where I thought of the same idea. If you hadn't made it now I sure wanted to work on something simular when I finished, now I can just use your version...

Will try this later today or tomorrow!! Keep you posted about testing proces...


Have installed it and tested it a bit and have the following minor comment:

  • Line 126 in 'tool_clone.php' has a type, see $template->pparse('output', 'page');
  • Line 91-93 in 'tool_doclone.php' contains debugging or some Dutch text;
  • If you see the list of pages it is not clear what to do, maybe explain in beginning that you need to click a hyperlink when you want to clone;
  • Would it also be possible to set visibility and other stuff when cloning, just as is possible when creating a new page;
  • Would it also be possible to clone the content of a page;
  • Does this cloning works with all the modules?
  • The 'back' link on the 'tool_doclone.php' refers  to wrong page
I received an error when cloning a guestbook page on my developement server, when clicking the back link I was sent to the frontend of the 'Website Baker' website.
[/list]
« Last Edit: January 09, 2006, 10:25:22 PM by Woudloper » Logged
bupaje
Geek-Like Baker
*****
Offline Offline

Posts: 401


WWW
« Reply #2 on: January 09, 2006, 10:36:47 PM »

Cool idea, I have often wished for this ability. In the past I had suggested a 'save snippet' to save cut and paste bits of code I often use and reuse them but this is better. Look forward to seeing hoe this develops.
Logged

pcwacht
Guest
« Reply #3 on: January 09, 2006, 11:17:47 PM »

Quote
Line 126 in 'tool_clone.php' has a type, see $template->pparse('output', 'page');
Look like one, but isn't.
The pparse is the function to start parsing, the parse is setting variables
Had me fooled as well.

Quote
Line 91-93 in 'tool_doclone.php' contains debugging or some Dutch text;
removed

Quote
If you see the list of pages it is not clear what to do, maybe explain in beginning that you need to click a hyperlink when you want to clone;
Did you hoover a link?  (Changed the hoover text to be more precise)
Might be less intuitive at first, but that is only the very first time I think.

Quote
Would it also be possible to set visibility and other stuff when cloning, just as is possible when creating a new page;
My thoughts:
Cloning is making an exact copy, then after the cloning or duplicating process you'll end up in the editscreen of the newly cloned page where you can change everything to your likings

Quote
Would it also be possible to clone the content of a page;
Only the content of the following modules will be cloned:
WYSIYWG, FORM and CODE,
With these modules EVERYTHING will be copied, with the form NOT the submissions ofcourse.

Quote
Does this cloning works with all the modules?
As far as I know

Quote
The 'back' link on the 'tool_doclone.php' refers  to wrong page
This back link is generated by wb build in functions, print_error in class_admin
the tool files are all protected for direct calls, so can't use them
Think this goes for every module

John
Updated the download in first post
« Last Edit: January 09, 2006, 11:20:55 PM by pcwacht » Logged
Vincent
Semi-Master Baker
*****
Offline Offline

Posts: 202


« Reply #4 on: January 25, 2006, 10:51:19 PM »

Good idea, John! Thanks,

Vincent
Logged
jschor
Junior Baker
****
Offline Offline

Posts: 110


« Reply #5 on: January 27, 2006, 03:55:46 PM »

Shouldn't this be in the completed module section also?? grin
Logged
wwwMARKLEYcouk
Master Baker
*****
Offline Offline

Posts: 268



WWW
« Reply #6 on: January 27, 2006, 04:10:35 PM »

Shouldn't this be in the completed module section also?? grin
no as its not completed yet its only version 0.4 which is beta testing.

excellent module so far though. Does exactly what it says on the tin Smiley thanks
Logged

http://www.markley.co.uk
new webhosting packages available at the cheapest prices around
enthused
Pending Apprentice Baker
**
Offline Offline

Posts: 41


« Reply #7 on: February 03, 2006, 06:51:04 AM »

A fantastic piece of work John. Something I've kinda been wishing for. Well done!
Enthused  tongue
Logged
Attila
Junior Baker
****
Offline Offline

Posts: 140



« Reply #8 on: February 03, 2006, 07:18:32 AM »

John,

I like your Page Cloner  smiley
Here is my german language file for it.

-- Dave
Logged
wwwMARKLEYcouk
Master Baker
*****
Offline Offline

Posts: 268



WWW
« Reply #9 on: March 07, 2006, 12:16:54 PM »

so is this module being revised or has it reached it official complete stage?
Logged

http://www.markley.co.uk
new webhosting packages available at the cheapest prices around
pcwacht
Guest
« Reply #10 on: March 07, 2006, 12:53:40 PM »

I think, since there are no errors or requests,  it has reached some final stage...

John


edit: added errors..
« Last Edit: March 07, 2006, 02:33:05 PM by pcwacht » Logged
ephraimt
Pending Apprentice Baker
**
Offline Offline

Posts: 7


« Reply #11 on: March 12, 2006, 08:23:40 AM »

Hi,

I love your page cloner.

I could really use an option that also clones all child pages (recursively including child's child etc.)

I started to look into doing it myself, but it is a big project to become familiar with your code, and I thought perhaps it would be easy for you to add this functionality, since you know the code.

Here's my idea:

1. Add a checkbox on the screen that comes up after choosing the page to clone. (The one that says: "Click to duplicate this page"...) The checkbox would say "Clone child pages".

2. If the box is checked, it would then clone as usual using the new name I provide, but then it would recursively drill down, cloning all children of that new page. (It would do this without asking to rename them or choose their parent. The parent would automatically be set to the appropriate relative place in the hierarchy starting with the first new clone.)

3. A very cool optional enhancement would be, once the cloning is complete, to present a page similar to the expanded page chooser list where I chose which page to clone, but this special page would be for renaming new pages. (Or maybe this is a new module called "Page Renamer"?) For example, it would be a big form with the old name shown for each page in the branch that was cloned, followed by an input field for changing the name if desired. This would be very useful for users who are creating multilingual sites and want to duplicate an entire language branch quickly before going in to translate each page's content.

What do you say?
Logged
mcbobo
Pending Apprentice Baker
**
Offline Offline

Posts: 9



WWW Email
« Reply #12 on: May 28, 2006, 02:29:12 PM »

Can this module clone only one section from a site, e.g. the news module section?
Logged
pcwacht
Guest
« Reply #13 on: May 28, 2006, 06:47:12 PM »

Quote
Quote
Would it also be possible to clone the content of a page;
Only the content of the following modules will be cloned:
WYSIYWG, FORM and CODE,
With these modules EVERYTHING will be copied, with the form NOT the submissions ofcourse.


Quote
Quote
Does this cloning works with all the modules?
As far as I know

@mcbobo
Quote
Can this module clone only one section from a site, e.g. the news module section?
See above, no, it will clone the whole page!


@ephraimt:
Quote
clones all child pages (recursively including child's child etc.)
Would be very tough to code this in.

Logged
puresmart
Pending Apprentice Baker
**
Offline Offline

Posts: 8


« Reply #14 on: September 04, 2006, 02:56:54 PM »

Nice module and very useful thanks.

I have one question:

The module by default installs in the Settings section. Editors of our site (Page creators) do not have permission to change settings therefore they cannot use the tool, only full Administrators, can I work round this?
Logged
Olli
Senior Baker
*****
Offline Offline

Posts: 170


« Reply #15 on: September 18, 2006, 01:39:52 PM »

hello john,
very nice tool, but what to you think about integrating this into the main pages overview?
e.g. with an extra button or inside the properties menu of each page?

right now the cloning functionality is VERY USEFUL but hidden inside the options (which not all users might have permissions to).

bye
Logged
pcwacht
Guest
« Reply #16 on: September 18, 2006, 05:44:08 PM »

Never thought of that...

My first very quick response : if pagecloning would be done through admin'front'end then there is no access control
Wouldn't hurt in small sites, but could hurt in bigger (more eitors) sites

For those with a small site, just bookmark the pagecloner link... Wink



John
Logged
Olli
Senior Baker
*****
Offline Offline

Posts: 170


« Reply #17 on: September 19, 2006, 04:09:29 PM »

hey john,
i guess you're right Wink

but what about limitating cloning to administrators only? Smiley

btw: does this board still send email-notifications on reply? does not work for me anymore...  huh

bye
Logged
pcwacht
Guest
« Reply #18 on: September 19, 2006, 07:15:58 PM »

Dunnoh how to limit to admin only...

I am using windows, made a folder with shortlinks to some of the stuff wich is handy, pagecloner, templateedit etc...

Then I open the folder, put it on the left of my screen and have the wb browser more to the right, works fast enough for me.

But anytime feel free to 'enhance' the code.

John

Logged
Olli
Senior Baker
*****
Offline Offline

Posts: 170


« Reply #19 on: September 19, 2006, 07:44:32 PM »

hey john,
maybe i'm totally wrong on this one - but i though about administration rights inside WB not anything OS related Wink...

let's say there is a user called 'pcwacht' inside WB. the default users are automatically members of the group "administrators",right?

just thought it might be a slight way of secutrity to bind a page-cloning-button to user-groups...

another maybe easier way: to turn cloning options to each page (that could be a seperate button on pages overview) on/off within the options menu, where you set things like intro page on/off, multiple menus and stuff like that...that would bring back security to the system Smiley

what do you think?
Logged
Pages: [1] 2 Go Up Print 
Jump to:  

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