BbCodes & Buttons Manager

BbCodes & Buttons Manager 3.3.5

No permission to download
I just downloaded version 2.1.0 of the bbcode manager, but I'm having issues with the button manager in Chrome. When I first load the page it looks okay. But as soon as I hover over the area holding the unused bbcodes, the button layout jumps to hover over the unused bbcodes and to the right. If my mouse leaves the unused bbcode area, then the button layout vanishes entirely.

Tested it in Firefox (22), and it works fine there.
Working for me. Can't reproduce the problem.
the "disable autolink" doesn't seem to work..

the post make by spammer still show the hyperlink..

Stop AutoLinking: set disable autolinking...
in the highlighter

what did do wrongly?
There's a misunderstanding. The stop autolinking function only works in the bbcodes where the function has been enabled. But it doesn't prevent the XenForo autolinking in a message.

When adding the spoiler to the Redactor bar, the button picture is sort of a three line looking thing and you can't really tell what the hell it is. Any way to fix that?
That's the normal behaviour. You must use css to set a new button and align it. I think there's a explanation a few posts above.

Forgot to ask - is it necessary to have Tiny MCE 4 installed if you just want to work within Redactor?
No.

Right, but if we've selected the 'Text' button option, why does that appear? I tried the H2 demo and that has the same button, even though it is set up as a text button.
The Text Button is a MCE4 option.
 
@cclaerhout have you been able to look at the errors I'm getting? Any chance you might lead me to the proper way of fixing them?

I am receiving a lot of those errors lately:

Code:
Error Info
ErrorException: Array to string conversion - library/BBM/BbCode/Formatter/Base.php:344
Generated By: Unknown Account, 13 minutes ago
Stack Trace
#0 /home/site/public_html/library/BBM/BbCode/Formatter/Base.php(344): XenForo_Application::handlePhpError(8, 'Array to string...', '/home/site...', 344, Array)
#1 [internal function]: BBM_BbCode_Formatter_Base->replacementMethodRenderer(Array, Array, Object(BBM_BbCode_Formatter_Base))
#2 /home/site/public_html/library/XenForo/BbCode/Formatter/Base.php(646): call_user_func(Array, Array, Array, Object(BBM_BbCode_Formatter_Base))
#3 /home/site/public_html/library/BBM/BbCode/Formatter/Base.php(546): XenForo_BbCode_Formatter_Base->renderValidTag(Array, Array, Array)
#4 /home/site/public_html/library/XenForo/BbCode/Formatter/Base.php(557): BBM_BbCode_Formatter_Base->renderValidTag(Array, Array, Array)
#5 /home/site/public_html/library/XenForo/BbCode/Formatter/Base.php(481): XenForo_BbCode_Formatter_Base->renderTag(Array, Array, 0)
#6 /home/site/public_html/library/XenForo/BbCode/Formatter/Base.php(462): XenForo_BbCode_Formatter_Base->renderTreeElement(Array, Array, 0)
#7 /home/site/public_html/library/XenForo/BbCode/Formatter/Base.php(442): XenForo_BbCode_Formatter_Base->renderSubTree(Array, Array)
#8 /home/site/public_html/library/XenForo/BbCode/Parser.php(505): XenForo_BbCode_Formatter_Base->renderTree(Array, Array)
#9 /home/site/public_html/library/XenForo/BbCode/TextWrapper.php(113): XenForo_BbCode_Parser->render(Array, Array)
#10 /home/site/public_html/library/DigitalPointAdPositioning/ViewPublic/Thread/View.php(34): XenForo_BbCode_TextWrapper->__toString()
#11 /home/site/public_html/library/XenForo/ViewRenderer/Abstract.php(227): DigitalPointAdPositioning_ViewPublic_Thread_View->renderHtml()
#12 /home/site/public_html/library/XenForo/ViewRenderer/HtmlPublic.php(67): XenForo_ViewRenderer_Abstract->renderViewObject('XenForo_ViewPub...', 'Html', Array, 'thread_view')
#13 /home/site/public_html/library/XenForo/FrontController.php(572): XenForo_ViewRenderer_HtmlPublic->renderView('XenForo_ViewPub...', Array, 'thread_view', NULL)
#14 /home/site/public_html/library/XenForo/FrontController.php(158): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_View), Object(XenForo_ViewRenderer_HtmlPublic), Array)
#15 /home/site/public_html/index.php(13): XenForo_FrontController->run()
#16 {main}
 
@JulianD

I've just converted one of my live board to XenForo. I don't get theses error yet. I didn't have these errors on my test boards either. I don't have time to perform further tests. If you have the bbcodes than produces this error, I will have a look. This shouldn't be hard to fix.
 
