How would I go about showing a graphic where an adsense ad would be?

Jesepi

Well-known member
What it comes down to is the need to have a filler graphic behind where an adsense ad would normally appear. Only people with some sort of adblock software enabled would see it.

I've seen it on a few sites, but can't wrap my head around the css or js involved. An example of a xenforo based site would be http://8wayrun.com/

If someone has a link to a guide somewhere, or even just a code example I would be very grateful.
 
An example of a xenforo based site would be http://8wayrun.com/

I got this from their source code. Here is the HTML for use in the templates:

Rich (BB code):
	<div class="premiumContainer" style="margin: -15px auto 12px;">
		<div class="notice">
			<a href="{xen:link account/upgrades}"><img src="PATH/TO/ADBLOCKIMAGE.GIF" border="0"></a>
		</div>
		<div class="adsense">
			YOUR ADSENSE CODE HERE
		</div>
	</div>

And here is the CSS which you can add to EXTRA.css. The dimensions of the container need to match the size of your adsense banner (as defined in your adsense code):

Rich (BB code):
.premiumContainer
{
	position: relative;
	overflow: hidden;
	text-align: center;
	width: 728px;
	height: 90px;
}

.premiumContainer .notice
{
	position: absolute;
}

I tested this on my forum and it works.
 
Top Bottom