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

Implemented [bb_code_edit] - Make buttons not only depend on a group

Discussion in 'Closed Suggestions' started by cclaerhout, Jan 23, 2014.

  1. cclaerhout

    cclaerhout Well-Known Member

    The new "insert" group now has the "quote", "code", "deleted" and new "spoiler" buttons configuration, but this configuration is not a "reference". Which means if some board admins want to make them independent buttons (to avoid the dropdown), they can't unless if they rewrite the JavaScript which would be quite a waste since the code is already there.

    So these buttons configuration could be in the parent level of the object then do something like this:

    Code:
            insert: {
               title: this.getText('insert'),
               func: 'show',
               dropdown:
               {
                 quote: buttonsCustom.quote,
                 spoiler: buttonsCustom.spoiler,
                 code: buttonsCustom.code,
                 deleted: buttonsCustom.delete
               }
             }
    
     
  2. Mike

    Mike XenForo Developer Staff Member

    There may be dropdown specific options in there (className) that could potentially change the behavior at the top level, though that doesn't happen now.

    But regardless, some level of JS would need to be written for the buttons (and possibly CSS), so couldn't you just reference buttonsCustom.insert.dropdown.xyz to set up your button anyway? (I suppose moving this out would save one line of setting up the button definition.)
     
    cclaerhout and Dan like this.
  3. cclaerhout

    cclaerhout Well-Known Member

    Thank you for your reply. For the reference, yes I can do it, but It would have been nice to only use the editor setup listener to manage this with php.
     
  4. Mike

    Mike XenForo Developer Staff Member

    I've made this tweak.
     
    cclaerhout likes this.
  5. cclaerhout

    cclaerhout Well-Known Member

    Thanks a lot !
     

Share This Page