Skip to content

Instantly share code, notes, and snippets.

@nojimage
Created April 1, 2011 03:59
Show Gist options
  • Save nojimage/897705 to your computer and use it in GitHub Desktop.
Save nojimage/897705 to your computer and use it in GitHub Desktop.
for April fool setting
<!-- ..snip.. -->
<?php if (Configure::read('AprilFool')) : ?>
fool content write here!
<?php endif; ?>
<?php __('Any Message'); ?>
<!-- ..snip.. -->
<?php
// app/config/bootstrap.php
// (..snip..)
// April fool
Configure::write('AprilFool', false);
$_time = time();
if (strtotime('2011-04-01 00:00:00') < $_time && $_time < strtotime('2011-04-02 00:00:00')) {
Configure::write('AprilFool', true);
Configure::write('Config.language', 'apr');
}
<html>
<head>
<!-- ..snip.. -->
<?php if (Configure::read('AprilFool')) : ?>
<?php echo $this->Html->css('april.css'); ?>
<?php endif; ?>
</head>
<body>
<!-- ..snip.. -->
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment