Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
pat_css_timer
Hi Folks.
I’m currently working on this kind of plugin:
Don’t know how many time I’ll taking on. Cooking plugins is a bit hard, you know :))
if(@txpinterface == 'admin') {
add_privs('pat_css_timer','1,2');
register_tab('extensions', 'pat_css_timer', pat_css_timer_gTxt('pat_css_timer'));
register_callback('pat_css_timer', 'pat_css_timer');
register_callback('pat_css_timer_welcome', 'pat_css_timer');
}
function pat_css_timer_gTxt($what, $atts = array()) {
$lang = array(
'pat_css_timer' => 'CSS Schedule',
'title' => 'Choose your CSS Files According to Planned Dates',
'documentation' => 'Plugin Help',
'planificator' => 'My Planner',
'choose_your_default_css' => 'What is your "default" CSS file?',
'css' => 'Select a CSS file to schedule',
'startdate' => 'Starting Date',
'enddate' => 'Ending Date',
'add' => 'Are you planning another CSS file?',
);
return strtr($lang[$what], $atts);
}
function pat_css_timer() {
global $step;
require_privs('pat_css_timer');
if($step == 'pat_css_timer_save') $step();
else pat_css_timer_edit();
}
function pat_css_timer_edit($message='') {
global $event, $step, $calendar;
pagetop(pat_css_timer_gTxt('pat_css_timer'),$message);
echo('
(...) and so on (...)
Cheers,
Last edited by Pat64 (2009-08-01 10:46:57)
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Re: pat_css_timer
Wouldn’t it be simpler if you turned that into a generic timer tag and let people use it in an if-construct in the templates?
Offline
#3 2009-07-31 13:40:15
- candyman
- Member

- From: Italy
- Registered: 2006-08-08
- Posts: 684
Re: pat_css_timer
Nice. I think that it would be better a timer that loads different CSS&graphics at different hours so to obtain a clear template for morning and a darker one for evening, for example… even if, maybe,, there would be a clear cache problem…
Nice idea, anyway.
Offline
Re: pat_css_timer
ruud wrote:
Wouldn’t it be simpler if you turned that into a generic timer tag and let people use it in an if-construct in the templates?
Nice idea (as always ;) I trying to think about that. Tkx.
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Re: pat_css_timer
candyman wrote:
Nice. I think that it would be better a timer that loads different CSS&graphics at different hours so to obtain a clear template for morning and a darker one for evening, for example… even if, maybe,, there would be a clear cache problem…
My first idea is to use it for daily design (i.e. a marketing campaign) not hourly. For morming/night css you can make this kind of timer with some (little) PHP code.
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Pages: 1
