- Views: 2K
- Replies: 11
Instructions to set up Google AdSense in XenVn add-on. Combined with a smart ad blocker detector.
(Hướng dẫn thiết lập trì hoãn tải Google AdSense trong XenVn add-on. Kết hợp trình phát hiện chặn quảng cáo thông minh.
Step 1. Go to https://www.google.com/adsense/ and set up your ad code. For example the image below:
(Bước 1. Truy cập trang https://www.google.com/adsense/ và thiết lập mã quảng cáo của bạn. Ví dụ như hình bên dưới.)
For example your code is:
(Ví dụ đoạn code của bạn)
JAVASCRIPT:
You must log in to view
(11 lines)
Step 2. Go to AdminCP -> XenVn -> Setting -> AddCode
(Bước 2. Truy cập AdminCP -> XenVn -> Setting -> AddCode)
Paste your ad codes into AD 1, AD 2, AD 3, AD 4 fields.
AD 1: displayed at the Top of: forums, threads, resources, redirects page.
AD 2: displayed at the Middle of: forums, threads, resources, redirects page.
AD 3: displayed at the Bottom of: forums, threads, resources, redirects page.
AD 4: displayed above attachment list of first post / resource view page.
Step 3. Go to AdminCP -> Groups & permissions -> User group permissions. Assign permissions to your user groups, by default, ads will be enabled.
(Bước 3. Truy cập AdminCP -> Groups & permissions -> User group permissions. Phân quyền cho các nhóm người dùng của bạn, mặc định là sẽ bật quảng cáo)
Set the following option:
(Thiết lập tùy chọn sau)
[XenVn] Forum Permissions
- Disable auto Ads for forum & redirect page (Select No to display ads)
- [XV] Disable auto Ads for resource & redirect page (Select No to display ads)
(Note that node permissions will override the value of user group permissions)
(Nếu bạn muốn phân quyền cho từng Node. Truy cập AdminCP -> Forums -> Node permissions. Lưu ý phân quyền theo node sẽ ghi đè giá trị phân quyền theo nhóm người dùng)
Read the documentation about permissions here:
https://xenforo.com/docs/xf2/groups-permissions/
Step 4. Enable Smart Ad Blocker Detection
XenVn Setting -> AddCode -> Enable Smart Ad Blocker Detection
XenVn add-on will display the following message if an ad blocker is detected.
XenVn add-on sẽ hiển thị thông báo sau nếu như phát hiện trình chặn quảng cáo.
Everything is completed. Google AdSense ads appear sooner or later because of Google. Please wait if the ad has not appeared on your page. Changing the ad code frequently will slow down the display of the ad.
(Mọi thứ đã hoàn tất. Quảng cáo Google AdSense xuất hiện sớm hay muộn là do Google. Hãy chờ đợi nếu quảng cáo chưa xuất hiện trên trang của bạn. Việc thay đổi mã quảng cáo thường xuyên sẽ làm chậm hiển thị quảng cáo.)
Last edited: