Next image instead of full size image Reset to one Next image instead of full size image Reset to one
 

News:

CPG Release 1.6.28
added submissions from {406man}
cleaned up a few PHP (8.4) deprecations
fixed PHP deprecation in calendar
removed security vulnerability
(please upgrade when possible)

Main Menu

Next image instead of full size image Reset to one

Started by hlabout, September 01, 2009, 05:20:20 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

hlabout

I successfully used the code supplied by Raug to disable the full size image function, see http://forum.coppermine-gallery.net/index.php/topic,59784.0.html.

Now I am wondering if it is possible to reset the function so that at the end of the pictures in an album the next click on the intermediate photo shows the first picture of that album.
At this moment the implemented function is working fine but at the end of album the function stops at the last picture of the particular album.
I am not familiar with programming in PHP so I hope someone can help me with my question.

Below you will see the code that was supplied by Raug.

Harald

ww.haraldlabout.nl/fotografie

____________________________________________________________________________________________________________________________________________________________________________

I added these two lines to theme_html_picture() at the top

global $pos, $nextimg;   
$nextimg = $pos + 1;

and then changed this section

if ($mime_content['content']=='image') {
        if (isset($image_size['reduced'])) {
            $winsizeX = $CURRENT_PIC_DATA['pwidth']+5;  //the +'s are the mysterious FF and IE paddings
            $winsizeY = $CURRENT_PIC_DATA['pheight']+3; //the +'s are the mysterious FF and IE paddings
            $pic_html = "<a href=\"javascript:;\" onclick=\"MM_openBrWindow('displayimage.php?pid=$pid&amp;fullsize=1','" . uniqid(rand()) . "','scrollbars=yes,toolbar=no,status=no,resizable=yes,width=$winsizeX,height=$winsizeY')\">";
            $pic_title = $lang_display_image_php['view_fs'] . "\n==============\n" . $pic_title;
            $pic_html .= "<img src=\"" . $picture_url . "\" class=\"image\" border=\"0\" alt=\"{$lang_display_image_php['view_fs']}\" /><br />";
            $pic_html .= "</a>\n";
        } else {
         

to this

if ($mime_content['content']=='image') {
        if (isset($image_size['reduced'])) {
            $winsizeX = $CURRENT_PIC_DATA['pwidth']+5;  //the +'s are the mysterious FF and IE paddings
            $winsizeY = $CURRENT_PIC_DATA['pheight']+3; //the +'s are the mysterious FF and IE paddings
            $pic_html = "<a href='?album=$album$cat_link&amp;pos=$nextimg'>";

   

    $pic_title = $lang_display_image_php['view_fs'] . "\n==============\n" . $pic_title;
            $pic_html .= "<img src=\"" . $picture_url . "\" class=\"image\" border=\"0\" alt=\"{$lang_display_image_php['view_fs']}\" /><br />";
            $pic_html .= "</a>\n";
        } else {

____________________________________________________________________________________________________________________________________________________________________________