The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Editing BBCode for CP compliance
I have added several BBCODES that will resize an image, play media or display other things such as youtubes, etc...
Additionaly I have users that use the settings in the Control Panel that disable pictures because they are at work or customer sites and dont want them displayed on customer/employer computers. They have asked if there was a way to make all the custom bbcodes comply with the control panel settings. What is the best approach for "fixing" this shortcoming. I guess this might also be a good request to change VB to have a check box in the ADD BBCODE to force compliance. Can this be coded in the REPLACEMENT code section of the bbcode or would I have to go deeper? Thanks for your help. If there is already a solution, please point me towards it. A previous search yielded nothing. |
#2
|
||||
|
||||
This can't be done in the Replacement for the BB Code. Nothing can be in the replacement other than HTML code. PHP or conditionals just don't work.
I actually have a system like this on my forum. I have an "article" bb code that embeds an article into an IFRAME and displays it in a post. I have a custom profile field where users can disable the iframe if they choose. My "solution" was a plugin on postbit_display_complete. It does a string replace (or preg_replace) on the "Replacement" text of the BB Code... The variable is $post['message'] This holds the HTML of the post. So remember you're not searching for "[B]" but "<b>." It is an annoying and convoluted way of doing things but it works. Also besides postbit you also have to scan for the "preview" and the "review" bits as well since the post might be rendered on those pages too. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|