BBCode Permissions

Started by Sesquipedalian, November 21, 2021, 10:50:07 PM

Previous topic - Next topic

Sesquipedalian

Link to the mod

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:
  • Hides editor buttons for disallowed BBCodes

Version 1.0:
  • Initial release
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

Mick.

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.

Sesquipedalian

Thanks, Mick. I'll fix that and post an update as soon as I can.
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

Sesquipedalian

I've just uploaded v1.1 to fix that bug.
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

Mick.

Yay! That's the ticket!  :P

All's good. Very very very useful mod.

Sesquipedalian

Excellent. Glad you like it. :)
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

Mick.


Shades.

ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Dream of Omnimaga

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.

Sesquipedalian

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.
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

Advertisement: