vForums Support > Programming & Coding :: Code Requests & Support :: > [F] UBBC

[F] UBBC - Posted By Fel!x (felix) on 16th Feb 08 at 9:33am
I was wondering if it is possible for someone to make a code so that the UBBC buttons in quick reply will appear in the same order with only the 20 seen there in Reply. So the it would look like:
Code:
 
  1. [b][/b][u][/u][i][/i][s][/s][size=2][/size][color=000000][/color][font=Veranda, Arial][/font][email][/email][url][/url][img][/img]
  2. [move][/move][hr][pre][/pre][center][/center][left][/left][right][/right][sup][/sup][sub][/sub][blockquote][/blockquote][quote][/quote]
 


Instead of:
Code:
 
  1. [b][/b][u][/u][i][/i][s][/s][size=2][/size][color=000000][/color][font=Veranda, Arial][/font][email][/email][url][/url][table][/table][tr][/tr][td][/td]
  2. [img][/img][move][/move][hr][pre][/pre][center][/center][left][/left][right][/right][sup][/sup][sub][/sub][blockquote][/blockquote][code][quote][/quote]
 



&& If that is do-able, can it be without the space between the two lines, just like in the quick reply?

You'll get lots of thanks, oh and love Smiley xD

Re: UBBC - Posted By Michael (wrighty) on 16th Feb 08 at 11:58am
I don't understand. {Unsure}

Re: UBBC - Posted By Fel!x (felix) on 16th Feb 08 at 12:32pm
Like in quick reply where it has ubbc, is it possible to have them in the same order and only those buttosn in normal reply? So in that order without Code & the table UBBC buttons. And if thats possible, witohut the space between the two rows =]

Re: UBBC - Posted By Michael (wrighty) on 16th Feb 08 at 5:51pm
so you want to a) remove the space & b) remove certain buttons when replying?

Re: UBBC - Posted By Fel!x (felix) on 17th Feb 08 at 4:13am
Yes, and also move the [<-M] button onto the top row XD

Re: UBBC - Posted By Ross (admin) on 17th Feb 08 at 11:56am
This will do that, Global Footer, but you do realize you've asked for 2 more buttons on the top row than the bottom?

