BbCodes & Buttons Manager

BbCodes & Buttons Manager 3.3.5

No permission to download
yeah :-) also this check may insert to:
- select redactor in the add-edit short configuration
- some phrases
- some button options in the bb-code edit

my php is very bad, but i can give some ideas ;-)
 
yeah :) also this check may insert to:
- select redactor in the add-edit short configuration
- some phrases
- some button options in the bb-code edit

my php is very bad, but i can give some ideas ;-)
It's done. I didn't do it for the buttons options in the Bb Code edit page because I'm not sure if some options can evolute or not.
 
cclaerhout updated BbCodes & Buttons Manager with a new update entry:

Version 2.3.3 released

Version 2.3.3 released
  • Bb Code Empty content checker fix when content is the number 0
    Thanks to @KiF
  • TinyMCE/XenForo Redactor checker
    Ie:
    • On XenForo 1.1.x, XenForo Redactor button configurations will not be dispayed
    • On XenForo 1.2.x, TinyMCE button configurations will not be displayed if you don't have installed the TinyMCE Quattro addon or if it's disabled...

Read the rest of this update entry...
 
@cclaerhout but something is wrong..
bad detecting.
for additional check - i was fresh clean installation of XenForo 1.2.3 and BBM 2.3.3, but 01.webp02.webp

oh.. in helper "editors" value $mceSupport firstly set to true, and below is checked and set to true if TinyMCE installed. And in any case value is true :)
I think what previously it should be set to false.

And one question.. in XenForo 1.1 inline TinyMCE is supported by BBM ?
If yes, then $mceSupport = (XenForo_Application::get('options')->get('currentVersionId') < 1020031);
 
Last edited:
And i found also one wrong thing...
i create new bb-code with Template Method with php-callback. bb-code is work good. If set up "content protection" and set group permissions on "View permissions" tab in bb-code - all work: not checked groups users are not see bbcode content in post.
BUT if this bbcode are included into spoiler - group permissions are not acceptable and not checked groups users will see content :-)
(but i have solution to this bug - i manual check required permissions in php-callback of my bbcode :-) )
 
@fly_indiz
  • I will check for the detection method but before I went to bed yesterday I've realized I shouldn't use the TinyMCE Quattro detection method because it performs further checks that should not be done here with the Bbm.
  • You've right for the default value of the mce variable
  • For the Bbm on XenForo 1.1.x, only the first version supports the XenForo TinyMCE 3.x editor. The second version only supports TinyMCE
    $mceSupport = (XenForo_Application::get('options')->get('currentVersionId') < 1020031);
    If you do that, TinyMCE Quattro config will only work with XenForo 1.1.x, so it shouldn't be done like this
  • I will also check for the view permissions of nested Bb Codes.
 
Last edited:
sorry @cclaerhout just updated..

getting an error in the admin panel.. when trying to configure the buttons or BBcodes..

when trying to select or edit BBcodes..

Server Error
No entry is registered for key 'addOns' ;

  1. XenForo_Application::get() in BBM/Helper/Editors.php at line 12
  2. BBM_Helper_Editors::getCompatibility() in BBM/ControllerAdmin/BbCodes.php at line 169
  3. BBM_ControllerAdmin_BbCodes->_getBbmBbCodeAddEditResponse() in BBM/ControllerAdmin/BbCodes.php at line 157
  4. BBM_ControllerAdmin_BbCodes->actionEdit() in XenForo/FrontController.php at line 313
  5. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
  6. XenForo_FrontController->run() in /srv/d_6CM001/www/www.sixcrazyminutes.com/htdocs/admin.php at line 13

when trying to select button manager ;


Server Error
No entry is registered for key 'addOns'

  1. XenForo_Application::get() in BBM/Helper/Editors.php at line 12
  2. BBM_Helper_Editors::getCompatibility() in BBM/ControllerAdmin/Buttons.php at line 10
  3. BBM_ControllerAdmin_Buttons->actionIndex() in XenForo/FrontController.php at line 313
  4. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
  5. XenForo_FrontController->run() in /srv/d_6CM001/www/www.sixcrazyminutes.com/htdocs/admin.php at line 13
 
Last edited:
im having a problem with orphan buttons

[BBM] Highlight Helper
& QuoteMe (orphan button) not showing in the editor when added and enabled.. is this a 1.1.x restriction ?
 
im having a problem with orphan buttons

[BBM] Highlight Helper
& QuoteMe (orphan button) not showing in the editor when added and enabled.. is this a 1.1.x restriction ?
For the highlight helper, yes. I haven't written the needed TMS and anyway I'm using now a new listener to add plugins.
For the QuoteME extension, it's working. You just need to be sure to have upgraded to the last versions of addons and to use the "after click" method activation" with QuoteME.
 
@ForestForTrees
You might be interested in this:
https://github.com/cclaerhout/xen_FontAwesome_BbCode

That's just something quickly done but it seems functional. All classes of Font Awesome should be working except the list (it doesn't suite a forum message anyway), to have the direct names which must be used inside the Bb Code option, check this file (line 183). The hardest to do will be the user interface and I don't know if I will have time to do it.

P.S: as usual the bbcode xml file is inside the extra directory.

fa-demo.webp
Source:
Code:
[fa=fa-camera-retro|left|fa-2x][SIZE=7][B]Text[/B] [/SIZE][/fa]
[fa=fa-lg|fa-square-o|fa-stack-2x|fa-stack|fa-twitter|fa-stack-1x] Piou piou[/fa]

Note that for the stack mode (two icons combined together), all options before the option "fa-stack" will be for the first icon, then all options after it will be for the second icon. Only one exception: the global size option (ie:"fa-lg")will be applied to the wrapper).
 
Last edited:
@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.
 
@cclaerhout, please, fix it. My styles do not work properly.
@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.
 
Back
Top Bottom