Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-09-06 01:57:41

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

aaa_dates - simple day based article display

this message radically edited/shortened to display actual release

My first plug. Hello plugin world of textpattern.

aaa_dates provides a simple solution for the listing of past, today’s, and future articles separatable on the base of the posting day (not by the exact posting time) to create event listings from single articles with posting dates set to the (if: future) event day and time accordingly.

- download & instructions for aaa_dates v0.12

- see a working example page here

The plugin provides tags to separate articles with posting dates from the past, today, future, aswell as past-and-today and future-and-today to be used in forms and pages surrounding article tags.

Inspired by Rick Siletti’s ras_if_days. which is a very simple and well working plug, only i couldn’t properly realise the event expiration at midnight of today’s date, which is important f.i for event listings, that draw their announced start time from their hour and minute posted. To have these events expire right after the day of them happening has gone there had to be a plug making a distinction regarding simply the day of their posting.

Last edited by jayrope (2006-11-15 18:34:22)


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

Offline

#2 2006-09-06 05:21:45

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,323
Website Mastodon

Re: aaa_dates - simple day based article display

How does this differ from an article form containing <txp:if_different><txp:posted format="%m %d" /></txp:if_different>?

Offline

#3 2006-09-06 10:39:13

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

Re: aaa_dates - simple day based article display

hey wet, by now it doesn’t differ much.
i learned how to do a plugin, it was fun, really.
i am not a programmer, just a person who uses textpattern.
people asking me to set them a site up want an intuitive tag, self explanatory, not an if statement. the customer just walks away and works with something else. if i present a selfexplanatory tag he or she might just start believing, that they could master a CMS themselves. That is plain wonderful for a leave-me-alone-with-computer-worx-person.

in any case: thanx much for the hint.
i actually had not noticed, that it would work that way, yet.
i set up a test page trying if:different out for a while to get a grasp if it feels better to use it. still testing, but i have a selfexplanatory tag now – and i can create additional functionality myself (or anyone interested, while keeping it slim, please) without having to wait for updates of the core software.

i will definately implement
hourly and daily offset controls for all the three tags soon.
over here people go out at night, and when a concert starts at 2 at night, then the announcement for it will still be of the evening before, which means the article would expire, before the event takes place. in other words, one needs an offset to extend a day period into the early hours of next morning.

or maybe you know a more intuitive way to do that with txp:tags only? that’ll be awesome to know about!

Last edited by jayrope (2006-09-06 10:45:41)


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

Offline

#4 2006-09-06 10:45:08

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,323
Website Mastodon

Re: aaa_dates - simple day based article display

Thanks for the explanation. I don’t think there’s an easy way of offsetting date and time in addition to some illegible php injections, so this will definitely justify the efforts for creating a plugin.

Offline

#5 2006-09-06 10:48:21

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

Re: aaa_dates - simple day based article display

Isn’t live with the computer dangerous?

Heyhey. Where can i find more info about these risks? I’ll do a search. Is ras_if_days having problems with injection?


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

Offline

#6 2006-09-06 23:06:47

nardo
Member
From: tuvalahiti
Registered: 2004-04-22
Posts: 743

Re: aaa_dates - simple day based article display

merci jayrope – un bon travaille!!

Offline

#7 2006-09-07 00:50:56

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: aaa_dates - simple day based article display

Nice. :)

Offline

#8 2006-09-07 11:40:55

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

Re: aaa_dates - simple day based article display

hello all, thanx very much for your nice responses!

i updated my first post above with a usage example.

l8r

Last edited by jayrope (2006-09-07 12:33:08)


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

Offline

#9 2006-10-26 03:05:18

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

Re: aaa_dates - simple day based article display

new version aaa_dates v.0.12 incl. simple tags for
all future articles incl today
aswell as
all past articles incl. today

enjoy.


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

Offline

#10 2006-11-15 18:04:32

Jaro
Member
From: S/F
Registered: 2004-11-18
Posts: 89

Re: aaa_dates - simple day based article display

Jane, thanks for the plugin! Is it possible to extend it? I would like to display content if an article is older than let’s say 10 days.

Offline

#11 2006-11-15 18:31:22

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

Re: aaa_dates - simple day based article display

jaro, i would love to help you on this, but can’t find time momentarily to work on this.
i am a musician

try using the txp:article or article_custom tag with an offset
or the ras_if_dates plugin on textcastle (which combines parts of aaa_dates with offset values)

best jrp


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

Offline

#12 2006-11-15 19:40:12

Jaro
Member
From: S/F
Registered: 2004-11-18
Posts: 89

Re: aaa_dates - simple day based article display

no worries jayrope. thanks for your answer. i wish i could do it myself and help others too.

Offline

Board footer

Powered by FluxBB