Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: [request] Save As, Save New button for 4.5+
…And after 8 years mrdale has a pony. Thanks stef.
Game, Set and Match… Thank you linesman, thank you ball boys.
Offline
Re: [request] Save As, Save New button for 4.5+
mrdale wrote #279063:
Game, Set and Match…
I’m on the edge of my seat waiting for your next Textpattern feature request, Dale. This one’s gonna be a hard act to follow.
Online
Re: [request] Save As, Save New button for 4.5+
er… here are a couple.
- true custom hierarchical content types (flexible collections of fields that may be used separately or combined and associated)
- content independent (univeral) categories
- better filtering tags for article_custom
- a trusty steed and a frosty mug for each dev
Seriously tho… thanks to devs for making this happen.
Offline
#64 2014-03-17 10:49:25
- Algaris
- Member
- From: England
- Registered: 2006-01-27
- Posts: 553
Re: [request] Save As, Save New button for 4.5+
Thank you so much for doing this. I use Mary’s upm_savenew plugin every day at work (for my last surviving Textpattern site sniff).
One suggestion (which might only be relevant to me given my workflow, so feel free to ignore), rather than change the title and URL title to the articles ID how about appending an auto incrementing numerical value to the URL title? I often have to duplicate articles that need the same title and to avoid a duplicate URL I just append a number to the end of it for example article-title-1, article-title-2, etc. From what I’ve seen this is how WordPress handles it.
Now if we’re wishing for ponies I’d love to see unlimited categories across all media types (articles, images, files, etc.), cnk_versioning integration (I can’t build a Textpattern site without it now), and maybe something like gbp_permanent_links in the core (wishful thinking) for true custom URLs. But these are topics for another thread. Today I’m just happy to have a Save As button in the core.
Offline
Re: [request] Save As, Save New button for 4.5+
Algaris wrote #279764:
rather than change the title and URL title to the articles ID how about appending an auto incrementing numerical value to the URL title? I often have to duplicate articles that need the same title and to avoid a duplicate URL I just append a number to the end of it for example article-title-1, article-title-2, etc. From what I’ve seen this is how WordPress handles it.
I agree with this suggestion – if I remember correctly that is how the forms/pages/styles handle increments when duplicating so we should keep it consistent. Unless there is a technical reason why this can’t be done.
Offline
Re: [request] Save As, Save New button for 4.5+
philwareham wrote #279765:
forms/pages/styles handle increments when duplicating so we should keep it consistent. Unless there is a technical reason why this can’t be done.
Forms/Pages/Styles add _copy
to the end, which is pretty lame from a concurrency viewpoint. Imagine two users hitting Duplicate on the same form at roughly the same time from different browsers: one of them is going to be disappointed. Although I believe there’s a unique constraint on the name field, so probable worst case scenario is that person 1’s Form gets saved and person 2 gets a MySQL error message thrown when they try and “create” a form of the same name. I should probably test that out and see what happens: I might have worked around it already by checking the name and adding another _copy
to the end if there’s a clash (which gets silly if 3 or 4 people hit the button at the same time, but hey…)
Luckily, in the case of articles, there’s an auto-incrementing ‘ID’ field. So we can tack that on wherever we like and it’s MySQL’s job to make sure the numbers don’t clash. Well, it will when the call is atomic, which it’ll need to be when CFs move out of the textpattern table.
I do take Algaris’ point about the visible title. The only reason I added the ID to both the title and URL-title was so you could a) distinguish the clone more easily in the article list, b) know the copy had taken place to your satisfaction if the URL-title was hidden behind its twisty, and c) keeping the title and url-title in sync felt ‘right’ from the perspective of indicating to the author what’s going on, even though it adds one more field to be edited before publication.
Willing to take direction on better methods. End result is not to confuse newcomers and make the fewest number of assumptions so it’s the least amount of hassle to get the clone published. Discuss.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: [request] Save As, Save New button for 4.5+
Ah, OK, fair points.
Offline