Code:
 
  1. <script type="text/javascript">
  2. <!--
  3.  
  4. var new_ubbc = "<div class=\"quick-reply-ubbc\"><a onclick=\"add_ubbc('[b]','[/b]');\" style=\"cursor: pointer;\"><img src=\"http://virtualforums.co.uk/images/bold.gif\" alt=\"Bold Text\" /></a><a onclick=\"add_ubbc('[u]','[/u]');\" style=\"cursor: pointer;\"><img src=\"http://virtualforums.co.uk/images/underline.gif\" alt=\"Underline Text\" /></a><a onclick=\"add_ubbc('[i]','[/i]');\" style=\"cursor: pointer;\"><img src=\"http://virtualforums.co.uk/images/italic.gif\" alt=\"Italicize Text\" /></a><a onclick=\"add_ubbc('[s]','[/s]');\" style=\"cursor: pointer;\"><img src=\"http://virtualforums.co.uk/images/strike.gif\" alt=\"Strike-Through Text\" /></a><a onclick=\"add_ubbc('[size=','[/size]', '2');\" style=\"cursor: pointer;\"><img src=\"http://virtualforums.co.uk/images/size.gif\" alt=\"Font Size\" /></a><a onclick=\"add_ubbc('[color=','[/color]', '000000');\" style=\"cursor: pointer;\"><img src=\"http://virtualforums.co.uk/images/color.gif\" alt=\"Font Color\" /></a><a onclick=\"add_ubbc('[font=','[/font]', 'Veranda, Arial');\" style=\"cursor: pointer;\"><img src=\"http://virtualforums.co.uk/images/font.gif\" alt=\"Font Family\" /></a><a onclick=\"add_ubbc('[email]','[/email]');\" style=\"cursor: pointer;\"><img src=\"http://virtualforums.co.uk/images/email.gif\" alt=\"Email Link\" /></a><a onclick=\"add_ubbc('[url]','[/url]');\" style=\"cursor: pointer;\"><img src=\"http://virtualforums.co.uk/images/url.gif\" alt=\"Hyperlink\" /></a><a onclick=\"add_ubbc('[img]','[/img]');\" style=\"cursor: pointer;\"><img src=\"http://virtualforums.co.uk/images/img.gif\" alt=\"Add Image\" /></a><a onclick=\"add_ubbc('[move]','[/move]');\" style=\"cursor: pointer;\"><img src=\"http://virtualforums.co.uk/images/marquee.gif\" alt=\"Moving Text\" /></a>";
  5. new_ubbc += "<br /><a onclick=\"add_ubbc('[hr]');\" style=\"cursor: pointer;\"><img src=\"http://virtualforums.co.uk/images/hr.gif\" alt=\"Horizontal Rule\" /></a><a onclick=\"add_ubbc('[pre]','[/pre]');\" style=\"cursor: pointer;\"><img src=\"http://virtualforums.co.uk/images/pre.gif\" alt=\"Pre-formatted Text\" /></a><a onclick=\"add_ubbc('[center]','[/center]');\" style=\"cursor: pointer;\"><img src=\"http://virtualforums.co.uk/images/center.gif\" alt=\"Center Text\" /></a><a onclick=\"add_ubbc('[left]','[/left]');\" style=\"cursor: pointer;\"><img src=\"http://virtualforums.co.uk/images/left.gif\" alt=\"Align Left\" /></a><a onclick=\"add_ubbc('[right]','[/right]');\" style=\"cursor: pointer;\"><img src=\"http://virtualforums.co.uk/images/right.gif\" alt=\"Align Right\" /></a><a onclick=\"add_ubbc('[sup]','[/sup]');\" style=\"cursor: pointer;\"><img src=\"http://virtualforums.co.uk/images/sup.gif\" alt=\"Superscript\" /></a><a onclick=\"add_ubbc('[sub]','[/sub]');\" style=\"cursor: pointer;\"><img src=\"http://virtualforums.co.uk/images/sub.gif\" alt=\"Subscript\" /></a><a onclick=\"add_ubbc('[blockquote]','[/blockquote]');\" style=\"cursor: pointer;\"><img src=\"http://virtualforums.co.uk/images/blockquote.gif\" alt=\"Blockquote\" /></a><a onclick=\"add_ubbc('[quote]','[/quote]');\" style=\"cursor: pointer;\"><img src=\"http://virtualforums.co.uk/images/quotepost.gif\" alt=\"Add Quote\" /></a></div>";
  6.  
  7. if(document.post_form && get('ubbc_buttons', ID)) {
  8.     get('ubbc_buttons', ID).innerHTML = new_ubbc;
  9. }
  10. //-->
  11. </script>
 

Re: UBBC - Posted By Fel!x (felix) on 17th Feb 08 at 11:59am
Thanks Ross! {Grin}
Whoops, I think I meant to have the Image UBBC Button on the top, not the Move O_o;

{Embarassed}

Can it be set-up like that if I just moved the <br />? {Unsure}

Re: UBBC - Posted By Michael (wrighty) on 17th Feb 08 at 12:05pm
use this:

