Not signed in (Sign In)

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorisign4jc
    • CommentTimeNov 2nd 2007 edited
     
    I have placed my photo gallery inside of one of my regular web pages (example: www.mysite.com/myphotos.php) and plogger is renamed as a folder on my site (example: www.mysite.com/photoalbum) . When I try to submit a comment as if I were a regualr visitor, the comment submits, then redirects me to the generic page of the picture I was just viewing and is no longer at www.mysite.com/myphotos.php . Instead it goes to: http://mysite.com/photoalbum/?level=picture&id=1 . How can I fix it so that it redirects back to www.mysite.com/myphotos.php ?
    • CommentAuthorjlw
    • CommentTimeNov 2nd 2007
     
    I had a slightly different problem that also involved redirects after posting comments (see the 'Unsanitary Fix for the Too-Many-Redirects Problem" thread.)

    Briefly, where you're redirected is determined by a variable named $redirect, which gets built up by this line of code in the "plog-comment.php" file:

    $redirect = str_replace("&","&",generate_url("picture",$parent_id, array(), true));

    What I had to do was comment out that statement and replace it with one that had my desired URL hard-coded into it. The id=n part of the URL is what determines what picture (and comment) gets displayed, and that ID number is stored in the $parent_id variable, so you can concatenate them to get a redirect that takes the user to the right place.

    As I said in my other thread, it's a very unsanitary fix, because (among other things) if you have a more complex site structure, your hard-coded URL won't always be the correct path. But hey, I'm not a programmer -- all I can do is tinker with things until they work like I want for my specific purpose. There's probably a much slicker way to do this if you really know your way around PHP, but I don't.
    • CommentAuthorisign4jc
    • CommentTimeNov 5th 2007
     
    Thanks! I went to the other post and altered my code accordingly. I replaced the redirect line with this to suit my needs:

    $redirect = "../myphotos.php?level=picture&id=".$parent_id;

    It works wonderfully!