Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2006-11-22 18:19:32

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: automaticly deleting (expired) articles

Rick, may I ask for the environment you ran your patched Txp on (MySQL and PHP version)?

Offline

#26 2006-11-22 18:55:34

hcgtv
Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: automaticly deleting (expired) articles

Wet, nice avatar ;)

Offline

#27 2006-11-22 18:57:26

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

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

#29 2006-11-23 18:13:16

jayrope
Plugin Author
From: Berlin
Registered: 2006-07-06
Posts: 687
Website Mastodon

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

#30 2006-11-23 18:40:03

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

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

#31 2006-11-24 03:24:07

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: automaticly deleting (expired) articles

…part of this patch I submitted for evaluation to the Textpattern developers, so it will eventually be included into the “official” Textpattern code.

Assuming it is accepted, yes. As for myself (don’t know about the others), I haven’t had the time to look at it yet.

Offline

#32 2007-02-13 21:34:28

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,306

Re: automaticly deleting (expired) articles

hi rick,

your article-expiration-plug is getting better and better rather quickly :) here it is, the entering of real dates! A great thing I’ve been waiting for!

You’ve implemented some interesting features. But two of these may be solved smoother in order to avoid user faults. I’m writing this very frankly because you’ve proven to be open to new ideas about improvements.

1) Is it possible for you to make the order of the date entries user defined? By the actual sorting order you’re covering the more technically versed users. There are all kinds of date formats, like the (I think) american mm-dd-yyyy or the european dd.mm.yyyy. As well as choosing the order of the entries there should be the possibility of choosing the separator , as there are inexperienced or uninformed users. Maybe even a *-wildcard-separator is possible, so that any non-alphanumeric/whitespace character would be accepted.

2) A little bit easier for you to realize would probably be this one here:
Giving the custom field a user defined name would be great for all non-english speaking countries. And this way the custom field’s name could also serve as a reminder of how to fill in the field: e.g. “Expiration date (yyy.mm.dd)” .

The next one is rather a pretty dream, but maybe it can be solved, too, come a time.
As I understand, the automatic article deletion can be triggered by merely entering the content tab. OK, this is painless. But it is semi-automatic, it’s something like a photoelectric barrier I have to pass.
The idea behind is to combine real automatic deletion/expiration with the insertion of a “No entries here”-message, in order to run the site completely unattended for a while. Together with plugs like stw_category_tree, which can hide categories without associated articles in them, a real system of automatisms would become possible.
I know there is pm_if_no_articles for the task of putting up a sorry-message, but if it works at all in 4.0.4 it works only if there is no article for that category, not even a hidden one.

Can you think of implementing at least one of the first two ideas? I’d greatly appreciate any of these!

Last edited by uli (2007-02-13 21:41:17)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#33 2007-02-13 22:37:48

rsilletti
Moderator
From: Spokane WA
Registered: 2004-04-28
Posts: 707

Re: automaticly deleting (expired) articles

Hi Uli,

The features you request aren’t something that I feel are best done with the delete articles plugin approach; by inherent design characteristic the problems accumulating with greater complexity, especially for multi user situations, render the idea to cumbersome. Wet’s patch, and his reasons for it, hold true for that reason and are the better approach. By itself those interface options aren’t available to work with in the presently available TXP download, and to reinvent them is out of my skill range. The best potential I have seen lately would be to add, if not the full capabilty you describe, the database fields and form interace components to this plugin zem_event then perhaps develop a plugin from that point.

Offline

Board footer

Powered by FluxBB