[Solved]: Global CSS location? / IFrame removal [Solved]: Global CSS location? / IFrame removal
 

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]

Main Menu

[Solved]: Global CSS location? / IFrame removal

Started by ltwally, May 16, 2009, 10:33:41 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ltwally

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!

ltwally

Ignore this - I forgot to hit "notify me of replies" above

Joe Carver

    Things to do when asking for help to violate your terms of service
    • Post a link to your gallery - It's a rule of this forum!
    • Get a better hosting company

    ltwally

    My gallery is not currently on the web.

    Anyone with an actual answer?  Thanks.

    Joachim Müller

    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.

    ltwally

    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

    Joe Carver

      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

      Point taken
      Quote from: ltwally
      this issue is between my webhost and me.

      ltwally

      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 know you do not have infinite time.  To me, this seems like a very easy question that would not require access to our Coppermine install and should be readily answerable by a person with sufficient knowledge/experience with Coppermine.  I did not expect this dialog to last even this long.
        • In this case, it is a fresh, clean and current install using the default theme.
        • I can and do override my hosts output using CSS.  ;)  They inject an iframe - and I disable iframes, rendering their code moot.

        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]

        Joachim Müller

        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.

        ltwally

        Thank you for the answer to my question.