BbCodes & Buttons Manager

BbCodes & Buttons Manager 3.3.5

No permission to download
i have been through allmost every single option i could find related to js, jQuery scripts.
and this in relation to this issue i have been having here: http://xenforo.com/community/thread...its-wysiwyg-bbcodes.51289/page-14#post-659864

Things i Test - All Failed Problem Still not resolved:
Disabled Cloud flare for tests
played around with all these settings for 20 min:
51NuO.png

i turned things on and off, default settings ect.
i then updated and play around wit the bb code buttons manager, no errors are present in the
51NFz.png


see how everything aligns and the separator button is there for the above option chosen:
51NH8.png

but with
51NHM.png
its a complete mess:
see how the
"Add New LineCreate Separator" does not show as a button:
51NIN.png

51NIZ.png

also played around with these settings:
51NL8.png

and in relation to JQuery:
51NMp.png

played around with all of these but still no change.

also i get no errors in my console either when i load this page, and after updating saving and resetting and moving stuff around no error persist, but the bb code manager for TinyQuattro still does not function properly:
51Nl8

51NkB


see how it says it is OK, but the manager still does not work...
i have also reinstalled and bb code manager and advanced pack, TinyQuattro. and the error still persists, also checked permissions on files, they are fine as it is. looked around for other bugs on site, there are none.

could it be my .htaccess file?, i will send configuration to
cclaerhout to see if this is the cause.

also replaced all js scripts related to Tinymc and bbm
51OaY.png

there is more after this.
but bbm buttons manager still problem persists.
rebuilt cache's re-built all templates and main forum templates, Re-install of Xenforo

