Page 1 of 1

Set article for date deletion

Posted: Mon Apr 30, 2007 9:42 pm
by rj
Comedy Central has videos that expire after a few weeks. I looked over the plugins but am not sure what to use to tag such articles for automatic deletion after a specified time?
Whats the answer?
I hope its easy! :)

RJ

Posted: Mon Apr 30, 2007 10:59 pm
by judebert
There's "Hide/delete entries for non-registered users after a specific timespan" (see spartacus.s9y.org). It sets the entries to draft, so non-registered users can't see them.

Posted: Tue May 01, 2007 2:40 am
by rj
Well I was thinking of maybe putting up a DAILY SHOW video every morning.
They will build up after a while. So I dont really care about who sees them, I want them deleted so it wont waste load time going off looking for things that are not there.

Iwant... :)

"delete article #234 in 30 days"

I suppose I could make a category for them and then use the aritlce filter thing by date and delete them ... Is that the answer? :)

RJ

Posted: Tue May 01, 2007 4:08 pm
by judebert
Sure, doing it manually will work. And that's a pretty efficient solution you've got there.

I don't think we've got an auto-delete function, because Serendipity's "use case" is an online diary. You generally don't want to delete entries from your diary.

On the other hand, modifying the plugin I mentioned earlier to actually delete the entries wouldn't be too hard, I don't think. If you're willing to back up in case you make a mistake, it'd probably be a good task to get your feet wet.

Posted: Tue May 01, 2007 6:04 pm
by rj
judebert wrote:Sure, doing it manually will work. And that's a pretty efficient solution you've got there.

I don't think we've got an auto-delete function, because Serendipity's "use case" is an online diary. You generally don't want to delete entries from your diary.
Could you expound on that! :)
I delete articles here and there, what is the adverse affect of that?

Posted: Tue May 01, 2007 6:41 pm
by judebert
rj wrote:Could you expound on that! :)
I delete articles here and there, what is the adverse affect of that?
Gladly! There's no adverse affect whatsoever.

Oh, you want more detail? :D

What I'm really saying is that Serendipity is designed for speed, simplicity, and security. Why? Because we (by which I mean Garvin and his cohorts; I wasn't here at that time) envisioned it as the original blogs were -- online diaries. Nothing more or less, no fancy stuff required, just a listing of past events and the observations that go with them. It ships with only the stuff required to do that job enabled; if you want to get fancy, you have to enable something extra, maybe even install a plugin.

In a regular diary, you don't rip out the pages. Usually. I suppose, if you had a really bad breakup, or if you said something stupid and needed to erase 18.5 minutes (sorry, American politics reference)... but usually, you keep everything around for later examination. So Serendipity has a delete function, and it works perfectly, but we expected you'd use it only rarely.

Then there's the revolution. People want Serendipity to work for multiple users, be a CMS system, connect to their ShoutCast servers, track their schedules, provide a gallery for their pictures, host forums, and do their homework. Luckily, the plugin system is so powerful and flexible that it's easy to write plugins for all those things. (Well, maybe not the homework.) So we do.

Suddenly Serendipity can do lots of stuff besides an online diary, and it's speedy, simple, and secure besides. The world recognizes its inherent superiority over all other web applications, flocks to it, and we all become rich and move to big mansions. (Yeah, right.)

But... we never thought we'd need an auto-delete function. It all started as an online diary. It still ships as an online diary. You CAN make it do a lot more, but it's never needed an auto-delete, because you generally don't want to delete entries from your diary, never mind AUTO-deleting them.

It's not too hard, though. The manual solution you mentioned would work just perfectly, and it's not a lot of work. And the plugin system is so phenomenally powerful that a plugin to do the auto-delete could be easily created. Almost has, in fact, and making modifications would be a nice introduction for a future Serendipity All-Star Developer.

So, no adverse affect from deletion. Just that automatic deletion isn't something that was considered, due to the original intended usage of Serendipity.

Posted: Wed May 02, 2007 11:20 am
by garvinhicking
Hi!

Actually, the plugin judebert referred to CAN delete entries based on the input of a custom field.

So you can setup a custom entryproperty file like "ExpiryDate". For your entry set an expiry date in that field like "2007-12-31". Then the plugin will delete that entry on 2007-12-31.

Cool, eh?

Best regards,
Garvin

Posted: Wed May 02, 2007 8:40 pm
by judebert
Oh, boy, I'm in trouble now. I'm about to contradict Garvin.

I was just looking at the CVS version, 1.10, through spartacus.s9y.org. It has three blocks, one for turning the entry to members-only, one for timeout, and one for un-sticky-ing.

The timeout block says "UPDATE serendipity_entries SET isdraft='true' WHERE id=entry_id". I thought that was turning it to a draft, thereby hiding it from the frontpage and everyone who wasn't the author. But I though modifying it to do the actual deletion wouldn't be too hard.

Did I get it wrong? Was I looking at an old version, or does that actually delete the entry?

Posted: Thu May 03, 2007 11:56 am
by garvinhicking
Hi Judebert!

You are right. It actually does not delete an entry, it just sets it's state to "DRAFT" again.

We really, like you describe, try to preserve any input the user entered. Usually that's what databases are for, so I completely agree with you :)

Best regards,
Garvin