BB Button Code

BB Button Code 1.3.2

No permission to download

Chris D

XenForo developer
Staff member
Yorick submitted a new resource:

[ValveTime.net] BB Button Code (version 1.3) - Use [button] bbcode to create nice looking CSS buttons

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.

View attachment 29426

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...

Read more about this resource...
 
Can this be done for Waindigo's Library or Xenporta? I tried doing it on both and it didn't look right in Xenporta and it wouldn't show up at all in Library.
 
Yorick submitted a new resource:

[ValveTime.net] BB Button Code (version 1.3) - Use [button] bbcode to create nice looking CSS buttons

Chris, it seems that (after looking in the error console) it addes strangely an image out of nowhere :S

caps.webp

This is the bbcode I used:

[button="text='Button Text' desc='Sub Text' title='Type URL' nofollow='yes' bgcolor='#176093' new='yes' style='gradient' textcolor='white'"]http://www.site.com [/button]

Custom BB Code Manager has now the ability to add a button to the editor. A solution where we can put the button spesification (like typing an image url) would be awesome...
 
Can this be done for Waindigo's Library or Xenporta? I tried doing it on both and it didn't look right in Xenporta and it wouldn't show up at all in Library.
o_O Only 6 weeks for a response...

Yes it should work anywhere that supports BB Code.

Chris, it seems that (after looking in the error console) it addes strangely an image out of nowhere :S

View attachment 36262

This is the bbcode I used:

[button="text='Button Text' desc='Sub Text' title='Type URL' nofollow='yes' bgcolor='#176093' new='yes' style='gradient' textcolor='white'"]http://www.site.com[/button]

Custom BB Code Manager has now the ability to add a button to the editor. A solution where we can put the button spesification (like typing an image url) would be awesome...
I'm looking now.

Yavuz, I cannot replicate this. I assume that image is being pulled from your CSS somewhere. I would do a search on your templates for the text "bbutton" or "gradient". I'm guessing that one of these - for some reason - contains that odd image as a repeating background image.
 
It's this here:

Code:
.gradient {
background: url('styles/BButtonCode/highlight.png') repeat-x 0 0;
}

I tried to hide it doing this:

Code:
.gradient {
background: url('styles/BButtonCode/highlight.png') repeat-x 0 0;
display: none;
}

Did I miss something?
 
@Chris Deeming following errors have been logged while I was sleeping.

Code:
ErrorException: Undefined variable: bwidth - library/BButtonCode/BbCode/Formatter/Base.php:136
Generated By: Bilinmeyen Hesap, Bugün 09:58
Stack Trace

#0 /home/user/public_html/library/BButtonCode/BbCode/Formatter/Base.php(136): XenForo_Application::handlePhpError(8, 'Undefined varia...', '/home/user/pu...', 136, Array)
#1 [internal function]: BButtonCode_BbCode_Formatter_Base->renderTagButton(Array, Array, Object(CodeRich_XenForo_BbCode_Formatter_Base))
#2 /home/user/public_html/library/XenForo/BbCode/Formatter/Base.php(646): call_user_func(Array, Array, Array, Object(CodeRich_XenForo_BbCode_Formatter_Base))
#3 /home/user/public_html/library/BBM/BbCode/Formatter/Base.php(546): XenForo_BbCode_Formatter_Base->renderValidTag(Array, Array, Array)
#4 /home/user/public_html/library/XenForo/BbCode/Formatter/Base.php(557): BBM_BbCode_Formatter_Base->renderValidTag(Array, Array, Array)
#5 /home/user/public_html/library/XenForo/BbCode/Formatter/Base.php(481): XenForo_BbCode_Formatter_Base->renderTag(Array, Array, 0)
#6 /home/user/public_html/library/XenForo/BbCode/Formatter/Base.php(462): XenForo_BbCode_Formatter_Base->renderTreeElement(Array, Array, 0)
#7 /home/user/public_html/library/XenForo/BbCode/Formatter/Base.php(853): XenForo_BbCode_Formatter_Base->renderSubTree(Array, Array)
#8 /home/user/public_html/library/BBM/BbCode/Formatter/Base.php(1086): XenForo_BbCode_Formatter_Base->renderTagAlign(Array, Array)
#9 [internal function]: BBM_BbCode_Formatter_Base->renderTagAlign(Array, Array, Object(CodeRich_XenForo_BbCode_Formatter_Base))
#10 /home/user/public_html/library/XenForo/BbCode/Formatter/Base.php(646): call_user_func(Array, Array, Array, Object(CodeRich_XenForo_BbCode_Formatter_Base))
#11 /home/user/public_html/library/BBM/BbCode/Formatter/Base.php(546): XenForo_BbCode_Formatter_Base->renderValidTag(Array, Array, Array)
#12 /home/user/public_html/library/XenForo/BbCode/Formatter/Base.php(557): BBM_BbCode_Formatter_Base->renderValidTag(Array, Array, Array)
#13 /home/user/public_html/library/XenForo/BbCode/Formatter/Base.php(481): XenForo_BbCode_Formatter_Base->renderTag(Array, Array, 0)
#14 /home/user/public_html/library/XenForo/BbCode/Formatter/Base.php(462): XenForo_BbCode_Formatter_Base->renderTreeElement(Array, Array, 0)
#15 /home/user/public_html/library/XenForo/BbCode/Formatter/Base.php(442): XenForo_BbCode_Formatter_Base->renderSubTree(Array, Array)
#16 /home/user/public_html/library/XenForo/BbCode/Parser.php(505): XenForo_BbCode_Formatter_Base->renderTree(Array, Array)
#17 /home/user/public_html/library/XenForo/ViewPublic/Forum/View.php(61): XenForo_BbCode_Parser->render('[CENTER][IMG]ht...')
#18 /home/user/public_html/library/XenForo/ViewRenderer/Abstract.php(227): XenForo_ViewPublic_Forum_View->renderRss()
#19 /home/user/public_html/library/XenForo/ViewRenderer/Rss.php(31): XenForo_ViewRenderer_Abstract->renderViewObject('XenForo_ViewPub...', 'Rss', Array, 'forum_view')
#20 /home/user/public_html/library/XenForo/FrontController.php(572): XenForo_ViewRenderer_Rss->renderView('XenForo_ViewPub...', Array, 'forum_view', NULL)
#21 /home/user/public_html/library/XenForo/FrontController.php(158): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_View), Object(XenForo_ViewRenderer_Rss), Array)
#22 /home/user/public_html/index.php(13): XenForo_FrontController->run()
#23 {main}

