 | Adding BBCode Buttons |  |
Posted: 01/09/2007 9:43 AM |
|
|
|
|
|
| Citation |
| Posts |
1253 |
| Word Cnt. |
68,166 |
| BDay |
Nov 9 |
| Sign |
Scorpio |
| Sex |
 |
|
|
|
Joined: Jan 06, 2006
Local time: 10:55 PM
|

|
|
|
|
 |
I have a couple of extra bbcode mods added but they don't have buttons, is it easy to add buttons for them?
 |
|
|
 |
 |
| Back to Top |
|
|
 | Re: Adding BBCode Buttons |  |
Posted: 01/09/2007 2:40 PM |
|
|
|
|
|
| Site Admin |
| Posts |
30757 |
| Word Cnt. |
2,628,690 |
| BDay |
Jul 28 |
| Sign |
Leo |
| Sex |
 |
|
|
|
Joined: Sep 25, 2004
Local time: 6:55 PM
Location: St Pete, FL
|

|
|
|
|
 |
Yes, you can add buttons for any installed BBCode. If you have added the Multi-BBCode and BBCode Organizer MODs, this is how you would do it...
OPEN
posting_body.tpl
FIND
| Code:
|
|
bbtags = new Array('[b]','[/b]',
|
At the end of the line, before the );, you would add the beginning and ending bbcode tags. So if your bbcode tag was [img], you would add '[img]','[/img]'...
This is how it looks here in RCF:
| Code:
|
|
bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[co de]','[/code]','[list][*]','[/list]','[list=1][*]','[/list]','[img]',' [/img]','[url=]','[/url]','[s]','[/s]','[sup]','[/sup]','[sub]','[/sub ]','[h1]','[/h1]','[h2]','[/h2]','[h3]','[/h3]','[table]','[/table]',' [serif]','[/serif]','[reverse]','[/reverse]','[hr]','[hr]','[hide]','[ /hide]','[mono]','[/mono]','[h4]','[/h4]','[h5]','[/h5]','[h6]','[/h6] ','[row]','[row]','[sans]','[/sans]','[rainbow]','[/rainbow]','[ref=di ctionary]','[/ref]','[ref=thesaurus]','[/ref]','[ref=translator]','[/r ef]','[you]','[you]','<center>','</center>','','','[col]','[col]','[fl ash]','[/flash]','[google]','[/google]','[quick]','[/quick]','[video]' ,'[/video]','[wiki]','[/wiki]','<blockquote>','</blockquote>');
|
OPEN
includes/bbcode.php
FIND
| Code:
|
|
$EMBB_widths = array('','40',
|
At the end of the line before the ) ;, enter the BBCode button width; i.e. ,'55'...
FIND
| Code:
|
|
$EMBB_values = array('','S',
|
At the end of the line before the ) ;, enter the BBCode title; i.e. ,'Image'..
This is how it looks here in RCF:
| Code:
|
$EMBB_widths = array('','40','40','40','40', '40','40', '40','55','65','40','40','40','40','40','40','40','55','65','40','40', '40','40','40','40','40','55','65','40','40','40','40') ;
$EMBB_values = array('','S','Sup','Sub','H1','H2','H3','Table','Serif','Reverse','HR' ,'Hide','Mono','H4','H5','H6','Row','Sans','Rainbow','RefD','RefT','R efR','You','Cntr','Color','Col','Flash','Google','QT','WMP','Wiki','Bl ock') ;
|
 |
|
|
 |
 |
| Back to Top |
|
|
 | Re: Adding BBCode Buttons |  |
Posted: 01/09/2007 3:25 PM |
|
|
|
|
|
| Citation |
| Posts |
1253 |
| Word Cnt. |
68,166 |
| BDay |
Nov 9 |
| Sign |
Scorpio |
| Sex |
 |
|
|
|
Joined: Jan 06, 2006
Local time: 10:55 PM
|

|
|
|
|
 |
Ooh thanks for that!
I do have the multi mod installed but not the buttons organizer so will add that to me list!
 |
|
|
 |
 |
| Back to Top |
|
|
 | Re: Adding BBCode Buttons |  |
Posted: 01/10/2007 5:36 AM |
|
|
|
|
|
| Site Admin |
| Posts |
30757 |
| Word Cnt. |
2,628,690 |
| BDay |
Jul 28 |
| Sign |
Leo |
| Sex |
 |
|
|
|
Joined: Sep 25, 2004
Local time: 6:55 PM
Location: St Pete, FL
|

