PDA

View Full Version : Adding code buttons



SloppyGoat
Fri 31st May '02, 12:48am
Ok, I've searched, but can't seem to find exactly how to add the buttons. Give me an example, please. I've added vbcode for flash, and now I'd like to add a flash code button. How do I do this?

Floris
Fri 31st May '02, 10:58am
Originally posted by SloppyGoat
Ok, I've searched, but can't seem to find exactly how to add the buttons. Give me an example, please. I've added vbcode for flash, and now I'd like to add a flash code button. How do I do this?
I guess the vbcode_buttons template.
(Admin Control Panel > Templates > Modify (expand) > vB code > vbcode_buttons < that one.)

<input type="button" class="bginput" value=" X " onclick="vbcode(this.form,'X','')" onmouseover="stat('x')" title="X (alt+x)" accesskey="x">
Maybe made that to fit yours. Not sure about how much you need to alter any javascript to get it to work, maybe nothing.

SloppyGoat
Fri 31st May '02, 2:42pm
And that adds the actual button? I thought it would be an image or something? :confused: How do you determine where it's positioned? I'm not sure I get this. Could you possibly substitute the labels/names in? I'd assume I'm supposed to know what goes where all the X's and parenthesis are, right? I'll take a look at the template when I get home, but so far, it doesn't make a lot of sense to me. :(

Floris
Fri 31st May '02, 3:15pm
Originally posted by SloppyGoat
And that adds the actual button? I thought it would be an image or something? :confused: How do you determine where it's positioned? I'm not sure I get this. Could you possibly substitute the labels/names in? I'd assume I'm supposed to know what goes where all the X's and parenthesis are, right? I'll take a look at the template when I get home, but so far, it doesn't make a lot of sense to me. :( What vB code did you make and can you give a screenshot of where you want it added? So it is more clear to me? When I have the time, I am willing to try and figure it out for you.

SloppyGoat
Sat 1st Jun '02, 1:58am
I just added this, and I'd just like to add another small button that says "swf" next to the IMG button....or wherever it can go. Then, I can get rid of the example url in it, right? (yourdomain.com) Would doing this bring up the box to paste the url in like an IMG or http tag? Or does that require some additional JS?


width="300" height="250" is replaced with (<embed src=http://yourdomain.com/test.swf type=application/x-shockwave-flash width="300" height="250"></embed>)


Thanks for your help! Much appreciated! :)

BTW, my vbcode buttons are default right now....just like the ones here, if you need a visual. ;)

SloppyGoat
Sat 1st Jun '02, 2:24am
One other thing I've noticed. When I use the code tag button, the text shows up black, and I have a black background, so it's invisible! How do I change that? :confused:

SloppyGoat
Mon 10th Jun '02, 10:33pm
Bump

SloppyGoat
Tue 18th Jun '02, 1:36am
Bump again

plattopus
Tue 18th Jun '02, 3:48am
Please install this hack (http://www.vbulletin.org/forum/showthread.php?s=&threadid=40047).

SloppyGoat
Mon 1st Jul '02, 12:50am
Hey thanks man! :) I knew there was going to be some JS in there somewhere. It worked perfectly.