Page 2 of 2

Re: [3.2][RC] Anti Adblock 1.0.4

Posted: Thu Dec 06, 2018 4:05 pm
by CamdenJaxx
null2 wrote:
Thu Dec 06, 2018 12:26 pm
May I disable this extension for specific groups?
Using a similar method to the one I mentioned above, you can accomplish this.
Step 1
Edit: /includes/functions.php

Find (Near Line 4389)

Code: Select all

	$notification_mark_hash = generate_link_hash('mark_all_notifications_read');
Add Below

Code: Select all

        if ( !function_exists('group_memberships') )
        {
            include($phpbb_root_path . 'includes/functions_user.'.$phpEx);
        }
        $groups = group_memberships(false,$user->data['user_id']);
        foreach ($groups as $grouprec)
        {
            $template->assign_vars(array(
            'S_GROUP_' . $grouprec['group_id'] => true
            ));
        }
* Credit for code goes solely to RMcGirr83.
Step 2
To find the group number you'll use in the next step:
  • Navigate to your ACP and then to the Users & Groups tab » Manage Groups » and go to the Settings link for the group(s) you're wanting to use.
  • The last number of the URL of the settings page for that group is your group number. (Ex: my.website/adm/index.php?i=acp_groups&sid=1234567890123456789012345678901&icat=1&mode=manage&action=edit&g=5)
  • This tells me the group ID I need to use is 5, which would mean I would use S_GROUP_5 in the code & example below.
Step 3
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 -->
Replace With*

Code: Select all

<!-- IF ANTIADBLOCK_ACTIVE and ANTIADBLOCK_COOKIE and ANTIADBLOCK_MODO > 2 and S_GROUP_X -->
* Please note that you will need to change the X in S_GROUP_X to a group number. For example: S_GROUP_5
Now the below conditional logic statements can be added to your templated files:
  • Show Only To Group X
    • <!-- IF S_GROUP_X --> Code To Show <!-- ENDIF -->
  • Show To Group X Or Y
    • <!-- IF S_GROUP_X or S_GROUP_Y --> Code To Show <!-- ENDIF -->
  • Hide From Group X
    • <!-- IF not S_GROUP_X --> Code To Hide <!-- ENDIF -->
  • Hide From Group X And Y
    • <!-- IF not S_GROUP_X and S_GROUP_Y --> Code To Hide <!-- ENDIF -->
It's good to point out that if you'd like to combine the logic from this post as well as my last, you should be able to use something similar to the following:
  • Show Only To Group X But Not If They Are A Moderator
    • <!-- IF S_GROUP_X and S_USER_IS_NOT_M -->
  • Show Only To Group X Or Group Y But Not If They Are Not An Administrator
    • <!-- IF S_GROUP_X or S_GROUP_Y and S_USER_IS_NOT_A -->

Re: [3.2][RC] Anti Adblock 1.0.4

Posted: Sat Jan 05, 2019 2:23 pm
by ngaia
picaron wrote:
Sun Dec 02, 2018 8:57 pm
ngaia, I'm sorry, I do not understand what that error is and I can not recreate it. :cry:
It seems to be a cachewall error...
i just found out that, the ext doesnt work on phpversion 7.1

how to make warning text to RED, and also can i use html in message box?

Re: [3.2][RC] Anti Adblock 1.0.5

Posted: Sat Apr 13, 2019 2:19 pm
by skybound
Any chance of extending this mod to allow a forum owner to block access to only selected certain forums if the visitor is using an ad blocker?

Re: [3.2][RC] Anti Adblock 1.0.5

Posted: Thu Apr 25, 2019 11:54 am
by skybound
Excellent. Have tested and works a treat. Thanks picaron. :D

Re: [3.2][RC] Anti Adblock 1.0.5

Posted: Sun Jun 09, 2019 1:24 pm
by chuppito
Hello I installed it and configured it on a forum 3.2.7.
The problem is that when I try with a test account, I have no messages...
Is there a translation of the extension into French? Once I have misconfigured this one
Thank youThank you

Re: [3.2][RC] Anti Adblock 1.0.5

Posted: Mon Jun 10, 2019 1:51 pm
by null2
chuppito wrote:
Sun Jun 09, 2019 1:24 pm
Hello I installed it and configured it on a forum 3.2.7.
The problem is that when I try with a test account, I have no messages...
Is there a translation of the extension into French? Once I have misconfigured this one
Thank youThank you
You may translate messages to any language in ACP/EXTENSIONS/ANTI ADBLOCK

Re: [3.2][RC] Anti Adblock 1.0.5

Posted: Mon Jun 10, 2019 1:55 pm
by chuppito
Hello, I translated the application and after contact with the developer, it updated the application. I gave him my translation he should put it in the new version. The problem is solved the extension works nowHello, I translated the application and after contact with the developer, it updated the application. I gave him my translation he should put it in the new version. The problem is solved the extension works now

Re: [3.2][RC] Anti Adblock 1.0.5

Posted: Mon Jun 10, 2019 2:04 pm
by null2
My forum has more than 400 subforuns and its hard to set permission to each one. So, to show antiblock message in all of them I changed file ext/Picaron/AntiAdblock/event/listener.php (line 151 in version 1.0.5):

Code: Select all

        // SHOW warning in forums with permission
        $forum_id =  (int) $this->request->variable('f', '');
        //if ($forum_id > 0) { ($this->auth->acl_get('f_show_antiadblock', $forum_id)) ? '': $show = false; }
I just commented last line and voilá!

Re: [3.2][RC] Anti Adblock 1.2.0

Posted: Tue Jun 11, 2019 4:14 pm
by stormo
Thank you. This extension works well. I particularly like the customization options.

Re: [ABD] Anti Adblock 1.2.0

Posted: Sat Jun 29, 2019 6:27 pm
by DavidIQ
This topic has been marked as [ABD] - Abandoned as the extension author has not been active recently. If the extension author wishes to continue development, please PM anyone on the Extension Customisations Team to request this topic be unlocked.

Notice!
We do not recommend that a user of the phpBB software install this extension, or any other extension that is marked as "abandoned" or "in development", on a live forum. Doing so may cause your forum to not perform in the manner it should.


Thank you,
The phpBB Extension Customisations Team