summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorStarla Insigna <hatkirby@fourisland.com>2008-12-21 11:18:19 -0500
committerStarla Insigna <hatkirby@fourisland.com>2008-12-21 11:18:19 -0500
commit7d049520112991edf1f1fd1f446bb892fc680b9c (patch)
treedf8206b5d12ada89bd34820af5449469ce9f1403
parent7b0c0ef6aeee750eed8258d2e125144bd95a7a43 (diff)
downloadfourisland-7d049520112991edf1f1fd1f446bb892fc680b9c.tar.gz
fourisland-7d049520112991edf1f1fd1f446bb892fc680b9c.tar.bz2
fourisland-7d049520112991edf1f1fd1f446bb892fc680b9c.zip
Re-did 404 page
For some reason, the 404 page was previously filled with terrible semantics, IE classes and it didn't look great. Now, the HTML has been improved.
The Search clause has been fixed, there was a bug with displaying the search terms. Also, the error document has been set to the 404 page so the 404
page is actually shown when a page cannot be found.
-rwxr-xr-x.htaccess2
-rwxr-xr-xpages/error.php12
-rwxr-xr-xtheme/errors/404.tpl164
3 files changed, 109 insertions, 69 deletions
diff --git a/.htaccess b/.htaccess index 9b841b1..3fd4fe2 100755 --- a/.htaccess +++ b/.htaccess
@@ -1,3 +1,5 @@
1ErrorDocument 404 http://fourisland.com/error/404.php
2
1RewriteEngine On 3RewriteEngine On
2 4
3RewriteCond %{HTTP_HOST} ^www.fourisland.com [NC] 5RewriteCond %{HTTP_HOST} ^www.fourisland.com [NC]
diff --git a/pages/error.php b/pages/error.php index 7f6c505..969b7da 100755 --- a/pages/error.php +++ b/pages/error.php
@@ -41,10 +41,10 @@ if ($errorid == '404')
41 } else { 41 } else {
42 if ((strpos($strReferer,".looksmart.co")>0) || (strpos($strReferer,".ifind.freeserve")>0) || (strpos($strReferer,".ask.co")>0) || (strpos($strReferer,"google.co")>0) || (strpos($strReferer,"altavista.co")>0) || (strpos($strReferer,"msn.co")>0) || (strpos($strReferer,"yahoo.co")>0)) 42 if ((strpos($strReferer,".looksmart.co")>0) || (strpos($strReferer,".ifind.freeserve")>0) || (strpos($strReferer,".ask.co")>0) || (strpos($strReferer,"google.co")>0) || (strpos($strReferer,"altavista.co")>0) || (strpos($strReferer,"msn.co")>0) || (strpos($strReferer,"yahoo.co")>0))
43 { 43 {
44 $arrSite = split("/",$strReferer); 44 $arrSite = explode("/",$strReferer);
45 $arrParams = split("?",$strReferer); 45 $arrParams = explode("?",$strReferer);
46 $strSearchTerms = $arrParams[1]; 46 $strSearchTerms = $arrParams[1];
47 $arrParams = split("&",$strSearchTerms); 47 $arrParams = explode("&",$strSearchTerms);
48 $strSite = $arrSite[2]; 48 $strSite = $arrSite[2];
49 $sQryStr=""; 49 $sQryStr="";
50 $arrQueryStrings = array("q=","p=","ask=","key="); 50 $arrQueryStrings = array("q=","p=","ask=","key=");
@@ -54,12 +54,14 @@ if ($errorid == '404')
54 for ($q=0;$q<count($arrQueryStrings);$q++) 54 for ($q=0;$q<count($arrQueryStrings);$q++)
55 { 55 {
56 $sQryStr = $arrQueryStrings[$q]; 56 $sQryStr = $arrQueryStrings[$q];
57 if (strpos($arrParams[$i],$sQryStr)==0) 57 if (strpos($arrParams[$i],$sQryStr) === 0)
58 { 58 {
59 $strSearchTerms = $arrParams[$i]; 59 $strSearchTerms = $arrParams[$i];
60 $strSearchTerms = split($sQryStr,$strSearchTerms); 60 $strSearchTerms = explode($sQryStr,$strSearchTerms);
61 $strSearchTerms = $strSearchTerms[1]; 61 $strSearchTerms = $strSearchTerms[1];
62 $strSearchTerms = str_replace("+"," ",$strSearchTerms); 62 $strSearchTerms = str_replace("+"," ",$strSearchTerms);
63
64 break;
63 } 65 }
64 } 66 }
65 } 67 }
diff --git a/theme/errors/404.tpl b/theme/errors/404.tpl index 1758a57..3010548 100755 --- a/theme/errors/404.tpl +++ b/theme/errors/404.tpl
@@ -1,64 +1,100 @@
1<TABLE cellSpacing=5 cellPadding=3 width=400> 1<H2>Hello, my name is Waddle Dee</H2>
2 <TBODY> 2
3 <TR> 3<P>
4 <TD id=tableProps vAlign=top align=left><IMG id=pagerrorImg src="/images/error404.png"></TD> 4 Aaaa.... well... I'm really sorry, but I can't find the page you're looking for. Really, I'm so sorry! Please don't tell Hat Kirby! This is
5 <TD id=tableProps2 vAlign=center align=left width=360> 5 the 17'th page I lost this week!
6 <H1 id=textSection1 style="FONT: 13pt/15pt verdana; COLOR: black"><SPAN id=errorText>Hello, my name is Waddle Dee</SPAN></H1> 6</P>
7 </TD> 7
8 </TR> 8<P>
9 9 Oh wait. Here we go. We can't find your page because... hmmm... oh not again... It seems Kirby ate the page you are looking for.
10 <TR> 10 Yes, I'm really sorry! He gets really hungry sometimes (all of the time) but we try to keep him fed.
11 <TD id=tablePropsWidth width=400 colSpan=2><FONT style="FONT: 8pt/11pt verdana; COLOR: black">Aaaa.... well... I'm really sorry, but I can't find the page you're looking for. Really, I'm so sorry! Please don't tell Hat Kirby! This is the 17'th page I lost this week!</FONT></TD> 11</P>
12 </TR> 12
13 13<!--BEGIN NOREFERER-->
14 <TR> 14 <P>
15 <TD id=tablePropsWidth width=400 colSpan=2><FONT id=LID1 style="FONT: 8pt/11pt verdana; COLOR: black"> 15 Anyway, instead of talking to me, you can:
16 <P id=LID2>Oh wait. Here we go. We can't find your page because... hmmm... oh not again... It seems Kirby ate the page you are looking for.<BR>Yes, I'm really sorry! He gets really hungry sometimes (all of the time) but we try to keep him fed. Anyway, instead of talking to me, you can:</P> 16 </P>
17 17
18 <!--BEGIN NOREFERER--> 18 <UL>
19 <UL> 19 <LI>Swim over to <A HREF="http://fourisland.com/">Fourever Island</A></LI>
20 <LI id=instructionsText1>Swim over to <A HREF="index.php">Fourever Island</A></LI> 20 <LI>Try <A HREF="http://fourisland.com/fourm/">The Fourm</A>!</LI>
21 <LI id=instructionsText2>Or maybe you could go to the <A HREF="http://cvs.fourisland.com">CVS Respository</A>!</LI> 21 <LI>Or maybe you could go to the <A HREF="http://code.fourisland.com">Mercurial Respository</A>!</LI>
22 </UL> 22 </UL>
23 23
24 <P id=LID2>I'm sure you'll have fun.</P> 24 <P>
25 <P id=LID2><strong>Oh, oh! More info has come in! You may not be able to find the page because of:</strong></p> 25 I'm sure you'll have fun.
26 26 </P>
27 <ol type="a"> 27
28 <li>An <strong>out-of-date bookmark/favourite</strong></li> 28 <P>
29 <li>A search engine that has an <strong>out-of-date listing for us</strong></li> 29 <STRONG>Oh, oh! More info has come in! You may not be able to find the page because of:</STRONG>
30 <li>A <strong>mis-typed address</strong></li> 30 </P>
31 </ol> 31
32 <!--END NOREFERER--> 32 <OL TYPE="A">
33 33 <LI>An <STRONG>out-of-date bookmark/favourite</STRONG></LI>
34 <!--BEGIN SEARCHREF--> 34 <LI>A search engine that has an <STRONG>out-of-date listing for us</STRONG></LI>
35 <P id=LID2><strong>Oh, oh! More info has come in!</STRONG></P> 35 <LI>A <STRONG>mis-typed address</STRONG></LI>
36 <P>You did a search on <strong><a href="<!--SEARCHREF.REF-->" target=_blank><!--SEARCHREF.SITE--></a></strong> for "<strong><!--SEARCHREF.TERMS--></strong>". However, their index appears to be out of date. (Because Kirby ate the page)</p><h2>All is not lost!</h2><p>Why not try these links?</p> 36 </OL>
37 <UL> 37<!--END NOREFERER-->
38 <LI id=instructionsText1>Swim over to <A HREF="index.php">Fourever Island</A> 38
39 <LI id=instructionsText2>Or maybe you could go to the <A HREF="http://cvs.fourisland.com">CVS Respository</A>! 39<!--BEGIN SEARCHREF-->
40 </UL> 40 <P>
41 <P id=LID2>I'm sure you'll have fun.</P> 41 <STRONG>Oh, oh! More info has come in!</STRONG>
42 <!--END SEARCHREF--> 42 </P>
43 43
44 <!--BEGIN NORMALREF--> 44 <P>
45 <P id=LID2><strong>Oh, oh! More info has come in!</STRONG></P> 45 You did a search on <STRONG><A HREF="<!--SEARCHREF.REF-->" TARGET="_blank"><!--SEARCHREF.SITE--></A></STRONG>
46 <P>You were referred to this page by: <strong><a href='<!--NORMALREF.REF-->' target='_blank'><!--NORMALREF.SITE--></a></strong><br />I guess they didn't know that Kirby ate the page.</P> 46 for "<STRONG><!--SEARCHREF.TERMS--></STRONG>". However, their index appears to be out of date. Because Kirby ate the page, no doubt.
47 <!--BEGIN OURBAD--> 47 </P>
48 <p id=LID2>Wait a minute! That's us! Uh oh! It looks like one of our own links is broken - I'm really sorry about this, and I'll try to fix it before Hatkirby notices. Please send an email to the email address on the HatBar. Thanks!</P> 48
49 <!--END OURBAD--> 49 <P>
50 <P id=LID2>Why not try one of these links?</P> 50 All is not lost! Why not try one of these links?
51 <UL> 51 </P>
52 <LI id=instructionsText1>Swim over to <A HREF="http://fourisland.com">Fourever Island</A></LI> 52
53 <LI id=instructionsText2>Or maybe you could go to the <A HREF="http://instadisc.org">InstaDisc site</A>!</LI> 53 <UL>
54 </UL> 54 <LI>Swim over to <A HREF="http://fourisland.com/">Fourever Island</A></LI>
55 <P id=LID2>I'm sure you'll have fun.</P> 55 <LI>Try <A HREF="http://fourisland.com/fourm/">The Fourm</A>!</LI>
56 <!--END NORMALREF--> 56 <LI>Or maybe you could go to the <A HREF="http://code.fourisland.com">Mercurial Respository</A>!</LI>
57 57 </UL>
58 <P id=LID2>Oh wait, I have to go. Hat Kirby's coming, and I better have an explanation for this one!</P> 58
59 <P><BR></P> 59 <P>
60 <H2 id=IEText style="FONT: 8pt/11pt verdana; COLOR: black">Kirby 404<BR>Property of hatkirby</H2> 60 I'm sure you'll have fun.
61 </FONT></TD> 61 </P>
62 </TR> 62<!--END SEARCHREF-->
63 </TBODY> 63
64</TABLE> 64<!--BEGIN NORMALREF-->
65 <P>
66 <STRONG>Oh, oh! More info has come in!</STRONG>
67 </P>
68
69 <P>
70 You were referred to this page by:
71 <STRONG><A HREF="<!--NORMALREF.REF-->" TARGET="_blank"><!--NORMALREF.SITE--></A></STRONG><BR />
72 I guess they didn't know that Kirby ate the page.
73 </P>
74
75 <!--BEGIN OURBAD-->
76 <P>
77 Wait a minute! That's us! Uh oh! It looks like one of our own links is broken!
78 I'm really sorry about this, and I'll try to fix it before Hatkirby notices.
79 Please PM "hatkirby" on The Fourm, or post a topic about it in "Fourscore Improvements". Thanks!
80 </P>
81 <!--END OURBAD-->
82
83 <P>
84 Why not try one of these links?
85 </P>
86
87 <UL>
88 <LI>Swim over to <A HREF="http://fourisland.com/">Fourever Island</A></LI>
89 <LI>Try <A HREF="http://fourisland.com/fourm/">The Fourm</A>!</LI>
90 <LI>Or maybe you could go to the <A HREF="http://code.fourisland.com">Mercurial Respository</A>!</LI>
91 </UL>
92
93 <P>
94 I'm sure you'll have fun.
95 </P>
96<!--END NORMALREF-->
97
98<P>
99 Oh wait, I have to go. Hatkirby's coming and I better have an explation for her this time!
100</P>