Lack of interest Expose content context to the Custom BB Code callbacks

This suggestion has been closed automatically because it did not receive enough votes over an extended period of time. If you wish to see this, please search for an open suggestion and, if you don't find any, post a new one.

DragonByte Tech

Well-known member
I'm creating a plugin that needs a PHP callback that depends on knowing the context of the BB Code, e.g. whether it's in a post, a signature, or some other content type another mod has created.

As far as I can tell, there's no way to actually discern the context reliably. I can guess the thread based on the view parameter, but I can't actually tell which content_type and content_id this BB Code is being parsed in.

I can work around this issue just now by creating a new DB table, parsing the content of the BB Code in DiscussionMessage_post::messagePostSave() and saving the md5 value of the BB Code contents in said table, then compare the parsed BB Code tag contents on thread view to the stored value in the DB table.

The fact that that explanation barely made sense to me, the guy who programmed it 5 minutes ago, should serve as an indication why this is needed.
 
Last edited:
Upvote 0
This suggestion has been closed. Votes are no longer accepted.
I don't disagree. Just wanted to note this limitation isn't currently exclusive to custom bb code. The core bb code system isn't context aware either.
 
Back
Top Bottom