For XenForo 1.2 users who would use this addon default spoiler Bb Code, you will need to update the template "bbm_bbcode_spoiler.css" with this css:
HTML:
.bbmSpoilerBlock iframe, .bbmSpoilerBlock object, .bbmSpoilerBlock embed {
   max-height: none;
   max-width: none;
}

This will fix a 1.2 css conflict.

I will update the archive later.
 
@cclaerhout Can you help me to creat a button in redactor, with:
open tag is : $
close tag is: $
That mean : $content$, not [bbcodetag]content[/bbcodetag]
Thanks.
 
Last edited:
Ugh. Thanks Cedric. That's too much work to be making a bunch of button images. I guess I'll wait for a better option.
You just need to create a sprite (an image with several icons), then to write one css per custom button. If you don't count the time to select which icon is going to match with which button, you probably only spend 5 minutes to write your css.

@cclaerhout Can you help me to creat a button in redactor, with:
open tag is : $
close tag is: $
That mean : $content$, not [bbcodetag]content[/bbcodetag]
Thanks.
This is not the bbcode standard, so it's not possible with this addon.
 
You just need to create a sprite (an image with several icons), then to write one css per custom button. If you don't count the time to select which icon is going to match with which button, you probably only spend 5 minutes to write your css.
For you maybe, yeah. For someone who doesn't know how to make sprites or write css? A lot lot longer.
 
This is not the bbcode standard, so it's not possible with this addon.
I find in js/bbm/redactor/bbm_redactor.src.js :
PHP:
                /*The XenForo would need to be updated*/
                /*
                    var oTag ='['+tag, cTag = '[/'+tag+']', content = config.tagContent, options = config.tagOptions, fullCode;
          
                    if(options) {
                        oTag += '='+options+']';
                    }else{
                        oTag += ']';
                    }
                    fullCode = oTag+content+cTag;
                */
