forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Miscellaneous => Topic started by: michael singer on December 04, 2004, 09:59:46 am

Title: click on image = go to previous image?
Post by: michael singer on December 04, 2004, 09:59:46 am

is there a mod for the main image to be linked, so that on click the previous (or next) image is displayed?

Title: Re: click on image = go to previous image?
Post by: Casper on December 04, 2004, 11:01:53 am
There are previous and next buttons on the image navigation menu.  Or do you mean on the pop-up full size image?
Title: Re: click on image = go to previous image?
Post by: Hein Traag on December 04, 2004, 06:22:10 pm
I think he means that when you click on the fullsize image it does not close and return you to the intermediate picture but instead loads the next or previous fullsize image.

Which would basicly mean editing the fullsize image output screen and add the next and previous buttons.

But with my coding skills that could take ages  ;D
Title: Re: click on image = go to previous image?
Post by: chtito on December 04, 2004, 07:58:46 pm
Hey, that's a good idea! I've never understood why clicking on the picture would close the window...

I'll try to see how it's feasible.

cheers!
Title: Re: click on image = go to previous image?
Post by: Hein Traag on December 04, 2004, 08:51:14 pm
Possible to make this optional in admin mode ? So you can switch it on or off depending on what line your gallery is hosted on ?

Little suggestion:
- Put a table above the picture like the one you see when viewing the pics with the filmstrip.
- Have three buttons there, PREVIOUS - CLOSE - NEXT.

Even better would be a fullsize image viewer with the filmstrip included. But this could be better inserted as
extra option on the album viewing page of a category. So you can select the fullsize viewer or the normal viewing mode.

Thanks for looking into this chtito  ;)
Title: Re: click on image = go to previous image?
Post by: chtito on December 04, 2004, 09:13:57 pm
What i'll do is very simple: i'm rewriting the display_fullsize_pic function to make customisation possible. Then i'll post a particular instance of customisation.

From then on, it should be very easy to figure out how to modify it to suit your changes.
Title: Re: click on image = go to previous image?
Post by: Hein Traag on December 05, 2004, 05:24:07 pm
Thanks chtito.. i'll be watching this thread and see if i can use your work. (read: see if i can use my godgiven codingskills *grin*)
Title: Re: click on image = go to previous image?
Post by: michael singer on December 06, 2004, 05:23:06 am
sorry, i have to add that i have disabled the popup function.
what i want to accomplish is:
a click on the image should display the previous image.
(this is a common function in photoblogs)
Title: Re: click on image = go to previous image?
Post by: kegobeer on December 06, 2004, 06:29:41 am
Quote
a click on the image should display the previous image.

Coppermine uses the intermediate image to open up the fullsize image in a pop-up.  This is by design and won't be altered.  Each theme supplied with Coppermine has forward and back navigation buttons that move backwards and forwards, and the filmstrip displayed at the bottom shows the next images available.
Title: Re: click on image = go to previous image?
Post by: chtito on December 06, 2004, 02:43:08 pm
Without the popup function it should be even easier to do. I'll see what i can do to make it customisable.
Title: Re: click on image = go to previous image?
Post by: Joachim Müller on December 06, 2004, 03:17:50 pm
This is a customization request then, not a feature request. Therefor: wrong board, moving accordingly.

Joachim
Title: Re: click on image = go to previous image?
Post by: michael singer on December 06, 2004, 05:15:30 pm
thank you chtito, i'm looking forward to this mod!
Title: Re: click on image = go to previous image?
Post by: Hein Traag on December 06, 2004, 05:23:27 pm
Not entirely agreeing with the notion that this is a customazation GauGau.
These days you get more and more servers on high speed connections and this also is happening to more and more home users.
The adding of a set of buttons to the fullsize image popup giving a user the option go to either previous or next image or close it
could be very usefull for highbandwidth users. Can't this be made optional, so a user can select the option under their profile
page for example ?

my 2 cents
Title: Re: click on image = go to previous image?
Post by: Joachim Müller on December 06, 2004, 06:01:40 pm
OK, to clarify: I'm fine with additional controls to be displayed on the pop-up screen (as an admin settable option), but the initial request was to have the click on the full-sized pic itself be a link to the previous image (see the subject of this thread). This is what I turned down to go into the core code. I didn't turn down the request to have additional controls, but after all the request for additional controls was "sort-of" hijacking Michael's original request... ;D

Joachim

Title: Re: click on image = go to previous image?
Post by: Hein Traag on December 06, 2004, 06:55:10 pm
apologies then for the "sort-of" hijacking  :-\\

