Content last modified Thursday 5 January 2012
hop to #bottom
Categories:
Author:
Current version:
4.2.0
About It:
Get it:
Rate it:
  • Helpful?
  • 1 Yes
  • 0 No
Flag it:
Contact Reason [ ? ]

ras_if_dates

A collaboration plugin combining ras_if_days and jayrope’s aaa_dates as a single plugin containing five tags. Tags are used to select article content conditionally by posting date or time.

Requires TXP Version 4.2.0

ras_enable_content returns contained content (as true) for display for the length of time, as set by the attributes, since the content’s posting, expiration, modification or creation time. All undefined values, such as no modified or expiration time setting for an article, or a modified time for a file, will be treated as a zero magnitude by the tag so as to reflect database defaults.

ras_enable_content is a conditional container tag that will accept an else clause which can be used to invert the behavior of the tag.

Attributes:
  • days: (integer 1 equals 1 day)
  • hours: (integer 1 equals 1 hour)
  • minutes: (integer 1 equals 1 minute )
  • type: options are:
    • apos (Article posted time – default)
    • axpr(Article expiration time)
    • amdf(Article last modified time)
    • fpos(File created time)
    • fmdf(File last modified time)
    • lpos(Link created time)
  • : fractional values in decimal are allowed but not required

These tags are intended for use in an appropriate content type form.

Posting Date Conditional Article Content:

ras_if_dates_today returns all articles posted to the date set with setdate, default is the current day. If the offset attribute is used, what is considered today is offset into the past or future by the value set in integer days, if setdate is set offset is disregarded. ras_if_dates_before returns all articles posted before, but not to include by default, the date set with setdate. ras_if_dates_after returns all articles posted after, but not to include by default, the date set with setdate.

Article Request Count:
Keywords/tags:
Initially released:
Oct 15 2006
Posted here:
16 Oct 2006
Article modified:
04 Dec 2009

You may want to leave your comments/questions at the Forum thread for quicker feedback. Otherwise, comment away:

Your comment will NOT be submitted until you click the 'Submit' button on the next pageload.

Commented (5)

Yes Rick!

Super, i am using it ALL THE TIME!
great plug!
Thanks for the inspiration, I think it will be useful.
Brandon:

Rick, I’ve been trying to download a couple of your plugins (mainly ras_if_dates and ras_delete_expired) but I can’t access your site due to my IP being blacklisted. I’m not sure how that happened, but your plugins would really help me out. Any help would really be appreciated. Thanks!

Will Chung:

Could you provide an example of how I might use your plugin to limit the articles included in a list to all dates after March 1, 2009?

Thanks.

For that you would use if_dates_after with the setdate attribute set to 2009-03-01. (it has a tag builder) Bear in mind that these tags don’t change what TXP returns as articles, it only looks at the posting date in the conditional and returns contained content according to the date set.
If you need more help with this pop me an email and I’ll send you some examples that way. I find trying to code examples through comments forms to be a bit hit and miss, TXP tags on TXP sites in particular.

Subscribe to this article's comments RSS feed. [ ? ]   View Recent Comments across the site.

Would you care to write a comment or visit the forum discussion?

You know you want to visit the Archives.

Browse

Categories


Articles

There are also tag clouds, 'cause those are fun.
TxP · TxD · GG