click on image = go to previous image? click on image = go to previous image?
 

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

Main Menu

click on image = go to previous image?

Started by michael singer, December 04, 2004, 09:59:46 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

michael singer


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


Casper

There are previous and next buttons on the image navigation menu.  Or do you mean on the pop-up full size image?
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Hein Traag

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

chtito

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!
Vous pouvez poser vos questions en français sur le forum francophone !

Hein Traag

#4
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  ;)

chtito

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.
Vous pouvez poser vos questions en français sur le forum francophone !

Hein Traag

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*)

michael singer

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)

kegobeer

Quotea 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.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

chtito

Without the popup function it should be even easier to do. I'll see what i can do to make it customisable.
Vous pouvez poser vos questions en français sur le forum francophone !

Joachim Müller

This is a customization request then, not a feature request. Therefor: wrong board, moving accordingly.

Joachim

michael singer

thank you chtito, i'm looking forward to this mod!

Hein Traag

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

Joachim Müller

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


Hein Traag

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!

pneurosys

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!

michael singer



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!



Hein Traag

#17
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.

<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.

Tarique Sani

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

SANIsoft PHP applications for E Biz

michael singer

#19
Quote from: 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



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.