Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
How to easy copy article as a new article?
Does anybody knows how to easy copy article as a new article with all attributes in body, excerpt and custom_fields?
I fill a bigger e-shop based on TXP and it’s really brutal to copy body, excerpt and 7 custom_field…
Maybe this could be a request for the future version of TXP or plugin-request, which copy whole article for example with different title adding – copy1, copy2 etc. without copying url_title because in copied article I have to change title and after saving TXP will generate appropriete url_title…
Can anybody help or know solution?
Job: Plugo – tvorba eshopu
Projects: Czech free fonts
Offline
Re: How to easy copy article as a new article?
upm_savenew will do this except for the title part. You have to change it before you hit “Save New” in order to get a different one.
Last edited by hakjoon (2007-03-08 20:12:50)
Shoving is the answer – pusher robot
Offline
Re: How to easy copy article as a new article?
You can do this with MySQL …
INSERT INTO textpattern
(Posted, AuthorID, LastMod, LastModID, Title, Title_html, Body, Body_html, Excerpt, Excerpt_html, Image, Category1, Category2, Annotate, AnnotateInvite, comments_count, Status, textile_body, textile_excerpt, Section, override_form, Keywords, custom_1, custom_2, custom_3, custom_4, custom_5, custom_6, custom_7, custom_8, custom_9, custom_10, uid)
SELECT Posted, AuthorID, LastMod, LastModID, Title, Title_html, Body, Body_html, Excerpt, Excerpt_html, Image, Category1, Category2, Annotate, AnnotateInvite, comments_count, ‘2’, textile_body, textile_excerpt, Section, override_form, Keywords, custom_1, custom_2, custom_3, custom_4, custom_5, custom_6, custom_7, custom_8, custom_9, custom_10, uid
FROM textpattern
WHERE ID=2
or basically:
INSERT INTO textpattern
(columns_comma_seperated
)
SELECT
columns_comma_seperated
FROM textpattern
WHERE ID=@id_you_are_copying@
*Note in my first example … instead of selecting STATUS … I selected ‘2’ that way it won’t be LIVE when copied… i also left out url_title … you may want to do more… *
Last edited by dbulli (2007-03-08 20:45:56)
nuff-respec ::: dannyb
Offline
Re: How to easy copy article as a new article?
A plugin … much easier ;) !
nuff-respec ::: dannyb
Offline
Re: How to easy copy article as a new article?
Thank you Hakjoon (and of course dbulli too). I try to search this plugin before posting question, but without success. Thx, it works as I need. I save many hours…
Job: Plugo – tvorba eshopu
Projects: Czech free fonts
Offline