Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-04-21 10:41:06

gavnosis
Member
From: Milton Keynes, UK
Registered: 2005-03-12
Posts: 151
Website

[request] Timed Style Sheet swapper

Once upon a time there used to be a plugin called zen_css …Alas, the link is broken :-( Is there anything similar out there that anyone knows about? (Or perhaps a link to this two-year plugin, if indeed it actually worked/works).

Thank you.

Offline

#2 2009-04-21 13:52:26

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,090
Website GitHub Mastodon Twitter

Re: [request] Timed Style Sheet swapper

Will one of these plugins help?

> Edit… probably not. I just read was Alex’s plugin did.

Last edited by colak (2009-04-21 13:54:11)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#3 2009-04-21 14:08:01

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,447
Website GitHub

Re: [request] Timed Style Sheet swapper

gavnosis

You could cheat with smd_multi_choice :-)

(untested but should work)

<txp:php>
   global $on_the_hour;
   $on_the_hour = strftime("%H");
</txp:php>

<txp:smd_switch item="?on_the_hour" look_in="phpvar">

   <txp:smd_case value="12" type="lt">
     <txp:css n="morning" format="link" />
   </txp:smd_case>

   <txp:smd_case value="18" type="lt">
     <txp:css n="afternoon" format="link" />
   </txp:smd_case>

   <txp:smd_case default="1">
     <txp:css n="evening" format="link" />
   </txp:smd_case>

</txp:smd_switch>

Add as many case statements as you like, to taste.

Last edited by Bloke (2009-04-21 21:25:43)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#4 2009-04-21 14:40:32

gavnosis
Member
From: Milton Keynes, UK
Registered: 2005-03-12
Posts: 151
Website

Re: [request] Timed Style Sheet swapper

I might’ve known you’d have cunning plan! Thanks Stef – I’ll give it a whirl later and let you know how I get on

Offline

#5 2009-04-21 15:58:25

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Re: [request] Timed Style Sheet swapper

You can try thg_if_time (my work :) )


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#6 2010-02-15 10:39:11

tka
New Member
Registered: 2010-02-15
Posts: 4

Re: [request] Timed Style Sheet swapper

the_ghost schrieb:

You can try thg_if_time (my work :) )

i would second that. for simple purposes perfect. thanks. :)

Offline

Board footer

Powered by FluxBB