Warning: The author of this contribution does not provide support for it anymore.

Advanced BBCode Box 3

ABBC3: Hidden bbcode tag, set which groups can see? - Advanced BBCode Box 3

ABBC3: Hidden bbcode tag, set which groups can see?

by spyrule » Wed Dec 19, 2012 12:17 am

Hello,

I just finished setting up ABBC3 on a phpbb 3.0.11 forum, and I'm wondering if there is a way to set the "Hidden" bbcode option to only be visible to groups that I specify.

Now, I know I can limit who can APPLY the hidden bbcode (currently, admin/mods only), however I would like to limit who can actually SEE the content to only certain groups within the forum, not just all registered users.

Is this possible?
I'll headbutt your knuckles and beat your foot with my ass!
spyrule
Registered User
Posts: 22
Joined: Sat Apr 30, 2005 1:34 pm
Location: Ottawa , Canada
Contact:

Re: ABBC3: Hidden bbcode tag, set which groups can see?

by VSE » Sat Dec 22, 2012 7:25 pm

For the record, I will say no.

But yes, you can do it. However, it is an ugly manual hack and will not respond well to any future changes you may make to your user groups, without going back into the code and hacking it again...and of course you will lose the hack if you ever update ABBC3 in the future, and will have to redo the hack each time you upgrade.

Having said all that, this is what you can do if you are willing and it means that much to you:

Go to your ACP Users and Groups tab and click on Manage Groups.
Click the Settings link for each group you want to be allowed to see the hidden tags. In the URL of the settings page, at the very end should be something like g=X where X is the number for that group. Write down the numbers of each group you want to be allowed to see hidden bbcode content.

Now open up includes/abbcode.php

Find:

Code: Select all

if ($user->data['user_id'] == ANONYMOUS || $user->data['is_bot'])


Replace with:

Code: Select all

if ( $user->data['user_id'] == ANONYMOUS || $user->data['is_bot'] || !in_array($user->data['group_id'], array(1, 2, 3)) )
Note: the 1, 2, 3 at the end MUST be replaced by the group numbers you wrote down

Then you will probably want to go into the language/abbcode.php file and change the line This board requires you to be registered and logged-in to view hidden content. to something more appropriate for your use of this tag.
Dictated but not read.
Official phpBB Extensions My Extensions & MODs
Please do not PM me for support.
User avatar
VSE
Extensions Development Coordinator
Extensions Development Coordinator
Posts: 4739
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman
Contact:

Re: ABBC3: Hidden bbcode tag, set which groups can see?

by spyrule » Sat Dec 22, 2012 10:36 pm

Awesome, TYVM for the info.

Any chance this type of option will ever make it into a future build ?
I'll headbutt your knuckles and beat your foot with my ass!
spyrule
Registered User
Posts: 22
Joined: Sat Apr 30, 2005 1:34 pm
Location: Ottawa , Canada
Contact:

Re: ABBC3: Hidden bbcode tag, set which groups can see?

by VSE » Sat Dec 22, 2012 11:51 pm

spyrule wrote:Awesome, TYVM for the info.

Any chance this type of option will ever make it into a future build ?


Probably not. phpBB has Forum permissions that allow you to create whole forum sections only select group members can enter and view and read and post in, for this purpose.
Dictated but not read.
Official phpBB Extensions My Extensions & MODs
Please do not PM me for support.
User avatar
VSE
Extensions Development Coordinator
Extensions Development Coordinator
Posts: 4739
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman
Contact:

Re: ABBC3: Hidden bbcode tag, set which groups can see?

by Jettins33 » Thu Apr 25, 2013 8:46 pm

Ok, this is a simple question.

I am using the tag:

Hide content from unregistered users: [hidden]hide this[/hidden]

I would like to know if registered bots have default access to this content, if not how do I enable so that bots can read it?

Thanks! :D
Jettins33
Registered User
Posts: 6
Joined: Wed Mar 06, 2013 1:30 pm
Contact:

Re: ABBC3: Hidden bbcode tag, set which groups can see?

by VSE » Fri Apr 26, 2013 4:35 pm

Technically, bots are registered users, so I would assume so.
Dictated but not read.
Official phpBB Extensions My Extensions & MODs
Please do not PM me for support.
User avatar
VSE
Extensions Development Coordinator
Extensions Development Coordinator
Posts: 4739
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman
Contact: