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

BB Button Code 1.3.2

Use [button] bbcode to create nice looking CSS buttons

  1. Chris D
    This add-on is not affiliated with XenForo Ltd.

    OVERVIEW


    This add on adds a new BBCode that allows you to create buttons.

    The buttons can be used anywhere that accepts BBCode input including XenPorta and many other add-ons.

    button_xf.PNG

    For example, the above button is created with the following BB Code

    Code:
    [button="size='extralarge' text='XenForo' desc='The best forum software' style='gradient' new='yes' bgcolor='#A12621' textcolor='white'"] http://www.xenforo.com [/button]
    Here's the full available syntax:

    [button="
    bgcolor='#FF8411|#555|red|black|#1A1A1A'
    style='gradient|normal'
    text='BIG BUTTONS'
    desc='I like big buttons and I cannot lie'
    title='SEO Friendly Title'
    size='small|medium|large|extralarge'
    textcolor='black|#555|#FFFFFF|red'
    new='yes|no'
    width='400px'
    nofollow='yes|no'
    margin='none|narrow|medium|wide|extrawide'
    "] http://www.valvetime.net [/button]

    As you can see you can literally create a button or set of buttons with as many different styles as you like. Each option changes a certain part of the HTML code or CSS.

    The options in bold above are those which are default if they aren't specified.

    You can configure text or bg colours with any hex value or otherwise compatible CSS value such as red, white, black etc. including RGB syntax.

    IMPORTANT NOTE REGARDING URLS

    XenForo quite helpfully automatically parses URLs for you and at this moment in time there isn't a definitive fix for this problem with regards to BBCode. There is an add on here which does fix this problem, but it doesn't work with XenPorta. So I've decided it shouldn't be a requirement to use this add on. And instead I have implemented a different workaround.

    Note the syntax above. There must always be a space before and after the URL. This ensures that when the URL is parsed, it doesn't mess up the rest of the button code.

    My code then strips out the autoparsed URL tags before building the HTML code.

    PERMISSIONS

    Currently this BB Code can be used by anyone on your forums. However, the help code for this BB Code is by default hidden from all but moderators and admins. Permissions may be looked at in a future version.

    SPECIAL THANKS

    To yavuz who requested this add on and for helping me to bug test it :)
    QenTox, bousaid, resonansER and 5 others like this.

Recent Updates

  1. Fixes a few undefined errors

Recent Reviews

  1. Motobaka
    Motobaka
    5/5,
    Version: 1.3.2
    I was bugging the person in charge of visual things in our forum for a button so that people would be more interested in clicking the Podcast. This is exactly what I needed. Thank you!
  2. yavuz
    yavuz
    5/5,
    Version: 1.3.2
    Thank you for keeping the addon up to date Chris.
  3. resonansER
    resonansER
    5/5,
    Version: 1.3
    Thank YOU! GOOD!
  4. yavuz
    yavuz
    5/5,
    Version: 1.3
    A good addition to my current BBCODE set. Excellent work Yorick, thanks for all your hard work :)
    1. Chris D
      Author's Response
      Thank you yavuz :)