displaying ads under "intermediate image display" displaying ads under "intermediate image display"
 

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

displaying ads under "intermediate image display"

Started by anthrt, December 23, 2005, 12:14:13 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

anthrt

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://coppermine-gallery.com/forum/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:

$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?

Joachim Müller

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.

anthrt

Quote from: GauGau 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.
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?

Nibbler

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

donnoman

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.