|
|
|
|
 |
Good Luck with it Karen...
 |
|
|
 |
 |
| Back to Top |
|
|
 | Re: Adding BBCode Buttons |  |
Posted: 01/12/2007 8:53 AM |
|
|
|
|
|
| Citation |
| Posts |
1253 |
| Word Cnt. |
68,166 |
| BDay |
Nov 9 |
| Sign |
Scorpio |
| Sex |
 |
|
|
|
Joined: Jan 06, 2006
Local time: 10:55 PM
|

|
|
|
|
 |
I added the button organiser I think. The code wasn't in my subSilver file but it was in my Template/Diddle file so I changed the code in that.
Therefore do I use the Diddle/posting_body.tpl or my subSilver/posting_body.tpl
Also the code you posted above isn't exactly the same in my bbcode.php so I'm not sure what to do with the code changes
www.babydreamz.net/public/bbcode.txt |
|
|
 |
 |
| Back to Top |
|
|
 | Re: Adding BBCode Buttons |  |
Posted: 01/12/2007 9:25 AM |
|
|
|
|
|
| Site Admin |
| Posts |
30757 |
| Word Cnt. |
2,628,690 |
| BDay |
Jul 28 |
| Sign |
Leo |
| Sex |
 |
|
|
|
Joined: Sep 25, 2004
Local time: 6:55 PM
Location: St Pete, FL
|

|
|
|
|
 |
The link to your bbcode.txt file doesn't work...
You would want to modify the code in both your Diddle and subSilver posting_body.tpl files to keep everything consistent even if you don't allow anyone to use the subSilver template. As long as you keep things consistent, it won't interfere with future MOD installs...
The examples I provided above wouldn't be exact since I only supplied partial code from the lines. The idea was to show you where to look. Since I have installed a lot of BBCode MODs here in RCF, there is no way that our code would match unless you have installed the same MODs in the same order, then organized them exactly the same that I did...
 |
|
|
 |
 |
| Back to Top |
|
|
 | Re: Adding BBCode Buttons |  |
Posted: 01/12/2007 9:56 AM |
|
|
|
|
|
| Citation |
| Posts |
1253 |
| Word Cnt. |
68,166 |
| BDay |
Nov 9 |
| Sign |
Scorpio |
| Sex |
 |
|
|
|
Joined: Jan 06, 2006
Local time: 10:55 PM
|

|
|
|
|
 |
The link works for me..lol!
The instructions you said were
FIND
| Quote:
|
Code: ‹ Select ›
$EMBB_widths = array('','40',
|
| Quote:
|
At the end of the line before the ) ;, enter the BBCode button width; i.e. ,'55'...
|
This is what I have, but no ):, I'm not sure where I add the width?
$EMBB_widths = array('') ;
$EMBB_values = array('') ;
I'm assuming this is my width? $EMBB_widths[] = '40';
Hope this makes sense! |
|
|
 |
 |
| Back to Top |
|
|
 | Re: Adding BBCode Buttons |  |
Posted: 01/12/2007 12:24 PM |
|
|
|
|
|
| Site Admin |
| Posts |
30757 |
| Word Cnt. |
2,628,690 |
| BDay |
Jul 28 |
| Sign |
Leo |
| Sex |
 |
|
|
|
Joined: Sep 25, 2004
Local time: 6:55 PM
Location: St Pete, FL
|

|
|
|
|
 |
| Karen wrote:
|
This is what I have, but no ):, I'm not sure where I add the width?
$EMBB_widths = array('') ;
$EMBB_values = array('') ;
I'm assuming this is my width? $EMBB_widths[] = '40';
|
Sure you have the ); at the end. It's just affter the array('' part. So if you want to add a width of 40 to the array, it would look like this when you are done:
| Code:
|
|
$EMBB_widths = array('', 40) ;
|
 |
|
|
 |
 |
| Back to Top |
|
|
 | Re: Adding BBCode Buttons |  |
Posted: 01/12/2007 1:41 PM |
|
|
|
|
|
| Citation |
| Posts |
1253 |
| Word Cnt. |
68,166 |
| BDay |
Nov 9 |
| Sign |
Scorpio |
| Sex |
 |
|
|
|
Joined: Jan 06, 2006
Local time: 10:55 PM
|

|
|
|
|
 |
Ohhh DOH!!!!!!!!
*smacks self on head* Yes I see it  |
|
|
 |
 |
| Back to Top |
|
|
 | Information |  |
|