Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » Plugin support
  3. » pat_timer

#1 2012-04-30 09:59:51

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,599
GitHub Twitter

pat_timer

pat_timer

Simple scheduler based on date and time ranges. Support <txp:else /> statement for alternative option.

Installation & Usage

Install this plugin as usual and activate it. Surround your callings like this:

<txp:pat_timer start="" end="">
(...) TXP or/and HTML tags to apply for this case
<txp:else />
(...) TXP or/and HTML tags for alternative option
</txp:pat_timer>

Attributes

  • start: String [required] starting date (format YYY-MM-DD H:i) when you wish to apply the statement which follow the current tag. Hour (24-hour format) and minutes can be omitted. Default: empty.
  • end: String [required] ending date (format YYY-MM-DD H:i) when you wish to end your schedule. Hour (24-hour format) and minutes can be omitted. Default: empty.

Note: date/time can be set in local timezone format (ie. “29/04/2012” for french users). If time is omitted, default “00:00” time will be applying.

Example

<txp:pat_timer start="2012-04-01 00:00" end="2012-04-01 23:59">
<txp:css format="link" name="naked_day" />
<txp:else />
<txp:css format="link" />
</txp:pat_timer>

In the code above, The CSS file named “naked day” will be displayed between 1 hour and midnight on April, 1st. Otherwise, the “defaultCSS file will be displayed.

Purpose

Possible purpose: marketing actions, CSS changing layout, posted links, contextual text… all for a few times.

To Do

Add repeat & each attributes for recurring schedules.

Changelog

  • 29 april 2012: v0.1 first public commit.

Pay with a Tweet to download

or Download directly

Check, test, comment, love or hate.

Last edited by Pat64 (2012-04-30 18:56:13)


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#2 2012-04-30 11:31:24

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,304

Re: pat_timer

Patrick, this looks so easy to apply, thanks!


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#3 2012-04-30 19:24:03

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,599
GitHub Twitter

Re: pat_timer

Thanks Uli.

Last edited by Pat64 (2012-05-01 07:21:38)


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#4 2012-05-10 19:36:14

phuture303
Member
Registered: 2008-09-14
Posts: 127

Re: pat_timer

Pat, thank you very much… Great & simple! :-)

Last edited by phuture303 (2012-05-10 19:36:29)

Offline

#5 2012-05-11 06:20:21

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,599
GitHub Twitter

Re: pat_timer

Glad to know that it’s useful to you :)


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

  1. Index
  2. » Plugin support
  3. » pat_timer

Board footer

Powered by FluxBB