Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-08-19 20:39:12

steffen
Member
Registered: 2009-12-13
Posts: 17

expired offset

hey guys!

i use the <txp:expires> for the date of events. events like “2ND MARCH BIRTHDAY AT JOHN”. these dates are displayed in articles. if a event expired, it disappears. everything is fine. but i want that the expired events are visible on the 3rd of march on 2 am for guys who join the party really late. i need kind of a <txp:expired offset="1"> thing, so that the article stays one day longer. you know? :)

i tried ras_if_dates but i think its not the right thing for my purpose

steffen

Last edited by steffen (2010-08-19 20:39:44)

Offline

#2 2010-08-20 00:18:32

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

Re: expired offset

You can time the expiry down to the second if you want so. No new tag features, no plugins, just the date input fields on the write tab.

And for displaying the event’s date you could use a custom field with msd_admin_datepicker.

Last edited by uli (2010-08-20 00:26:37)


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

Offline

#3 2010-08-20 00:25:40

steffen
Member
Registered: 2009-12-13
Posts: 17

Re: expired offset

uli wrote:

You can time the expiry down to the second if you want so. No new tag features, no plugins, just the date input fields on the write tab.

sorry, i dont understand. did you understand me properly?

expiry-date: 02 march
publish date: 01 feb

title would be something like “Johns Birthday is on <txp:expires />” (published on <txp:posted />)

so imagine.. now is the third of march, the article is expired and gone. but i want that it is still there for one day more. both input fields are already in use, how should i time down the expiry there?

edit: haha, du bist ja auch aus deutschland. so ist das. :)

Last edited by steffen (2010-08-20 00:26:56)

Offline

#4 2010-08-20 00:29:42

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

Re: expired offset

Steffen, I already edited my post while you were answering.

Johns Birthday is on <txp:custom_field name=“event” />


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

Offline

#5 2010-08-20 00:33:15

steffen
Member
Registered: 2009-12-13
Posts: 17

Re: expired offset

uli wrote:

And for displaying the event’s date you could use a custom field with msd_admin_datepicker.

achso, datepicker für ein customfield wäre eine option. aber ur umständlich, man müsste zwei daten einstellen die immer einen tag unterschied haben. ich würde das lieber automatisiert lösen. ich könnte mir auch vorstellen die tage als aufsteigende nummern auszugeben. 1 bis 365 und dann das aktuelle datum per upm_date_time (auch 1 bis 365). dann könnte man vielleicht mit einer abfrage sagen, dass <txp:expires /> zwei integer werte unter dem aktuellen datum sein muss, um ausgeblendet zu werden. aber das ist auch sehr umständlich und ich weiß nicht wie ich das umsetzen kann.

gruß,
steffen

Last edited by steffen (2010-08-20 00:33:42)

Offline

Board footer

Powered by FluxBB