1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

BBCode permission

Discussion in 'XenForo Development Discussions' started by bAstimc, Jan 21, 2015.

  1. bAstimc

    bAstimc Member

    Hey,
    I'm writing a plugin for my forum where you can click on a custom BBCodeButton from the Redactor Iconbar/Editor.
    Well this new Button should only be visible for user with permission. I've set up the permission option, and got a PHPfunction to look it up but my question is: Where should I check it to enable/disable the custom BBCode button wether the permission is set true or false?
    I tried it in
    PHP:
    public static function EditorSetup(XenForo_View $view$formCtrlName, &$message, array &$editorOptions, &$showWysiwyg)
    but its too early.

    greets
     
  2. cclaerhout

    cclaerhout Well-Known Member

    Buttons can't have permissions with the standard installation. Use the Bbm.
     
    bAstimc and Xon like this.
  3. bAstimc

    bAstimc Member

    I already noticed that o_O

    Is it possible to call a modal on bbm @cclaerhout?
    Else I'm trying to add a callback via js EditorInit.

    Edit: done.

    Merci beaucoup!
     
    Last edited: Jan 22, 2015
  4. cclaerhout

    cclaerhout Well-Known Member

    With Redactor, not. I could have done it like I did with TinyMCE, but now I don't need it. You can still look this tutorial here (see the Github example, not the attachment).
     
  5. bAstimc

    bAstimc Member

    already finished it and I did it with Redactor:)
     
    cclaerhout likes this.

Share This Page