Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2006-01-26 21:17:30
- Gena Wenli
- Member
- From: Ohio, USA
- Registered: 2006-01-26
- Posts: 34
Article_custom Help
Is there a way to make an article_custom tag that only shows everything posted for the the upcoming week (i.e., Sunday-Saturday)? In this scenario, the post date would be edited for the future, and then all posts for the upcoming week would show up in a specific area. Is this possible?
G
Offline
#2 2006-01-26 21:48:08
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Article_custom Help
You can use the attribute time=“future”, and there is also month=“yyyy-mm”, but there is nothing for sorting by week as far as I know.
You could use a custom field to store next Saturday’s date, and use
<code>
<txp:if_custom_field name=”…” val=“20060128”>
article tag
</txp:if_custom_field>
</code>
but then you’d have to change the val=”…” every week…
Also have a look at chh_article_custom that has a more flexible time attribute.
Offline
#3 2006-01-26 22:00:07
- Gena Wenli
- Member
- From: Ohio, USA
- Registered: 2006-01-26
- Posts: 34
Re: Article_custom Help
I’ve installed the plugins, how exactly would I best implement them?
Thanks! Please forgive my n00bness. :-P
G
Last edited by Gena Wenli (2006-01-26 22:00:27)
Offline
#4 2006-01-26 22:08:21
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Article_custom Help
I’m sorry, I’m not using this plugin myself, so you’d better ask in the plugin thread.
Offline
#5 2006-01-26 22:09:24
- Gena Wenli
- Member
- From: Ohio, USA
- Registered: 2006-01-26
- Posts: 34
Re: Article_custom Help
I just realized that if I set the post’s timestamp for the future it will not appear until then. Is there a workaround for this? I’d like to have all of them be displayed, and then restrict them with article_custom tags.
G
Offline
#6 2006-01-26 22:27:30
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Article_custom Help
I’m not sure if you’re talking about <txp:article_custom />
or <txp:chh_article_custom />
, but both have a time attribute:
txp:article_custom
txp:chh_article_custom
Offline
#7 2006-01-26 22:33:46
- Gena Wenli
- Member
- From: Ohio, USA
- Registered: 2006-01-26
- Posts: 34
Re: Article_custom Help
No, I’m talking about the actual posts. When I make a post, I wanted to be able to set the timestamp for the future and then have it be available right away. But TXP help says it won’t appear until the date on the timestamp. Or is that just for the <code><txp:article /></code> and not <code><txp:article_custom /></code>?
G
Last edited by Gena Wenli (2006-01-26 22:34:41)
Offline
#8 2006-01-26 22:54:06
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Article_custom Help
Both tags have the time attribute (values: past, future or any). If not set, the default is past, but if you add time=“any” to the article tag, everything will be displayed, also articles with a date posted in the future.
Offline
#9 2006-01-26 23:55:33
- Gena Wenli
- Member
- From: Ohio, USA
- Registered: 2006-01-26
- Posts: 34
Re: Article_custom Help
So if I make a post with a timestamp of 4 days from now, and another post with a timestamp of 9 days from now, and then put <code><txp:chh_article_custom day=”+7” /></code>, the firs post I made will show up, but not the second one?
G
Offline
Re: Article_custom Help
Gena Wenli wrote:
So if I make a post with a timestamp of 4 days from now, and another post with a timestamp of 9 days from now, and then put <code><txp:chh_article_custom day=”+7” /></code>, the firs post I made will show up, but not the second one?
Actually, that tag would show nothing…ever. :)
<txp:chh_article_custom time="+0 days,+7 days" />
would show articles with a date from the current time to seven days from now.<txp:chh_article_custom time="future" day="+1,+8" />
would show articles with a date anytime from midnight tomorrow to 11:59pm seven days from now.
I’m not very happy with the way all of this date business is handled in the plugin, least of all the way it is documented. Let’s just say it seemed like a good idea at the time.
Offline
#11 2006-01-27 02:36:03
- Gena Wenli
- Member
- From: Ohio, USA
- Registered: 2006-01-26
- Posts: 34
Re: Article_custom Help
Thanks!
G
Offline
Pages: 1