




السلام عليكم ورحمه الله وبركاته
[ اسم شرح ] : شرح تعطيل مانع الاعلانات adblock لمنتديات vBulletin
[ وصف شرح ] : شرح اضافة لتعطيل مانع الاعلانات او anti adblock داخل منتداك بطريقة سهل جد
الخطوات
- نذهب الى لوحة التحكم
- ثم نختار الاستايل الذي نريد ان نضيف له [ anti adblock ]
- في اخر قالب [ headinclude ] نضع الكود التالي.
كود:
<div class="afs_ads"> </div>
<script type="text/javascript">
(function() {
var message = "انت تستخدم اضافة [ Adblock ] الرجاء اغلق الاضافة حتى تسطيع تصفح المنتدى بشكل جيد ";
var tryMessage = function() {
setTimeout(function() {
if(!document.getElementsByClassName) return;
var ads = document.getElementsByClassName('afs_ads'),
ad = ads[ads.length - 1];
if(!ad
|| ad.innerHTML.length == 0
|| ad.clientHeight === 0) {
alert(message);
//window.location.href = '[URL of the donate page. Remove the two slashes at the start of thsi line to enable.]';
} else {
ad.style.display = 'none';
}
}, 2000);
}
/* Attach a listener for page load ... then show the message */
if(window.addEventListener) {
window.addEventListener('load', tryMessage, false);
} else {
window.attachEvent('onload', tryMessage); //IE
}
})();
</script>