BbCodes & Buttons Manager

BbCodes & Buttons Manager 3.3.5

No permission to download
cclaerhout updated BbCodes & Buttons Manager with a new update entry:

Version 2.8.2 released

Version 2.8.2 released
  • Add a Xon tweak that speeds up the tags map creation (used for tag permissions) from 200ms to 2ms according his own tests - A big thank to him. This tweak has been submitted 1 month ago, but since it is related to one sensitive code section I just wanted to test it longer
  • Add an option to strip not only tags but also their content in the
    fast thread preview; to allow this feature the "eradicator" formatter has been extended - Thanks to...

Read the rest of this update entry...
 
I was playing around with the new button manager tonight Cedric and it looks fantastic. Excellent work as always. Question for you - if I use the solo spoiler button, is there a way to change the icon from the flag?
 
I was playing around with the new button manager tonight Cedric and it looks fantastic. Excellent work as always. Question for you - if I use the solo spoiler button, is there a way to change the icon from the flag?
Just add this to your extra css template:
Code:
html body .redactor_toolbar li a.redactor_btn_insertspoiler{
   background-position: 3px -1565px;
}
OR if you don't mind using "!important"
Code:
html .redactor_toolbar li a.redactor_btn_insertspoiler{
   background-position: 3px -1565px !important;
}

In this line, you just need to update the second position value (-1565px) to select another icon from the XenForo sprite. If you want to get that number easily, just start to create a Bbm Bb Code to use the "Redactor Sprite Helper".
helper.webp
 
cclaerhout updated BbCodes & Buttons Manager with a new update entry:

Version 2.8.3 released

Version 2.8.3 released
  • Improve xml security on XenForo installations that have been updated with the Zend xml tester.
    To be clear: there was only a risk if you imported a malicious BbCode xml. So if you download files from authenticated developers, it's not a problem. If you didn't have updated to the last XenForo patched versions, this xml Bbm BbCodes importation will still work

  • The tags map is now compatible with the preCacheBase system: the tags incremention...

Read the rest of this update entry...
 
This mod causes a conflict in VaultWiki. VaultWiki has its own custom BB-Codes with callbacks like so:
Code:
array($callback_class_object, $callback_method)
In library/BBM/BbCode/Formatter/Base.php, there is this line:
Code:
        if(isset($tagInfo['callback'][0]))
        {
            $tagInfo['callback'][0] = '';//Not needed for info (recursive)
        }
That causes the callback handlers for VaultWiki's BB-Codes to be blanked out, and none of VaultWiki's BB-Codes can parse while BBM is enabled.
 
This mod causes a conflict in VaultWiki. VaultWiki has its own custom BB-Codes with callbacks like so:
Code:
array($callback_class_object, $callback_method)
In library/BBM/BbCode/Formatter/Base.php, there is this line:
Code:
        if(isset($tagInfo['callback'][0]))
        {
            $tagInfo['callback'][0] = '';//Not needed for info (recursive)
        }
That causes the callback handlers for VaultWiki's BB-Codes to be blanked out, and none of VaultWiki's BB-Codes can parse while BBM is enabled.
Thank you for reporting this and taking the time to look into my problem, hopefully @cclaerhout can come up with a way so both add-on play nice with each other :)
 
Last edited:
@pegasus
Are you sure of you? The tagInfo, which is originally a simple array, is not passed by reference so any modification done in that "_createCurrentTag" function should not impact the original data, unless some other Bbm functions are used (the ones using the function "bbmGetCurrentTag()": add/remove wrapper & add/get extra information in the view), but with them I don't think this callback info would be needed.
 
In this case, offset 0 was originally set as a reference to the original object instance that acts as the BB-Code handler for VaultWiki tags. By setting offset 0 = to an empty string, you are changing the original object instance to an empty string.

If that doesn't seem to make sense as an explanation, regardless I am sure that this line is the problem. Commenting the line makes VaultWiki work as expected.

The comments say that you are doing this to avoid creating a recursive object. This should not matter, since in PHP 5, all "copies" of the same instance actually point to the same memory space -- having another copy doesn't use any more memory than the empty value you set it to. Hence, changing 1 (even if not a reference) changes them all. Therefore, I don't think you need to set it empty at all, or you are just asking for trouble whenever the offset refers to an object.
 
Last edited:
I have also an issue.
With your addon some buttons disappears from editor.

with bbm.webp

Without it looks like this.

without bbm.webp

I don`t care about the floating buttons.
But the Button from xenmedia gallery is important for my forum.

I run Xenforo 1.3.4
Mediagallery 2.1.5
Before BBM 2.8.2 after this happened i update to 2.8.3 but doesn`t change.
 
In this case, offset 0 was originally set as a reference to the original object instance that acts as the BB-Code handler for VaultWiki tags. By setting offset 0 = to an empty string, you are changing the original object instance to an empty string.

If that doesn't seem to make sense as an explanation, regardless I am sure that this line is the problem. Commenting the line makes VaultWiki work as expected.

The comments say that you are doing this to avoid creating a recursive object. This should not matter, since in PHP 5, all "copies" of the same instance actually point to the same memory space -- having another copy doesn't use any more memory than the empty value you set it to. Hence, changing 1 (even if not a reference) changes them all. Therefore, I don't think you need to set it empty at all, or you are just asking for trouble whenever the offset refers to an object.
Thanks a lot for your explanations and your time. I will fix this in the next release.
@teletubbi
I've tried in the past with other addons that added buttons to the editor using the default framework and it was working. I'm going to check again.

Edit: I've only integrated the manual way that developers use to add buttons, not the automatic one by the XenForo Custom Bb Codes. I will fix this.
 
Last edited:
Thanks for amazing AddOn, but when I install it, then import some default bbcode (in extra folder). But still cannot use that bbcode, any setting need be set?
 
@teletubbi
The 2.9 version will fix this. A lot of code (a lot php & all the JavaScript) of the buttons manager have been rewritten. A new feature will allow admins to use the buttons manager to position directly the XenForo Custom Bb Codes in the XenForo Redactor editor. This will override their button default position.
 

Attachments

  • custpos.webp
    custpos.webp
    40 KB · Views: 6
  • custpos2.webp
    custpos2.webp
    5.5 KB · Views: 6
Why doesn't the BBCode Manager support HTML Replacement when creating a Custom BBCode, like the default xenForo option offers?

Default xenForo option:
Screenshot_23-26-02.png


Your plugin:
Screenshot_23-26-44.png
 
Top Bottom