forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: simonesimonsnet on June 27, 2018, 04:31:26 pm

Title: Ads in my gallery but I don't know where they come from
Post by: simonesimonsnet on June 27, 2018, 04:31:26 pm
Hello guys, I'm having the weirdest error in my gallery at the moment  :o

I bought my hosting & domain name at OVH for my site and gallery (https://simone-simons.net/). Before, my site was hosted for free by Flaunt and I had to display ads on every page.

When I moved the gallery, I uploaded all the files to my new hosting and also the MySQL database. I also uploaded a new theme.

In the template.php file of my old theme (at Flaunt), I had this line to display the ads :

Code: [Select]
<div id='div-gpt-ad-1441211811388-0' style='height:90px; width:728px;'>
<script type='text/javascript'>
googletag.cmd.push(function() { googletag.display('div-gpt-ad-1441211811388-0'); });
</script>
</div>

I didn't add this line to my new theme. Yet, when I try to display a picture, I see 2 ad banners, like on this page : https://simone-simons.net/gallery/displayimage.php?album=681&pid=14298#top_display_media

When I look at the source code, here is what I see :

Code: [Select]
<table align="center" width="100%" cellspacing="1" cellpadding="0" class="maintable ">
        <tr>
                <td align="center" class="display_media" nowrap="nowrap">
                        <table width="100%" cellspacing="2" cellpadding="0">
                                <tr>
                                        <td align="center" style="{SLIDESHOW_STYLE}">

<center><script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- responsive flaunt -->
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-7892222271864999"
     data-ad-slot="3482167138"
     data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script></center><br>

                                                <a href="javascript:;" onclick="MM_openBrWindow('displayimage.php?pid=14298&amp;fullsize=1','143101295b339d2d1d7d3','scrollbars=yes,toolbar=no,status=no,resizable=yes,width=1605,height=1070')"><img src="albums/userpics/10001/normal_smoonstyle2018-006.jpg" width="600" height="400" class="image" border="0" alt="Click to view full size image" /><br /></a>


<br><center><script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- responsive flaunt -->
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-7892222271864999"
     data-ad-slot="3482167138"
     data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script></center>
                                        </td>
                                </tr>
                        </table>

I don't understand where this comes from !  ???  I had a look at all the pages of my new theme and I can't find where these lines are (so I can't delete them). Do you know where/in which file I should look to fix this error ?

Thanks in advance.

(I'm using Coppermine 1.5.46 by the way)
Title: Re: Ads in my gallery but I don't know where they come from
Post by: phill104 on June 27, 2018, 10:49:34 pm
Nice theme you have there too.

I am guessing that there is either come code in your theme.php file, or anycontent.php

Take a look at theses and see if there is anything. If that still doesn't fix it, or you cannot find it there are some other potential places.

P.S. CPG 1.6.x is now available. Might be worth seeing if your theme works with version 1.6 in a test environment. It may even fix your problem.
Title: Re: Ads in my gallery but I don't know where they come from
Post by: ron4mac on June 27, 2018, 11:44:42 pm
It may be coming from a plugin that is active.
Title: Re: Ads in my gallery but I don't know where they come from
Post by: simonesimonsnet on June 27, 2018, 11:50:40 pm
Thanks ! The line was actually in include/theme.inc.php

Might have been placed there by my previous host, when I moved the gallery I just downloaded all the files and uploaded them to the new host.

I can't thank you enough, it's been bothering me for weeks and you solved the problem in just a few hours  ;D You rock !