Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Adjust background color pop-up screen  (Read 4658 times)

0 Members and 1 Guest are viewing this topic.

rterburg

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 29
    • terBurg.net Landscape photography and nature photography
Adjust background color pop-up screen
« on: January 03, 2006, 09:00:31 pm »

I want to adjust the background color of the pop-up screen when a large picture is displayed. I have tried to change the style.css from my modified project VII theme, but is doesn't work. ???
At the source of the HTML page  can't find the solution.

I have changed the background in my CPG 1.3.2 version, but now I can't find where to do it. Can someone help me with this?
« Last Edit: January 04, 2006, 07:33:03 am by GauGau »
Logged
~Ron~
www.terburg.net, Dutch landscape- and naturephotography

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Adjust background color pop-up screen
« Reply #1 on: January 03, 2006, 10:01:08 pm »

Copy below code (taken from themes/sample/theme.php)
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>
  <title><?php echo $CONFIG['gallery_name'?>: <?php echo $lang_fullsize_popup['click_to_close'];
      
?>
</title>
  <meta http-equiv="content-type" content="text/html; charset=<?php echo $CONFIG['charset'] == 'language file' $lang_charset $CONFIG['charset'?>" />
  <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
}
, edit themes/yourtheme/theme.php, and paste it into a new line above
Code: [Select]
?>Then edit the code you just pasted in as you wish.
Logged

rterburg

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 29
    • terBurg.net Landscape photography and nature photography
Re: Adjust background color pop-up screen
« Reply #2 on: January 04, 2006, 07:08:49 am »

Thanks it works!  :D
Logged
~Ron~
www.terburg.net, Dutch landscape- and naturephotography
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 20 queries.