Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2004-04-17 16:10:51

mamash
Member
From: Prague
Registered: 2004-02-21
Posts: 127
Website

[plugin] [ORPHAN] fha_time_diff: A Time Since generator

Notice: This plugin is no longer available by the author but it can be copied from this thread.

**********************************************************

Hi,

this is my first plugin ever, so be kind to me. Download it here (it’s the new plugin syntax, so simply copy and paste the code into your TXP plugin admin). The old, pre-RC (1.19 and older) format plugin is still there.

It takes a certain date in parts (i. e. year, month, hour etc.) and spills out a ‘time since’ information. If some units are not provided, no values for these units are returned either. Some examples:

  • <txp:fha_time_diff year="2004" month="3" day="23" hour="2" minute="40" />
    Returns a complete time information, from years to minutes.
  • <txp:fha_time_diff year="2000" month="10" />
    Returns months and years since October 2000.
  • <txp:fha_time_diff year="1980" month="5" day="1" />
    Returns years, months and days since May 1, 1980.
  • <txp:fha_time_diff year="1975" />
    Only returns years since 1975.

Additionally, these arguments can be passed to the plugin. (You don’t need them for basic use with English language.)

  • lang=""
    Sets a language (two chars) for unit words; see plugin source for languages provided (sofar Czech and English only) and hints on how to add others. If not set, the plugin tries the site wide language setting, otherwise ‘en’ is assumed.
  • simpleplurals=""
    If set to a non-zero number, it indicates which amount triggers the plural form (e. g. ‘years’ instead of ‘year’). If set to zero, it turns on special word forms handling that always follows the last digit (e. g. necessary for Czech dates). If not set, it defaults to a language-specific value (2 for English, 0 for Czech).
  • delimiter=""
    Sets characters that should separate individual values. If not set, a comma with a space are assumed.

The plugin is based upon a script written by Mark H. Kathmann.

Copy Paste Plugin

YToxMDp7czo0OiJuYW1lIjtzOjEzOiJmaGFfdGltZV9kaWZmIjtzOjY6ImF1dGhvciI7czoxMToiRmlsaXAgSGFqbnkiO3M6MTA6ImF1dGhvcl91cmkiO3M6MjI6Imh0dHA6Ly9maWxpcC5oYWpueS5uZXQiO3M6NzoidmVyc2lvbiI7czo0OiIwLjIzIjtzOjExOiJkZXNjcmlwdGlvbiI7czo1NjoiUmV0dXJucyB0aW1lIGRpZmZlcmV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XInKSAkb3V0ID0gKCRwYXN0KSA/ICgiJG91dCAkc2luY2UiKSA6ICgiJG91dCAkdW50aWwiKTsNCg0KCXJldHVybiAkd3JhcE9wZW4udHJpbSgkb3V0KS4kd3JhcENsb3NlOw0KfQ0KIjtzOjQ6InR5cGUiO3M6MToiMCI7czo1OiJvcmRlciI7czoxOiI1IjtzOjM6Im1kNSI7czozMjoiNzVjMmNjZTVlMmFhYWMwN2FkOGZjMDIyZDFjYjFiZjgiO30=

Last edited by mamash (2004-10-30 08:57:17)


Who’s gonna textdrive you home tonight?

Offline

#2 2004-04-17 16:49:21

Ray
Member
Registered: 2004-03-02
Posts: 150

Re: [plugin] [ORPHAN] fha_time_diff: A Time Since generator

Now that’s a allot of fun.

I set it up for all our family birthdates. My ten year old thinks it’s the coolest thing going ; )

Nice plugin mamash. Thanks 8 )

Offline

#3 2004-04-17 16:55:46

mamash
Member
From: Prague
Registered: 2004-02-21
Posts: 127
Website

Re: [plugin] [ORPHAN] fha_time_diff: A Time Since generator

Glad I could be of <del>help</del> fun. ;)

Edit: It shouldn’t be hard to turn it the other way around and make it output ‘time till’ information. Some other day…

Last edited by mamash (2004-04-17 16:58:26)


Who’s gonna textdrive you home tonight?

Offline

#4 2004-04-17 17:02:02

Ray
Member
Registered: 2004-03-02
Posts: 150

Re: [plugin] [ORPHAN] fha_time_diff: A Time Since generator

Now that would be handy.

XX day’s, XX hours, XX minutes, XX seconds until Txp is outta Gamma.

<i>(i couldn’t resist…all in good fun)</i>

@ )

Last edited by Ray (2004-04-17 17:03:35)

Offline

#5 2004-04-17 17:13:21

Ray
Member
Registered: 2004-03-02
Posts: 150

Re: [plugin] [ORPHAN] fha_time_diff: A Time Since generator

mamash,

where is the general plugin information stored on the server? file/folder…?

Offline

#6 2004-04-17 17:35:38

mamash
Member
From: Prague
Registered: 2004-02-21
Posts: 127
Website

Re: [plugin] [ORPHAN] fha_time_diff: A Time Since generator

“general plugin information”?

If you mean the description and the short help, it’s all stored in the installation file, which inserts it into your database.


Who’s gonna textdrive you home tonight?

Offline

#7 2004-04-17 19:26:02

Ray
Member
Registered: 2004-03-02
Posts: 150

Re: [plugin] [ORPHAN] fha_time_diff: A Time Since generator

Once it’s in the database….how can I access it to make alterations.

Specifically I’m thinking about adding an ID so that the style of the date can be changed via CSS. Set one rule in the style sheet and it changes the date (output) whenever/wherever it’s used.

Right now I have a span around your code.

<code><span style=“color:#c00;”><txp:fha_time_diff year=“2004” month=“3” day=“23” hour=“2” minute=“40” /></span></code>

To have an ID already embedded in the tag would be a nice touch.

Last edited by Ray (2004-04-17 19:26:36)

Offline

#8 2004-04-17 19:35:15

froehle
New Member
From: Minneapolis, MN
Registered: 2004-02-29
Posts: 5
Website

Re: [plugin] [ORPHAN] fha_time_diff: A Time Since generator

Ray, you can edit the code for the plugin on the plugin tab (in admin) in the Textpattern backend. The code itself is stored in your mysql database.

Offline

#9 2004-04-17 19:39:26

mamash
Member
From: Prague
Registered: 2004-02-21
Posts: 127
Website

Re: [plugin] [ORPHAN] fha_time_diff: A Time Since generator

Now I understand. Well, I was conceiving this as a ‘content’ plugin, and didn’t want to introduce any infrastructure. But maybe I could simply add ‘wraptag’ and ‘class’ tags as well.

For now, you can always go to your plugin admin area. Clicking on the plugin’s name will get you a source editing page. The outputting line is the last one on the bottom. Is that enough? :)


Who’s gonna textdrive you home tonight?

Offline

#10 2004-04-17 19:43:23

Ray
Member
Registered: 2004-03-02
Posts: 150

Re: [plugin] [ORPHAN] fha_time_diff: A Time Since generator

I was just thinking….a “class” would be better since the code could/would be used several times on the same page.

class=“timedif” (or some such)

“The outputting line is the last one on the bottom. Is that enough?”
Yes sir.

Thanks.

Offline

Board footer

Powered by FluxBB