Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-06-02 14:28:11

tinyfly
Member
From: Dallas, Texas
Registered: 2004-05-10
Posts: 462
Website

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.

Offline

#2 2005-06-02 16:09:31

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

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

#3 2005-06-02 16:28:08

tinyfly
Member
From: Dallas, Texas
Registered: 2004-05-10
Posts: 462
Website

Re: Plugin Request: Show selected articles for weekend.

Sounds Like the right track manfre. This is awesome!

Offline

#4 2005-06-06 06:56:47

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

Re: Plugin Request: Show selected articles for weekend.

mem_if_today

This tag will conditionally parse and display the enclosed text data if today is or isnot one of the specified days.

Offline

#5 2005-06-06 13:51:07

tinyfly
Member
From: Dallas, Texas
Registered: 2004-05-10
Posts: 462
Website

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.

Offline

#6 2005-06-06 14:28:34

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

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

#7 2005-06-06 15:26:57

tinyfly
Member
From: Dallas, Texas
Registered: 2004-05-10
Posts: 462
Website

Re: Plugin Request: Show selected articles for weekend.

aha! So something like if_today show articles with category of weekend.

your brilliant.

Offline

#8 2005-06-06 15:40:23

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

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

#9 2005-06-06 15:51:06

tinyfly
Member
From: Dallas, Texas
Registered: 2004-05-10
Posts: 462
Website

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.

Offline

#10 2005-06-06 16:10:28

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

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

Board footer

Powered by FluxBB