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: help adding ads to theme  (Read 7704 times)

0 Members and 1 Guest are viewing this topic.

acers

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
help adding ads to theme
« 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)
and
(http://img12.imageshack.us/img12/4506/snap28ly.th.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
« Last Edit: August 09, 2005, 04:42:08 am by Nibbler »
Logged

snork13

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 260
  • Internet! Is that thing still around?
    • Gallery
Re: help adding ads to theme
« Reply #1 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
Logged

snork13

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 260
  • Internet! Is that thing still around?
    • Gallery
Re: help adding ads to theme
« Reply #2 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
Logged

acers

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: help adding ads to theme
« Reply #3 on: August 09, 2005, 03:22:51 am »

thanks a lot.. thats exactly what i wanted :D
Logged

snork13

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 260
  • Internet! Is that thing still around?
    • Gallery
Re: help adding ads to theme
« Reply #4 on: August 09, 2005, 04:05:56 am »

glad it work for ya...

maybe this can get marked solved :)
Logged

version

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: help adding ads to theme
« Reply #5 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
Logged

fh2level

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: help adding ads to theme
« Reply #6 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 :(
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: help adding ads to theme
« Reply #7 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
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 19 queries.