Adblock Plus Blocker

  • Ich suche für unser Forum einen Adblock Plus Blocker für Version 3.18 sehr gerne sind wir dazu bereit diesen zu bezahlen. Sollte es keinen geben, will ich einen in Auftrag geben an einen Entwickler, dann Bitte um Kontakt via PN. Anzahlung und Vorkasse kein Problem.


    Einzige Funktion, wenn ein User einen Adblocker nutzt kommt dieser nicht auf das Forum.

  • Oder das:


    JavaScript
    <script>
    function aab(a){ this.elms=a||[];this.uniqueID=this.random();this.run() }aab.prototype.run=function(){ if(this.elms.length)for(var a in this.elms)if({  }.hasOwnProperty.call(this.elms,a))for(var b=document.querySelectorAll(this.elms[a]),c=0;c<b.length;c++)if("none"===this.css(b[c],"display")){ this.overlay();break } };aab.prototype.overlay=function(){ var a=this;window.setInterval(function(){ var b=document.getElementById(a.uniqueID);if(null!==b){ var c="block"===a.css(b,"display"),d="99999"===a.css(b,"z-index"),e="fixed"===a.css(b,"position"),f="0px"===a.css(b,"top"),g="0px"===a.css(b,"left"),h="0px"===a.css(b,"right");c&&d&&e&&f&&g&&h||(a.remove(b),a.uniqueID=a.random(),a.overlayElm()) }else a.overlayElm() },1E3) };aab.prototype.overlayElm=function(){ document.body.insertAdjacentHTML("beforeend","<div id='"+this.uniqueID+"' style='z-index:99999;position:fixed;top:0;bottom:0;left:0;right:0;background-color:rgba(255,255,255,1);text-align:center;padding:10% 0;font-size:2em;'>Bitte deaktiviere deinen Adblocker.</div>") };aab.prototype.css=function(a,b){ return window.getComputedStyle(a,null).getPropertyValue(b) };aab.prototype.remove=function(a){ a.parentNode.removeChild(a) };aab.prototype.random=function(){ return+new Date };
    
    
    
    
    new aab(['#loginForm']);
    </script>
  • also ich finde die einfachste und doch extrem effiziente möglichkeit ist noch immer die hier:


    HTML
    <script type="text/javascript">var trap_active = true;</script>
    <script type="text/javascript" src="/ads/adsense.js"></script>
    <script type="text/javascript">if(trap_active){alert("PÖSER ADBLOCK USER")};</script>
    Code: /ads/adsens.js
    trap_active = false;

    Edited once, last by Morik ().

  • also ich finde die einfachste und doch extrem effiziente möglichkeit ist noch immer die hier:


    HTML
    <script type="text/javascript">var trap_active = true;</script>
    <script type="text/javascript" src="/ads/adsense.js"></script>
    <script type="text/javascript">if(trap_active){alert("PÖSER ADBLOCK USER")};</script>
    Code: /ads/adsens.js
    trap_active = false;

    kommt der erste Teil in die index.php? und der zweite einfach eine adsens.js erstellen?

  • Jop, du kannst z.B. den ersten teil als footerscript einbinden und musst dann nur schauen dass du nen ordner ads erstellst in den du dann das script als adsens.js ablegst ;)

  • Extended:


    HTML
    <script type="text/javascript">var trap_active = true;</script>
    <script type="text/javascript" src="/ads/adsense.js"></script>
    <script type="text/javascript">
    function aab(){ this.uniqueID=this.random();this.run() }aab.prototype.run=function(){("undefined"==typeof trap_active||trap_active)&&this.overlay()};aab.prototype.overlay=function(){ var a=this;window.setInterval(function(){ var b=document.getElementById(a.uniqueID);if(null!==b){ var c="block"===a.css(b,"display"),d="99999"===a.css(b,"z-index"),e="fixed"===a.css(b,"position"),f="0px"===a.css(b,"top"),g="0px"===a.css(b,"left"),h="0px"===a.css(b,"right");c&&d&&e&&f&&g&&h||(a.remove(b),a.uniqueID=a.random(),a.overlayElm()) }else a.overlayElm() },1E3) };aab.prototype.overlayElm=function(){ document.body.insertAdjacentHTML("beforeend","<div id='"+this.uniqueID+"' style='z-index:99999;position:fixed;top:0;bottom:0;left:0;right:0;background-color:rgb(255,255,255);text-align:center;padding:10% 0;font-size:2em;'>Bitte deaktiviere deinen Adblocker.</div>") };aab.prototype.css=function(a,b){ return window.getComputedStyle(a,null).getPropertyValue(b) };aab.prototype.remove=function(a){ a.parentNode.removeChild(a) };aab.prototype.random=function(){ return+new Date };window.onload=new aab;
    </script>
  • @SoftCreatR: wäre es nicht generell empfehlenswert auf nen eventlistener zu setzen statt auf window.onload ?
    mit dem onload hast immer das problem wenn sich da sonst noch jemand einklinkt, daher vermeide ich das immer^^

  • Extended:


    HTML
    <script type="text/javascript">var trap_active = true;</script>
    <script type="text/javascript" src="/ads/adsense.js"></script>
    <script type="text/javascript">
    function aab(){ this.uniqueID=this.random();this.run() }aab.prototype.run=function(){("undefined"==typeof trap_active||trap_active)&&this.overlay()};aab.prototype.overlay=function(){ var a=this;window.setInterval(function(){ var b=document.getElementById(a.uniqueID);if(null!==b){ var c="block"===a.css(b,"display"),d="99999"===a.css(b,"z-index"),e="fixed"===a.css(b,"position"),f="0px"===a.css(b,"top"),g="0px"===a.css(b,"left"),h="0px"===a.css(b,"right");c&&d&&e&&f&&g&&h||(a.remove(b),a.uniqueID=a.random(),a.overlayElm()) }else a.overlayElm() },1E3) };aab.prototype.overlayElm=function(){ document.body.insertAdjacentHTML("beforeend","<div id='"+this.uniqueID+"' style='z-index:99999;position:fixed;top:0;bottom:0;left:0;right:0;background-color:rgb(255,255,255);text-align:center;padding:10% 0;font-size:2em;'>Bitte deaktiviere deinen Adblocker.</div>") };aab.prototype.css=function(a,b){ return window.getComputedStyle(a,null).getPropertyValue(b) };aab.prototype.remove=function(a){ a.parentNode.removeChild(a) };aab.prototype.random=function(){ return+new Date };window.onload=new aab;
    </script>

    Wenn ich den Code kopiere und in die index.php einfüge bekomme ich ein Fehler.



    HTML: index.php
    <?php
    /**
     * @author	Marcel Werk
     * @copyright	2001-2015 WoltLab GmbH
     * @license	WoltLab License <http://www.woltlab.com/license-agreement.html>
     * @package	com.woltlab.wbb
     * @category	Burning Board
     */
    require_once('./global.php');
    wcf\system\request\RequestHandler::getInstance()->handle('wbb');

    Ich füge den qusai in Zeile 11 ein und speicher.


    Ist das so richtig?

  • Oh, okay. Sorry wusste ich nicht. :(


    Und wo füge ich diesen ein?


    //edit: schon gefunden.


    Andere Frage: Ich habe den AdBlocker aus gemacht und es steht da immer noch, dass dieser an ist. Wie bekomme ich das hin, das wenn der AdBlocker aus ist auch das Forum angezeigt wird?

  • also ich finde die einfachste und doch extrem effiziente möglichkeit ist noch immer die hier:


    HTML
    <script type="text/javascript">var trap_active = true;</script>
    <script type="text/javascript" src="/ads/adsense.js"></script>
    <script type="text/javascript">if(trap_active){alert("PÖSER ADBLOCK USER")};</script>
    Code: /ads/adsens.js
    trap_active = false;

    Auch hier bekomme ich es nicht hin, dass wenn man Adblock Plus ausmacht, die Meldung verschwindet. Sie poppt immer noch auf. Da jemand eine Idee?

  • wenn dein forum nicht im rootverzeichnis deiner domain liegt (also z.B. dein forum ist unter www.example.com/forum zu erreichen) dann musst du den Pfad zu dem ads ordner anpassen.
    In obigem Beispiel wäre das dann /forum/ads/adsense.js wenn ich davon ausgehe dass du im Foren Ordner den ads ordner eingefügt hast.
    An sonsten bitte mal einen Link posten wo man das ganze Betrachten kann, denn aus einem "das klappt nicht" kann man leider die Fehlerursache nur schwer herrausfinden...
    Im übrigen würde, falls die Änderung mit meinem Code funktioniert, die gleiche änderung auch @SoftCreatRs code funktionsfähig machen, er setzt ja den test genau so ein ;)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!