Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-12-15 20:23:08

Rexel
Member
Registered: 2005-11-18
Posts: 26

[request] deleting an article and its related content, possible?

maybe a silly question here.

but is it possible to delete an article, its related image and the category that the image reside in, all by deleting the article?

ie: when I delete the article, the article image and its category is deleted as well.

I tried searching the forum, but no luck so far.

Regards

Last edited by Rexel (2007-12-15 20:24:15)

Offline

#2 2007-12-15 21:23:24

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: [request] deleting an article and its related content, possible?

No, it’s not possible. Wouldn’t be wise either, because an image category could also be assigned to other images, and even an image could also be assigned to other articles.

Offline

#3 2007-12-15 21:32:52

Rexel
Member
Registered: 2005-11-18
Posts: 26

Re: [request] deleting an article and its related content, possible?

You’re right; it wont be wise to delete the image category.

But lets say I have an article which is an item for sale, once that item is not for sale anymore, its cleaner and time effective to delete the article “the item” and its image in one go. specially if the person who’s going to maintain the site is not savy and may delete just the main image or just the thumbnail etc.

So deleting the article which will in turn delete the related image and thumbnail will make sense.
I suppose a plug in is best suited for the task, but given I’m a complete php baby, its beyond me at this moment.
My limited understanding dictate a run to the DB ->fetching the article ID, the image and thumbnail IDs and deleting them all in one go, again I might be wrong.

Offline

#4 2007-12-15 21:40:08

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: [request] deleting an article and its related content, possible?

You could always post a plugin request.
As far as I know, when you delete an image, the thumbnail is also deleted.

Offline

#5 2007-12-17 08:50:31

Rexel
Member
Registered: 2005-11-18
Posts: 26

Re: [request] deleting an article and its related content, possible?

Thank you Els.
Sorry about the late reply.
Anybody can shed a bit of PHP light on the matter?
Will be greatly appreciated.

Regards

Offline

Board footer

Powered by FluxBB