Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: [Solved]: Next image instead of full size image  (Read 4998 times)

0 Members and 1 Guest are viewing this topic.

Raug

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
[Solved]: Next image instead of full size image
« on: May 29, 2009, 10:07:49 pm »

I tried searching but I didn't see anything related to this.  Maybe I was using the wrong words.

What I want to do is have the next image be displayed instead of the fullsize image when you click it.  I already have the images showing at full size so make it popup with the same image isn't doing anything for me.

Is there a way to do this?  I'm guess it could be done by making the picture have the same link as the forward arrow in displayimage.php, but I wouldn't know where to change that :X
« Last Edit: June 03, 2009, 08:58:31 am by Joachim Müller »
Logged

Stevo

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 86
Re: Next image instead of full size image
« Reply #1 on: June 02, 2009, 10:53:07 pm »

Create intermediate pictures  NO

This should do it (I guess)

Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Next image instead of full size image
« Reply #2 on: June 03, 2009, 07:59:38 am »

@Stevo: No, that's wrong. Raug asked for something completely different.

@Raug: I'm sure that a mod to accomplish this has been posted a long time ago on this board, but I can't remember where nor who posted it. Please perform a thorough search. You'll have to modify themes/yourtheme/theme.php, the code you need to edit resides within function theme_html_picture() - that's all I remember out of the back of my head.
Logged

Raug

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Next image instead of full size image
« Reply #3 on: June 03, 2009, 08:46:08 am »

Actually, I managed to get this done myself after a bit of tinkering.  I know almost no php so I was surprised I got it done (I took 2 years of computer science during HS and then I only learned Java, lol :X ).  I'm not sure if this is going to work all the time, but here are the changes I made.

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 {


In all the tests I've done, it seems to work so hopefully I didn't end up breaking something else in another part of the gallery.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Next image instead of full size image
« Reply #4 on: June 03, 2009, 08:58:19 am »

Thanks for returning and posting your solution.
Logged

hlabout

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 118
    • Harald Labout Fotografie
Re: [Solved]: Next image instead of full size image
« Reply #5 on: August 30, 2009, 09:21:44 am »

Love this mod and implemented it myself.
Thanks for the useful information. ;D
Did you observe any negative behavior in your Gallery after the above changes?

Harald

www.haraldlabout.nl/fotografie
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: [Solved]: Next image instead of full size image
« Reply #6 on: August 30, 2009, 12:53:57 pm »

Locking
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 20 queries.