From e6362171e86d53155c34bf60f2786ee5af0cb707 Mon Sep 17 00:00:00 2001 From: Starla Insigna Date: Thu, 31 Mar 2011 21:56:35 -0400 Subject: Added April Fools Day 2011 joke Also adjusted the date for the Day of Silence to reflect the 2011 date. --- includes/specialdates.php | 12 +++++++----- index.php | 10 ++++++++++ theme/images/afd-l7-2011.png | Bin 0 -> 112120 bytes theme/layouts/7/holiday.php | 2 +- 4 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 theme/images/afd-l7-2011.png diff --git a/includes/specialdates.php b/includes/specialdates.php index 8d0aa08..907ca8f 100755 --- a/includes/specialdates.php +++ b/includes/specialdates.php @@ -44,7 +44,7 @@ sd_solar_multiannual('Leap Day',2,29,4,2004); //DateFinder sd_solar_annual('St Patricks Day',3,17); //DateFinder sd_solar_annual('April Fools Day',4,1); //Awesome sd_solar_annual('Tri\'s CIEday',4,22); //DateFinder -sd_solar_annual('Silence Day',4,25); //DateFinder +sd_solar_annual('Silence Day',4,15); //DateFinder sd_solar_annual('WCA Day',5,5); //DateFinder sd_lunar_annual('Mothers Day',5,7,2); //BG Pic; DateFinder; Header Pic sd_lunar_annual('Memorial Day',5,1,5); //BG Pic; DateFinder; Header Pic @@ -354,7 +354,7 @@ function sd_dateFinder() case 'Tris CIEday': return 'This is the day that shei came.'; case 'Silence Day': return 'Support LGBT people by keeping the silence until 5 PM.'; case 'CTNH': return 'It never happened.'; - case 'April Fools Day': return 'Long live the three!'; + case 'April Fools Day': return 'It\'s FRIDAY, FRIDAY, GOTTA GET DOWN ON FRIDAY!'; } } } @@ -363,10 +363,12 @@ function doAprilFoolsDay($text) { if (sd_isSpecialDay('April Fools Day')) { - $text = str_replace('four', 'three', $text); - $text = str_replace('Four', 'Three', $text); + $text = str_replace('four', 'friday', $text); + $text = str_replace('Four', 'Friday', $text); //$text = str_replace('4', '3', $text); - $text = str_replace('FOUR', 'THREE', $text); + $text = str_replace('FOUR', 'FRIDAY', $text); + $text = preg_replace('/([A-Za-z0-9 ]*)\: ([A-Za-z0-9 ]*)/', ' Rebecca Black: \2', $text); + $text = str_replace('Hatkirby', 'Rebecca Black', $text); } return $text; diff --git a/index.php b/index.php index 2986730..9072431 100755 --- a/index.php +++ b/index.php @@ -32,6 +32,16 @@ if (strpos($_SERVER['REQUEST_URI'],'index.php')) exit; } +if (sd_isSpecialDay('April Fools Day')) +{ + if (rand(0,20) == 4) + { + header('Location: http://www.youtube.com/watch?v=CD2LRROpph0'); + echo(" "); + exit; + } +} + ob_start(); $pageName = basename($_GET['area']); diff --git a/theme/images/afd-l7-2011.png b/theme/images/afd-l7-2011.png new file mode 100644 index 0000000..c8833c9 Binary files /dev/null and b/theme/images/afd-l7-2011.png differ diff --git a/theme/layouts/7/holiday.php b/theme/layouts/7/holiday.php index 54499a9..19accc4 100755 --- a/theme/layouts/7/holiday.php +++ b/theme/layouts/7/holiday.php @@ -105,7 +105,7 @@ if (sd_isSpecialDay('April Fools Day')) ?> div#banner { - background-image: url(/theme/images/afd-l7.png); + background-image: url(/theme/images/afd-l7-2011.png); }