[RFC] Permissions for custom BBCodes

Note: We are moving the topics of this forum and it will be deleted at some point

Publish your own request for comments/change or patches for the next version of phpBB. Discuss the contributions and proposals of others. Upcoming releases are 3.2/Rhea and 3.3.
Post Reply
poppertom69
Registered User
Posts: 8
Joined: Mon Jan 07, 2008 12:32 pm

[RFC] Permissions for custom BBCodes

Post by poppertom69 »

Description
I believe that phpBB should have the ability to set permissions for who can use custom bbcodes. This would be very useful because you can have certain bbcodes for admins/moderators etc. This would also mean you could hide bbcodes to logged in users, as you could have permissions for viewing and using etc.

Pros
  • More control on what content can be displayed in posts
  • Can hide comments for moderators/admins
  • Saves heavy modding by authors to achieve hiding content from guests etc
Cons
  • Alot of code change to get this to work
  • Alot of new permissions would be added - may get confussing
Proposal
To make this less confussing I would suggest being able to assign bbcodes into groups e.g.
  1. Create a bbcode group called 'Admins'
  2. Add the bbcodes into this group that the admins will be able to use
  3. Then in the permissions system you have an option 'Can use bbcode group Admins' and 'Can view bbcode group Admins'
  4. When posting only the bbcodes you can use display in the posting area
  5. If you try to use a bbcode you do not have permission to use it removes the tags from the post and just puts the text.
If a user/group can use more than one bbcode group, it needs to make sure there is no duplicated bbcodes and only display unique one.

Usability
A way to stop people getting confussed as to why their bbcode isn't showing, would be if a bbcode isn't assigned into a group it will automatically show on the posting page, this means if people don't want to use this system it still works the old way.

I did have a working copy of something like this ages ago so I know it is possible, I think this would be a very useful feature to be added as it would be use by a lot of people.
Last edited by poppertom69 on Sat May 15, 2010 9:10 am, edited 1 time in total.

keith10456
Registered User
Posts: 523
Joined: Sat Apr 22, 2006 10:29 pm
Contact:

Re: [RFC] Permissions for custom BBCodes

Post by keith10456 »

I like the idea :)

There could be an argument about a Group having Permission to use a bbcode, make a number of posts, then an Admin remove the Permission from their Group... The posts that they made will still have the content with the code in the posts.

I'm not a coder but one would think having the system remove the code from the posts once the Permission is changed is not a good idea.

Then again, it can be made so all previous posts will remain as is. I could live with that.

If this (the bbcode Permissions) is implemented, I think it would need to be done in the simplest way possible.

For example, no Permission options on the default bbcodes. Also, by default, all custom bbcodes be set to "enabled" for All (Admins, Moderators, Registered Users, etc.). If they choose to, the Admins could then disable the custom bbcode for specified Groups. This will prevent the Permissions system from being unnecessarily over-complicated... And prevent unnecessary Support posts at phpBB.

poppertom69
Registered User
Posts: 8
Joined: Mon Jan 07, 2008 12:32 pm

Re: [RFC] Permissions for custom BBCodes

Post by poppertom69 »

keith10456 wrote: I'm not a coder but one would think having the system remove the code from the posts once the Permission is changed is not a good idea.

Then again, it can be made so all previous posts will remain as is. I could live with that.
I think once the post has been made it should be left as is even if they don't have permissions to use that code anymore! This means no content would be lost
keith10456 wrote: For example, no Permission options on the default bbcodes. Also, by default, all custom bbcodes be set to "enabled" for All (Admins, Moderators, Registered Users, etc.). If they choose to, the Admins could then disable the custom bbcode for specified Groups. This will prevent the Permissions system from being unnecessarily over-complicated... And prevent unnecessary Support posts at phpBB.
I agree all standard bbcodes are left alone, this should only apply to custom ones.

By default the code should be enabled for everyone and it is only when it has been added to a 'bbcode group' that it is removed from everyone and only viewable by people with permission to view that group! This would mean that the system still works exactly like it does at the moment you just have an advanced option to stop people using it!

keith10456
Registered User
Posts: 523
Joined: Sat Apr 22, 2006 10:29 pm
Contact:

Re: [RFC] Permissions for custom BBCodes

Post by keith10456 »

poppertom69 wrote:
keith10456 wrote: I'm not a coder but one would think having the system remove the code from the posts once the Permission is changed is not a good idea.

Then again, it can be made so all previous posts will remain as is. I could live with that.
I think once the post has been made it should be left as is even if they don't have permissions to use that code anymore! This means no content would be lost
My point exactly ;)

poppertom69 wrote:This would mean that the system still works exactly like it does at the moment you just have an advanced option to stop people using it!
Ditto :)

FeyFre
Registered User
Posts: 29
Joined: Wed Mar 17, 2010 9:49 pm

Re: [RFC] Permissions for custom BBCodes

Post by FeyFre »

poppertom69 wrote:I think once the post has been made it should be left as is even if they don't have permissions to use that code anymore! This means no content would be lost
keith10456 wrote:My point exactly
And my too.
But I see another issue.
  1. User made post and used there BBCodes he have rights to use(potentially it is possible, for instance Founder probably will have full BBCodes permissions)
  2. Moderator moderates post (i.e edits it) but he do not have rights to use BBCodes used in post by poster.
So what behaviour of phpbb should be in such situation acceptable?
  • Moderator should not be able to edit this post?
    This is nonsense.
  • Moderator should be able to edit post, and not allowed for Moderator BBCodes will not be parsed.
    Poster will protest, and will be right.(Simple rule: do not change what you cannot revert to original state)
  • Moderator should be able to edit post, and not allowed for Moderator BBCodes will be parsed too if they allowed to user.
    It is probably unacceptable too(ha-ha, sharing permission trick)
And what about locations which have not particular author?(For instance Forum description fields. One Admin have rights to use BBCode, other have not it).

Post Reply