help adding ads to theme help adding ads to theme
 

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

help adding ads to theme

Started by acers, August 07, 2005, 05:48:05 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

acers

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)
and
(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fimg12.imageshack.us%2Fimg12%2F4506%2Fsnap28ly.th.jpg&hash=dde4b0754c62034cf76b0a898f207488dee39481)

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

snork13

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

snork13

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

acers

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

snork13

glad it work for ya...

maybe this can get marked solved :)

version

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

fh2level

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 :(

Joachim Müller

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