Ghostt
04-13-2011, 10:00 PM
Vbulletin Anti ADblock Alert Box will show a nice alert box below the header which is enabled if the user surfs with any advertisment blocking software.
The notifaction is telling the user to disable his adblocking software on this free website which depends on the sponsor earnings.
This Mod is Compatibel to ALL Versions of the Vbulletin Software!
Follow the 4 steps to Install the mod:
1/4. Upload the adframe.js file and the icon images (http://ul.to/4sa9jlfv) to your server.
Download: http://ul.to/4sa9jlfv
2/4. ADD this html code to the bottom of the header template (or where you want this alert box to apear)
<div class="a"></div>
3/4. ADD the following Code to bottom of the header template header (to show alert on every page) or to the showthread template (If you want to show alert only on thread pages). You can edit the red marked text.
<script type="text/javascript">
<!--
var adblock = true;
//-->
</script>
<script type="text/javascript" src="adframe.js"></script>
<script type="text/javascript">
<!--
if(adblock) {
var allElements = document.getElementsByTagName('div');
for (var i = 0; i < allElements.length; i++) {
if (allElements[i].className == 'a') {
allElements[i].innerHTML = '<div class=\"blocked\">DIESE SEITE IST WERBEFINANZIERT UND DAHER KOSTENFREI. BITTE UNTERSTÜTZEN SIE WWW.EXAMPLE.COM MIT DER<strong> DEAKTIVIERUNG IHRES WERBEBLOCKERS AUF WWW.EXAMPLE.COM</strong>. VIELEN DANK! (<img src=\"/images/statusicon/cp_help.gif\" height=\"12\" width=\"12\" alt=\"Help\" title=\"Tutorial zur Deaktivierung von ADblock auf bestimmten Seiten\" /> <a href=\"/showthread.php?t=450353\">WIE? und mehr Info<\/a>). <a href=\"/showthread.php?t=450353\"><div class="x"><img title=\"Tutorial zur Deaktivierung von ADblock auf bestimmten Seiten\" src=\"/images/statusicon/cross.png\" alt=\"Close\"></a><\/div><\/div>';
}
}
}
//-->
</script>
4/4. ADD this CSS rules to the bottom of "addtitional Style variables" of your Style.
.blocked{background: #fff6bf url(/images/statusicon/exclamation.png) center no-repeat;background-position: 15px 50%; /* x-pos y-pos */text-align: left;padding: 5px 30px 5px 45px;border: 2px solid #ffd324; margin-left:auto; margin-right: auto; margin-top:5px;}
.x {float: right;margin:-10px -7px 0 0;}
4,5*/4(optional)
Open a thread in your forum where you explain the users how to disable adblock on your page. you can use a image like this: http://i.imgur.com/mUzdG.jpg
And how it is important to support this free page with disabling the adblocking software on this page which is depend on the advertisment earnings.
Then replace the thread id with the green marked number in the code from the 3/4 step
The notifaction is telling the user to disable his adblocking software on this free website which depends on the sponsor earnings.
This Mod is Compatibel to ALL Versions of the Vbulletin Software!
Follow the 4 steps to Install the mod:
1/4. Upload the adframe.js file and the icon images (http://ul.to/4sa9jlfv) to your server.
Download: http://ul.to/4sa9jlfv
2/4. ADD this html code to the bottom of the header template (or where you want this alert box to apear)
<div class="a"></div>
3/4. ADD the following Code to bottom of the header template header (to show alert on every page) or to the showthread template (If you want to show alert only on thread pages). You can edit the red marked text.
<script type="text/javascript">
<!--
var adblock = true;
//-->
</script>
<script type="text/javascript" src="adframe.js"></script>
<script type="text/javascript">
<!--
if(adblock) {
var allElements = document.getElementsByTagName('div');
for (var i = 0; i < allElements.length; i++) {
if (allElements[i].className == 'a') {
allElements[i].innerHTML = '<div class=\"blocked\">DIESE SEITE IST WERBEFINANZIERT UND DAHER KOSTENFREI. BITTE UNTERSTÜTZEN SIE WWW.EXAMPLE.COM MIT DER<strong> DEAKTIVIERUNG IHRES WERBEBLOCKERS AUF WWW.EXAMPLE.COM</strong>. VIELEN DANK! (<img src=\"/images/statusicon/cp_help.gif\" height=\"12\" width=\"12\" alt=\"Help\" title=\"Tutorial zur Deaktivierung von ADblock auf bestimmten Seiten\" /> <a href=\"/showthread.php?t=450353\">WIE? und mehr Info<\/a>). <a href=\"/showthread.php?t=450353\"><div class="x"><img title=\"Tutorial zur Deaktivierung von ADblock auf bestimmten Seiten\" src=\"/images/statusicon/cross.png\" alt=\"Close\"></a><\/div><\/div>';
}
}
}
//-->
</script>
4/4. ADD this CSS rules to the bottom of "addtitional Style variables" of your Style.
.blocked{background: #fff6bf url(/images/statusicon/exclamation.png) center no-repeat;background-position: 15px 50%; /* x-pos y-pos */text-align: left;padding: 5px 30px 5px 45px;border: 2px solid #ffd324; margin-left:auto; margin-right: auto; margin-top:5px;}
.x {float: right;margin:-10px -7px 0 0;}
4,5*/4(optional)
Open a thread in your forum where you explain the users how to disable adblock on your page. you can use a image like this: http://i.imgur.com/mUzdG.jpg
And how it is important to support this free page with disabling the adblocking software on this page which is depend on the advertisment earnings.
Then replace the thread id with the green marked number in the code from the 3/4 step