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

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

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 {

____________________________________________________________________________________________________________________________________________________________________________