Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: automaticly deleting (expired) articles
Just reading the thread with much interest … some thoughts …
May I add a ‘change status’ wish? Deleting content is too cruel in many cases.
If it’s a classified ad then it will probably return again, so a status change to hidden might be useful for reuse.
Somebody else will find the status fixed be very helpful for some time. After that time the article will change ‘back’ to i.e. live.
The next issue might be recurring articles (hey, it’s x-mas again) so you will add a 2nd custom field which creates the possibility for date ranges and recurring events.
Last not least make that thingy header compatible and then schedule driven CSS changes are possible …
As always just my 2c …
Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML
Offline
#17 2006-11-09 18:23:24
- rsilletti
- Moderator

- From: Spokane WA
- Registered: 2004-04-28
- Posts: 707
Re: automaticly deleting (expired) articles
A set of “set article status to:” tags to be used inside conditionals sounds like a great idea. The head aware capability is available in single article mode, but not in lists. That being an inherent design characteristic with the way delete_articles works, a new plugin would probably be needed.
Thanks
added a set_article_status tag to the current download, has some interesting potential.
Last edited by rsilletti (2006-11-10 15:47:48)
Offline
Re: automaticly deleting (expired) articles
i am completely content already, just to let you know rick, but i’ll follow the thread further on and also will beta test further!
A hole turned upside down is a dome, when there’s also gravity.
Offline
#19 2006-11-10 19:29:04
- rsilletti
- Moderator

- From: Spokane WA
- Registered: 2004-04-28
- Posts: 707
Re: automaticly deleting (expired) articles
Thanks jayrope, I’ve a final version done that I’m happy with myself:
Plugin Link ras_delete_expired_v4.0.4.4.txt
let me know if you see any problems.
Last edited by rsilletti (2006-11-12 17:45:07)
Offline
Re: automaticly deleting (expired) articles
(sorry was offline for a week)
rick, this is awesome – i just seen the newest version on the textpattern resources: great job!
A hole turned upside down is a dome, when there’s also gravity.
Offline
Re: automaticly deleting (expired) articles
Another take on expiring articles. Might be of interest for those who’d rather not alter their database to achieve article expiry.
Offline
Re: automaticly deleting (expired) articles
wet, your link target needs registering with the txp-dev list to be visible, as the archives of the list are private, only visible to members.
do you think anyone minds if i reprint the text here? of course i’d obfuscate the author’s email addy or other private data.
Last edited by jayrope (2006-11-22 12:45:07)
A hole turned upside down is a dome, when there’s also gravity.
Offline
Re: automaticly deleting (expired) articles
jayrope wrote:
wet, your link target needs registering with the txp-dev list to be visible, as the archives of the list are private, only visible to members.
Everybody’s free to enlist.
do you think anyone minds if i reprint the text here?
It’s up to you. I have never read the terms of the mailing list regarding reprints of text, I think. I was under the impression that anybody who could apply that patch to the current development code is on the list anyway.
Last edited by wet (2006-11-22 12:58:16)
Offline
#24 2006-11-22 16:20:19
- rsilletti
- Moderator

- From: Spokane WA
- Registered: 2004-04-28
- Posts: 707
Re: automaticly deleting (expired) articles
I’ve plugged that patch in and find that it is exactly what is needed at this point. The deficiencies in the present plugins are obvious and the patch provides a much better solution with a much better future. IMHO its time to revisit the expire article field in the textpattern table feature and wet’s patch provides for a robust interface for other development as well.
What Mary fixed in txp:posted Rev 2094 was carried over into txp:expire in the patch, given that fix all seems to work perfectly.
Last edited by rsilletti (2006-11-22 16:27:24)
Offline
Re: automaticly deleting (expired) articles
Rick, may I ask for the environment you ran your patched Txp on (MySQL and PHP version)?
Offline
Re: automaticly deleting (expired) articles
Wet, nice avatar ;)
We Love TXP . TXP Themes . TXP Tags . TXP Planet . TXP Make
Offline
Re: automaticly deleting (expired) articles
I’m so proud of my early christmas present I received today!
Offline
#28 2006-11-22 23:34:10
- rsilletti
- Moderator

- From: Spokane WA
- Registered: 2004-04-28
- Posts: 707
Re: automaticly deleting (expired) articles
txp_version: 4.0.4 (unknown revision) Rev 2092
last_update: 2006-11-21 18:00:52/2006-11-17 22:38:55
document_root: /Library/Apache2/htdocs
$path_to_site: /Library/Apache2/htdocs/expire_mod
txp_path: /Library/Apache2/htdocs/expire_mod/textpattern
permlink_mode: messy
tempdir: /Library/Apache2/htdocs/expire_mod/textpattern/tmp
web_domain: localhost/expire_mod
php_version: 4.3.2
server_time: 2006-11-22 15:31:25
MySQL: 4.0.15
locale: C
server: Apache/2.0.47 (Unix) DAV/2 PHP/4.3.2
apache_version: Apache/2.0.47 (Unix) DAV/2 PHP/4.3.2
php_sapi_mode: apache2handler
rfc2616_headers:
os_version: Darwin 6.8
Offline
Re: automaticly deleting (expired) articles
8) nice present, wet!
your patch is the right way to go i’d say, too.
I personally favor ability of the plugin to actually delete expired articles from the DB, especially automatically, cause it makes texpattern suitable for sites, that have
scheduled events,
classifieds and
alike data, which expires and doesn’t need to be kept.
Think of something like a “Mitfahrzentrale” (agency for arranged lifts): when 300 drivers drove on their day XX, then these 300 entries should be deleteable next day, immediately and automatically, that would keep the database slim.
won’t that make sense to include a deleteonexpire=“0 or 1” attribute on txp:expire?
an is txp:expire real now in r2094?
i still run 4.0.4 release.
Last edited by jayrope (2006-11-23 18:30:37)
A hole turned upside down is a dome, when there’s also gravity.
Offline
Re: automaticly deleting (expired) articles
jayrope wrote:
won’t that make sense to include a deleteonexpire=“0 or 1” attribute on txp:expire?
No, that won’t work. txp:expire is a tag which will print the expiry time as long as an article is shown for display. So the tag won’t have a chance to run at or after expiry time. Which doesn’t mean that one couldn’t include a piece of maintanence code which purges expired articles automagically elsewhere. As the article table stores expire times/dates when this patch is applied, it can serve as a solid groundwork for add on functionality supplied by plugins.
an is txp:expire real now in r2094?
No, it’s just part of this patch I submitted for evaluation to the Textpattern developers, so it will eventually be included into the “official” Textpattern code. I haven’t received any feedback yet.
Offline