But we did accomplish one thing, to enhance the request :). I'm curious to find out what chtito can cook up!
Title: Re: click on image = go to previous image?
Post by: pneurosys on December 11, 2004, 03:51:34 pm
hi, i also need to display next / prev controls in the full size popup, im trying to do it using the pid and aid with the db but is getting kind of complicated, if someone has found a way to do it, id really appreciate some help, thanks!
Title: Re: click on image = go to previous image?
Post by: michael singer on December 29, 2004, 08:08:22 am


may i ask again, if anyone has an idea?

just to sum it up:

1) i have disabled the popup function for my gallery.
2) i have disabled the creation of intermediate images.
3) so, all my images are fullsize.

all what i would like to have is:

a click on the image should get me to the previous one.

a mod for this would be muchly appreciated!


Title: Re: click on image = go to previous image?
Post by: Hein Traag on December 29, 2004, 08:27:23 am
When opening the file displayimage.php one can find the table posted below. Not that code savvy myself but i do know its in this table that you have to edit to get it to skip to the next image in a album instead of closing the window.

Code: [Select]
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="2">
 <td align="center" valign="middle">
  <table cellspacing="2" cellpadding="0" style="border: 1px solid #000000; background-color: #FFFFFF;">
   <td>
<?php
    
if (isset($HTTP_GET_VARS['picfile'])) {
        if (!
GALLERY_ADMIN_MODEcpg_die(ERROR$lang_errors['access_denied'], __FILE____LINE__);

        
$picfile $HTTP_GET_VARS['picfile'];
        
$picname $CONFIG['fullpath'] . $picfile;
        
$imagesize = @getimagesize($picname);
        echo 
"<a href=\"javascript: window.close()\"><img src=\"" path2url($picname) . "\" $imagesize[3] class=\"image\" border=\"0\" alt=\"\" title=\"$picfile\n" $lang_fullsize_popup['click_to_close'] . "\"/></a><br />\n";
    } elseif (isset(
$HTTP_GET_VARS['pid'])) {
        
$pid = (int)$HTTP_GET_VARS['pid'];
        
$sql "SELECT * " "FROM {$CONFIG['TABLE_PICTURES']} " "WHERE pid='$pid$ALBUM_SET";
        
$result db_query($sql);

        if (!
mysql_num_rows($result)) cpg_die(ERROR$lang_errors['non_exist_ap'], __FILE____LINE__);

        
$row mysql_fetch_array($result);
        
$pic_url get_pic_url($row'fullsize');
        
$geom 'width="' $row['pwidth'] . '" height="' $row['pheight'] . '"';
        echo 
"<a href=\"javascript: window.close()\"><img src=\"" $pic_url "\" $geom class=\"image\" border=\"0\" alt=\"\" title=\"" htmlspecialchars($row['filename']) . "\n" $lang_fullsize_popup['click_to_close'] . "\"></a><br />\n";
    }

    
?>

   </td>
  </table>
 </td>
</table>

Maybe someone can come up with a idea how to accomplish this.
Title: Re: click on image = go to previous image?
Post by: Tarique Sani on December 29, 2004, 08:59:15 am
Well, the really correct solution to this would be a PhotoBlog Mod for CPG, just one page Which shows the  latest uploaded picture by default, clicking on the image take to the previous page, a filmstrip for recent/related uploads and a calendar which shows dates on which pictures were uploaded as highlighted.

displayimage.php code can be largely reused BUT this has to be a mod not a replacement for displayimage.php

Title: Re: click on image = go to previous image?
Post by: michael singer on January 03, 2005, 10:22:36 am
Well, the really correct solution to this would be a PhotoBlog Mod for CPG, just one page Which shows the latest uploaded picture by default, clicking on the image take to the previous page, a filmstrip for recent/related uploads and a calendar which shows dates on which pictures were uploaded as highlighted.

displayimage.php code can be largely reused BUT this has to be a mod not a replacement for displayimage.php



yes, i think this would be a feature that photologgers, running photosites with frequently updated content, would appreciate very much!
with some modifications (index page goes directly to content - shows last uploaded photo in fullsize, additional input fields in comments section for homepage url and email, and some others) coppermine could also be a great script for running a photoblog. the rss feature is one step in this direction.


Title: Re: click on image = go to previous image?
Post by: Hein Traag on May 08, 2005, 09:26:00 pm
Thread is kinda dead right ? Did anything of this idea survive it into a CM edition ?