Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Nice bit of code for error.html...

Quote Reply
Nice bit of code for error.html...
Just thought I'd share this. Not sure how many people wanna use it... but I found it handy on my site (which uses mod_rewrite, so invalid categories are picked up via page.cgi).

Code:
<%if error contains 'seem to have a category'%>
<font color=green>Sorry, this category no longer
exists on our site. Please
<a href="<%build_root_url%>">click here</a>
to go to our main page.</font>
<BR><BR>
<%else%>
Oops, we had the following problem:<br><%error_font%><b><%error%></b></font></font>
<%endif%>

Basically, it lets you show a custom error message, if the error being reported looks like it's gonna show a "category not found" error.

Enjoy!

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Nice bit of code for error.html... In reply to
Hmm. Your recommend_it plugin needs a bit of this when the guy sending the recommendation just leaves the recepient blank and is redirected to error as dished out by server....

This is what a user would see otherwise, if he left the recepient blank and hot submit:
Software error:

Column SentList cannot be left blank. at path/to/lsql/recommend_it.cgi line 167.
For help, please send mail to the webmaster (webmaster@domain.tld), giving this error message and the time and date of the error.

HyTC

Last edited by:

HyperTherm: Sep 8, 2004, 1:38 AM
Quote Reply
Re: [HyperTherm] Nice bit of code for error.html... In reply to
Yeah.... when I get time. Remember, its a FREEBIE Wink

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!