• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
BB Button Code

BB Button Code 1.3.2

No permission to download
Use [button] bbcode to create nice looking CSS buttons
This add-on is not affiliated with XenForo Ltd.


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.


For example, the above button is created with the following BB 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:

desc='I like big buttons and I cannot lie'
title='SEO Friendly Title'
"] 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.


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.


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.


To yavuz who requested this add on and for helping me to bug test it :)
Chris D
First release
Last update
5.00 star(s) 3 ratings

More resources from Chris D

Latest updates

  1. Fixes a few undefined errors

    Fixes a bunch of potential "undefined" exception errors.

Latest reviews

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!
Thank you for keeping the addon up to date Chris.
Thank YOU! GOOD!
A good addition to my current BBCODE set. Excellent work Yorick, thanks for all your hard work :)
Chris D
Chris D
Thank you yavuz :)