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: displaying ads under "intermediate image display"  (Read 4805 times)

0 Members and 1 Guest are viewing this topic.

anthrt

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
displaying ads under "intermediate image display"
« on: December 23, 2005, 12:14:13 pm »

i think that "intermediate image display" is the right section for where i want the ads to display. anyway, take a look at this image, the arrow is where i want the ads to show

(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fimg476.imageshack.us%2Fimg476%2F5872%2Fadexample4fp.png&hash=d414a10a0ff4d53f2ad0d2f7d436e5ab14f92c13)

now, in themes.inc.php under the section "// HTML template for intermediate image display " this is the code i am using:

Code: [Select]
$template_display_media = <<<EOT
        <tr>
                <td align="center" class="display_media" nowrap="nowrap">
                        <table cellspacing="2" cellpadding="0" class="imageborder">
                                <tr>
                                        <td align="center">
                                                {IMAGE}

                                        </td><br />
<script type="text/javascript"><!--
google_ad_client = "pub-0000000000000000";
google_ad_width = 468;
google_ad_height = 15;
google_ad_format = "468x15_0ads_al";
google_ad_channel ="";
google_color_border = "ffffff";
google_color_bg = "FFFFFF";
google_color_link = "0033CC";
google_color_url = "000000";
google_color_text = "000000";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
                                </tr>
                        </table>

and a whole bunch more crap. but the ads arent displaying. if i just write some text after the closing script tag, the text displays fine. there is one other link unit on the page before this which displays properly.

so im wondering if this is a 'problem' with adsense or something else?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: displaying ads under "intermediate image display"
« Reply #1 on: December 23, 2005, 12:44:13 pm »

don't edit themes.inc.php, under no circumstances. Instead: copy the "Intermediate image dsiplay" section from themes/sample/theme.php into themes/yourtheme/theme.php and then modify accordingly.
Logged

anthrt

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: displaying ads under "intermediate image display"
« Reply #2 on: December 23, 2005, 01:05:29 pm »

don't edit themes.inc.php, under no circumstances. Instead: copy the "Intermediate image dsiplay" section from themes/sample/theme.php into themes/yourtheme/theme.php and then modify accordingly.
ok, so should i remove the intermediate image display section from themes.inc.php and add it to theme.php? or should i copy it so that the section exists in both files?
Logged

Nibbler

  • Guest
Re: displaying ads under "intermediate image display"
« Reply #3 on: December 23, 2005, 03:25:20 pm »

Just copy it. What you have in theme.php takes priority over what exists in themes.inc.php
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: displaying ads under "intermediate image display"
« Reply #4 on: December 23, 2005, 08:34:18 pm »

master_template from cpg-contrib.org can be used anytime you are tempted to modify themes.inc.php

Here is a modified master_template to replace the display_media template.

Also note, that unless you correctly configure the client_id and ad channel it won't display anything.

the template throws in a div with hello world in it, just to show you where on the page the content will appear.

you should configure the google client properly then remove the hello world div.
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 19 queries.