I think you can change this for my quetions ?? I don't know more about javascrip language, so I can't do anything.
In Xenforo 1.1.x, in tinymce editor, js/tinymce/theme/xenforo/editor_template.js, afrer
Code:
(function() {
    var wrapBbCode = function(editor, tag)
    {
        var selection = editor.selection,
            content, range, caret;
I add :
Code:
        var xenStartTag = '[';
        var xenSlashTag = '[/';
        var xenSlashTag2 = '[/';
        var xenEndTag = ']';
        var xenEndTag2 = ']';
        var xenPStart = '<p>';
        var xenPEnd = '</p>';
        var tag2 = tag;
        if(tag == '$') {
            xenStartTag = '';
            xenSlashTag = '';
            xenSlashTag2 = '';
            xenEndTag = '';
            xenEndTag2 = '';
            xenPStart = '';
            xenPEnd = '';
        }
I change
Code:
        content = '[' + tag + ']'

            + selection.getContent().replace(/^<p>/, '').replace(/<\/p>$/, '')
            + '<span id="__xfBbCaret">_</span>'
            + '[/' + tag + ']';

        content = '<p>' + content + '</p>';
        selection.setContent(content);
to
Code:
        content = xenStartTag + tag + xenEndTag

            + selection.getContent().replace(/^<p>/, '').replace(/<\/p>$/, '')
            + '<span id="__xfBbCaret">_</span>'
            + xenSlashTag2 + tag2 + xenEndTag2;

        content = xenPStart + content + xenPEnd;
        selection.setContent(content);
Then, after
Code:
        addButtons : function (theme, tb)
        {
            var tags = theme.settings.xenforo_custom_bbcode_tags,
                controlManager = theme.editor.controlManager;

            //tb.add(controlManager.createControl('|'));
I add:
Code:
            tb.add(controlManager.createButton('xenforo_dollar',
                { title: 'Dollar', image : 'http://domain.com/icon.png', cmd: 'xenForoWrapBbCode', ui: false, value: '$' }
                          ));
So, that's working. I don't know how to do like this in Xenforo 1.2 with redactor.
Sorry for my bad English.
Thanks.
 
For you maybe, yeah. For someone who doesn't know how to make sprites or write css? A lot lot longer.
Just have a try. XenForo default sprite has already a lot of different icons (see here), so you probably only needs to focus on css using the two links (id message: 230). I could develop an interface for this, but I don't have time for this and learning this kind of css is honestly easy. It is also useful for a forum admin, so you will not waste your time.
 
Weird everything was working before and now this add on gives me error 500
So i had some error so i disabled all my add on but when i enabled them one by one i could of enable 3.4.2 and quatro add on but this one i get error 500. any thoughts?

Edit: Well disabled them then uninstalled 2.1.1 and installed it again and now it work no error. Weird
 
Last edited:
@cclaerhout Keep getting this error below. I'm using the 1.2 platform:

Code:
ErrorException: Undefined offset: 1 - library/BButtonCode/BbCode/Formatter/Base.php:59
Generated By: Bilinmeyen Hesap, 35 dakika önce
Stack Trace

#0 /home/user/public_html/library/BButtonCode/BbCode/Formatter/Base.php(59): XenForo_Application::handlePhpError(8, 'Undefined offse...', '/home/user/pu...', 59, Array)
#1 [internal function]: BButtonCode_BbCode_Formatter_Base->renderTagButton(Array, Array, Object(QMIAL_BbCode_Formatter_Base))
#2 /home/user/public_html/library/XenForo/BbCode/Formatter/Base.php(646): call_user_func(Array, Array, Array, Object(QMIAL_BbCode_Formatter_Base))
#3 /home/user/public_html/library/BBM/BbCode/Formatter/Base.php(546): XenForo_BbCode_Formatter_Base->renderValidTag(Array, Array, Array)
#4 /home/user/public_html/library/XenForo/BbCode/Formatter/Base.php(557): BBM_BbCode_Formatter_Base->renderValidTag(Array, Array, Array)
#5 /home/user/public_html/library/XenForo/BbCode/Formatter/Base.php(481): XenForo_BbCode_Formatter_Base->renderTag(Array, Array, 0)
#6 /home/user/public_html/library/XenForo/BbCode/Formatter/Base.php(462): XenForo_BbCode_Formatter_Base->renderTreeElement(Array, Array, 0)
#7 /home/user/public_html/library/XenForo/BbCode/Formatter/Base.php(853): XenForo_BbCode_Formatter_Base->renderSubTree(Array, Array)
#8 /home/user/public_html/library/BBM/BbCode/Formatter/Base.php(1086): XenForo_BbCode_Formatter_Base->renderTagAlign(Array, Array)
#9 [internal function]: BBM_BbCode_Formatter_Base->renderTagAlign(Array, Array, Object(QMIAL_BbCode_Formatter_Base))
#10 /home/user/public_html/library/XenForo/BbCode/Formatter/Base.php(646): call_user_func(Array, Array, Array, Object(QMIAL_BbCode_Formatter_Base))
#11 /home/user/public_html/library/BBM/BbCode/Formatter/Base.php(546): XenForo_BbCode_Formatter_Base->renderValidTag(Array, Array, Array)
#12 /home/user/public_html/library/XenForo/BbCode/Formatter/Base.php(557): BBM_BbCode_Formatter_Base->renderValidTag(Array, Array, Array)
#13 /home/user/public_html/library/XenForo/BbCode/Formatter/Base.php(481): XenForo_BbCode_Formatter_Base->renderTag(Array, Array, 0)
#14 /home/user/public_html/library/XenForo/BbCode/Formatter/Base.php(462): XenForo_BbCode_Formatter_Base->renderTreeElement(Array, Array, 0)
#15 /home/user/public_html/library/XenForo/BbCode/Formatter/Base.php(442): XenForo_BbCode_Formatter_Base->renderSubTree(Array, Array)
#16 /home/user/public_html/library/XenForo/BbCode/Parser.php(505): XenForo_BbCode_Formatter_Base->renderTree(Array, Array)
#17 /home/user/public_html/library/XenForo/ViewPublic/Forum/View.php(61): XenForo_BbCode_Parser->render('[CENTER][IMG]ht...')
#18 /home/user/public_html/library/XenForo/ViewRenderer/Abstract.php(227): XenForo_ViewPublic_Forum_View->renderRss()
#19 /home/user/public_html/library/XenForo/ViewRenderer/Rss.php(31): XenForo_ViewRenderer_Abstract->renderViewObject('XenForo_ViewPub...', 'Rss', Array, 'forum_view')
#20 /home/user/public_html/library/XenForo/FrontController.php(572): XenForo_ViewRenderer_Rss->renderView('XenForo_ViewPub...', Array, 'forum_view', NULL)
#21 /home/user/public_html/library/XenForo/FrontController.php(158): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_View), Object(XenForo_ViewRenderer_Rss), Array)
#22 /home/user/public_html/index.php(13): XenForo_FrontController->run()
#23 {main}

Request State

array(3) {
  ["url"] => string(58) "http://www.site.com/forums/link/index.rss"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
@cclaerhout Do you have any idea? Thanks.
Sorry It's already hard to find time to support the original addon, so supporting customization is not possible.

@cclaerhout Keep getting this error below. I'm using the 1.2 platform:
=> If I refer to this error "library/BButtonCode/BbCode/Formatter/Base.php:59", it doesn't seem to come from one of this addon library but from another one. Not idea which it is.
 
Top Bottom