Not signed in (Sign In)

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

    • CommentAuthora2plogger
    • CommentTimeFeb 24th 2009 edited
     
    hi sidtheduck,

    I have done everything u gave at the below url to change the cruft free url for SEO.

    http://www.plogger.org/forum/discussion/2125/cruftfree-urls/#Item_13

    It works great for images those having caption..Well i have images set those don't have captions.. While visiting those urls ,it returns to the same page. I cant load the destination page.But i can see the seo url at the address bar /filename/ like this..

    If i add a caption to the image,i can load the destination page...but i have 500 images...

    So please advice me,is there any fix available to load the images those don't have the caption ?????

    Please help
    •  
      CommentAuthorsidtheduck
    • CommentTimeFeb 24th 2009
     
    a2plogger,

    Do you have a link to your install and, more specifically, a link that is in error?
    • CommentAuthora2plogger
    • CommentTimeFeb 25th 2009 edited
     
    in the below link u can see,images those having captions working fine...but for the others it returns to the same page

    Link

    Please help me out....
    • CommentAuthora2plogger
    • CommentTimeFeb 25th 2009
     
    Hi sidtheduck,

    Please help,how to solve my above problem ?????
    • CommentAuthora2plogger
    • CommentTimeFeb 26th 2009
     
    anyone know,how to fix this issue ???? why there is no response sidtheduck ?????
    •  
      CommentAuthorsidtheduck
    • CommentTimeFeb 26th 2009 edited
     
    Posted By: a2ploggerwhy there is no response sidtheduck ?
    well ... frankly, because I have been busy and haven't had the time. :D

    But to answer your question, open plog-functions.php and find the following code (in the resolve_path function):
    // no such caption, perhaps we have better luck with path?
    if (!$picture) {
    $filepath = join("/",$names);
    $sql = "SELECT *
    FROM `".TABLE_PREFIX."pictures`
    WHERE `path`='" . mysql_real_escape_string($filepath)."'
    AND `parent_album`=".intval($album["id"]);
    $result = run_query($sql);
    $picture = mysql_fetch_assoc($result);
    }

    and change it to read:
    // No such caption, perhaps we have better luck with path?
    if (!$picture) {
    // Check if it's an RSS feed for the picture comments
    while (!empty($names['arg1']) && $names['arg1'] == 'feed') {
    $feed = array_pop($names);
    }
    $filepath = join('/', $names);
    $like_match = array('_', '%');
    $like_replace = array('\_', '\%');
    $filepath = str_replace($like_match, $like_replace, $filepath);
    $sql = "SELECT *
    FROM `".TABLE_PREFIX."pictures`
    WHERE `path` LIKE '".$filepath.".%'
    AND `parent_album`=".intval($album['id']);
    $result = run_query($sql);
    $picture = mysql_fetch_assoc($result);
    }


    This is the updated code in the codebase so it should be working in the next release as well. Let me know if it's still not working for you.
    • CommentAuthora2plogger
    • CommentTimeFeb 26th 2009 edited
     
    thanks for your response sidtheduck,

    It returns err..


    Please help
    •  
      CommentAuthorsidtheduck
    • CommentTimeFeb 26th 2009
     
    sorry 'bout that. :|

    I forgot that the newest code used the constant PLOGGER_TABLE_PREFIX and the old code used TABLE_PREFIX. I edited my post above.
    • CommentAuthora2plogger
    • CommentTimeFeb 26th 2009
     
    [Solved]

    Thanks sidtheduck,
    It works great. Thanks for your response and great help ....