problem still there :(

i am out of idea's because i have done everything i though possible that would cause such an issue.
 
@XxUnkn0wnxX
First of all, congratulations, your bug report is nicely done. I think I know where the problem is coming from. TinyMCE has updated its fontname to avoid bug with IE11. I've modified the public interface but not the admin. I need to review this, but I've spent the last two days driving and I'm exhausted.
 
@XxUnkn0wnxX
I don't release a fix yet, cause I've one pending new feature that I'm working on and an another bug to fix first.

Edit the admin template (an admin template is not with other templates, you need to be in debug mode to access the "Development panel") "bbm_buttons_config.css"
Replace all "icomoon"strings by "tinymce". The visual layout problem should be fixed.
 
@XxUnkn0wnxX
My bad, the real template to edit is a different one but you will not have to do it since this is a TinyMCE Quattro template. A fix will be provided in a few minutes.
 
@XxUnkn0wnxX
My bad, the real template to edit is a different one but you will not have to do it since this is a TinyMCE Quattro template. A fix will be provided in a few minutes.
even when updating to
TinyMCE Quattro
1.6.3.2
,
i still get the same problems i had before i press update refresh nothing saves, even though it say it saved, also same problem the separator button still does not show
 
This button is just some basic css and a simple js code attached to it. I could understand that the js code has a bug in it, but the css has no reason not to display. Contact me by pm with an access to the bbm library directory of your website and a temporary admin access.
 
Two information:
  1. There's a small css bug with the integration of the icons of the XenForo Redactor editor if they don't use the sprite mode. It has been fixed in the Github version.
    For those who want a quick fix, edit the template "bbm_editor_redactor_autocss" and proceed to that change.
  2. If you don't know how to do a sprite (an image with several icons in it), just use the website icomoon. I haven't realized it has an option to automatically create a sprite after you select the icons you want. (Click on "images" and configure your sprite - see the paragraph 9 of the FAQ).
 
Last edited:
A feedback about XxUnkn0wnxX problems (put aside his own website JS errors):
  • When you select a MCE4 button icons set button, you have to enter its unicode. The main problem was coming from there.
    A check in the datawriter has been added to avoid this problem in the future.
  • The second problem was about creating a button for an existing independent BbCode:
    • Do NOT recreate the same Bb Code with the BBM. For him, it was working, but that's more luck than anything else.
    • Create instead an "Orphan button". The process is almost the same than for a Bb Code but its tag must have a @ before.
      Example: you've got a hide Bb Code provided by an independent plugin and you want to create a button for it.
      Go to the Bb Code Manager and create a new "Bb Code" that will have an at sign (@) as the first character of its tag name: @hide.

    Edit: New entry in the FAQ (10)
 
Last edited:
cclaerhout updated BbCodes & Buttons Manager with a new update entry:

Version 2.3.0 released

Version 2.3.0 released
  • Editor selection by controller/viewname/forums
    • You can now use a custom config of an editor (MCE4/XenForo Redactor editor) in a forum (or by Controller/View) whereas your default setting is to use the other editor.
    • This means you can create a configuration for any editor and select to use it wherever you want.
  • It's now possible to disable "attach", "email", "img", "media" and "url" tags by usergroups. This method is experimental...

Read the rest of this update entry...
 
@cclaerhout
I add this code to block RecentNews of addon XenPorta to quick edit my post :
HTML:
<a href="{xen:link 'posts/{$news.first_post_id}/edit'}" class="item control edit {xen:if $xenOptions.messageInlineEdit, OverlayTrigger}"
                                          data-href="{xen:link 'posts/{$news.first_post_id}/edit-inline'}" data-overlayOptions="{&quot;fixed&quot;:false}"
                                      ><span></span>{xen:phrase edit}</a>
                                          <xen:require js="js/xenforo/discussion.js" />
But when I click it, all buttons I added didn't display
 
@cclaerhout
I add this code to block RecentNews of addon XenPorta to quick edit my post :
HTML:
<a href="{xen:link 'posts/{$news.first_post_id}/edit'}" class="item control edit {xen:if $xenOptions.messageInlineEdit, OverlayTrigger}"
                                          data-href="{xen:link 'posts/{$news.first_post_id}/edit-inline'}" data-overlayOptions="{&quot;fixed&quot;:false}"
                                      ><span></span>{xen:phrase edit}</a>
                                          <xen:require js="js/xenforo/discussion.js" />
But when I click it, all buttons I added didn't display
I suppose you're using Redactor. It certainly comes from this js integration and the XenForo Js loader that loads first the editor script then the buttons integration script whereas the custom template template with the custom buttons is not yet loaded (js object = BBM_Redactor.customButtonsConfig). I think I had this problem with the MarkItUp reverse option and I've used a dirty trick (ref). I also had this problem with TinyQuattro and I've used a better JS method to be sure the template is loaded before to launch the JavaScript (ref).

I'm not sure your problem is the same. But at the moment I'm focusing on my own websites and don't have much time. But you can try to debug the problem yourself and see if modify these files, would change something after this edit (in the minify version too):
From:
Code:
XenForo.BbmCustomEditor = function($textarea) { this.__construct($textarea); };
To:
Code:
    XenForo.BbmCustomEditor = function($textarea) {
                var self = this;
                setTimeout(function(){self.__construct($textarea)}, 0);
    };

If it doesn't, contact me next week with your XenPorta code, I will try to reproduce the problem.

Edit: no, sorry, it's not the same problem that TinyMCE, actually the custom buttons must be set before the Redactor framework is loaded. So the above change will do nothing. I can't think clearly right now and since the XenForo Editor Framework is not documented, it will require further tests. Try to check in your JS console (when you trigger the overlay) if the if the file "bbm_redactor.js" is set before or after "bb_code_edit.js".
 
Last edited:
Edit: no, sorry, it's not the same problem that TinyMCE, actually the custom buttons must be set before the Redactor framework is loaded. So the above change will do nothing. I can't think clearly right now and since the XenForo Editor Framework is not documented, it will require further tests. Try to check in your JS console (when you trigger the overlay) if the if the file "bbm_redactor.js" is set before or after "bb_code_edit.js".
When I set bbm_redactor.js after bb_code_edit.js, all buttons I added didn't display at all.
 
When I set bbm_redactor.js after bb_code_edit.js, all buttons I added didn't display at all.
Yes, that's expected. I mean what you were trying to do with the portal block is to edit inline a message isn't it? If yes, when you trigger an overlay, some javascript files are loaded by XenForo (you can see them in the console). Check the order of those loadings. And give me by pm the full block with your custom code, otherwise I can't test it.
 
Last edited:
@time
I've tested the code you gave me. This is a problem with the XenForo Redactor Framework that is more global that this only addon. It's similar to the problem I had with TinyMCE Quattro. A simple image to illustrate it:
bug.webp

As you see, there is no custom button in this editor, where it should have one. But more important, if you check the phrase of the button to switch the editor, it's not yet translated. It is because the Javascript file loaded faster than the XenForo template which has the Javascript object containing the translations. So it's a problem with the XenForo editor framework.

To solve it you can edit the XenForo bb_code_edit.js file (I suppose that you know there is a file with the readable script and one with its minify version).
One solution is to change this line:
Code:
XenForo.BbCodeWysiwygEditor = function($textarea) { this.__construct($textarea); };
To this:
Code:
  XenForo.BbCodeWysiwygEditor = function($textarea) {
     var self = this;
     setTimeout(function(){self.__construct($textarea)}, 0);
   };

The problem of the XenForo framework as it has been created is that to extend it another script must be loaded before it. So the above code is going to work but only for the framework itself. A solution is to put a longer timeout. Ie:
Code:
  XenForo.BbCodeWysiwygEditor = function($textarea) {
     var self = this;
     setTimeout(function(){self.__construct($textarea)}, 10);
   };

Once this done, as I've said, the framework will not have any problem with the template which has its phrases, but the custom buttons will still not be displayed. The script loader must also be modified the same way with a shorter delay (0 will be perfect). This means you must edit the bbm_redactor.js file (see its location in my previous post) to modify this line:
Code:
XenForo.BbmCustomEditor = function($textarea) { this.__construct($textarea); };

To:
Code:
  XenForo.BbmCustomEditor = function($textarea) {
     var self = this;
     setTimeout(function(){self.__construct($textarea)}, 0);
   };


Another solution would be that XenForo developers to set a priority order in the js require template helper to be sure to avoid this problem (between scripts), but the setTimeout trick must still be used to wait for the template to be fully loaded in the dom, then execute the required JavaScript.

Fell free to report this bug to XenForo developers. Once it would have been fixed or once some documentation would have been provided to avoid this may be in another way, I will modify this addon and the resource that explains how to manually add buttons to Redactor.
 
Thanks you very much, @cclaerhout
But I can't find
Code:
XenForo.BbmCustomEditor = function($textarea) { this.__construct($textarea); };
in bbm_redactor.js file.
 
I need some help. Before upgrading to 1.2.2 I had an important BBCODE called premium that let me hide the content from certain usergroups. Now I'm trying to use this addon to replicate his functionality but with no luck.

I've changed the name of the [protected] BB in [premium] but I'm not able to set it to work. I'd like that the [premium] content is hidden from everyone but some specific usergroups.

Can someone tell me how to set it?
 
I need some help. Before upgrading to 1.2.2 I had an important BBCODE called premium that let me hide the content from certain usergroups. Now I'm trying to use this addon to replicate his functionality but with no luck.

I've changed the name of the [protected] BB in [premium] but I'm not able to set it to work. I'd like that the [premium] content is hidden from everyone but some specific usergroups.

Can someone tell me how to set it?
The premium BbCode was one of my previous addon which code was not clean. Now all Bb Codes can have their content protected in a cleaner way. You just need to edit the Bb Code and apply it some view permissions. See this screenshot.
 
Top Bottom