Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#61 2008-09-06 13:24:20
- szac
- Member
- From: Detroit-ish
- Registered: 2004-09-18
- Posts: 50
Re: ras_if_expired (conditional, expiration, date)
Hi, How can I can show the next future article after today (Posted asc)? It works if I limit the articles shown to the number of articles less then the future ones, but I just need to show the first future article after today or today’s article. Like this:
Article:
<txp:article_custom sort="Posted asc" time="any" section="games" listform="myform" />
Form:
<txp:ras_if_dates_today>
Today's Game:
<txp:title />
<txp:else />
<txp:ras_if_dates_after>
Next Game:
<txp:title />
</txp:ras_if_dates_after>
</txp:ras_if_dates_today>
Offline
#62 2008-09-06 20:27:01
- rsilletti
- Moderator
- From: Spokane WA
- Registered: 2004-04-28
- Posts: 707
Re: ras_if_expired (conditional, expiration, date)
You could use ras_enable_articles for finer control but the conditionals themselves only look at the posting date and won’t see article count. Perhaps an arrangement with more than one article_custom tag or article tag, then you could use the limit attribute or the if_first_article tag to produce the result you are looking for.
The more recent versions of the plugin also include a “setdate” attribute to select a specific date. The most recent version is ras_if_dates_v4.0.5.1 and it works for version TXP 4.0.5 and above.
Last edited by rsilletti (2008-09-06 20:35:05)
Offline
Re: ras_if_expired (conditional, expiration, date)
Hi
Im am using the folling code, but to no avail.
I am trying to show the word new and change the class (which changes the colour) if the article is older than 7 days (from current date)
<txp:ras_if_dates_today offset=“7”>
<div class=“innerdiv-new”>
<strong>NEW:</strong><txp:permlink><txp:adi_title offset=“4” append=”“ /></txp:permlink></div>
<txp:else />
<div class=“innerdiv”><txp:permlink><txp:adi_title offset=“4” append=”“ /></txp:permlink></div>
</div>
</txp:ras_if_dates_today>
Can you help
Last edited by oliverker (2008-11-25 11:31:21)
Offline
#64 2008-11-25 16:22:41
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,311
Re: ras_if_expired (conditional, expiration, date)
Try removing the second </div>
in the else part.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: ras_if_expired (conditional, expiration, date)
uli wrote:
Try removing the second
</div>
in the else part.
Nope? dosn’t work
Offline
#66 2008-11-25 17:00:51
- rsilletti
- Moderator
- From: Spokane WA
- Registered: 2004-04-28
- Posts: 707
Re: ras_if_expired (conditional, expiration, date)
if_dates_today uses offset to move the date that it looks for up or down the time scale like a moving window, it will only operate for the seventh day then cease to operate, Try this:
<txp:ras_enable_articles days="7">
<div class=“innerdiv-new”>
<strong>NEW:</strong><txp:permlink><txp:adi_title offset=“4” append=”“ /></txp:permlink></div>
<txp:else />
<div class=“innerdiv”><txp:permlink><txp:adi_title offset=“4” append=”“ /></txp:permlink></div>
</div>
</txp:ras_enable_articles>
Offline
Re: ras_if_expired (conditional, expiration, date)
Superb, Many thanks,
brilliant plugin, when I know what I’m doing : )
Offline
#68 2008-11-25 22:57:35
- rsilletti
- Moderator
- From: Spokane WA
- Registered: 2004-04-28
- Posts: 707
Re: ras_if_expired (conditional, expiration, date)
Thank You.
Offline
Re: ras_if_expired (conditional, expiration, date)
rsilletti wrote:
Thank You.
Hi, Do you actually have a full list of allof the different ways of using this plugin and what each one does?
It’s great plugin and your support is great but feel it would help with a more in-depth help file and more examples?
Oliver
Offline
#70 2008-11-26 16:32:18
- rsilletti
- Moderator
- From: Spokane WA
- Registered: 2004-04-28
- Posts: 707
Re: ras_if_expired (conditional, expiration, date)
The best examples I have are here: examples ,bear in mind that these are on a testing site, and that not everything on this site is current. Some outdated stuff is still linked to forum topics.
Last edited by rsilletti (2008-11-26 16:37:03)
Offline
Re: ras_if_expired (conditional, expiration, date)
This plugin sounds like the solution to my problem: i wish to show events sorted by future_date under UPCOMING, then have these move to PAST evens automagically after the current_date
But 75% of the links in this thread seems to be dead or lead nowhere….
Where might i get the latest and greatest plugin that will accomplish what i wish.
PS if you look at the Fat Shrapnel Tour info on this page
You will see what i wish to take place… .the topmost listing under NEXT should only show the next earliest future dated concert, and the UPCOMING would show the tours in the farther future, in order. PAST events or tours would either disappear or would drop to a PAST listings.
I would have each tour date be a link to a permanent article with lots of more information and have them appear in order of dates.
pps It was easy for me to accomplish this on one of my EE sites, and I am hoping to this with TxP.
…. texted postive
Offline
#72 2011-01-05 16:11:50
- szac
- Member
- From: Detroit-ish
- Registered: 2004-09-18
- Posts: 50
Re: ras_if_expired (conditional, expiration, date)
Hi,
You should smd_calendar http://stefdawson.com/sw/plugins/smd_calendar to achieve the the functionality that you’re describing.
Offline