XF 1.2 Placing an ad

gavpeds

Active member
Hi all so i have added an add unit to my forum. It displays how i want etc after i have had a play but what i would like to know is if i have done this the correct way or if i have just botched it!!

So i am using the responsive adsense unit. I hunted the template for where i could put the code and found ad_above_content so put the code in there. Is that correct?

I then found that because of my theme when the ad showed the full size it would overlap some of the forum content like the users online box on the right etc.
So went into style properties and changed the page width controller under general from 980px to 1027px which fixed it.

So my site http://windowcleaningforums.co.uk/ now seems to be showing the ad as i wish it to be displayed i guess i just want to know if i have done this the correct way or not. If not what is the correct way?
 
Great thanks so by reading that it seems i have implemented the ad correctly then.

One question i would like to ensure is ok to do is i want to centre the ad above content so i have put it in a
Code:
<div align="center">
AD CODE
</div>

Is this ok? i mean will this break any adsense rules?

The only problem i have noticed changing the width from 980px to 1028px to accommodate the ad is that in the conversation view it ads a few pixels to the grey of the conversation area which i would like to fix if anyone knows how?
 

Attachments

  • New Picture (2).webp
    New Picture (2).webp
    40.5 KB · Views: 8
Last edited:
Hi so I have placed ads above content and bellow content. All seems fine on my personal 5in screen android phone but pick up my smaller work iphone5 and the ads are going off the right creating a horizontal scroll bar. It is only by a few pixels but annoying non the less. How can I fix this?
image.webp
image.webp
 
You will need to use smaller ad units.

I don't know what the width of the iPhone is but the ad unit must be small enough to allow for any padding and margins.
 
Hi ok so it seems adding this line
Code:
@media(min-width: 320px) { .above-content-ad-wcf { width: 234px; height: 60px; } }
to the google standard code works.

So now i have this
Code:
<style>
.above-content-ad-wcf { width: 320px; height: 50px; }
@media(min-width: 320px) { .above-content-ad-wcf { width: 234px; height: 60px; } }
@media(min-width: 500px) { .above-content-ad-wcf { width: 468px; height: 60px; } }
@media(min-width: 800px) { .above-content-ad-wcf { width: 728px; height: 90px; } }
</style>
 
One more question i promise!

So i have used <xen:if is="!{xen:helper ismemberof, $visitor, 6,4}"> in these ads so that Moderators and premium members do not see the ads.

Problem is adding the mod group id it means i also don't see them even though i am admin so presume something to do with permissions. I would like to see them just to keep an eye on them etc really.

How can i fix this.

Thanks again so much for your help. (y)
 
You have a few options: remove yourself from the moderating user group, create a new instance targeted at your user ID only, use another (logged out) browser session.
 
User groups do no determine moderator status, that is done by explicitly setting a user to be a moderator.
Regardless of whether you are an administrator or not.

What you will lose are any permissions which are set in the moderating user group.

You can assign those moderator permissions directly at the user level if necessary.
 
Back
Top Bottom