Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
[plugin] csb_if_newer_than
This simple plugin can be used to check if an article has been published within a given time. It’s my first plugin for Textpattern.
Article (website offline – Uli)
Download
Version 1.0
csb_if_newer_than.txt
Usage
In an article form:
<txp:csb_if_newer_than days="30" hours="12" minutes="20">
The article is posted within 30 days, 12 hours and 20 minutes.
<txp:else />
This article is too old.
</txp:csb_if_newer_than>
Feel free to make suggestions and report bugs!
{Edited to fix the broken download link. -Uli}
Last edited by uli (2012-02-09 23:19:35)
Offline
#2 2006-04-29 13:12:12
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: [plugin] csb_if_newer_than
Thanks for this, using it here to mark ‘new’ articles.
Offline
Re: [plugin] csb_if_newer_than
very cool
thanks csandberg
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Offline
Re: [plugin] csb_if_newer_than
Figured out a neat trick (at least to me). I never liked having really large day counts (3,000 days ago).
<txp:csb_if_newer_than days="365" hours="0" minutes="0">
<txp:permlink><txp:title /></txp:permlink> - <txp:posted />
<txp:else />
<txp:permlink><txp:title /></txp:permlink> - <txp:posted format="%B %e, %Y" />
</txp:csb_if_newer_than>
Offline
Pages: 1