-
AuthorPosts
-
Rob Hawthorn Friend
Rob Hawthorn
- Join date:
- September 2014
- Posts:
- 190
- Downloads:
- 0
- Uploads:
- 28
- Thanks:
- 38
- Thanked:
- 3 times in 1 posts
February 8, 2010 at 10:52 am #148498Hi, 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
histeriks Friendhisteriks
- Join date:
- December 2009
- Posts:
- 285
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 16
- Thanked:
- 114 times in 87 posts
March 10, 2010 at 11:39 pm #335707rob_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,
RobHi 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 FriendRob Hawthorn
- Join date:
- September 2014
- Posts:
- 190
- Downloads:
- 0
- Uploads:
- 28
- Thanks:
- 38
- Thanked:
- 3 times in 1 posts
March 11, 2010 at 2:43 pm #335813Hi 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,
Robhisteriks Friendhisteriks
- Join date:
- December 2009
- Posts:
- 285
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 16
- Thanked:
- 114 times in 87 posts
March 11, 2010 at 2:55 pm #335816rob_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,
RobYou’re welcome Rob 🙂
1 user says Thank You to histeriks for this useful post
AuthorPostsViewing 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
New module position displaying incorrectly – Is my code wrong?
Viewing 4 posts - 1 through 4 (of 4 total)