Code:
 
  1. <script type="text/javascript">
  2. <!--
  3.  
  4. var new_ubbc = "<div class=\"quick-reply-ubbc\"><a onclick=\"add_ubbc('[b]','[/b]');\" style=\"cursor: pointer;\"><img src=\"http://virtualforums.co.uk/images/bold.gif\" alt=\"Bold Text\" /></a><a onclick=\"add_ubbc('[u]','[/u]');\" style=\"cursor: pointer;\"><img src=\"http://virtualforums.co.uk/images/underline.gif\" alt=\"Underline Text\" /></a><a onclick=\"add_ubbc('[i]','[/i]');\" style=\"cursor: pointer;\"><img src=\"http://virtualforums.co.uk/images/italic.gif\" alt=\"Italicize Text\" /></a><a onclick=\"add_ubbc('[s]','[/s]');\" style=\"cursor: pointer;\"><img src=\"http://virtualforums.co.uk/images/strike.gif\" alt=\"Strike-Through Text\" /></a><a onclick=\"add_ubbc('[size=','[/size]', '2');\" style=\"cursor: pointer;\"><img src=\"http://virtualforums.co.uk/images/size.gif\" alt=\"Font Size\" /></a><a onclick=\"add_ubbc('[color=','[/color]', '000000');\" style=\"cursor: pointer;\"><img src=\"http://virtualforums.co.uk/images/color.gif\" alt=\"Font Color\" /></a><a onclick=\"add_ubbc('[font=','[/font]', 'Veranda, Arial');\" style=\"cursor: pointer;\"><img src=\"http://virtualforums.co.uk/images/font.gif\" alt=\"Font Family\" /></a><a onclick=\"add_ubbc('[email]','[/email]');\" style=\"cursor: pointer;\"><img src=\"http://virtualforums.co.uk/images/email.gif\" alt=\"Email Link\" /></a><a onclick=\"add_ubbc('[url]','[/url]');\" style=\"cursor: pointer;\"><img src=\"http://virtualforums.co.uk/images/url.gif\" alt=\"Hyperlink\" /></a><a onclick=\"add_ubbc('[img]','[/img]');\" style=\"cursor: pointer;\"><img src=\"http://virtualforums.co.uk/images/img.gif\" alt=\"Add Image\" /></a><br /><a onclick=\"add_ubbc('[move]','[/move]');\" style=\"cursor: pointer;\"><img src=\"http://virtualforums.co.uk/images/marquee.gif\" alt=\"Moving Text\" /></a>";
  5. new_ubbc += "<a onclick=\"add_ubbc('[hr]');\" style=\"cursor: pointer;\"><img src=\"http://virtualforums.co.uk/images/hr.gif\" alt=\"Horizontal Rule\" /></a><a onclick=\"add_ubbc('[pre]','[/pre]');\" style=\"cursor: pointer;\"><img src=\"http://virtualforums.co.uk/images/pre.gif\" alt=\"Pre-formatted Text\" /></a><a onclick=\"add_ubbc('[center]','[/center]');\" style=\"cursor: pointer;\"><img src=\"http://virtualforums.co.uk/images/center.gif\" alt=\"Center Text\" /></a><a onclick=\"add_ubbc('[left]','[/left]');\" style=\"cursor: pointer;\"><img src=\"http://virtualforums.co.uk/images/left.gif\" alt=\"Align Left\" /></a><a onclick=\"add_ubbc('[right]','[/right]');\" style=\"cursor: pointer;\"><img src=\"http://virtualforums.co.uk/images/right.gif\" alt=\"Align Right\" /></a><a onclick=\"add_ubbc('[sup]','[/sup]');\" style=\"cursor: pointer;\"><img src=\"http://virtualforums.co.uk/images/sup.gif\" alt=\"Superscript\" /></a><a onclick=\"add_ubbc('[sub]','[/sub]');\" style=\"cursor: pointer;\"><img src=\"http://virtualforums.co.uk/images/sub.gif\" alt=\"Subscript\" /></a><a onclick=\"add_ubbc('[blockquote]','[/blockquote]');\" style=\"cursor: pointer;\"><img src=\"http://virtualforums.co.uk/images/blockquote.gif\" alt=\"Blockquote\" /></a><a onclick=\"add_ubbc('[quote]','[/quote]');\" style=\"cursor: pointer;\"><img src=\"http://virtualforums.co.uk/images/quotepost.gif\" alt=\"Add Quote\" /></a></div>";
  6.  
  7. if(document.post_form && get('ubbc_buttons', ID)) {
  8. get('ubbc_buttons', ID).innerHTML = new_ubbc;
  9. }
  10. //-->
  11. </script>
 



I think.....

Re: UBBC - Posted By Fel!x (felix) on 17th Feb 08 at 12:07pm
Thanks Wrighty!

{Embarassed} I'm not very smart today, thanks heaps to you both!

EDIT: If I change them to custom images it doesn't work, is there a way they can be custom images? =/

