Textpattern Forum

You are not logged in. Register | Login | Help

#71 2011-01-05 16:04:08

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 480
Website

Re: ras_if_expired (conditional, expiration, date)

This plugin sounds like the solution to my problem: i wish to show events sorted by future_date under UPCOMING, then have these move to PAST evens automagically after the current_date

But 75% of the links in this thread seems to be dead or lead nowhere….

Where might i get the latest and greatest plugin that will accomplish what i wish.

PS if you look at the Fat Shrapnel Tour info on this page

You will see what i wish to take place… .the topmost listing under NEXT should only show the next earliest future dated concert, and the UPCOMING would show the tours in the farther future, in order. PAST events or tours would either disappear or would drop to a PAST listings.

I would have each tour date be a link to a permanent article with lots of more information and have them appear in order of dates.

pps It was easy for me to accomplish this on one of my EE sites, and I am hoping to this with TxP.


…. texted postive

Offline

#72 2011-01-05 16:11:50

szac
Member
From: Detroit-ish
Registered: 2004-09-18
Posts: 50

Re: ras_if_expired (conditional, expiration, date)

Hi,

You should smd_calendar http://stefdawson.com/sw/plugins/smd_calendar to achieve the the functionality that you’re describing.

Offline

#73 2011-01-05 16:15:38

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 685
Website

Re: ras_if_expired (conditional, expiration, date)

You shouldn’t need a plugin.

Next event:

<txp:article_custom section="events" form="list" time="future" sort="Posted asc" limit="1" />

Following events:

<txp:article_custom section="events" form="list" time="future" sort="Posted asc" limit="3" offset="1" />

Not tried, just inspired from a site of mine where I have to do something similar (and did! :)). So let me know if it works or if it give you any hint.

Offline

#74 2011-01-05 16:23:37

szac
Member
From: Detroit-ish
Registered: 2004-09-18
Posts: 50

Re: ras_if_expired (conditional, expiration, date)

I was never able to get the time=“future” attribute to respect the post time. So as soon as the day of the event would come, the article would drop off. I would have to resort to a bunch of the conditions to get it to show as expected. Using smd_calendar, I’d just set the time of the post to after the event. The plugin does support article duration so you could add another condition for an event happening ‘right now’.

Here’s what I did for a future list of events at pack1631.org. The ‘form’ is just embedded right in the page template. Probably could be optimized further, but it has worked for me.

            <div id="events_block">
                <h2 class="content_headline">Upcoming Events</h2>
                   <ul id="events_list">
                    <txp:smd_article_event section="events" time="future" limit="100">
                        <txp:if_different>
                            <h3><txp:posted format="%B" /></h3>
                        </txp:if_different>  
                        <li>
                            <div class="event_list_title">                   
                                <div class="event_date"><txp:posted format="%d" /></div>
                                <div class="event_title"><txp:title /></div>

                                <div style="clear:left"></div>
                            </div>
                            <div class="event_desc"><txp:body /></div>
                        </li>
                    </txp:smd_article_event>
                    </ul><!--/events_list-->
            </div><!--/events_block-->

Offline

#75 2011-01-05 16:36:38

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 685
Website

Re: ras_if_expired (conditional, expiration, date)

time=“future” works for me, as long as you carefully choose the hour of the event. Past the hour (h and m), the event becomes past. I’m sure smd plugins works wonderfully, too: they always do! :) I think bici should try both methods and then pick what fits his needs.

Offline

#76 2011-01-05 16:58:27

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 480
Website

Re: ras_if_expired (conditional, expiration, date)

Thanks to both of You! for your quick and very good responses. Suggestions greatly appreciated. I will give these a try later today at home.


…. texted postive

Offline

#77 2011-01-06 03:43:49

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

Re: ras_if_expired (conditional, expiration, date)

Most recent incarnation of this plugin is @ ras_if_dates , but from your description I think I agree that it may not be required or the best solution. It is an article based conditional that tests for a variety of posting and expiration states, but it doesn’t have access to filter the actual content returned, only what is displayed.

Offline

Board footer

Powered by FluxBB