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: [Solved]: Global CSS location? / IFrame removal  (Read 8948 times)

0 Members and 1 Guest are viewing this topic.

ltwally

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
[Solved]: Global CSS location? / IFrame removal
« 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?
Code: [Select]
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!
« Last Edit: May 21, 2009, 01:37:54 am by Joachim Müller »
Logged

ltwally

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Global CSS location? / IFrame removal
« Reply #1 on: May 16, 2009, 10:35:03 pm »

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

Joe Carver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1545
  • aka 'i-imagine'
    • Home Page
Re: Global CSS location? / IFrame removal
« Reply #2 on: May 17, 2009, 12:57:09 pm »

    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

    • Coppermine newbie
    • Offline Offline
    • Posts: 6
    Re: Global CSS location? / IFrame removal
    « Reply #3 on: May 18, 2009, 11:32:06 pm »

    My gallery is not currently on the web.

    Anyone with an actual answer?  Thanks.
    Logged

    Joachim Müller

    • Dev Team member
    • Coppermine addict
    • ****
    • Offline Offline
    • Gender: Male
    • Posts: 47843
    • aka "GauGau"
      • gaugau.de
    Re: Global CSS location? / IFrame removal
    « Reply #4 on: May 19, 2009, 08:50:08 am »

    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.

    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.

    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.

    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.
    Logged

    ltwally

    • Coppermine newbie
    • Offline Offline
    • Posts: 6
    Re: Global CSS location? / IFrame removal
    « Reply #5 on: May 19, 2009, 07:53:28 pm »

    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.

    Quote
    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.
    Thank you for your input in this matter - but this issue is between my webhost and me.

    Quote
    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.
    What I mean is that we are not yet ready for random internet visitors or the site to be published.

    Quote
    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.
    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

    Quote
    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.
    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
    Logged

    Joe Carver

    • Dev Team member
    • Coppermine addict
    • ****
    • Country: us
    • Offline Offline
    • Gender: Male
    • Posts: 1545
    • aka 'i-imagine'
      • Home Page
    Re: Global CSS location? / IFrame removal
    « Reply #6 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

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

      ltwally

      • Coppermine newbie
      • Offline Offline
      • Posts: 6
      Re: Global CSS location? / IFrame removal
      « Reply #7 on: May 19, 2009, 09:36:05 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]
        Logged

        Joachim Müller

        • Dev Team member
        • Coppermine addict
        • ****
        • Offline Offline
        • Gender: Male
        • Posts: 47843
        • aka "GauGau"
          • gaugau.de
        Re: Global CSS location? / IFrame removal
        « Reply #8 on: May 20, 2009, 09:54:07 am »

        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
        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 in themes/yourtheme/theme.php, right before
        Code: [Select]
        ?>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.
        Logged

        ltwally

        • Coppermine newbie
        • Offline Offline
        • Posts: 6
        Re: Global CSS location? / IFrame removal
        « Reply #9 on: May 20, 2009, 06:30:43 pm »

        Thank you for the answer to my question.
        Logged
        Pages: [1]   Go Up
         

        Page created in 0.024 seconds with 19 queries.