You mean instead the zenphoto error? I believe there is currently no way except hacking some core files. There was a thread about that somewhere but I don't remember where.
I've been having a lot of trouble with my gallery pages not being indexed so I've decide to try a few things. To start with I turned ZP mod_rewrite off. As a lot of my artists have linked to their own pages I am expecting a ton of error messages.
The ZP error I'm talking about looks like this...
Zenphoto Error: the requested object was not found. Please go back and try again.
Ideally, I'd like to hack it so I have a custom error page appear.
Just for reference, my permalinks problem as I posted it in the forum is below...
I'd like to weigh in here. I've been looking for a solution to my ZP images not being indexed by google for about 4 months (as it turns out - ever since I included my WP header!). I received a lot of advice about alt tags etc on this forum and the other. After I posted my 404 errors question and got Chief's reply it all started to make sense.
1. Google Webmasters shows that all of my Zp pages come back as 404. 2. When I upgraded to WP 2.6 the browser bar said 'nothing found' for all of my ZP pages. 3. Google has zero of my 2000 ZP images indexed.
So it's an issue with mod_rewrite.
As I...
a) Used Ruzee's (ZP Developer recommended) include. b) Use WP pretty permalinks c) Enabled ZP mod_rewrite.
... all of my ZP pages came back as errors.
So, what can we do about it? How do we make a b c consistent with each other?
Developers - we look to you for guidance here! We want to keep our headers, pretty permalinks and be included in the Google club.
What should we do? I have disabled mod_rewrite of the time being. I want to test it out. Have a look at my site if you like. Some of the links may be temporarily broken.
I'm more than willing to be a try out any thought you may have as long as it allows me to keep my theme and my header include!
I found the 404 code in the functions-controller.php file...
' // Error message for objects not found. if ($success === false) { // Replace this with a redirect to an error page in the theme if it exists, or a default ZP error page. header("HTTP/1.0 404 Not Found"); echo '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'; echo "\n".gettext("Zenphoto Error: the requested object was not found. Please go back and try again."); echo "\n<!-- The requested object (album=\"" . $album . "\": image=\"" . $image . "\") was not found. -->"; echo '</body></html>'; exit(); } }'
I would like to redirect this to my websites general error page. If that file were http://phauxshow.com/404.php what would I have to change to the code above?
In tonight's nightly build is an implementation that lets Themse create their own error pages. You can look at the example theme for how to do this. Create a page named 404.php and place it in your theme folder.
All the Zenphoto package themes will come wiht a custom error page, so if you are using one of them just modify the page to suit your needs.
To redirect to your site standard 404 page just place `header("Location: "http://phauxshow.com/404.php");` at the front of the script.
I just discovered this tonight (404 page template). I'm using 1.6 and prefer not to upgrade because of customizing. I can't follow "where" to put '`'header("Location: "http://phauxshow.com/404.php");'`? Will this work with 1.6?
Comments
I've been having a lot of trouble with my gallery pages not being indexed so I've decide to try a few things. To start with I turned ZP mod_rewrite off. As a lot of my artists have linked to their own pages I am expecting a ton of error messages.
The ZP error I'm talking about looks like this... Ideally, I'd like to hack it so I have a custom error page appear.
Just for reference, my permalinks problem as I posted it in the forum is below...
' // Error message for objects not found.
if ($success === false) {
// Replace this with a redirect to an error page in the theme if it exists, or a default ZP error page.
header("HTTP/1.0 404 Not Found");
echo '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>';
echo "\n".gettext("Zenphoto Error: the requested object was not found. Please go back and try again.");
echo "\n<!-- The requested object (album=\"" . $album . "\": image=\"" . $image . "\") was not found. -->";
echo '</body></html>';
exit();
}
}'
I would like to redirect this to my websites general error page. If that file were http://phauxshow.com/404.php what would I have to change to the code above?
All the Zenphoto package themes will come wiht a custom error page, so if you are using one of them just modify the page to suit your needs.
To redirect to your site standard 404 page just place
`header("Location: "http://phauxshow.com/404.php");`
at the front of the script.
Seriously, it is a pleasure using ZenPhoto!
P