coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: anthrt on December 23, 2005, 12:14:13 PM

Title: displaying ads under "intermediate image display"
Post by: anthrt 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://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?
Title: Re: displaying ads under "intermediate image display"
Post by: Joachim Müller 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.
Title: Re: displaying ads under "intermediate image display"
Post by: anthrt on December 23, 2005, 01:05:29 PM
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?
Title: Re: displaying ads under "intermediate image display"
Post by: Nibbler 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
Title: Re: displaying ads under "intermediate image display"
Post by: donnoman 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.