Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: [plugin] [ORPHAN] fha_time_diff: A Time Since generator
You’d have to change all spaces inside double quotes in the last few lines of the code, which start with “if (!empty”.
And you’re right, a non-breaking space should probably be the default behaviour, I’ll think about it.
Who’s gonna textdrive you home tonight?
Offline
#32 2004-09-06 20:42:13
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: [plugin] [ORPHAN] fha_time_diff: A Time Since generator
Done that, it works! Thank you, mamash.
Offline
Re: [plugin] [ORPHAN] fha_time_diff: A Time Since generator
Don’t mean to be a pest Mamash, just wondering if you’ve had any time to look into the 320 days until… type thing. To give you and idea, check my wedding countdown on the right side of this page.
Thanks!
-Chris
chrisfenison.com
Offline
Re: [plugin] [ORPHAN] fha_time_diff: A Time Since generator
I get the idea, cfenison, but to tell the truth, I’m a very bad programmer and it takes ages for me to get working results. I won’t have time to implement this in the few next weeks for sure.
Who’s gonna textdrive you home tonight?
Offline
#35 2004-10-30 03:38:15
- nardo
- Member

- From: tuvalahiti
- Registered: 2004-04-22
- Posts: 743
Re: [plugin] [ORPHAN] fha_time_diff: A Time Since generator
hey mamash, I’ve saved the plugin txt file to my hard-drive, then tried to install as normal…
but I get a bunch of shady characters appearing on my screen when I hit the ‘install’ button…
another plugin (jmr_gallery) installed fine… I am on g1.19
thankin u
Offline
Re: [plugin] [ORPHAN] fha_time_diff: A Time Since generator
Hi nardo,
I’m sorry, I upgraded the plugin format to the RC version and forgot that there are users who haven’t jumped on the dev train yet. OK take this link for the pre-RC plugin format.
Who’s gonna textdrive you home tonight?
Offline
#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