Not signed in (Sign In)

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

    • CommentAuthorpandianbe
    • CommentTimeJun 5th 2009 edited
     
    Please someone help me to get Thumbs of Next/Previous Links Pictures instead of Text? in Picture View (picture.php)

    I know that need to change the functions plogger_get_prev_picture_link() and plogger_get_next_picture_link().

    function plogger_get_next_picture_link() {

    global $config;
    $next_url = plogger_get_next_picture_url();
    $image_list = $GLOBALS["image_list"];
    $row = $GLOBALS["current_picture"];
    $current_picture = array_search($row['id'],$image_list);
    if ($current_picture < sizeof($image_list)-1){
    $id = $image_list[$current_picture+1];
    }
    $pic_data = get_picture_by_id($id);
    $thumb=generate_thumb($pic_data['path'], $id);
    if ($next_url){
    $next_link = '<a accesskey="v" href="'.$next_url.'" title="Next" rel="'.$thumb.'">Next &raquo;</a><br /><a accesskey="v" href="'.$next_url.'"><img class="photos-large" src="'.$thumb.'" width="100" height="100" border="0"/></a>';
    }
    else{
    $next_link = '';
    }
    return $next_link;
    }

    function plogger_get_prev_picture_link() {

    $prev_url = plogger_get_prev_picture_url();
    $image_list = $GLOBALS["image_list"];
    $row = $GLOBALS["current_picture"];
    $current_picture = array_search($row['id'],$image_list);
    if ($current_picture > 0){
    $id = $image_list[$current_picture-1];
    }
    $pic_data = get_picture_by_id($id);
    $thumb = generate_thumb($pic_data['path'], $id);
    if ($prev_url){
    $prev_link = '<a accesskey="v" href="'.$prev_url.'" title="Previous" rel="'.$thumb.'">&laquo; Previous</a><br /><a accesskey="v" href="'.$prev_url.'"><img class="photos-large" src="'.$thumb.'" width="100" height="100" border="0"/></a>';
    }
    else{
    $prev_link = '';
    }
    return $prev_link;
    }


    It is working Properly But the Problem that we get error meesage " undefined variable id" in first and last image of the album.

    I know that it is completed 90% but help me to avoid the error message of first and last pictures of album.(picture.php)

    Thanks in advance.................

    version :Plogger 3.2
    Trunk : 599
    • CommentAuthorpandianbe
    • CommentTimeJun 8th 2009
     
    Sidtheduck and Kim,

    Please suggest you inputs?
    • CommentAuthorpandianbe
    • CommentTimeJun 22nd 2009
     
    Sidtheduck and Kim,

    Please suggest you inputs?
    •  
      CommentAuthorsidtheduck
    • CommentTimeJun 22nd 2009
     
    This should work for you pandianbe:
    function plogger_get_next_picture_link() {

    global $config;
    $next_url = plogger_get_next_picture_url();
    if ($next_url){
    $image_list = $GLOBALS["image_list"];
    $row = $GLOBALS["current_picture"];
    $current_picture = array_search($row['id'],$image_list);
    if ($current_picture < sizeof($image_list)-1){
    $id = $image_list[$current_picture+1];
    }
    $pic_data = get_picture_by_id($id);
    $thumb=generate_thumb($pic_data['path'], $id);
    $next_link = '<a accesskey="v" href="'.$next_url.'" title="Next" rel="'.$thumb.'">Next &raquo;</a><br /><a accesskey="v" href="'.$next_url.'"><img class="photos-large" src="'.$thumb.'" width="100" height="100" border="0"/></a>';
    }
    else{
    $next_link = '';
    }
    return $next_link;
    }

    function plogger_get_prev_picture_link() {

    $prev_url = plogger_get_prev_picture_url();
    if ($prev_url){
    $image_list = $GLOBALS["image_list"];
    $row = $GLOBALS["current_picture"];
    $current_picture = array_search($row['id'],$image_list);
    if ($current_picture > 0){
    $id = $image_list[$current_picture-1];
    }
    $pic_data = get_picture_by_id($id);
    $thumb = generate_thumb($pic_data['path'], $id);
    $prev_link = '<a accesskey="v" href="'.$prev_url.'" title="Previous" rel="'.$thumb.'">&laquo; Previous</a><br /><a accesskey="v" href="'.$prev_url.'"><img class="photos-large" src="'.$thumb.'" width="100" height="100" border="0"/></a>';
    }
    else{
    $prev_link = '';
    }
    return $prev_link;
    }
    • CommentAuthorpandianbe
    • CommentTimeJun 23rd 2009
     
    Great.Its working Sidtheduck.