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: Hi there help with the pop-up  (Read 4136 times)

0 Members and 1 Guest are viewing this topic.

omgtwi

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Hi there help with the pop-up
« on: December 04, 2009, 08:07:56 am »

Hi there I run my own website and I have a photo gallery (http://tiny.cc/lbddZ) and when you click an image and you see the smaller version then you click it and it's full size, which file do I go to edit that so I can add an image code?
Logged

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: Hi there help with the pop-up
« Reply #1 on: December 04, 2009, 08:42:33 am »

Real URL is http://photos.omgcelebritynews.com/index.php
If you want to skip the intermediate page check this plugin out http://forum.coppermine-gallery.net/index.php/topic,53290.html
If thats not what your asking for please explain a little better.

Logged
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

omgtwi

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Hi there help with the pop-up
« Reply #2 on: December 04, 2009, 08:45:36 am »

No when you click the intermediate image, how do you edit the coding in the pop-up
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Hi there help with the pop-up
« Reply #3 on: December 04, 2009, 10:33:31 am »

Edit themes/yourtheme/theme.php with a plain text editor and edit the function theme_display_fullsize_pic as you see fit. If that function doesn't exist in your custom theme, copy
Code: [Select]
// Display the full size image
function theme_display_fullsize_pic()
{
    global $CONFIG, $THEME_DIR, $ALBUM_SET;
    global $lang_errors, $lang_fullsize_popup, $lang_charset;

    if (isset($_GET['picfile']))
    {
        if (!GALLERY_ADMIN_MODE) cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);

    $picfile = $_GET['picfile'];
    $picname = $CONFIG['fullpath'] . $picfile;
    $imagesize = @getimagesize($picname);
    $imagedata = array('name' => $picfile, 'path' => path2url($picname), 'geometry' => $imagesize[3]);
    }
    elseif (isset($_GET['pid']))
    {
    $pid = (int)$_GET['pid'];
    $sql = "SELECT * " . "FROM {$CONFIG['TABLE_PICTURES']} " . "WHERE pid='$pid' $ALBUM_SET";
    $result = cpg_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'] . '"';
    $imagedata = array('name' => $row['filename'], 'path' => $pic_url, 'geometry' => $geom);
    }

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
  <meta http-equiv="content-type" content="text/html; charset=<?php echo $CONFIG['charset'] == 'language file' $lang_charset $CONFIG['charset'?>" />
  <title><?php echo $CONFIG['gallery_name'?>: <?php echo $lang_fullsize_popup['click_to_close'];
      
?>
</title>
  <script type="text/javascript" src="scripts.js"></script>
  <style type="text/css">
  body { margin: 0; padding: 0; background-color: gray; }
  img { margin:0; padding:0; border:0; }
  #content { margin:0 auto; padding:0; border:0; }
  table { border:0; height:100%; width:100%; border-collapse:collapse}
  td {         vertical-align: middle; text-align:center; }
  </style>
  </head>
  <body>
    <script language="JavaScript" type="text/JavaScript">
      adjust_popup();
    </script>
    <table>
      <tr>
            <td>
          <div id="content">
              <?php     echo  '<a href="javascript: window.close()"><img src="'
                
htmlspecialchars($imagedata['path']) . '" '
                
$imagedata['geometry']
                . 
'alt="'
                
htmlspecialchars($imagedata['name'])
                . 
'" title="'
                
htmlspecialchars($imagedata['name'])
                . 
"\n" $lang_fullsize_popup['click_to_close']
                . 
'" /></a><br />' ."\n";
               
?>

          </div>
        </td>
      </tr>
    </table>
  </body>
</html>
<?php
}
from themes/sample/theme.php into a new line before
Code: [Select]
?>of the file themes/yourtheme/theme.php and then edit as you see fit. And yes: this has been asked and answered many times over; searching would have told you so.
Logged
Pages: [1]   Go Up
 

Page created in 0.04 seconds with 20 queries.