summary refs log tree commit diff stats
path: root/includes
diff options
context:
space:
mode:
Diffstat (limited to 'includes')
-rwxr-xr-xincludes/bbcode.php3
-rwxr-xr-xincludes/comments.php3
-rwxr-xr-xincludes/common.php8
-rwxr-xr-xincludes/functions.php12
-rwxr-xr-xincludes/layout.php19
-rwxr-xr-xincludes/parsers.php2
-rwxr-xr-xincludes/specialdates.php102
7 files changed, 94 insertions, 55 deletions
diff --git a/includes/bbcode.php b/includes/bbcode.php index 28247ff..4842ee5 100755 --- a/includes/bbcode.php +++ b/includes/bbcode.php
@@ -37,6 +37,7 @@ class BBCode
37 $this->bbcodes2['url'] = '<a href="{PARAM}">{CONTENT}</a>'; 37 $this->bbcodes2['url'] = '<a href="{PARAM}">{CONTENT}</a>';
38 $this->bbcodes['img'] = '<img src="{CONTENT}" alt="Image" />'; 38 $this->bbcodes['img'] = '<img src="{CONTENT}" alt="Image" />';
39 $this->bbcodes2['img'] = '<img src="{CONTENT}" alt="{PARAM}" title="{PARAM}" />'; 39 $this->bbcodes2['img'] = '<img src="{CONTENT}" alt="{PARAM}" title="{PARAM}" />';
40 $this->bbcodes['imgright'] = '<img src="{CONTENT}" align="right" alt="Image" />';
40 $this->bbcodes['big'] = '<big>{CONTENT}</big>'; 41 $this->bbcodes['big'] = '<big>{CONTENT}</big>';
41 $this->bbcodes['small'] = '<small>{CONTENT}</small>'; 42 $this->bbcodes['small'] = '<small>{CONTENT}</small>';
42 $this->bbcodes['ul'] = '<ul>{CONTENT}</ul>'; 43 $this->bbcodes['ul'] = '<ul>{CONTENT}</ul>';
@@ -57,6 +58,8 @@ class BBCode
57 $this->bbcodes['thumb'] = '<a href="/images/{CONTENT}"><img src="http://fourisland.com/thumb.php?file=images/{CONTENT}&amp;mode=scale&amp;by=521&amp;side=0" alt="Image" /></a>'; 58 $this->bbcodes['thumb'] = '<a href="/images/{CONTENT}"><img src="http://fourisland.com/thumb.php?file=images/{CONTENT}&amp;mode=scale&amp;by=521&amp;side=0" alt="Image" /></a>';
58 $this->bbcodes['thumb2'] = '<a href="/images/{CONTENT}"><img src="http://fourisland.com/thumb.php?file=images/{CONTENT}&amp;mode=scale&amp;by=260&amp;side=0" align="right" alt="Image" /></a>'; 59 $this->bbcodes['thumb2'] = '<a href="/images/{CONTENT}"><img src="http://fourisland.com/thumb.php?file=images/{CONTENT}&amp;mode=scale&amp;by=260&amp;side=0" align="right" alt="Image" /></a>';
59 $this->bbcodes['project'] = '<a href="http://projects.fourisland.com/projects/show/{CONTENT}">{CONTENT}</a>'; 60 $this->bbcodes['project'] = '<a href="http://projects.fourisland.com/projects/show/{CONTENT}">{CONTENT}</a>';
61 $this->bbcodes['hr'] = '<hr size="2" color="black" />';
62 $this->bbcodes2['audio'] = '<p id="audioplayer_{CONTENT}">Click to download: <a href="{PARAM}">{CONTENT}</a></p><script>AudioPlayer.embed("audioplayer_{CONTENT}", {soundFile: "{PARAM}", titles: "{CONTENT}"});</script>';
60 63
61 $this->init = true; 64 $this->init = true;
62 } 65 }
diff --git a/includes/comments.php b/includes/comments.php index 78353c1..be48c02 100755 --- a/includes/comments.php +++ b/includes/comments.php
@@ -23,8 +23,7 @@ if (!defined('S_INCLUDE_FILE')) {define('S_INCLUDE_FILE',1);}
23require('headerproc.php'); 23require('headerproc.php');
24 24
25include('includes/recaptchalib.php'); 25include('includes/recaptchalib.php');
26$publickey = "6LfgvgEAAAAAAG_BJMkWk8sNcT1nBaGoXKJYb-JT"; 26$publickey = "6LdIZLwSAAAAAGS77bqSjfRka3TsLeRn71-W441f";
27$privatekey = "6LfgvgEAAAAAAD0_UVLp57MU7tqcypsbZPS9qTnr";
28 27
29$curID = 0; 28$curID = 0;
30 29
diff --git a/includes/common.php b/includes/common.php index 1239c68..8ca6958 100755 --- a/includes/common.php +++ b/includes/common.php
@@ -47,6 +47,14 @@ if (isset($_GET['layout']))
47 exit; 47 exit;
48} 48}
49 49
50if (sd_isSpecialDay('April Fools Day') && ($_COOKIE['layout'] != '7'))
51{
52 setcookie('layout', 7, time()+60*60*24*30, '/', '.fourisland.com');
53
54 header('Location: ' . getRewriteURL());
55 exit;
56}
57
50if (preg_match('|MSIE ([0-9].[0-9]{1,2})|', $_SERVER['HTTP_USER_AGENT'], $matched)) 58if (preg_match('|MSIE ([0-9].[0-9]{1,2})|', $_SERVER['HTTP_USER_AGENT'], $matched))
51{ 59{
52 $usingIE = true; 60 $usingIE = true;
diff --git a/includes/functions.php b/includes/functions.php index efb3c13..f0dad53 100755 --- a/includes/functions.php +++ b/includes/functions.php
@@ -281,7 +281,7 @@ function displayRelated($title, $avoid = 0)
281 $template = new FITemplate('related'); 281 $template = new FITemplate('related');
282 } 282 }
283 283
284 $template->adds_block('POST', array( 'TITLE' => htmlentities($getrelated3[$i]['title']), 284 $template->adds_block('POST', array( 'TITLE' => doAprilFoolsDay(htmlentities($getrelated3[$i]['title'])),
285 'CODED' => $getrelated3[$i]['slug'], 285 'CODED' => $getrelated3[$i]['slug'],
286 'AUTHOR' => $getrelated3[$i]['author'], 286 'AUTHOR' => $getrelated3[$i]['author'],
287 'DATE' => date('F jS Y',strtotime($getrelated3[$i]['pubDate'])))); 287 'DATE' => date('F jS Y',strtotime($getrelated3[$i]['pubDate']))));
@@ -331,11 +331,11 @@ function getPollOfTheWeek($id = -1)
331 $getpoll2 = mysql_query($getpoll); 331 $getpoll2 = mysql_query($getpoll);
332 $getpoll3 = mysql_fetch_array($getpoll2); 332 $getpoll3 = mysql_fetch_array($getpoll2);
333 333
334 $potw->add('QUESTION', stripslashes(htmlentities($getpoll3['question']))); 334 $potw->add('QUESTION', doAprilFoolsDay(stripslashes(htmlentities($getpoll3['question']))));
335 $potw->add('OPTION1', stripslashes(htmlentities($getpoll3['option1']))); 335 $potw->add('OPTION1', doAprilFoolsDay(stripslashes(htmlentities($getpoll3['option1']))));
336 $potw->add('OPTION2', stripslashes(htmlentities($getpoll3['option2']))); 336 $potw->add('OPTION2', doAprilFoolsDay(stripslashes(htmlentities($getpoll3['option2']))));
337 $potw->add('OPTION3', stripslashes(htmlentities($getpoll3['option3']))); 337 $potw->add('OPTION3', doAprilFoolsDay(stripslashes(htmlentities($getpoll3['option3']))));
338 $potw->add('OPTION4', stripslashes(htmlentities($getpoll3['option4']))); 338 $potw->add('OPTION4', doAprilFoolsDay(stripslashes(htmlentities($getpoll3['option4']))));
339 339
340 $getip = "SELECT * FROM didpollalready WHERE ip = \"" . $_SERVER['REMOTE_ADDR'] . "\""; 340 $getip = "SELECT * FROM didpollalready WHERE ip = \"" . $_SERVER['REMOTE_ADDR'] . "\"";
341 $getip2 = mysql_query($getip); 341 $getip2 = mysql_query($getip);
diff --git a/includes/layout.php b/includes/layout.php index b11c56f..566ce50 100755 --- a/includes/layout.php +++ b/includes/layout.php
@@ -47,7 +47,7 @@ if (isset($hatNav) && is_array($hatNav))
47 47
48 foreach ($hatNav as $item) 48 foreach ($hatNav as $item)
49 { 49 {
50 $template->adds_block('HATNAV',array('TITLE' => $item['title'], 'URL' => $item['url'], 'ICON' => $item['icon'])); 50 $template->adds_block('HATNAV',array('TITLE' => doAprilFoolsDay($item['title']), 'URL' => $item['url'], 'ICON' => $item['icon']));
51 } 51 }
52} 52}
53 53
@@ -76,7 +76,7 @@ $i=0;
76while ($getaffs3 = mysql_fetch_array($getaffs2)) 76while ($getaffs3 = mysql_fetch_array($getaffs2))
77{ 77{
78 $template->adds_block('AFFILIATES', array( 'COLOR' => getTagColor($i++), 78 $template->adds_block('AFFILIATES', array( 'COLOR' => getTagColor($i++),
79 'TITLE' => htmlentities($getaffs3['title']), 79 'TITLE' => doAprilFoolsDay(htmlentities($getaffs3['title'])),
80 'URL' => $getaffs3['url'])); 80 'URL' => $getaffs3['url']));
81} 81}
82 82
@@ -86,7 +86,7 @@ $i=0;
86while ($getwebps3 = mysql_fetch_array($getwebps2)) 86while ($getwebps3 = mysql_fetch_array($getwebps2))
87{ 87{
88 $template->adds_block('WEBPROJS', array( 'COLOR' => getTagColor($i++), 88 $template->adds_block('WEBPROJS', array( 'COLOR' => getTagColor($i++),
89 'TITLE' => htmlentities($getwebps3['title']), 89 'TITLE' => doAprilFoolsDay(htmlentities($getwebps3['title'])),
90 'URL' => $getwebps3['url'])); 90 'URL' => $getwebps3['url']));
91} 91}
92 92
@@ -235,7 +235,7 @@ $i=0;
235while ($getpopular3[$i] = mysql_fetch_array($getpopular2)) 235while ($getpopular3[$i] = mysql_fetch_array($getpopular2))
236{ 236{
237 $template->adds_block('POPULAR', array( 'CODED' => $getpopular3[$i]['slug'], 237 $template->adds_block('POPULAR', array( 'CODED' => $getpopular3[$i]['slug'],
238 'TITLE' => stripslashes(htmlentities($getpopular3[$i]['title'])))); 238 'TITLE' => doAprilFoolsDay(stripslashes(htmlentities($getpopular3[$i]['title'])))));
239 $i++; 239 $i++;
240} 240}
241 241
@@ -278,6 +278,17 @@ $template->add('ME', getRewriteURL());
278 278
279$template->add('CONTENT', $content); 279$template->add('CONTENT', $content);
280 280
281ob_start();
281$template->display(); 282$template->display();
283$document = ob_get_contents();
284ob_end_clean();
285
286$document = doAprilFoolsDay($document);
287$document = str_replace(doAprilFoolsDay($content), $content, $document);
288$document = str_replace("id=\"threem\"", "id=\"fourm\"", $document);
289$document = str_replace("id=\"threeipedia\"", "id=\"fouripedia\"", $document);
290$document = str_replace('CLASS="threem none threem-none"', 'CLASS="fourm none fourm-none"', $document);
291$document = str_replace("threeisland.com/", "fourisland.com/", $document);
292echo($document);
282 293
283?> 294?>
diff --git a/includes/parsers.php b/includes/parsers.php index 5e984c2..86284af 100755 --- a/includes/parsers.php +++ b/includes/parsers.php
@@ -27,8 +27,10 @@ include('includes/smilies.php');
27 27
28function parseText($text) 28function parseText($text)
29{ 29{
30 $text = htmlspecialchars($text);
30 $text = parseBBCode($text); 31 $text = parseBBCode($text);
31 $text = parseSmilies($text); 32 $text = parseSmilies($text);
33 $text = doAprilFoolsDay($text);
32 34
33 return $text; 35 return $text;
34} 36}
diff --git a/includes/specialdates.php b/includes/specialdates.php index 067de6d..8d0aa08 100755 --- a/includes/specialdates.php +++ b/includes/specialdates.php
@@ -42,11 +42,12 @@ sd_lunar_annual('Presidents Day',2,1,3); //DateFinder
42sd_solar_annual('Valentines Day',2,14); //BG Pic; DateFinder 42sd_solar_annual('Valentines Day',2,14); //BG Pic; DateFinder
43sd_solar_multiannual('Leap Day',2,29,4,2004); //DateFinder 43sd_solar_multiannual('Leap Day',2,29,4,2004); //DateFinder
44sd_solar_annual('St Patricks Day',3,17); //DateFinder 44sd_solar_annual('St Patricks Day',3,17); //DateFinder
45sd_solar_annual('April Fools Day',4,1); //Awesome
45sd_solar_annual('Tri\'s CIEday',4,22); //DateFinder 46sd_solar_annual('Tri\'s CIEday',4,22); //DateFinder
46sd_solar_annual('Silence Day',4,25); //DateFinder 47sd_solar_annual('Silence Day',4,25); //DateFinder
47sd_solar_annual('WCA Day',5,5); //DateFinder 48sd_solar_annual('WCA Day',5,5); //DateFinder
48sd_lunar_annual('Mothers Day',5,7,2); //BG Pic; DateFinder; Header Pic 49sd_lunar_annual('Mothers Day',5,7,2); //BG Pic; DateFinder; Header Pic
49sd_lunar_annual('Memorial Day',5,1,4); //BG Pic; DateFinder; Header Pic 50sd_lunar_annual('Memorial Day',5,1,5); //BG Pic; DateFinder; Header Pic
50sd_easter(); //BG Pic; DateFinder 51sd_easter(); //BG Pic; DateFinder
51sd_solar_annual('Flag Day',6,14); //BG Pic; DateFinder 52sd_solar_annual('Flag Day',6,14); //BG Pic; DateFinder
52sd_solar_annual('Hatkirbys B-Day',6,17); //BG Pic; DateFinder; Header Pic 53sd_solar_annual('Hatkirbys B-Day',6,17); //BG Pic; DateFinder; Header Pic
@@ -54,6 +55,7 @@ sd_lunar_annual('Fathers Day',6,7,3); //BG Pic; DateFinder
54sd_solar_annual('CTNH',6,17); //Header Pic; DateFinder 55sd_solar_annual('CTNH',6,17); //Header Pic; DateFinder
55sd_solar_annual('Independance Day',7,4); //BG Pic; DateFinder 56sd_solar_annual('Independance Day',7,4); //BG Pic; DateFinder
56sd_lunar_annual('SysAdminDay',7,5,4); //DateFinder 57sd_lunar_annual('SysAdminDay',7,5,4); //DateFinder
58sd_solar_annual('Opposite Day',8,25); //Yet to be implemented
57sd_lunar_annual('Labor Day',9,1,1); //Yet to be implemented 59sd_lunar_annual('Labor Day',9,1,1); //Yet to be implemented
58sd_solar_annual('Four Island A',9,22); //BG Pic; DateFinder; Header Pic 60sd_solar_annual('Four Island A',9,22); //BG Pic; DateFinder; Header Pic
59sd_lunar_annual('Columbus Day',10,1,2); //BG Pic; DateFinder 61sd_lunar_annual('Columbus Day',10,1,2); //BG Pic; DateFinder
@@ -310,50 +312,64 @@ function sd_addDateIn($id,$dateid)
310 312
311function sd_dateFinder() 313function sd_dateFinder()
312{ 314{
313 if (sd_ifNoSpecialDay()) 315 if (sd_ifNoSpecialDay())
314 { 316 {
315 $did = sd_getMonthStart(date('n')-1); 317 $did = sd_getMonthStart(date('n')-1);
316 $did += (date('j')-1); 318 $did += (date('j')-1);
317 $did = sd_findNextDay() - $did; 319 $did = sd_findNextDay() - $did;
318 return ($did . ' more days until the next holiday!'); 320 return ($did . ' more days until the next holiday!');
319 } else { 321 } else {
320 switch (sd_getCurrentDay()) 322 switch (sd_getCurrentDay())
321 { 323 {
322 case 'New Years Day': return 'Happy new years!'; 324 case 'New Years Day': return 'Happy new years!';
323 case 'Martin Luther King Day': return 'Happy Martin Luther King Day!'; 325 case 'Martin Luther King Day': return 'Happy Martin Luther King Day!';
324 case 'Groundhog Day': return 'It\'s groundhog day? Will he see his shadow?'; 326 case 'Groundhog Day': return 'It\'s groundhog day? Will he see his shadow?';
325 case 'Presidents Day': return 'Happy President\'s Day!'; 327 case 'Presidents Day': return 'Happy President\'s Day!';
326 case 'Valentines Day': return 'Happy Valentines Day! Will you be mine?'; 328 case 'Valentines Day': return 'Happy Valentines Day! Will you be mine?';
327 case 'St Patricks Day': return 'Happy St. Patrick\'s Day! If you\'re not wearing green, I\'ll pinch you!'; 329 case 'St Patricks Day': return 'Happy St. Patrick\'s Day! If you\'re not wearing green, I\'ll pinch you!';
328 case 'Mothers Day': return 'Happy Mothers Day!'; 330 case 'Mothers Day': return 'Happy Mothers Day!';
329 case 'Memorial Day': return 'Remember...'; 331 case 'Memorial Day': return 'Remember...';
330 case 'Easter': return 'Happy Easter! Where are those eggs?'; 332 case 'Easter': return 'Happy Easter! Where are those eggs?';
331 case 'Mardi Gras': return 'Happy Mardi Gras! Time to get fat!'; 333 case 'Mardi Gras': return 'Happy Mardi Gras! Time to get fat!';
332 case 'Ash Wednesday': return 'Happy Ash Wednesday! Did you get your ashes?'; 334 case 'Ash Wednesday': return 'Happy Ash Wednesday! Did you get your ashes?';
333 case 'Palm Sunday': return 'Happy Palm Sunday!'; 335 case 'Palm Sunday': return 'Happy Palm Sunday!';
334 case 'Holy Thursday': return 'Happy Holy Thursday!'; 336 case 'Holy Thursday': return 'Happy Holy Thursday!';
335 case 'Hatkirbys B-Day': return 'Happy Birthday to me! Happy Birthday to me! Happy Birthday dear Hatkirby! Happy Birthday to me!'; 337 case 'Hatkirbys B-Day': return 'Happy Birthday to me! Happy Birthday to me! Happy Birthday dear Hatkirby! Happy Birthday to me!';
336 case 'Flag Day': return 'Happy Flag Day!'; 338 case 'Flag Day': return 'Happy Flag Day!';
337 case 'Fathers Day': return 'Happy Fathers Day!'; 339 case 'Fathers Day': return 'Happy Fathers Day!';
338 case 'Independance Day': return 'Happy 4th of July!'; 340 case 'Independance Day': return 'Happy 4th of July!';
339 case 'Labor Day': return 'Happy Labor Day!'; 341 case 'Labor Day': return 'Happy Labor Day!';
340 case 'Four Island A': return ('Happy birthday Four Island! Four Island is ' . (date('Y')-2007) . ' years old!'); 342 case 'Four Island A': return ('Happy birthday Four Island! Four Island is ' . (date('Y')-2007) . ' years old!');
341 case 'Columbus Day': return 'Happy Columbus Day!'; 343 case 'Columbus Day': return 'Happy Columbus Day!';
342 case 'Halloween': return 'Happy Halloween!'; 344 case 'Halloween': return 'Happy Halloween!';
343 case 'Veterans Day': return 'Only 2 minutes of silence. Remember... remember...'; 345 case 'Veterans Day': return 'Only 2 minutes of silence. Remember... remember...';
344 case 'Thanksgiving': return 'Happy Thanksgiving! Gobble gobble gobble gobble!'; 346 case 'Thanksgiving': return 'Happy Thanksgiving! Gobble gobble gobble gobble!';
345 case 'Kirby Week': return 'It\'s Kirby Week! Not only is it a time of celebreation and fun on Four Island, it\'s only a week before Christmas!'; 347 case 'Kirby Week': return 'It\'s Kirby Week! Not only is it a time of celebreation and fun on Four Island, it\'s only a week before Christmas!';
346 case 'Christmas Eve': return '"1 Day Left" says Fourie!'; 348 case 'Christmas Eve': return '"1 Day Left" says Fourie!';
347 case 'Christmas Day': return 'Merry Christmas! Time for presents!'; 349 case 'Christmas Day': return 'Merry Christmas! Time for presents!';
348 case 'New Years Eve': return '5... 4... 3... 2...'; 350 case 'New Years Eve': return '5... 4... 3... 2...';
349 case 'SysAdminDay': return '<A HREF="http://www.sysadminday.com">If you can read this, thank your <I><B>sysadmin</B></I></A>'; 351 case 'SysAdminDay': return '<A HREF="http://www.sysadminday.com">If you can read this, thank your <I><B>sysadmin</B></I></A>';
350 case 'WCA Day': return '<A HREF="http://wca2001.keenspace.com">Webcomic Appreciation Day!</A> Stare in wonder at all of your favorite webcomics! Like Pillowcase, for instance!'; 352 case 'WCA Day': return '<A HREF="http://wca2001.keenspace.com">Webcomic Appreciation Day!</A> Stare in wonder at all of your favorite webcomics! Like Pillowcase, for instance!';
351 case 'Leap Day': return 'What day is it? LEAP DAY? This only happens once every four years! LET\'S LEAP IN JOY!'; 353 case 'Leap Day': return 'What day is it? LEAP DAY? This only happens once every four years! LET\'S LEAP IN JOY!';
352 case 'Tris CIEday': return 'This is the day that shei came.'; 354 case 'Tris CIEday': return 'This is the day that shei came.';
353 case 'Silence Day': return 'Support LGBT people by keeping the silence until 5 PM.'; 355 case 'Silence Day': return 'Support LGBT people by keeping the silence until 5 PM.';
354 case 'CTNH': return '<A HREF="/fuhsdiufgsadiufgaisfioas.php">It never happened.</A>'; 356 case 'CTNH': return '<A HREF="/fuhsdiufgsadiufgaisfioas.php">It never happened.</A>';
355 } 357 case 'April Fools Day': return 'Long live the three!';
358 }
356 } 359 }
357} 360}
358 361
362function doAprilFoolsDay($text)
363{
364 if (sd_isSpecialDay('April Fools Day'))
365 {
366 $text = str_replace('four', 'three', $text);
367 $text = str_replace('Four', 'Three', $text);
368 //$text = str_replace('4', '3', $text);
369 $text = str_replace('FOUR', 'THREE', $text);
370 }
371
372 return $text;
373}
374
359?> 375?>