![]() |
|
zenphoto error-object not found - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: zenphoto error-object not found (/thread-2822.html) |
zenphoto error-object not found - eddiejanzer - 2008-05-07 Is there a way of styling this? If a gallery is no longer available but shows up in web searches, is there a way to syle this more like a custom 404 page so that when someone ends up on my site, they can navigate to somewhere else? zenphoto error-object not found - sbillard - 2008-05-07 This processing is done in the function zp_load_request() of functions-controller.php. You could add the output of a 404 header there. zenphoto error-object not found - eddiejanzer - 2008-05-08 That's what I thought, I had found that file but don't know php. Your saying I can point it to a 404 header? Or just add a 404 heading? I figure I can't just write straight html here. Can anyone give me an example? I'd like to be able to style it a bit, so I'm hoping I can "direct to a friendly 404 page". zenphoto error-object not found - sbillard - 2008-05-08 adding `header("HTTP/1.0 404 Page not found");` to the code where the error is handled will probably work. Haven't tried it. You might also need ` echo "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head> <title>404 - Page not found</TITLE> <META NAME=\"ROBOTS\" CONTENT=\"NOINDEX, FOLLOW\"></head>";` before the echo of the zenphoto error message. Let us know how it works out. zenphoto error-object not found - eddiejanzer - 2008-05-11 well, I could not get it to work, but I noticed that when you just remove the code for the error, zenphoto just loads the gallery page. To me this is better than getting a white error page with no navigation to anywhere... I'm wondering if it's "bad" to do without the zen error by deleting 'echo "\n[b]".gettext(" Error:[/b] the requested object was not found. Please go back and try again."); '`echo "\n<!-- The requested object (album=\"" . $album . "\": image=\"" . $image . "\") was not found. -->"; exit();`' |