PDA

View Full Version : Removing the Comment Redirection Page


kidleethal
07-25-2006, 03:54 AM
Hello,

I searched the forum high and low, and while I found some threads asking the same question, no one actually posted an answer.

I am running Pixelpost 1.5, I have the comments on the same page as my image, and I do not want the 'Thanks for commenting, you will now be redirected...' page to show at all. I just want the visitor to be redirected back to the image they just commented on. I know you can drop the 'content' value down in index.php, but this still shows the redirection page.

I am happy hacking my index.php if needs be, unless someone has a better solution.

Thanks,

Lee

GeoS
07-25-2006, 06:29 AM
Find:
// Sending notification
mail($recipient_email,$subject,$body,$headers);

} // end of if($_GET['x'] == "save_comment")

and replace with:
// Sending notification
mail($recipient_email,$subject,$body,$headers);

} // end of if($_GET['x'] == "save_comment")
header("Location: index?showimage=".$_POST['parent_id']);

kidleethal
07-25-2006, 11:21 PM
Hey Geos,

Thanks for your reply. I added in the text into my index.php, but when after I post a comment, I get a 404 Not Found page, and the address given is, for example:

http://www.decoy.co.nz/photo2/%CAindex?showimage=9

Instead of:

http://www.decoy.co.nz/photo2/index.php?showimage=9

Any ideas why it's adding that '%CA' and missing the '.php' off the end?

Thanks for your time, you're the man!

Lee

GeoS
07-26-2006, 02:56 PM
I made small mistake. It should be:
// Sending notification
mail($recipient_email,$subject,$body,$headers);

} // end of if($_GET['x'] == "save_comment")
header("Location: index.php?showimage=".$_POST['parent_id']);

If you copy this code from forum make sure that between Location: and index.php is one space.

kidleethal
07-27-2006, 02:04 AM
Worked perfectly.

Thank you so much Geos! :)