1001 Postcards Love Love Love Meep Meep ZenZodiac DailyQuotation

Error Page ?





EMAIL MARTY message board
  « Error Page ? »
Welcome, Guest. Please Login or Register.
03/17/18 at 22:28:50
Home Help Search Login Register message board
   General Stuff
   Error Page ?
(Moderator: Marty)
Pages: 1 Reply Notify of replies Send the topic Print 
   Author  Topic: Error Page ?  (Read 680 times)
Silver Dragon

Posts: 38


Error Page ?
« on: 04/09/04 at 10:11:41 »
Reply with quote Modify message

Is there a way to create an error page for CP Shop?

I deleted a couple of my stores that were already listed in search engines and if someone clicks on them they get taken to a blank page (meaning my template without any content).
Administrator Dragon

Gender: male
Posts: a whole lot

That's me. :)

WWW E-Mail
Re: Error Page ?
« Reply #1 on: 04/11/04 at 01:10:17 »
Reply with quote Modify message

Hmm...I'm sure there is.

Perhaps if you put something like this in the cpshop.cgi file (the bolded part is new):

} else {
   unless ($content =~ /<img/i) {
       print "Location:\n\n";

   $html =~ s/<\[title\]>/$pagetitle/g;

Translated to English, that additional code (the bolded part) says:

Unless $content (which contains the stuff generated by cpshop) contains the text "<img", then send the user to

The idea is that if cpshop doesn't return any results, then there shouldn't be any image tags in the $content variable.

You might have to change the /<img/ part to something else (like /yourstoreid/ or /class=/ or something), but presumably that should work.

Pages: 1 Reply Notify of replies Send the topic Print 
Jump to: message board (

Powered by YaBB 1 Gold - Release (Yet Another Bulletin Board)
Copyright © 2000-2001, X-Null. All Rights Reserved.