Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Plugin Request: Show selected articles for weekend.
I have a client that publishes about 5 articles per day and would like to be able to mark specific articles (usually one from each day) as weekend articles. When Friday night at 12:00am comes around then the front page would would update to show the marked weekend articles. Then on Monday it would switch back to normal operation.
Calling all plugin makers: Is this possible and would someone like to take up development of this? There might be a bribe in it for you.
Refresh Dallas and other Refreshing Cities.
Offline
Re: Plugin Request: Show selected articles for weekend.
I’ll take a stab at this. It seems the only thing required is the soon to be created mem_if_today plugin. I’m envisioning the attributes “is” and “isnot” (so it can work safely nested under a txp:else. I think tests for day of the week, weekday, and weekend. I’ll probably come up with more when I sit down and code it.
Then you will be left with the ability to mark articles for showing on the weekend. There should be existing plugins out there that use either a custom field, or you could use one of the category fields.
Edit: I think this would work out pretty good with an admin side piece that allows a user defined test. E.g. is=“holiday”, where holiday would contain a bunch of dates added by the user. Could also have valentines, xmas, july 4th, etc. This would work nicely with date specific CSS and layouts.
Last edited by Manfre (2005-06-02 16:13:31)
Offline
Re: Plugin Request: Show selected articles for weekend.
Sounds Like the right track manfre. This is awesome!
Refresh Dallas and other Refreshing Cities.
Offline
Re: Plugin Request: Show selected articles for weekend.
This tag will conditionally parse and display the enclosed text data if today is or isnot one of the specified days.
Offline
Re: Plugin Request: Show selected articles for weekend.
This is a nice plugin Manfre but what I am looking for I quess is an admin plugin where there is a check box or something on the “write” tab that says “show on weekend”. This will be for articles written on a daily basis that my client can flag to show only the specified ones on the weekend. So, on the weekend it would just change the sort order (I guess?) so that the checked articles show first and then when the weekend is over it goes back to normal sorting.
Is this possiple, Thanks for your hard work.
Refresh Dallas and other Refreshing Cities.
Offline
Re: Plugin Request: Show selected articles for weekend.
This plugin is only one piece to the solution. This tag will allow you to do change the tags used to output content on weekends. You can use the second category field to flag an article for the weekend (if it’s not being used already).
Offline
Re: Plugin Request: Show selected articles for weekend.
aha! So something like if_today show articles with category of weekend.
your brilliant.
Refresh Dallas and other Refreshing Cities.
Offline
Re: Plugin Request: Show selected articles for weekend.
Exactly,
<code>
<txp:mem_if_today is=“weekday”>
…article tag for weekday articles…
</txp:mem_if_today>
<txp:mem_if_today is=“weekend”>
…article tag for weekend only articles…
</txp:mem_if_today>
</code>
Offline
Re: Plugin Request: Show selected articles for weekend.
Hey thanks Manfre, if you want pick out a shirt at Threadless.com email me your info and I’ll send it to you as a small token of my appreciation.
Refresh Dallas and other Refreshing Cities.
Offline
Re: Plugin Request: Show selected articles for weekend.
Thanks for the offer. That site has lots of cool shirts. Let me know if you need anymore help with getting this working.
Offline