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: Changing the Background color  (Read 3746 times)

0 Members and 1 Guest are viewing this topic.

Jmaj

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
Changing the Background color
« on: November 27, 2008, 02:41:17 am »

Hey,

Does anyone know where the file is to change the color of the BG is displayimage.php

Example:

http://coppermine-gallery.net/demo/cpg14x/displayimage.php?pid=268&fullsize=1


The color is gray, I wanna make it white

thanks
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Changing the Background color
« Reply #1 on: November 27, 2008, 10:04:59 am »

We can tell you how to change the background color of our site. However that would not help you much, as it depends on the theme you use. Therefor, posting a link to your gallery might help (we already know the URL of our demo). That's why board rules say to post links. There's even a list at the top of the page where you compose your messages that says so. There's a reason for that policy...

You might want to look into http://forum.coppermine-gallery.net/index.php/topic,24056.msg123520.html#msg123520, as questions similar to yours have been asked a million times already. Generic answer: color is being defined in the stylesheet that comes with your theme.

Logged

Jmaj

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
Re: Changing the Background color
« Reply #2 on: November 27, 2008, 03:59:32 pm »

Oh okay.


And I found it, for future searches.

The answers is the:

includes/themes.inc.php

Look for the   <style type="text/css"> and edit the background color to what you want.
Logged

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: Changing the Background color
« Reply #3 on: November 27, 2008, 04:16:09 pm »

Do not edit core files.. read the Joachims post more careful

Quote
Generic answer: color is being defined in the stylesheet that comes with your theme.
Logged

Jmaj

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
Re: Changing the Background color
« Reply #4 on: November 27, 2008, 04:37:39 pm »

I read the css before I posted the topic. I couldnt find the grey color and it's hex value.


I couldnt find it in the main css and my theme's css.

The source showed it as a embedded css, and that area is where I found it. Unless it's somewhere else.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Changing the Background color
« Reply #5 on: November 27, 2008, 05:49:35 pm »

As Hein suggested: do not edit include/themes.inc.php! Under no circumstances!

Any particular reason for not doing as I suggested:
Therefor, posting a link to your gallery might help
Logged

Gizmo

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1015
    • BullsEye Photos
Re: Changing the Background color
« Reply #6 on: November 28, 2008, 12:54:55 pm »

To change the background color of the popup fullsize image you need to copy the following code from the sample theme.php and paste it into your theme.php then change the sytling.

Copy from Sample theme.php and paste into your 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>
  <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
}

Locate and edit the background color to suit your needs.
Code: [Select]
body { margin: 0; padding: 0; background-color: gray; }
For instance, if you want it black, change "gray" to "black" or use the hexadecimal code.
Code: [Select]
body { margin: 0; padding: 0; background-color: black; }or
Code: [Select]
body { margin: 0; padding: 0; background-color: #000000; }
Logged
Did you read the manual first???? Taking 2 minutes to backup your files can save you hours of wondering what you screwed up.
Billy Bullock - BullsEyePhotos Blog of Indecision
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 15 queries.