Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2004-10-26 14:09:57

osei
Plugin Author
From: Stockholm, Sweden
Registered: 2004-07-01
Posts: 178
Website

[plugin] [ORPHAN] glx_countdown

Version: 0.1
Download: glx_countdown
Example

This plugin will display how long time it is until a given date and when that date is reached it will display whatever text you want.

Example

<txp:glx_countdown day month="11" year="2004" day="24" hour="13" minute="15">
Today is my Birthday!!!
</txp:glx_countdown>
<txp:glx_countdown month="1" year="2005" day="1" delimiter="och" titletxt="Tills " usetitle="true">
New year!!
</txp:glx_countdown>

The output will be something like this 2 hours, 5 minutes

Attributes

hour
minute
second
month
day
delimiter
Value to separate two values
Default: ,
usetitle
Set this to true to use an title to display the date we are countdowning to, else to false, note the outputed countdown will be wrapped with an span tag, but the text that is displayed when the countdown has ended will not be wrapped.
titletxt
Text to display beffore the date in the title
date
How the date will be formated, see the php manual for more info
Default: Y-m-d H:i

Copy/Paste Plugin Code

YToxMDp7czo0OiJuYW1lIjtzOjEzOiJnbHhfY291bnRkb3duIjtzOjY6ImF1dGhvciI7czoxMzoiSm9oYW4gTmlsc3NvbiI7czoxMDoiYXV0aG9yX3VyaSI7czoyNDoiaHR0cDovL2pvaGFuLmdhbGF4ZW4ubmV0IjtzOjc6InZlcnNpb24iO3M6MzoiMC4xIjtzOjExOiJkZXNjcmlwdGlvbiI7czoyNjoiQ291bnRkb3duIHRvIGFuIGdpdmVuIGRhdGUiO3M6NDoiaGVscCI7czoxODE5OiI8cD5UaGlzIHBsdWdpbiB3aWxsIGRpc3BsYXkgaG93IGxvbmcgdGltZSBpdCBpcyB1bnRpbCBhIGdpdmVuIGRhdGUgYW5kIHdoZW4gdGhlIGRhdGUgaXMgcmVhY2hlZCBpdCB3aWxsIGRpc3BsYXkgd2hhdGV2ZXIgdGV4dCB5b3Ugd2FudCB0by48L3A+Cgo8aDI+QXR0cmlidXRlczwvaDI+CjxkbD4KCTxkdD48Y29kZT5ob3VyPC9jb2RlPjwvZHQ+Cgk8ZHQ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aGluZykgOiAiIjsNCgl9DQoJcmV0dXJuICgkdXNldGl0bGUgPT0gdHJ1ZSkgPyAiPHNwYW4gdGl0bGU9XCIiLiR0aXRsZXR4dC5kYXRlKCRkYXRlLCR3aGVuKS4iXCI+Ii4kb3V0cHV0LiI8L3NwYW4+IiA6ICRvdXRwdXQ7DQp9DQoNCiI7czo0OiJ0eXBlIjtzOjE6IjAiO3M6NToib3JkZXIiO3M6MToiNSI7czozOiJtZDUiO3M6MzI6IjdjNGQ2YzYwMGIyMzNhMmU2MGQzMTUyZmQ3NmQxOWVhIjt9

Last edited by osei (2004-10-26 14:11:50)


Johan Nilsson

Offline

#2 2004-10-26 15:58:22

jhaeusler
Member
From: Berlin
Registered: 2004-09-04
Posts: 22
Website

Re: [plugin] [ORPHAN] glx_countdown

Nice idea, thanks! Will check it out right now.


http://ww.spreeblick.de, a weblog from Berlin

Offline

#3 2004-10-26 19:57:22

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

Re: [plugin] [ORPHAN] glx_countdown

A bit of an overlap


Who’s gonna textdrive you home tonight?

Offline

#4 2004-10-26 20:05:39

osei
Plugin Author
From: Stockholm, Sweden
Registered: 2004-07-01
Posts: 178
Website

Re: [plugin] [ORPHAN] glx_countdown

well, maybe maybe not. But i felt i wanted to share what i needed myself for a project, and i wanted it to display a selected text when the time was reached.

I like your plugin, but it wasnt exactly what i wanted.


Johan Nilsson

Offline

#5 2004-10-26 20:25:53

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

Re: [plugin] [ORPHAN] glx_countdown

Yeah, I know, it wasn’t meant as a critique.


Who’s gonna textdrive you home tonight?

Offline

#6 2005-08-08 17:40:55

midnightferret
New Member
From: new orleans
Registered: 2005-02-10
Posts: 4
Website

Re: [plugin] [ORPHAN] glx_countdown

Sorry to bump this, and I believe I read that the author of this plugin was going to be unavailable for support, but I have a question:

Am I the only intellectually challenged person here who cannot figure out how to get the plugin to render anything but how many months and weeks until a date, and not the days, hours, minutes, and so on?

< txp:glx_countdown month=“10” year=“2005” day=“01” hour=“09” minute=“00” >
It’s here!!!
< /txp:glx_countdown >

(without the spaces of course)

only displays “1 month, 3 weeks”

and no hours or minutes. What have I done wrong?

Last edited by midnightferret (2005-08-08 18:20:12)

Offline

Board footer

Powered by FluxBB