Pruning Old Posts
Pruning Old Posts
Is there an easy way to go back and prune old, outdated posts in Serendipity? Say like have it auto-delete posts over x-amount of days old (I'm thinking around a year ago)?
Brian
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Pruning Old Posts
Hi!
There's an event plugin serendipity_event_outdate_entries that you can use to purge old entries.
However of course that is not the way a weblog usually works *g*
Best regards,
Garvin
There's an event plugin serendipity_event_outdate_entries that you can use to purge old entries.
However of course that is not the way a weblog usually works *g*
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
The name is "Hide entries for non-registered users". Now that I read the description, I see that it does not completely do what you wanted.
Thus you might need to modify that plugin to delete entries instead of "hiding" them? Or you just manually delete old entries? Dunno.
Best regards,
Garvin
The name is "Hide entries for non-registered users". Now that I read the description, I see that it does not completely do what you wanted.
Thus you might need to modify that plugin to delete entries instead of "hiding" them? Or you just manually delete old entries? Dunno.
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
Modifying the PHP code would take me some time - have you thought about just using phpMyAdmin to quickly delete more entries?
DELETE FROM serendipity_entries WHERE timestamp < (UNIX_TIMESTAMP(NOW()) - 86400*360)
would delete all entries older than one year from the current timestamp onwards...
Best regards,
Garvin
Modifying the PHP code would take me some time - have you thought about just using phpMyAdmin to quickly delete more entries?
DELETE FROM serendipity_entries WHERE timestamp < (UNIX_TIMESTAMP(NOW()) - 86400*360)
would delete all entries older than one year from the current timestamp onwards...
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Yes, I started to do that, and I can still go ahead. But I thought it might be easier to see if there was something that would do it automatically for me.
I know a lot of other CMS' have something that allows admins to prune posts and stuff, I thought it might be a neat feature to have.
Not a huge deal, though, I can go through and do it manually. =D
I know a lot of other CMS' have something that allows admins to prune posts and stuff, I thought it might be a neat feature to have.
Not a huge deal, though, I can go through and do it manually. =D
Brian
Well, right now it just gives a page that says "post not found" or something like that. Mind you, it's not the 404 generic error that says "page not found", it still shows a page on my blog.
But I know that in the past if I deleted something, and then tried to go to that post, it would redirect me to the front page. Since I last updated, it doesn't do that anymore.
So, my question is, how do I get it to do that again?
But I know that in the past if I deleted something, and then tried to go to that post, it would redirect me to the front page. Since I last updated, it doesn't do that anymore.
So, my question is, how do I get it to do that again?
Brian
Okay; sorry, I didn't realize it was functioning this way. It's probably because a post ID was actually found in the URL, leading us to actually mention there was a problem. I think this was part of the SEO effort: if two different URLs point to the same thing, they get ranked low. So we made incorrect posts point to an error page, so the main page doesn't get down-ranked.
I'm betting this will require a change in the core code. I can't promise to look into it at this moment, but you're next on my list. (Others are welcome to fix it instead, of course.) If nobody gets it in about a week, I've forgotten despite my PDA. Bump this topic then to kick me in the butt.
I'm betting this will require a change in the core code. I can't promise to look into it at this moment, but you're next on my list. (Others are welcome to fix it instead, of course.) If nobody gets it in about a week, I've forgotten despite my PDA. Bump this topic then to kick me in the butt.