marty.net 1001 Postcards Love Love Love Meep Meep ZenZodiac DailyQuotation

YOU ARE HERE:
Error Page ?

HOME

CPSHOP|

|

|

EMAIL MARTY
  marty.net message board
  « Error Page ? »
Welcome, Guest. Please Login or Register.
12/18/17 at 06:59:37
Home Help Search Login Register
   marty.net message board
   General
   General Stuff
   Error Page ?
(Moderator: Marty)
Pages: 1 Reply Notify of replies Send the topic Print 
   Author  Topic: Error Page ?  (Read 644 times)
luv2wander
Silver Dragon
***

Posts: 38




   

E-Mail
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).
Logged
Marty
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 {
   &gettemplate;
   unless ($content =~ /<img/i) {
       print "Location: http://www.mysite.com/error.html\n\n";
       exit;
   }

   $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 http://www.mysite.com/error.html.

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.
Logged

--
Regards,
Marty·.¸¸.·´¯`·.¸¸.-> marty@marty.net
Pages: 1 Reply Notify of replies Send the topic Print 
Jump to:


marty.net message board (http://www.marty.net/cgi/marty/board/messageboard)

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