Skip to:
Content
Pages
Categories
Search
Top
Bottom

Where to put adsense code?

Viewing 9 replies - 1 through 9 (of 9 total)

  • Adam Harley
    Member

    @kawauso

    Your image link returns a 403 Forbidden error, a direct link to your website would be much easier to work with anyway. I’d recommend putting it in header.php and using either tables or CSS to align it to the left of the main content.


    fl00r97
    Member

    @fl00r97

    Incredible fast response, thanks!

    I corrected the link, please try again.

    Ben


    Adam Harley
    Member

    @kawauso

    I don’t usually work with adsense so I don’t know what the div it’s in is called. If you can post a link to your site with AdSense running I can probably work out some CSS though.


    fl00r97
    Member

    @fl00r97

    URL is: http://www.qtext.nl

    Thanks again,

    Ben


    Olaf Lederer
    Participant

    @finalwebsites

    Hi, to place an ad box like this you need to tweak the existing theme.

    Try to open an extra div container inside the header tpl file and close the container inside the footer tpl.

    inside this container you can place the forum plus a banner (of course you need to change some css code)

    EDIT: btw adsense doesn’t have a great CTR for forums


    fl00r97
    Member

    @fl00r97

    Thanks for your reply Olaf, but I think this is beyond my understanding.

    Can you please elaborate?

    Thanks!

    Ben


    Adam Harley
    Member

    @kawauso

    Okay I can’t work out how to get it to position relative to the theme, since it just… disappears if I try aligning it properly at left: -1000px. Putting <div style="position: absolute; left: 100px;"> and </div> around it will put it on the left of the screen outside the layout though, just fixed against the side of the screen rather than the layout.

    @Olaf: this theme does some awful things if you try aligning anything to its left using a div :(


    Olaf Lederer
    Participant

    @finalwebsites

    just example code…

    header.php (the two divs between body and wrapper)

    <body id="<?php bb_location(); ?>">
    <div style="position:relative;width:1200px;border:1px solid red;margin:0 auto;">
    <div style="width:120px;left:0;top:200px;position:absolute;height:600px;background-color:yellow;"></div>
    <div id="wrapper">

    footer.php (the div before the action)

    </div>
    </div>

    <?php do_action('bb_foot'); ?>

    </body>
    </html>

    I checked this only i firefox (Ubuntu) and of course the header background image is only between the new container (put the background into the body style.

    @floor97,

    before you’re able to tweak themes you need to know some CSS


    fl00r97
    Member

    @fl00r97

    Brilliant!

    I copied the code into header.php and tweaked it a bit to show the ad. Here’s the result: http://www.qtext.nl

    Thank you so much.

    P.s.: ik zie net in je profiel dat je ook uit Nederland komt!

Viewing 9 replies - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.