Page 1 of 2

Re: [3.2][RC] Anti Adblock 1.0.0

Posted: Tue Aug 21, 2018 1:24 pm
by Ger
picaron wrote: Tue Aug 21, 2018 12:45 pm
Warning: In case there is a previous version of this extension installed in the path /ext/Picaron/AntiAdblock, it is necessary to delete it completely by deleting all the saved data and files hosted on the server prior to the installation of the version 1.2.0, following the steps described in the README.md file included in the extension itself.
Extension Name: Anti Adblock
Author: Picaron

Extension Description:
This extension warns users who use Ad Blockers on our website.
It is fully configurable, being able to select the position and type of the warning message, the time to be displayed, the delay between the warnings and the option to close the message by means of a button with a countdown.
It includes the management of permissions of User Groups and Forums to be able to define when and to whom the warnings will be shown.
It is possible to create texts for as many languages as necessary.
The user who accesses our website and does not have the text of the warning defined in their language, will see the default warning in English.

Anti Adblock 1.2.0
Supported Templates: All.

Requirements:
  • phpBB >=3.2.4
  • PHP >=5.6
Spanish support:
http://www.phpbb-es.com

Download:
Download Anti Adblock 1.2.0

History:
  • 1.0.0 - First release. Code is based in antiblock.org.
  • 1.0.2 - Optimization of the code. Configuration options are included in the ACP.
  • 1.0.3
    - Added option for warning in upper part of the forum.
    - The configuration in the ACP is transferred to the EXTENSIONS tab.
    - Language management is included.
  • 1.0.4
    - Added javascript verification in the warning option at the top of the forum.
    - Added the management of forums and main pages where the Warning will be displayed.
  • 1.0.5
    - The permission management for Users Groups and Forums is added.
  • 1.2.0
    - The code is optimized.
    - The development of the extension in the path /ext/Picaron/AntiAdblock is abandoned.
Installation:
  1. Download the latest release.
  2. Unzip the downloaded release.
  3. Copy the content of /pikaron/antiadblock/ folder to /ext/pikaron/antiadblock/.
  4. Enable extension in the ACP.
  5. Configure by navigating in the ACP -> EXTENSIONS -> Anti Adblock
Screenshots:

Image

ACP
General Options
Image

New Language
Image

Editing Language
Image
clarification:
Entering into a debate about the ethics that each one has on the topic of advertising on web pages, is not the purpose of this thread.
I have limited myself to creating a tool that can be used by anyone who considers it. ;)

You might want to read up on Including CSS and JS since in this form your extension certainly won't get validated.

Apart from that, interesting extension. Your approach is a bit rough though; it makes the site unusable when an adblocker is active. Many sites just display a message instead; asking to disable the adblocker. You even might want to consider to show only the first post of topics with activated adblocker but completely disabling will probably just alienate the visitors.

Re: [3.2][RC] Anti Adblock 1.0.0

