BbCodes & Buttons Manager

BbCodes & Buttons Manager 3.3.5

No permission to download
@cclaerhout
The separators are working for me, but it's not working with "OverlayTrigger".
2-png.66789

Example, in template EWRblock_RecentNews, after
Code:
&nbsp; (<a href="{xen:link 'threads/edit', $news}" class="OverlayTrigger">{xen:phrase edit}</a>)
i add
Code:
<a href="{xen:link 'threads/edit', $news}" class="OverlayTrigger">({xen:phrase edit})</a>
Then, in domain.com/portal/, I click "Edit", seem Separator I've added don't display
1-png.66788


Sorry for my bad English.
 
@Lil.Tee
Oh yes, this is a random problem because the XenForo Template Scripts Loader with json requests (I think that it's only for them) doesn't load the scripts in "order" and there's no way to give the priority for one script on another one. So an easy way to "fix" this is to put the bbm Javascript file at the end of the "page_container_js_head" template. It will work, the script is tiny, so that's ok, but it will be loaded on every pages. So the line to add:
Code:
<script src="{xen:helper javaScriptUrl, '{$javaScriptSource}/bbm/redactor/bbm_redactor.js?_v={$xenOptions.jsVersion}'}"></script>

May be you can put it inside a conditionnal that will at least check if the visitor is a member (unless if you have given an access to visitor to post messages somewhere)
Code:
<xen:if is="{$visitor.user_id}">
   <script src="{xen:helper javaScriptUrl, '{$javaScriptSource}/bbm/redactor/bbm_redactor.js?_v={$xenOptions.jsVersion}'}"></script>
</xen:if>

And thank you I've just seen I forgot to update the layout for XenForo 1.3 here too.
 
I've found another solution but more acrobatic. Its avantage: instead of loading a 1400 bytes js code on all pages, it will only load this 380 bytes code:
Code:
!function(n,t,i){var e=XenForo.create,f=!1,u=!1;XenForo.create=function(t,r,o){t=="XenForo.BbCodeWysiwygEditor"&&(t="XenForo.bbmBridge"),e(t,r,o),t=="XenForo.BbmCustomEditor"&&(u=!0,f&&n(i).trigger("bbmLoadEd"))},XenForo.bbmBridge=function(t){var e=this,r=function(){new XenForo.BbCodeWysiwygEditor(t)};if(u)r();else{n(i).on("bbmLoadEd",function(){r()});f=!0}}}(jQuery,this,document);
Code:
!function($, window, document, undefined)
{
   var xenCreate = XenForo.create,
     BbCodeWysiwygEditorToLoad = false, BbmCustomEditorLoaded = false;

   XenForo.create = function(className, element, extra)
   {
     if(className == 'XenForo.BbCodeWysiwygEditor') {
       className = 'XenForo.bbmBridge';
     }
   
     xenCreate(className, element, extra);

     if(className == 'XenForo.BbmCustomEditor') {
       BbmCustomEditorLoaded = true;
       if(BbCodeWysiwygEditorToLoad){
         $(document).trigger('bbmLoadEd');
       }
     }   
   }

   XenForo.bbmBridge = function($textarea){
     var self = this;

     var loadEditor = function(){
       new XenForo.BbCodeWysiwygEditor($textarea);
     };
   
     if(!BbmCustomEditorLoaded){
       $(document).on('bbmLoadEd', function(e){
         loadEditor();
       });
       BbCodeWysiwygEditorToLoad = true;
     }else{
       loadEditor();
     }
   }
}
(jQuery, this, document);


I've tested both codes are working. So I will make them as an option.
 
I tried to install last version and there is an error when install :

Please enter a valid callback method (BBM_Listeners_BbCode::listen).
 
@Lil.Tee
Since you have an easy way to test if it would work or not, could you please test this release (I don't have time and I don't use Redactor on my live boards):
https://github.com/cclaerhout/xen_BBM_v2/archive/master.zip

There's a new option about what we've talked (in the Buttons Manager options):
View attachment 66866
Thank you so much. I've tested this version.
As you have said, "Included the Bbm Redactor loader will add only a few bytes of code, but included the main Bbm Redactor Javascript is the safest solution." Because If I chose "Bbm Redactor loader", sometime it not work.
Thank you again !!
 
Thank you so much. I've tested this version.
As you have said, "Included the Bbm Redactor loader will add only a few bytes of code, but included the main Bbm Redactor Javascript is the safest solution." Because If I chose "Bbm Redactor loader", sometime it not work.
Thank you again !!
Thanks for your feedback. That's strange I've made the test more then 20 times (x2) with another addon that sent me a developer to test a kind of similar problem that had TinyMCE before and it worked every time. Anyway since the default option is to load the full js, that should not be a problem.
 
cclaerhout updated BbCodes & Buttons Manager with a new update entry:

Version 2.6.2.1 released

Version 2.6.2.1 released
  • Fix listener reference of previous version - thanks to kezako
    (If you didn't see the problem, it simply means you kept on your server the former files)
  • Add a Bbm Redactor loader option to be sure to load custom config when the first editor on the page is loaded from a json request
    Thanks to Lee.Tee for his testings and feedbacks

Read the rest of this update entry...
 
cclaerhout updated BbCodes & Buttons Manager with a new update entry:

Version 2.6.2.1 released

Version 2.6.2.1 released
  • Fix listener reference of previous version - thanks to kezako
    (If you didn't see the problem, it simply means you kept on your server the former files)
  • Add a Bbm Redactor loader option to be sure to load custom config when the first editor on the page is loaded from a json request
    Thanks to Lee.Tee for his testings and feedbacks

Read the rest of this update entry...
My nickname is Lil.Tee, not Lee.Tee :P
 
I am having problem with BBCode...

Code:
[URL='http://someplace.com']Some place[/URL]

I write to entries using the URL bbcode
  • the first line will output as expected.
  • second line output text without conversion
If is deactivate BBcode Manager, everything works.

Test message
 
If I fast edit a post then are my custom buttons gone, any idea why?
No, I can't reproduce it neither Redactor (which has been tested quite a lot during the last release) nor with TinyMCE.


I am having problem with BBCode...

Code:
[URL='http://someplace.com']Some place[/URL]

I write to entries using the URL bbcode
  • the first line will output as expected.
  • second line output text without conversion
If is deactivate BBcode Manager, everything works.

Test message
I can't reproduce the problem on my boards. See the screenshot.
 

Attachments

  • bug2é.webp
    bug2é.webp
    19.5 KB · Views: 6
Are you useing the same "Bbm Editor Configuration by Controller" Settings as me?
I've told you I will not support two different editors on the same page. If you load a custom Redactor editor on the quickreply, you must load the same config on the edit inline overlay window (TinyMCE Quattro being the default one) otherwise you will just have a fallback of the Redactor editor.
 
I've told you I will not support two different editors on the same page. If you load a custom Redactor editor on the quickreply, you must load the same config on the edit inline overlay window (TinyMCE Quattro being the default one) otherwise you will just have a fallback of the Redactor editor.
I have the TinyMCE only on the more options page. So I have not 2 editors on one page but the fast edit has not the buttons who I have added only on the fast reply.
 
Top Bottom