BbCodes & Buttons Manager

BbCodes & Buttons Manager 3.3.5

No permission to download

cclaerhout

Well-known member
I'm trying use BBM v2.1.4 and it work normally.
The error codes doesn't help, it just says "it doesn't work". Can you provide me by pm a link to your dev board on your server (i would prefer to avoid the public board) with an admin account and ftp access? This will be the easier to debug.
 

cclaerhout

Well-known member
@fly_indiz
I've tested and the error is confirmed. Why? I don't know. The object has correct information, must be again a problem of JS order.

Anyway, it doesn't matter. See the 2.4.0 Preview version of the addon on Github.

I'm now using an hybrid method to add buttons to the XenForo Redactor editor. It's using the method of @sonnb & the former one. Beside it fixes your problem, the advantages with this method are:
  • All buttons added by other addons will be automatically displayed at the end of the Bbm editor config layout. If these buttons added by an another addon have Bbm orphan buttons, it becomes possible to position them. In the previous versions you had to use orphan buttons to display them, otherwise they didn't show.
  • This method still allows you to fully control the layout of the editor buttons. It seems in the futur XenForo will have its own function to add custom buttons to the editor, but that will be again like the old way that some of us knew on vBulletin 3.x, in other words the custom buttons will be added at the end of existed buttons. The only difference is there will have an option to disable some of the button groups.
  • If any JS loading problems occur (I'm thinking about the JS file order), the custom buttons will still be displayed using the default XenForo method to insert buttons. If you have disable all buttons from a XenForo Button Group, they will not be displayed. If only one of them is inside the editor, all of them will be displayed. Example:
    One of the XenForo Buttons Group is named "block". It contains the buttons "quote" and "code". If you take these two buttons from the editor and a problem occur, they will still not be displayed (as designed). If you only let the "quote" button in the editor config, both will still be displayed.

Before releasing this version I would like to test the problem of @Lil.Tee
 
Last edited:

Lil.Tee

Member
@cclaerhout
Yesterday, I contacted support of my host, and they fixed that problem. The problem didn't from your addon. Now, it's work perfectly. Thank you so much.
I look forward to your updates.
 
Last edited:

Gossamer

Active member
For a few weeks now, I've been getting a lot of repeats of the same server error (ErrorException: Undefined index: option - library/BBM/BbCode/Formatter/Base.php:375). About 11 pages of them. I've just updated to 2.3.5 and the error persists.

ErrorException: Undefined index: option - library/BBM/BbCode/Formatter/Base.php:375
Generated By: Unknown Account, 2 minutes ago
Stack Trace
#0 library/BBM/BbCode/Formatter/Base.php(375): XenForo_Application::handlePhpError(8, 'Undefined index...', '/home/markedrp/...', 375, Array)
#1 library/BBM/BbCode/Formatter/Base.php(1071): BBM_BbCode_Formatter_Base->replacementMethodRenderer(Array, Array, false)
#2 library/BBM/BbCode/Formatter/Base.php(660): BBM_BbCode_Formatter_Base->wrapMe(Array, Array, '<div style="mar...')
#3 library/XenForo/BbCode/Formatter/Base.php(575): BBM_BbCode_Formatter_Base->renderValidTag(Array, Array, Array)
#4 library/XenForo/BbCode/Formatter/Base.php(488): XenForo_BbCode_Formatter_Base->renderTag(Array, Array, 0)
#5 library/XenForo/BbCode/Formatter/Base.php(469): XenForo_BbCode_Formatter_Base->renderTreeElement(Array, Array, 0)
#6 library/XenForo/BbCode/Formatter/Base.php(449): XenForo_BbCode_Formatter_Base->renderSubTree(Array, Array)
#7 library/XenForo/BbCode/Parser.php(505): XenForo_BbCode_Formatter_Base->renderTree(Array, Array)
#8 library/XenForo/ViewPublic/Forum/View.php(61): XenForo_BbCode_Parser->render('[blockquote]?[R...')
#9 library/XenForo/ViewRenderer/Abstract.php(227): XenForo_ViewPublic_Forum_View->renderRss()
#10 library/XenForo/ViewRenderer/Rss.php(31): XenForo_ViewRenderer_Abstract->renderViewObject('XenForo_ViewPub...', 'Rss', Array, 'forum_view')
#11 library/XenForo/FrontController.php(572): XenForo_ViewRenderer_Rss->renderView('XenForo_ViewPub...', Array, 'forum_view', NULL)
#12 library/XenForo/FrontController.php(158): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_View), Object(XenForo_ViewRenderer_Rss), Array)
#13 index.php(13): XenForo_FrontController->run()
#14 {main}
Request State
array(3) {
["url"] => string(55) "http://www.pandorarp.com/forums/the-plains.80/index.rss"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
 

cclaerhout

Well-known member

cclaerhout

Well-known member
@Gossamer, try the last version and tell me if it works for you if you go back to the forum index rss page. If it doesn't I will need more information about one of your bb code which is using the direct replacement method.
 

Teapot

Well-known member
When I have this add-on enabled I can't edit posts. Once its disabled I can edit fine.
Any ideas?
I'm having the same problem on my side. The edit overlay just isn't appearing, and opening a post edit in a new tab works but the editor doesn't display. This is definitely a BBM error, because this appears in the console:

Code:
[Error] TypeError: 'null' is not an object (evaluating 'e.length')
    each (jquery.min.js, line 4)
    postHook (bbm_redactor.js, line 1)
    (anonymous function) (bbm_redactor.js, line 1)
 
I was looking into using this in replacement to the BB Code Manager but upon installation it would result in blank pages no matter what I tried.

The error log showed this:

ErrorException: Fatal Error: Loader::load(): Failed opening required 'KingK/BbCodeManager/BbCodeManager.php'
...

Which doesn't make any sense since I'm supposed to remove BB Code Manager in the first place. Also as far as I can tell there are no backwards dependencies with it, in fact, I removed it completely and everything worked, except when I enabled BBM.
 

cclaerhout

Well-known member
I was looking into using this in replacement to the BB Code Manager but upon installation it would result in blank pages no matter what I tried.

The error log showed this:



Which doesn't make any sense since I'm supposed to remove BB Code Manager in the first place. Also as far as I can tell there are no backwards dependencies with it, in fact, I removed it completely and everything worked, except when I enabled BBM.
If you have import your previous Bb Codes, check if you have any one them using a function that is no more available. May be you could give the complete error log, that should be more detailed than the one you post.

If you don't find any, disable the BBM addon, reupload the files of the other addon (only the ones from the library if you want) and then uninstall it properly (in XenForo), then delete the files you've just uploaded. You can after enable again BBM, it should work. If it doesn't contact me by pm.
 

Stuart Wright

Well-known member
@cclaerhout Do you mind to update this addon to remove conflict with XenGallery? Your current way for adding buttons by extends editorOptions.buttons will break other addons that add buttons to editor.

If buttons are just to insert bbcode tag (without popup), I will do not need to use any JS as XF already supported it.

PHP:
public static function editor_setup(XenForo_View $view, $formCtrlName, &$message, array &$editorOptions, &$showWysiwyg)
    {
        if ($showWysiwyg)
        {
            $editorOptions['json']['buttons']['insertAlbum'] = array(
                'title' => new XenForo_Phrase('sonnb_xengallery_insert_album'),
                'tag' => 'album'
            );
            $editorOptions['json']['buttons']['insertContent'] = array(
                'title' => new XenForo_Phrase('sonnb_xengallery_insert_content'),
                'tag' => 'content'
            );
        }
    }

If popup required then some JS are needed but will not break other buttons as we already have class selector for each buttons. So do not need to extend current editorOptions anymore.
^ Where is this? What do we edit to create new buttons?
 

cclaerhout

Well-known member
^ Where is this? What do we edit to create new buttons?
With this addon, you don't need to edit anything. With the manual way, you need to use the editor_setup listener and extend the $editorOptions array variable (its json key) like is showed in the example of Sonnb you quoted.
 

cclaerhout

Well-known member
Thanks Cédric, how do I
Admin => Development => Code Event Listeners => Create New Code Event Listener => editor_setup => copy the callback signature => create your callback => save the listener => you can extend buttons using a similar code that the one used by Sonnb. Check here if needed.

In your button, put aside it's array key, you have to set its title & tag. Once the "tag" key has been setup, the XenForo JS will manage the button return.
 
Last edited:

cclaerhout

Well-known member
cclaerhout updated BbCodes & Buttons Manager with a new update entry:

Version 2.5.0 released

Version 2.5.0 released

This release focuses on making easier the Bb Code developement.
  • Add new development settings in the Bb Codes options (only available in debug mode) :
    • The Bb Code Unique IdentifierTo use with the new listener (see below)
    • The Bb Code Addon attribution
      (Work in progress: the code is there but can't be seen)
  • Add two new XenForo listeners for the BBM adon:
    • bbm_callback_template_cacheThe first one,...

Read the rest of this update entry...
 
Top