Posted: Tue Aug 21, 2018 1:44 pm
by </Solidjeuh>
I agree with Ger. Blocking the whole forum is bad idea. Most visitors will just leave the forum instead of disabling the adblocker. (I'm one of them)

Re: [3.2][RC] Anti Adblock 1.0.2

Posted: Thu Aug 23, 2018 7:25 am
by fagbutlil
I just leave a site that use add's if i want to see the adds i just go to facebook.

Re: [3.2][RC] Anti Adblock 1.0.2

Posted: Thu Aug 23, 2018 8:14 pm
by david63
picaron wrote: Thu Aug 23, 2018 7:57 pm One question: What does a user run away from?
1.- To a website that contains advertising.
2.- To a website that requires payment of a fee to be able to use it.
3.- To a website that is free and has no advertising - which believe it or not is the still the majority of sites.

Re: [3.2][RC] Anti Adblock 1.0.2

Posted: Thu Aug 23, 2018 8:59 pm
by 3Di
it's a nice extension, as long as there is a switch in place.
I personally don't care about an advice if I can get rid of it asap.

Re: [3.2][RC] Anti Adblock 1.0.2

Posted: Mon Aug 27, 2018 1:41 am
by KYPREO
fagbutlil wrote: Thu Aug 23, 2018 7:25 am I just leave a site that use add's if i want to see the adds i just go to facebook.
Well that doesn't make any sense. Facebook runs ads and sponsored posts and through its cornering of the market has reduced the average CPM of banner ads and taken considerable traffic from third party websites like forums, in turn requiring them to run more banner ads and more intrusive kinds of ads to cover hosting costs.

Re: [3.2][RC] Anti Adblock 1.0.3

Posted: Mon Aug 27, 2018 2:19 pm
by donsenilo
Hi

Why is the JavaScript-Warning gone ?

Re: [3.2][RC] Anti Adblock 1.0.3

Posted: Mon Aug 27, 2018 4:39 pm
by donsenilo
picaron wrote: Mon Aug 27, 2018 3:46 pm I do not fully understand your question ... Let's see ... :roll:
The Javascript code is still present in a JS file that is generated dynamically from PHP ... :P
In 1.0.2 there was an option to warn people if they have disabled javascript. But in 1.0.3. its gone.

Re: [3.2][RC] Anti Adblock 1.0.3

Posted: Fri Aug 31, 2018 12:43 pm
by skybound
Any chance it could include which specific forum it is active in? For example, I don't really mind if members block ads for most of our site, but then I do want the message to display in the classifieds (personal sales) forum.

Re: [3.2][RC] Anti Adblock 1.0.4

Posted: Sat Nov 24, 2018 1:36 pm
by ngaia
i have this error, when i try to configure

HTTP 503

Service Unavailable


ReqID: 38153050589156827 • IP: 117.248.161.117 Security by Cachewall

Re: [3.2][RC] Anti Adblock 1.0.4

Posted: Mon Dec 03, 2018 5:00 pm
by RomaamoR
Data entered in the ACP is not saved.
Image

Re: [3.2][RC] Anti Adblock 1.0.4

Posted: Mon Dec 03, 2018 7:22 pm
by RomaamoR
Works. I did not clean the cache.

Re: [3.2][RC] Anti Adblock 1.0.4

Posted: Wed Dec 05, 2018 2:15 am
by CamdenJaxx
Leaving the debate alone, it would be great to assign what usergroups this is shown to. For example, if I have a role for those who have donated, it would be awesome to hide this notice for them. Also, it'd be great to not see this as an administrator of the site as well.

Any chance of adding this feature?

Re: [3.2][RC] Anti Adblock 1.0.4

Posted: Wed Dec 05, 2018 8:28 pm
by CamdenJaxx
I was able to put together a solution for now to alleviate myself from seeing the notice. For anyone wanting to hide this from your moderators and/or administrators, you can make two small file edits to be able to achieve this. Please note that one of these changes adds code to your functions.php file, which will most likely be updated, so these edits will need to be made again if you upgrade your forum software before this functionality is added to the extension itself.
Step 1

Edit: /ext/Picaron/AntiAdblock/styles/all/template/event/overall_header_content_before.html
Find (Near Line 1)

Code: Select all

<!-- IF ANTIADBLOCK_ACTIVE and ANTIADBLOCK_COOKIE and ANTIADBLOCK_MODO > 2 -->
To Hide From Admins Only
Replace With

Code: Select all

<!-- IF ANTIADBLOCK_ACTIVE and ANTIADBLOCK_COOKIE and ANTIADBLOCK_MODO > 2 and S_USER_IS_NOT_A -->
To Hide From Moderators & Admins
Replace With

Code: Select all

<!-- IF ANTIADBLOCK_ACTIVE and ANTIADBLOCK_COOKIE and ANTIADBLOCK_MODO > 2 and S_USER_IS_NOT_M -->
Step 2
Edit: /includes/functions.php

Find (Near Line 4457)

Code: Select all

		'S_USER_LOGGED_IN'		=> ($user->data['user_id'] != ANONYMOUS) ? true : false,
Replace With

Code: Select all

		'S_USER_IS_M'			=> ($auth->acl_get('m_')) ? true : false,
		'S_USER_IS_NOT_M'		=> ($auth->acl_get('m_')) ? false : true,
		'S_USER_IS_A'			=> ($auth->acl_get('a_')) ? true : false,
		'S_USER_IS_NOT_A'		=> ($auth->acl_get('a_')) ? false : true,
		'S_USER_LOGGED_IN'		=> ($user->data['user_id'] != ANONYMOUS) ? true : false,
Now, with any templated files, you can use conditional logic with regards to the user status:
  • S_USER_IS_M
    • User is a Moderator
  • S_USER_IS_NOT_M
    • User is not a Moderator
  • S_USER_IS_A
    • User is an Administrator
  • S_USER_IS_NOT_A
    • User is not an Administrator

Re: [3.2][RC] Anti Adblock 1.0.4

Posted: Thu Dec 06, 2018 12:26 pm
by null2
May I disable this extension for specific groups?