forum.coppermine-gallery.net

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
(http://img12.imageshack.us/img12/9818/snap18vt.th.jpg) (http://img12.imageshack.us/my.php?image=snap18vt.jpg)
and
(http://img12.imageshack.us/img12/4506/snap28ly.th.jpg) (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:


Code: [Select]
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