XenForo Tutorials

XF 2 Show adblock detected notice

Submitted by Bi0S, , Thread ID: 108169

Thread Closed
Bi0S
Leaks God
Pirates
Level:
0
Reputation:
91
Posts:
7.83K
Likes:
385
Credits:
25.7K
05-12-2018, 01:02 PM
#1
Today i used an old resource of xF1 on xF2 by copying required things.

This Tutorial will help you to shows adblock notice to user in place of google advertisement banner.




In order to get it working on your website, first create java script file namely advertisement.js and add it to your forum root directory.

add following code to it - its just a one line code.

Content locked
This content has been locked. Please login or register in order to unlock it.


You can edit message to show, as per your wish and style.[img]data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7[/img]

That's it!, now you can test it for correct configuration by enabling ad block on your website.

If you get the message like as shown in above image, you did it correctly.

I made this by understanding code from below thread.

https://xenforo.com/community/resources/...foro.3347/

You can see it in action by clicking here

Enjoy!
[Image: KiXcHZw.gif]
[Image: yOythq1.png]

Users browsing this thread: 1 Guest(s)