Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Sesquipedalian on November 21, 2021, 10:50:07 PM

Title: BBCode Permissions
Post by: Sesquipedalian on November 21, 2021, 10:50:07 PM
Link to the mod (https://custom.simplemachines.org/index.php?mod=4299)

BBCode Permissions

A modification for SMF 2.1 that allows the admin to set permissions for BBCodes. Any standard or custom BBCodes can be given permissions using this mod.


Settings

There are two settings to control BBCode permissions.

First, the "Restricted BBC" setting allows you to control which BBCodes will require permission to use and which will not.

Then, a separate setting is created for each restricted BBCode that allows you to set the permissions for that BBCode.


Limitations

This modification cannot be used to remove restrictions from BBCodes that already have them. For example, the html BBCode is always restricted by SMF itself, and this modification does not change that.


License

BBCode Permissions, © 2021 Jon Stovell, is released under the MIT License. A full copy of this license is included in the package file.


Changelog

Version 1.1:

Version 1.0:
Title: Re: BBCode Permissions
Post by: Mick. on January 31, 2022, 06:54:50 PM
About time this mod became available. Just dloaded it to test since I have custom bbc codes for me (admin).

One issue found...

No permissions given, the user still sees bbc codes in the post editor. When using it, it displays the code like this, [example]example[/example]. Without the output.

Permissions given, using same bbc code, then it displays the intended output.

Yup, they're restricted.  Just a heads up.
Title: Re: BBCode Permissions
Post by: Sesquipedalian on January 31, 2022, 07:51:50 PM
Thanks, Mick. I'll fix that and post an update as soon as I can.
Title: Re: BBCode Permissions
Post by: Sesquipedalian on January 31, 2022, 09:34:10 PM
I've just uploaded v1.1 to fix that bug.
Title: Re: BBCode Permissions
Post by: Mick. on January 31, 2022, 09:50:35 PM
Yay! That's the ticket!  :P

All's good. Very very very useful mod.
Title: Re: BBCode Permissions
Post by: Sesquipedalian on January 31, 2022, 10:05:11 PM
Excellent. Glad you like it. :)
Title: Re: BBCode Permissions
Post by: Mick. on January 31, 2022, 10:06:04 PM
Quote from: Sesquipedalian on January 31, 2022, 10:05:11 PMExcellent. Glad you like it. :)
We been asking for this for years lol
Title: Re: BBCode Permissions
Post by: Shades. on February 01, 2022, 01:11:49 PM
Awesome! 8)
Title: Re: BBCode Permissions
Post by: Dream of Omnimaga on March 02, 2022, 05:44:19 AM
There is a bug with the url tag: When the user posts a website link without the URL tag it still gets parsed as a link even with url disabled for that usergroup.
Title: Re: BBCode Permissions
Post by: Sesquipedalian on March 02, 2022, 12:22:20 PM
It sounds like you have the "Automatically link posted URLs" setting enabled. If that setting is enabled, then all URLs that are not contained within BBCode tags will be automatically linked, even if the url and iurl BBCodes are restricted or disabled. So if you want to restrict access to the url and iurl BBCodes, you should also disable that setting.