Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
jad_oldposted
In response to the rc3 problem I described here (regarding the format parametr for txp:posted), I wrote this plugin.
http://www.jdueck.net/files/code/jad_oldposted.txt
It basically emulates the way txp:posted used to work before 1.0rc3, using the old formatting strings.
Use it exactly as you would the txp:posted tag, but the format parameter uses these elements.
The new rc3 implementation is better for localisation (ie non-english users), but if you use english, I believe the old way offered more flexible formatting of dates including (my pet feature) ordinal suffixes (ie ‘March 19th’ and ‘June 1st’ not just ‘March 19’ and ‘June 1’). You can also use this plugin as a stopgap if you don’t want to convert your old date format strings to the new format.
If you use 1.0rc2 or lower then you have no use for this plugin.
(update) Version 560.2+ fixes the time offset problem mentioned below (thanks to andruidica for the patch)
Last edited by jdueck (2006-04-07 15:34:34)
Offline
Re: jad_oldposted
Great! Thanks, now I can use my strange <code>format=“M j\<\s\u\p\>S\<\/\s\u\p\>, Y”</code> again!
Offline
#3 2005-03-02 05:43:16
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: jad_oldposted
Oh goody. :) How’d I miss seeing this?
I’m big on ordinal suffixes myself.
While I recognize the need for this for non-english sites, it’d be nice if both were available as an option.
Offline
Re: jad_oldposted
i can’t seem to get this to work in the article pages… is this a problem you guys have seen? or is it just me? (it’s a wonderful plugin, though, joel.. thank you.)
textpattern.org :: find and share Textpattern resources
docs.textpattern.io :: Textpattern user documentation
Offline
#5 2005-03-29 00:22:03
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: jad_oldposted
Works fine for me (rc3 rev245).
Offline
Re: jad_oldposted
hey, how do you know what revision you’re running? (or do you remember from when you downloaded? is there someplace you can check?)
‘must be something wrong with my setup then.. i’ll check through again; thanks mary
textpattern.org :: find and share Textpattern resources
docs.textpattern.io :: Textpattern user documentation
Offline
#7 2005-03-29 03:01:45
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: jad_oldposted
Textpattern itself won’t tell you.
When you download from SVN, if you peek inside any one of the index.html files before you delete them, the number is there.
(Edit: gonna add this info to my how-to)
Last edited by Mary (2005-03-29 03:08:06)
Offline
Re: jad_oldposted
thanks Mary
textpattern.org :: find and share Textpattern resources
docs.textpattern.io :: Textpattern user documentation
Offline
#9 2005-10-09 03:18:30
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: jad_oldposted
I noticed today the plugin needs to be updated, Joel, it returns incorrect date/time in 4.01. :)
Offline
Re: jad_oldposted
that’s been true for seemingly most of the date-based plugins since rev3ish, i believe…
textpattern.org :: find and share Textpattern resources
docs.textpattern.io :: Textpattern user documentation
Offline
Re: jad_oldposted
One reason why I’m reducing my dependance on them. We need an “update a plug-in” week.
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Re: jad_oldposted
I figured out how to fix the problem with the time not showing correctly. For me it was just a timezone problem, so the fix was simply a matter of changing the second line within the function from:
$date_offset = $thisarticle["posted"];to:
$date_offset = $thisarticle["posted"] + tz_offset();And it will use the timezone offset set in preferences.
Last edited by andruidica (2006-04-07 14:46:59)
Offline