Request State

array(3) {
  ["url"] => string(60) "http://www.sitename.com/forumlar/sunum-haberleri.183/index.rss"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}

Code:
ErrorException: Undefined variable: bmargin - library/BButtonCode/BbCode/Formatter/Base.php:136
Generated By: Bilinmeyen Hesap, Bugün 09:58
Stack Trace

#0 /home/user/public_html/library/BButtonCode/BbCode/Formatter/Base.php(136): XenForo_Application::handlePhpError(8, 'Undefined varia...', '/home/user/pu...', 136, Array)
#1 [internal function]: BButtonCode_BbCode_Formatter_Base->renderTagButton(Array, Array, Object(CodeRich_XenForo_BbCode_Formatter_Base))
#2 /home/user/public_html/library/XenForo/BbCode/Formatter/Base.php(646): call_user_func(Array, Array, Array, Object(CodeRich_XenForo_BbCode_Formatter_Base))
#3 /home/user/public_html/library/BBM/BbCode/Formatter/Base.php(546): XenForo_BbCode_Formatter_Base->renderValidTag(Array, Array, Array)
#4 /home/user/public_html/library/XenForo/BbCode/Formatter/Base.php(557): BBM_BbCode_Formatter_Base->renderValidTag(Array, Array, Array)
#5 /home/user/public_html/library/XenForo/BbCode/Formatter/Base.php(481): XenForo_BbCode_Formatter_Base->renderTag(Array, Array, 0)
#6 /home/user/public_html/library/XenForo/BbCode/Formatter/Base.php(462): XenForo_BbCode_Formatter_Base->renderTreeElement(Array, Array, 0)
#7 /home/user/public_html/library/XenForo/BbCode/Formatter/Base.php(853): XenForo_BbCode_Formatter_Base->renderSubTree(Array, Array)
#8 /home/user/public_html/library/BBM/BbCode/Formatter/Base.php(1086): XenForo_BbCode_Formatter_Base->renderTagAlign(Array, Array)
#9 [internal function]: BBM_BbCode_Formatter_Base->renderTagAlign(Array, Array, Object(CodeRich_XenForo_BbCode_Formatter_Base))
#10 /home/user/public_html/library/XenForo/BbCode/Formatter/Base.php(646): call_user_func(Array, Array, Array, Object(CodeRich_XenForo_BbCode_Formatter_Base))
#11 /home/user/public_html/library/BBM/BbCode/Formatter/Base.php(546): XenForo_BbCode_Formatter_Base->renderValidTag(Array, Array, Array)
#12 /home/user/public_html/library/XenForo/BbCode/Formatter/Base.php(557): BBM_BbCode_Formatter_Base->renderValidTag(Array, Array, Array)
#13 /home/user/public_html/library/XenForo/BbCode/Formatter/Base.php(481): XenForo_BbCode_Formatter_Base->renderTag(Array, Array, 0)
#14 /home/user/public_html/library/XenForo/BbCode/Formatter/Base.php(462): XenForo_BbCode_Formatter_Base->renderTreeElement(Array, Array, 0)
#15 /home/user/public_html/library/XenForo/BbCode/Formatter/Base.php(442): XenForo_BbCode_Formatter_Base->renderSubTree(Array, Array)
#16 /home/user/public_html/library/XenForo/BbCode/Parser.php(505): XenForo_BbCode_Formatter_Base->renderTree(Array, Array)
#17 /home/user/public_html/library/XenForo/ViewPublic/Forum/View.php(61): XenForo_BbCode_Parser->render('[CENTER][IMG]ht...')
#18 /home/user/public_html/library/XenForo/ViewRenderer/Abstract.php(227): XenForo_ViewPublic_Forum_View->renderRss()
#19 /home/user/public_html/library/XenForo/ViewRenderer/Rss.php(31): XenForo_ViewRenderer_Abstract->renderViewObject('XenForo_ViewPub...', 'Rss', Array, 'forum_view')
#20 /home/user/public_html/library/XenForo/FrontController.php(572): XenForo_ViewRenderer_Rss->renderView('XenForo_ViewPub...', Array, 'forum_view', NULL)
#21 /home/user/public_html/library/XenForo/FrontController.php(158): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_View), Object(XenForo_ViewRenderer_Rss), Array)
#22 /home/user/public_html/index.php(13): XenForo_FrontController->run()
#23 {main}

