test
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • Rob Hawthorn Friend
    #148498

    Hi, on my site (http://www.personal-training-warwickshire.com/sandbox/) I have tried to add an extra module position to display google adverts.

    There are 3 adverts in total (the top banner is displaying correctly) but there are two adverts located closely to each other (one in module position “right” and one as the attached image just above the main content in new position “content_advert”.

    To add the module position I added the following code to index.php:

    <?php if ($this->countModules('content_advert')) : ?>
    <div>
    <jdoc:include type="modules" name="content_advert" style="xhtml" />
    </div>
    <?php endif; ?>

    Then I created a new module and assigned it position “content_advert”.

    The advert in module position “right” should be a 250×250 square (it was displaying correctly before I added the new module). The ad in module position “content_advert” is 468×60. Both are displaying incorrectly and I need to get them working.

    I think I have done something incorrect with the index.php code, is my code wrong?

    Looking on two different computers one displays correctly and the other displays with the advert trying to put horizontal ads into the square hence chopping the ad off.

    Regards,
    Rob


    1. ads-incorrect
    histeriks Friend
    #335707

    rob_hawthorn;164075Hi, on my site (http://www.personal-training-warwickshire.com/sandbox/) I have tried to add an extra module position to display google adverts.

    There are 3 adverts in total (the top banner is displaying correctly) but there are two adverts located closely to each other (one in module position “right” and one as the attached image just above the main content in new position “content_advert”.

    To add the module position I added the following code to index.php:

    <?php if ($this->countModules('content_advert')) : ?>
    <div>
    <jdoc:include type="modules" name="content_advert" style="xhtml" />
    </div>
    <?php endif; ?>

    Then I created a new module and assigned it position “content_advert”.

    The advert in module position “right” should be a 250×250 square (it was displaying correctly before I added the new module). The ad in module position “content_advert” is 468×60. Both are displaying incorrectly and I need to get them working.

    I think I have done something incorrect with the index.php code, is my code wrong?

    Looking on two different computers one displays correctly and the other displays with the advert trying to put horizontal ads into the square hence chopping the ad off.

    Regards,
    Rob

    Hi Rob,

    Just a possibility:

    by inserting style=”xhtml” atribute you are specifying that you’re using chrome styles.

    Try to remove that attribute:

    <?php if ($this->countModules(‘content_advert’)) : ?>
    <div>
    <jdoc:include type=”modules” name=”content_advert” style=”xhtml” />
    </div>
    <?php endif; ?>

    and report back please, so we can continue if that didn’t solve it.

    Good luck 🙂

    Rob Hawthorn Friend
    #335813

    Hi histeriks, luckily it seemed to have worked, the client requested the removal of the ads soon after so it was redundant anyway.

    But good to know for the future so thank you very much for the reply.

    Regards,
    Rob

    histeriks Friend
    #335816

    rob_hawthorn;168916Hi histeriks, luckily it seemed to have worked, the client requested the removal of the ads soon after so it was redundant anyway.

    But good to know for the future so thank you very much for the reply.

    Regards,
    Rob

    You’re welcome Rob 🙂

Viewing 4 posts - 1 through 4 (of 4 total)

This topic contains 4 replies, has 2 voices, and was last updated by  histeriks 14 years, 9 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum