Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-10-25 22:41:29

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

time="future" attribute in article_custom tag

I need to have the time=“future” attribute in the article_custom tag include today. Can someone explain that one to me please?


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#2 2006-10-25 22:50:47

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

Re: time="future" attribute in article_custom tag

My best perception of the time attribute is strictly as a comparison – date earlier than now, date later than now, or both; judging from you wording, I may have a solution for you in the form of a set of conditional article tags.
Take a look at this: ras_if_dates_v4.0.4.1.txt

Offline

#3 2006-10-25 23:06:08

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: time="future" attribute in article_custom tag

Thanks for that rsilletti but I don’t think it will work and needs applying to each individual article. :(

To explain my need in detail, if you go to DarkStar you will see that the page only displays “future” posts. If you look at the first gig you can see that it is for this coming Saturday. As things are at the moment that article will disappear at midnight on Friday whereas I would like it to remain on display during Saturday as well.


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#4 2006-10-25 23:44:50

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

Re: time="future" attribute in article_custom tag

It applies to each article recursively in the article form by posting date or time, should work fine for this, in your article form wrapping your current content. You would have to use “any” for the time settings for article_custom with tags in the article form as follows.

<txp:ras_if_dates_today>
Article Form tags and content
</txp:ras_if_dates_today>

<txp:ras_if_dates_after>
Article Form tags and content
</txp:ras_if_dates_after>

This would return articles for the current date and all dates after the current date. It may require article category and specific form settings to not affect all your articles.

Last edited by rsilletti (2006-10-25 23:51:33)

Offline

#5 2006-10-26 03:01:22

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

Re: time="future" attribute in article_custom tag

i included this feature for you in my small plug aaa_dates today.
was too easy? erm, untested. you may try. enjoy.

rick, lets get these two more lines into ras_dates?


A hole turned upside down is a dome, when there’s also gravity.

Offline

#6 2006-10-26 03:24:48

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

Re: time="future" attribute in article_custom tag

yes, it appears to be the next step, next version will be up soon.

Offline

#7 2006-10-26 21:44:10

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: time="future" attribute in article_custom tag

Sorry Rick, I probably misunderstood the usage. In the mean time Jane’s plug-in worked a treat! :)

Can I take some credit if you two get together on this one? :)
Should produce a nice cool plug-in methinks.

Last edited by thebombsite (2006-10-26 21:45:29)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#8 2006-10-26 21:52:22

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

Re: time="future" attribute in article_custom tag

stuart,
glad it worked!
rick’s plug was inspiring mine in the first place, mine is just a very stripped down and twisted-other-ways programming rehearsal, if you want so.
nevertheless glad have a use for it 8)

@rick: wonderful! i just read this here and thought i’d give the rest of my plug another use…

toooot!

Last edited by jayrope (2006-10-26 21:57:10)


A hole turned upside down is a dome, when there’s also gravity.

Offline

#9 2006-10-27 03:30:26

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

Re: time="future" attribute in article_custom tag

Stuart: Actually Uli started the whole thing Here and with some good ideas from jayrope the idea came together into This

The most recent variant is Here , and your welcome to join the fun and help kick any of the dents out before we update on the org site.

Thank again jayrope!

Offline

#10 2006-10-27 17:08:13

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: time="future" attribute in article_custom tag

I’ve downloaded the new version and shall try it out. Might even be this year! ;)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

Board footer

Powered by FluxBB