[RFC] BBCode permissions and moving to all custom

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.
User avatar
brunoais
Registered User
Posts: 958
Joined: Fri Dec 18, 2009 3:55 pm

Re: [RFC] BBCode permissions and moving to all custom

Post by brunoais » Fri Dec 07, 2012 3:15 pm

What do you mean by unique ID variables?
I don't understand the problem you are describing.

User avatar
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

Re: [RFC] BBCode permissions and moving to all custom

Post by imkingdavid » Fri Dec 07, 2012 4:08 pm

Probably he wants each bbcode to be wrapped in a tag that supports the id attribute, and each bbcode should get a unique id value.
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.

User avatar
brunoais
Registered User
Posts: 958
Joined: Fri Dec 18, 2009 3:55 pm

Re: [RFC] BBCode permissions and moving to all custom

Post by brunoais » Fri Dec 07, 2012 4:12 pm

If he wants that, then he can do it himself. The way I'm developing the parser, changing how each BBcode is parsed is a trivial task

ecwpa
Registered User
Posts: 181
Joined: Mon Jan 24, 2005 2:10 am
Contact:

Re: [RFC] BBCode permissions and moving to all custom

Post by ecwpa » Fri Dec 07, 2012 4:13 pm

Exactly that. I wanted to use a carousel library but it requires an unique ID to work, if there're more than 1 bbcodes it won't work.

As far as I know bbcodes have ID internally, all I need is to be able to use them.

Edit:
If he wants that, then he can do it himself.
Really? How?
Slightly better English than it was in 2005, still improving :D

User avatar
brunoais
Registered User
Posts: 958
Joined: Fri Dec 18, 2009 3:55 pm

Re: [RFC] BBCode permissions and moving to all custom

Post by brunoais » Fri Dec 07, 2012 4:24 pm

By changing all the parse classes such that they all inject extra attributes in the resulting HTML.
The way I'm making this, it should be trivial.

ecwpa
Registered User
Posts: 181
Joined: Mon Jan 24, 2005 2:10 am
Contact:

Re: [RFC] BBCode permissions and moving to all custom

Post by ecwpa » Fri Dec 07, 2012 5:19 pm

Are you talking about altering phpBB's code? how's that trivial?

The point of a RFC like that is exactly not doing that.
Slightly better English than it was in 2005, still improving :D

User avatar
VSE
Extension Customisations
Extension Customisations
Posts: 670
Joined: Mon Mar 08, 2010 9:18 am

Re: [RFC] BBCode permissions and moving to all custom

Post by VSE » Fri Dec 07, 2012 5:30 pm

To the point of the OP, I don't think permissions need to be expanded to all BBcodes - does anybody really need to restrict anybody from using bold, italics, quotes or lists? The current flash and img bbcode permissions seem adequate enough to me.

However, I really do think that Custom BBcodes should have a Group assignments option. Because the custom bbcodes are where lots of Admins add bbcodes with abilities they may only want certain users to have. The ability to assign a custom bbcode to specific user groups only would be really nice.
Has an irascible disposition.

User avatar
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

Re: [RFC] BBCode permissions and moving to all custom

Post by imkingdavid » Fri Dec 07, 2012 5:37 pm

VSE+ wrote:To the point of the OP, I don't think permissions need to be expanded to all BBcodes - does anybody really need to restrict anybody from using bold, italics, quotes or lists? The current flash and img bbcode permissions seem adequate enough to me.
I don't think it would hurt to allow permissions to be set for all BBCodes. After all, if all BBCodes are made to be custom BBCodes, there would be no nice way to programmatically determine which BBCodes are supplied natively and which are user-created.
VSE+ wrote:However, I really do think that Custom BBcodes should have a Group assignments option. Because the custom bbcodes are where lots of Admins add bbcodes with abilities they may only want certain users to have. The ability to assign a custom bbcode to specific user groups only would be really nice.
We do need to tackle the issue of whether to or not to apply a restricted BBCode when a post is quoted. Because a quote is not actually tied to a user with anything more than a username, and it is impossible to tell if that user actually said those words exactly, users could circumvent BBCode permissions by simply quoting and using an authorized user's username. I suppose an acceptable solution would be to replace any restricted bbcodes with something like [Restricted content removed] or something.
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.

User avatar
EXreaction
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Re: [RFC] BBCode permissions and moving to all custom

Post by EXreaction » Fri Dec 07, 2012 5:50 pm

ecwpa wrote:Exactly that. I wanted to use a carousel library but it requires an unique ID to work, if there're more than 1 bbcodes it won't work.

As far as I know bbcodes have ID internally, all I need is to be able to use them.
Could you explain what you mean by a Unique ID a bit more, perhaps with an example? It is very possible that everyone here is assuming you mean something different than you actually do, so if we know exactly what you mean we can better help. :)

Do you mean something like:
[a id=1]


[b id=2]

Or unique per instance like:
[a id=1]
[b id=2]
[c id=3]
[b id=4]

If you mean the first example, you should already be able to do that with custom bbcodes. While you can't assign "id" because it is unique per page as per html rules, I believe you should be able to achieve the same results using class and/or the data attributes to the output. If not, could you perhaps explain more about the situation?

ecwpa
Registered User
Posts: 181
Joined: Mon Jan 24, 2005 2:10 am
Contact:

Re: [RFC] BBCode permissions and moving to all custom

Post by ecwpa » Fri Dec 07, 2012 6:19 pm

You're right, I probabbly didn't make myself clear. Yes, I mean something like the second example.

For example, let's say a div:

Code: Select all

[div=1]content[/div]
Which could output something like:

Code: Select all

<div id="1">content</div>
With this I can use "1" as div ID to trigger an event with javascript.

Now, what if I want to insert another div inside the same post?

Code: Select all

[div=1]content[/div]
[div=2]content[/div]
I just can't do that right now, if there's a method please just link me to the documentation, I don't want to derail the thread.
Slightly better English than it was in 2005, still improving :D

Post Reply