coppermine-gallery.com/forum

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Themes/Skins/Templates => Topic started by: acers on August 07, 2005, 05:48:05 PM

Title: help adding ads to theme
Post by: acers on August 07, 2005, 05:48:05 PM
Hi i just want to add a google adsense ad just below and centered below the intermediate picture template and another ad while viewing the category below the category bar.
See screenshots..I have made the area where i want ad dark
(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fimg12.imageshack.us%2Fimg12%2F9818%2Fsnap18vt.th.jpg&hash=1991e86be6277177d354d3225ee200cdbeebc34d) (http://img12.imageshack.us/my.php?image=snap18vt.jpg)
and
(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fimg12.imageshack.us%2Fimg12%2F4506%2Fsnap28ly.th.jpg&hash=dde4b0754c62034cf76b0a898f207488dee39481) (http://img12.imageshack.us/my.php?image=snap28ly.jpg)

anyone can tell where to add the html code for adsense. Its obviously not in the template file. I was trying to add to theme.php but not getting the exact results.. Its not getting centered properly.
Thanks
Title: Re: help adding ads to theme
Post by: snork13 on August 08, 2005, 03:02:58 AM
i can help you, zip up your theme, and include a txt file with your adsense code..i'll return the zip file corrected :> or pm me!

-snork
Title: Re: help adding ads to theme
Post by: snork13 on August 08, 2005, 08:54:14 PM
Well, there may be a better way, this was a quick hack, and i'll look at it more in depth when i have time, in your theme.php find the function theme_display_image, change the ad stuff to reflect your info, screenshoot attached:


function theme_display_image($nav_menu, $picture, $votes, $pic_info, $comments, $film_strip)
{
    global $HTTP_COOKIE_VARS, $CONFIG;

    starttable();
    echo $nav_menu;
    endtable();

    starttable();
    echo $picture;
    endtable();
    if ($CONFIG['display_film_strip'] == 1) {
        echo $film_strip;
    }
echo '  <br />                                     <script type="text/javascript"><!--

google_ad_client = "pub-******************";

google_ad_width = 728;

google_ad_height = 90;

google_ad_format = "728x90_as";

google_ad_type = "text";

google_ad_channel ="";

google_color_border = "333333";

google_color_bg = "333333";

google_color_link = "FFFFFF";

google_color_url = "999999";

google_color_text = "000000";

//--></script>

                                            <script type="text/javascript"

  src="http://****************/pagead/show_ads.js">

                                                                                  </script>';
    starttable();
    echo $votes;
    endtable();



-snork
Title: Re: help adding ads to theme
Post by: acers on August 09, 2005, 03:22:51 AM
thanks a lot.. thats exactly what i wanted :D
Title: Re: help adding ads to theme
Post by: snork13 on August 09, 2005, 04:05:56 AM
glad it work for ya...

maybe this can get marked solved :)
Title: Re: help adding ads to theme
Post by: version on January 04, 2006, 02:01:25 PM
snork13:

That little preview image is exactly what im looking for but try as i might i cant seem to get any ads to display at all no matter where i put my adsense code.

I'm using the Hardwired theme with pretty much default settings. Any help would be great.

Thanks

Regards

v3
Title: Re: help adding ads to theme
Post by: fh2level on January 12, 2006, 10:43:13 PM
I am also attempting to add tis to the harwired theme but I do not have the function theme_display_image anywhere in the theme.php code :(
Title: Re: help adding ads to theme
Post by: Joachim Müller on January 13, 2006, 08:29:22 AM
are you by chance running cpg1.4.x? If yes, then you're on the wrong board, as this one deals with cpg1.3.x