Re: UBBC - Posted By Michael (wrighty) on 17th Feb 08 at 12:24pm
Code:
 
  1. <script type="text/javascript">
  2. <!--
  3.  
  4. var root = 'http://virtualforums.co.uk/images/';
  5.  
  6. var new_ubbc = "<div class=\"quick-reply-ubbc\"><a onclick=\"add_ubbc('[b]','[/b]');\" style=\"cursor: pointer;\"><img src=\""+root+"bold.gif\" alt=\"Bold Text\" /></a><a onclick=\"add_ubbc('[u]','[/u]');\" style=\"cursor: pointer;\"><img src=\""+root+"underline.gif\" alt=\"Underline Text\" /></a><a onclick=\"add_ubbc('[i]','[/i]');\" style=\"cursor: pointer;\"><img src=\""+root+"italic.gif\" alt=\"Italicize Text\" /></a><a onclick=\"add_ubbc('[s]','[/s]');\" style=\"cursor: pointer;\"><img src=\""+root+"strike.gif\" alt=\"Strike-Through Text\" /></a><a onclick=\"add_ubbc('[size=','[/size]', '2');\" style=\"cursor: pointer;\"><img src=\""+root+"size.gif\" alt=\"Font Size\" /></a><a onclick=\"add_ubbc('[color=','[/color]', '000000');\" style=\"cursor: pointer;\"><img src=\""+root+"color.gif\" alt=\"Font Color\" /></a><a onclick=\"add_ubbc('[font=','[/font]', 'Veranda, Arial');\" style=\"cursor: pointer;\"><img src=\""+root+"font.gif\" alt=\"Font Family\" /></a><a onclick=\"add_ubbc('[email]','[/email]');\" style=\"cursor: pointer;\"><img src=\""+root+"email.gif\" alt=\"Email Link\" /></a><a onclick=\"add_ubbc('[url]','[/url]');\" style=\"cursor: pointer;\"><img src=\""+root+"url.gif\" alt=\"Hyperlink\" /></a><a onclick=\"add_ubbc('[img]','[/img]');\" style=\"cursor: pointer;\"><img src=\""+root+"img.gif\" alt=\"Add Image\" /></a><br /><a onclick=\"add_ubbc('[move]','[/move]');\" style=\"cursor: pointer;\"><img src=\""+root+"marquee.gif\" alt=\"Moving Text\" /></a>";
  7. new_ubbc += "<a onclick=\"add_ubbc('[hr]');\" style=\"cursor: pointer;\"><img src=\""+root+"hr.gif\" alt=\"Horizontal Rule\" /></a><a onclick=\"add_ubbc('[pre]','[/pre]');\" style=\"cursor: pointer;\"><img src=\""+root+"pre.gif\" alt=\"Pre-formatted Text\" /></a><a onclick=\"add_ubbc('[center]','[/center]');\" style=\"cursor: pointer;\"><img src=\""+root+"center.gif\" alt=\"Center Text\" /></a><a onclick=\"add_ubbc('[left]','[/left]');\" style=\"cursor: pointer;\"><img src=\""+root+"left.gif\" alt=\"Align Left\" /></a><a onclick=\"add_ubbc('[right]','[/right]');\" style=\"cursor: pointer;\"><img src=\""+root+"right.gif\" alt=\"Align Right\" /></a><a onclick=\"add_ubbc('[sup]','[/sup]');\" style=\"cursor: pointer;\"><img src=\""+root+"sup.gif\" alt=\"Superscript\" /></a><a onclick=\"add_ubbc('[sub]','[/sub]');\" style=\"cursor: pointer;\"><img src=\""+root+"sub.gif\" alt=\"Subscript\" /></a><a onclick=\"add_ubbc('[blockquote]','[/blockquote]');\" style=\"cursor: pointer;\"><img src=\""+root+"blockquote.gif\" alt=\"Blockquote\" /></a><a onclick=\"add_ubbc('[quote]','[/quote]');\" style=\"cursor: pointer;\"><img src=\""+root+"quotepost.gif\" alt=\"Add Quote\" /></a></div>";
  8.  
  9. if(document.post_form && get('ubbc_buttons', ID)) {
  10. get('ubbc_buttons', ID).innerHTML = new_ubbc;
  11. }
  12. //-->
  13. </script>
 


change where it says: var root =

to the root directory where your icons are stored. Also, name them as the UBBC name such as: code, email etc.. ALL .gif

Re: UBBC - Posted By Fel!x (felix) on 17th Feb 08 at 12:27pm
Thanks again =]

I'll go rehost the images now O_o; lol

[Filled]

Re: UBBC - Posted By Michael (wrighty) on 17th Feb 08 at 12:31pm
{Smile}