Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#37 2004-10-30 14:24:54
- nardo
- Member
- From: tuvalahiti
- Registered: 2004-04-22
- Posts: 743
Re: [plugin] [ORPHAN] fha_time_diff: A Time Since generator
you’re a prince among men and from Prague… good on ya, and cheers
Offline
Re: [plugin] [ORPHAN] fha_time_diff: A Time Since generator
This is a really fun and quite useful plugin. Thanx!
Offline
Re: [plugin] [ORPHAN] fha_time_diff: A Time Since generator
I’ve just discovered this plugin which looks like a close fit for my proposed travel blog. What I want to do is show how many days since we started our trip.
I notice that one of the updates allows for a “from” attribute; combined with the “posted” attribute, this appears to allow me to count the days between the start of the trip and the article being posted.
However, I’m struggling to get the “from” date format right. The forum posting says “The date/time format should adhere to the usual syntax”. Unfortunately, the link to examples is dead.
Can someone tell me the correct syntax for this attribute, or point me to another resource?
[EDIT] Just figured this out (clever me! not). However, is there any way to only output days. At the moment, my first article is showing “hours” when really I want it to show as “Day 1”.
Thanks, AS
Last edited by aslsw66 (2006-12-12 12:52:22)
Offline
Re: [plugin] [ORPHAN] fha_time_diff: A Time Since generator
See strftime specs, also you can search for ‘strftime’ on the php.net site.
Who’s gonna textdrive you home tonight?
Offline
Re: [plugin] [ORPHAN] fha_time_diff: A Time Since generator
Mamesh,
Wow! It’s nearly midnight here so I really wasn’t expecting a response so soon.
I edited my initial post, but here’s the gist… Is there any way to get this to just output the number of days? I want to calculate the number of days since the trip started. If the first article is about the first day of the trip, I really want this to output “Day 1”.
Great plugin. I can’t believe how often I think about an idea, search the forums and someone else has already done it!
AS
Offline
Re: [plugin] [ORPHAN] fha_time_diff: A Time Since generator
Two years after I’ve made the thing and you’re expecting me to remember? :)
I don’t think this actually happened ever. And the situation with my time available is even worse now, so if anybody wants to grab this, feel free to do so and make it better.
Who’s gonna textdrive you home tonight?
Offline
Re: [plugin] [ORPHAN] fha_time_diff: A Time Since generator
Fair ‘nuff! I can sympathise with the time pressures…
Well, I’m more a hacker than a programmer. I’m going to have a go at hacking something together for my own needs – but your code is a great headstart for me so many many thanks for that.
Offline
Re: [plugin] [ORPHAN] fha_time_diff: A Time Since generator
Have I been using this plugin for so long? Today is neme.org’s 3rd birthday and there seems to be a problem with the way the plugin calculates time as it is showing our time online as “2 years, 11 months and 24 days”. As Mamash gave up this plugin, is anybody interested in taking it over?
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#45 2008-02-27 20:31:11
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: [plugin] [ORPHAN] fha_time_diff: A Time Since generator
It’s still working fine on my site. The only thing is it uses the server time, which in my case is 6 hours behind my local time. But 7 days off? Is your server on another planet maybe ;)
Offline
Re: [plugin] [ORPHAN] fha_time_diff: A Time Since generator
Els wrote:
It’s still working fine on my site. The only thing is it uses the server time, which in my case is 6 hours behind my local time. But 7 days off? Is your server on another planet maybe ;)
It is very strange. I have 2 txp installs in textdrive/joyent under the same domain. One of them showed the time difference just fine but not the other. This morning, all is ok… What is Mary’s usual diagnosis?… Gremlins?
Last edited by colak (2008-02-28 07:16:15)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#47 2008-02-29 00:36:54
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: [plugin] [ORPHAN] fha_time_diff: A Time Since generator
Could it have been the browser cache?
Offline