Not signed in (Sign In)

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

    • CommentAuthorgunny007
    • CommentTimeNov 11th 2006
     
    Is any one help me to get the image name in place of next /previous links. example. suppose i have gallery of Aishwarya rai. instead of next/previous links...i want to display of previous link, it could be aishwarya10 and for instead of next link aishwarya12 like this. (visit this page.......http://www.netgana.com/actress/movie_actress_gallery1/aiswarya_roy/aiswarya_roy-11.jpg

    It will give more link popularity will lead to get listing in search engine...

    Please help me...
    • CommentAuthorgunny007
    • CommentTimeDec 27th 2006
     
    Anyone is Help this request...I am badly needed...Please...

    Mike are you hearing!!!!!????
    • CommentAuthornatebot
    • CommentTimeJan 1st 2007 edited
     
    gunny007 -
    What you are asking for requires a minor modification of gallery.php

    Do you have basic proficiency in php? If so then what you want to do is also select the path field in the sql query used in building the $image_list array.

    You can explode the path data in the same loop that creates $image_list to make an array (call it $image_name) of image file names (or instead make a $image_list a multidimensional array) Then you need to replace the text "next" with something like:
    " '.$image_name[$current_picture+1].' "
    (without the double quotes.)
    • CommentAuthorsolemnchaos
    • CommentTimeJan 2nd 2007 edited
     
    Here's another way. Basically all you need to do is get the basename of the path generated.

    lines 174-185 in the default install of gallery.php should look like this:

    $current_picture = array_search($id,$image_list);

    $prev_link = $next_link = "";

    if ($current_picture > 0) {
    $prev_link = '<a accesskey="," href="'.generate_url("picture",$image_list[$current_picture-1]).'">&laquo; Previous</a>';
    };

    if ($current_picture < sizeof($image_list)-1)
    {
    $next_link = '<a accesskey="." href="'.generate_url("picture",$image_list[$current_picture+1]).'">Next &raquo;</a>';
    };
    ----------------------------------------------------
    change them to this:

    $current_picture = array_search($id,$image_list);
    $p_link = generate_url("picture",$image_list[$current_picture-1]);
    $p_name = basename($p_link);
    $n_link = generate_url("picture",$image_list[$current_picture+1]);
    $n_name = basename($n_link);

    $prev_link = $next_link = "";

    if ($current_picture > 0) {

    $prev_link = '<a accesskey="," href="'.$p_link.'" title="previous image">&laquo; ' .$p_name. '</a>';
    };

    if ($current_picture < sizeof($image_list)-1)
    {
    $next_link = '<a accesskey="." href="'.$n_link.'" title="next image">' .$n_name. ' &raquo;</a>';
    };

    ---------------------
    My gallery is currently under reconstruction, but it's functional enough to show this working (you'll need to select an image to see the previous next links):
    http://www.solemnchaos.net/gallery/fractals/fractal_explorer

    hope that helps.
    • CommentAuthorgunny007
    • CommentTimeFeb 26th 2007
     
    Thanks solemnchaos and natebot for tips.

    natebot I dont have basic profiency in PHP...sorry for that.
    • CommentAuthorgunny007
    • CommentTimeFeb 26th 2007
     
    Thanks solemnchaos and natebot for tips.

    natebot I dont have basic profiency in PHP...sorry for that.