Download & Extend

Code to get special css-file by night

Project:CSS Injector
Version:6.x-1.3
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

What do I put of code in the PHP-field to get a different css-file activated by night?

Comments

#1

Something like this:

<?php
$hour
= (int)date('G');
// After 7pm or before 4am.
if ($hour > 18 OR $hour < 4) {
  return
TRUE;
}
else {
  return
FALSE;
}
?>

Edited 06/19/2010 to correct syntax errors.

#2

Hmm, can't get this to work...is it confirmed working?
Thanks!

#3

It does when there aren't any syntax errors. :-/

nobody click here