coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: ltwally on May 16, 2009, 10:33:41 PM

Title: [Solved]: Global CSS location? / IFrame removal
Post by: ltwally on May 16, 2009, 10:33:41 PM
I installed Coppermine for the first time today, and am busy trying to remove the IFrame banner that my ISP puts on our sites.

First, I should double check that Coppermine does not use IFRAME's anywhere.

If not, is there a location where I can inject the following CSS so that it will be used by every single Coppermine page?
iframe {display:none !important;}

I've already got it in the Classic theme's styles.css... however, there are some popup windows that do not reference that file that I would very much like to remove that annoying banner from.

Thanks!
Title: Re: Global CSS location? / IFrame removal
Post by: ltwally on May 16, 2009, 10:35:03 PM
Ignore this - I forgot to hit "notify me of replies" above
Title: Re: Global CSS location? / IFrame removal
Post by: Joe Carver on May 17, 2009, 12:57:09 PM
Things to do when asking for help to violate your terms of service
Title: Re: Global CSS location? / IFrame removal
Post by: ltwally on May 18, 2009, 11:32:06 PM
My gallery is not currently on the web.

Anyone with an actual answer?  Thanks.
Title: Re: Global CSS location? / IFrame removal
Post by: Joachim Müller on May 19, 2009, 08:50:08 AM
Quote from: ltwally on May 18, 2009, 11:32:06 PM
Anyone with an actual answer?
No, as we can't suggest solutions to stuff we can't take a look at. We're supporters, not clairvoyants nor magicians.

Quote from: ltwally on May 16, 2009, 10:33:41 PM
I [...] am busy trying to remove the IFrame banner that my ISP puts on our sites.
If you want to get rid of an iframe that your webhost injects, then the straightforward answer is: sign up with another webhost. The webhost can inject that iframe into the output in a manner that makes it impossible to circumvent - after all, that's probably part of the contract between you and the webhost, so you're probably not allowed to remove it anyway. If you do remove it by modifying the stylesheet accordingly, your webhost will fire you in no time.

Quote from: ltwally on May 18, 2009, 11:32:06 PM
My gallery is not currently on the web.
Then how come you have issues with a webhost injecting an iframe? I have never heard of intranets where you get iframe code injected. What would be the point of an intranet with adverts - nobody would be able to see the adverts.

Quote from: ltwally on May 16, 2009, 10:33:41 PM
I've already got it in the Classic theme's styles.css... however, there are some popup windows that do not reference that file that I would very much like to remove that annoying banner from.
Amazing. All pop-ups triggered by coppermine that I'm aware off use your theme's stylesheet. Tell us what pop-ups you're refering to. Anyway, you will find  the code to edit in your theme's theme.php file - it contains the HTML templates of all pop-ups as well.

Do as we suggested: post a link to your gallery. I do not believe you if you tell me that it's not on the internet. If that is actually true, it won't harm to post the link from your browser's address bar anyway and tell us exactly what inranet you're on or why it's not accessible on the internet.
Title: Re: Global CSS location? / IFrame removal
Post by: ltwally on May 19, 2009, 07:53:28 PM
Quote from: Joachim Müller on May 19, 2009, 08:50:08 AM
No, as we can't suggest solutions to stuff we can't take a look at. We're supporters, not clairvoyants nor magicians.
The Coppermine gallery I am setting up is a stock install with nothing customised (yet).  Nothing I have asked actually requires anyone to look at the Coppermine gallery that I'm setting up.  There is absolutely no reason to have you look at it, as the Coppermine gallery is a completely fresh install.  Additionally, the website has its IPFILTER set to reject all traffic but my ISP and my IP address at this point.  I'm sorry if this seems to offend anyone.

QuoteIf you want to get rid of an iframe that your webhost injects, then the straightforward answer is: sign up with another webhost. The webhost can inject that iframe into the output in a manner that makes it impossible to circumvent - after all, that's probably part of the contract between you and the webhost, so you're probably not allowed to remove it anyway. If you do remove it by modifying the stylesheet accordingly, your webhost will fire you in no time.
Thank you for your input in this matter - but this issue is between my webhost and me.

QuoteThen how come you have issues with a webhost injecting an iframe? I have never heard of intranets where you get iframe code injected. What would be the point of an intranet with adverts - nobody would be able to see the adverts.
What I mean is that we are not yet ready for random internet visitors or the site to be published.

QuoteAmazing. All pop-ups triggered by coppermine that I'm aware off use your theme's stylesheet. Tell us what pop-ups you're refering to. Anyway, you will find  the code to edit in your theme's theme.php file - it contains the HTML templates of all pop-ups as well.
Here is the url of one pop-up that does not load the theme's CSS file:  http://copperminegallery.xyz.com/displayimage.php?pid=1&fullsize=1

QuoteDo as we suggested: post a link to your gallery. I do not believe you if you tell me that it's not on the internet. If that is actually true, it won't harm to post the link from your browser's address bar anyway and tell us exactly what inranet you're on or why it's not accessible on the internet.
Once again - my question does not require you to examine it.  And, since it's not (yet) publically accessible, there is no point in arguing.

Thanks
Title: Re: Global CSS location? / IFrame removal
Post by: Joe Carver on May 19, 2009, 09:29:08 PM
Points missed

Point taken
Quote from: ltwally
this issue is between my webhost and me.
Title: Re: Global CSS location? / IFrame removal
Post by: ltwally on May 19, 2009, 09:36:05 PM
Quote from: i-imagine on May 19, 2009, 09:29:08 PM
    Points missed
    • The unpaid volunteers who help Coppermine users here don't have infinite time
    • A fresh installation does not always equal a clean, current or proper installation
    • You cannot over-ride your free host's output any more than you can keep a postcard from getting marked


    I'm just looking for the place to restructure the CSS in the above-mentioned pop-up window.  (http://copperminegallery.xyz.com/displayimage.php?pid=1&fullsize=1)

    Thanks[/list]
    Title: Re: Global CSS location? / IFrame removal
    Post by: Joachim Müller on May 20, 2009, 09:54:07 AM
    Quote from: ltwally on May 19, 2009, 09:36:05 PM
    I'm just looking for the place to restructure the CSS in the above-mentioned pop-up window.  (http://copperminegallery.xyz.com/displayimage.php?pid=1&fullsize=1)
    Edit themes/yourtheme/theme.php, find the function definition function theme_display_fullsize_pic() and edit as you see fit. If that function definition doesn't exist in your custom theme, copy// 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 in themes/yourtheme/theme.php, right before?>and then edit as you see fit. This has been asked and answered many times over, the answer always remains the same. Instead of your confrontational postings you could have searched the forum throughly.

    i-imagine already told you some of the reasons why we ask for a link to the gallery. Anyway, it is you who asked for free support, so you have to respect our board rules no matter what. If our board rules would have said that you have to wear a funny hat while typing your postings, you would have to respect that as well without arguing. We're not ready to explain the board rules to every visitor who is asking for free support - if you want to find out why the rules exist as they are right now, you're welcome to search the forum for previous discussions as well.
    For you, it should be enough to understand that there are reasons for each and every existing board rule.
    Title: Re: Global CSS location? / IFrame removal
    Post by: ltwally on May 20, 2009, 06:30:43 PM
    Thank you for the answer to my question.