Request State

array(3) {
  ["url"] => string(60) "http://www.sitename.com/forumlar/sunum-haberleri.183/index.rss"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
When push RSS-button from admin account(this is important!) from any other account error not appear. I got this error:
Code:
ErrorException: Undefined offset: 1 - library/BButtonCode/BbCode/Formatter/Base.php:39

#0 /var/www/xxxx/public_html/library/BButtonCode/BbCode/Formatter/Base.php(39): XenForo_Application::handlePhpError(8, 'Undefined offse...', '/var/www/xxxxxx...', 39, Array)
#1 [internal function]: BButtonCode_BbCode_Formatter_Base->renderTagButton(Array, Array, Object(BButtonCode_BbCode_Formatter_Base))
#2 /var/www/xxxxxx/public_html/library/XenForo/BbCode/Formatter/Base.php(646): call_user_func(Array, Array, Array, Object(BButtonCode_BbCode_Formatter_Base))
#3 /var/www/xxxx/public_html/library/XenForo/BbCode/Formatter/Base.php(557): XenForo_BbCode_Formatter_Base->renderValidTag(Array, Array, Array)
#4 /var/www/xxxx/public_html/library/XenForo/BbCode/Formatter/Base.php(481): XenForo_BbCode_Formatter_Base->renderTag(Array, Array, 0)
#5 /var/www/xxxx/public_html/library/XenForo/BbCode/Formatter/Base.php(462): XenForo_BbCode_Formatter_Base->renderTreeElement(Array, Array, 0)
#6 /var/www/xxxxx/public_html/library/XenForo/BbCode/Formatter/Base.php(442): XenForo_BbCode_Formatter_Base->renderSubTree(Array, Array)
#7 /var/www/xxxxxx/public_html/library/XenForo/BbCode/Parser.php(505): XenForo_BbCode_Formatter_Base->renderTree(Array, Array)
#8 /var/www/xxxxx/public_html/library/XenForo/ViewPublic/Forum/GlobalRss.php(43): XenForo_BbCode_Parser->render('[button="size='...')
#9 /var/www/xxxxxx/public_html/library/XenForo/ViewRenderer/Abstract.php(227): XenForo_ViewPublic_Forum_GlobalRss->renderRss()
#10 /var/www/xxxxxx/public_html/library/XenForo/ViewRenderer/Rss.php(31): XenForo_ViewRenderer_Abstract->renderViewObject('XenForo_ViewPub...', 'Rss', Array, '')
#11 /var/www/xxxxxxx/public_html/library/XenForo/FrontController.php(572): XenForo_ViewRenderer_Rss->renderView('XenForo_ViewPub...', Array, '', NULL)
#12 /var/www/xxxxxx/public_html/library/XenForo/FrontController.php(158): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_View), Object(XenForo_ViewRenderer_Rss), Array)
#13 /var/www/xxxxxx/public_html/index.php(13): XenForo_FrontController->run()
#14 {main}

array(3) {
  ["url"] => string(37) "http://xxxxxx.com/forums/-/index.rss"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}

If possible, fix it, please.
 
Hi @Chris Deeming, first of all thanks for this awesome resource. I have one question regarding this add-on. Is it possible to not underline the text of this button when I hover over the button? This small feature would make this just perfect :)
 
Top Bottom