Restricting Custom BBCode for a certain subset of users

Get help developing custom BBCodes or request one.
Post Reply
MathBlade
Registered User
Posts: 5
Joined: Fri Jan 18, 2019 6:15 am

Restricting Custom BBCode for a certain subset of users

Post by MathBlade » Wed Apr 03, 2019 6:54 am

Based on the advice given below:

viewtopic.php?f=438&t=2499561#p15181756

I have made an extension that does what I need it to do, however I need to restrict the permissions of the extension to certain users.

I have an event that handles when to render the given text and functions correctly and I have a reference to the user in question.

My main question is as follows:

How do I access php if the user is a moderator,admin, or has a certain access group? I tried looking it up in the general documentation and couldn't find it. If it's going to be write my own query to the DB that's fine, I'd just rather do the best practices.

User avatar
david63
Registered User
Posts: 16196
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: Restricting Custom BBCode for a certain subset of users

Post by david63 » Wed Apr 03, 2019 6:57 am

Look at the Advanced BBCode extension - that allows BBCodes for groups.
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

MathBlade
Registered User
Posts: 5
Joined: Fri Jan 18, 2019 6:15 am

Re: Restricting Custom BBCode for a certain subset of users

Post by MathBlade » Wed Apr 03, 2019 7:07 am

Thank you! Is the source code readily available? I'm doing this for another group of people and I'd rather not have to add multiple extensions unless needed, because I'd have to convince them.

User avatar
david63
Registered User
Posts: 16196
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: Restricting Custom BBCode for a certain subset of users

Post by david63 » Wed Apr 03, 2019 7:36 am

MathBlade wrote:
Wed Apr 03, 2019 7:07 am
Thank you! Is the source code readily available? I'm doing this for another group of people and I'd rather not have to add multiple extensions unless needed, because I'd have to convince them.
https://www.phpbb.com/customise/db/exte ... bcode_box/
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

MathBlade
Registered User
Posts: 5
Joined: Fri Jan 18, 2019 6:15 am

Re: Restricting Custom BBCode for a certain subset of users

Post by MathBlade » Thu Apr 04, 2019 1:34 am

Thank you very much!

Post Reply

Return to “Custom BBCode Development and Requests”