PDA

View Full Version : vbcode_buttons template help



OpalCat
Mon 18th Mar '02, 6:37am
I'm editing my vbcode_buttons template and I want to add some buttons that add special symbols. I have them in my replacements, but they are not open & close tags, they are only single tags. For example, the tag puts a © symbol. I want to set up the buttons, but if I just put them in the way the other buttons are coded (as I've done for a cite and spoiler button) then the "close tags" buttons would add, say, and that would be just silly.

How do I do this? Here is how I have the buttons so far:


<input type="button" class="bginput" value="&euro;" title="Insert Euro Symbol" onClick="vbcode(this.form,'euro','')" name="button" >
<input type="button" class="bginput" value="&pound;" title="Insert Pound Symbol" onClick="vbcode(this.form,'pound','')" name="button2" >
<input type="button" class="bginput" value="&yen;" title="Insert Yen Symbol" onClick="vbcode(this.form,'yen','')" name="button3" >
<input type="button" class="bginput" value="&frac12;" title="Insert 1/2 Symbol" onClick="vbcode(this.form,'1/2','')" name="button4" >
<input type="button" class="bginput" value="&frac14;" title="Insert 1/4 Symbol" onClick="vbcode(this.form,'1/4','')" name="button5" >
<input type="button" class="bginput" value="&frac34;" title="Insert 3/4 Symbol" onClick="vbcode(this.form,'3/4','')" name="button6" >
<input type="button" class="bginput" value="&copy;" title="Insert Copyright Symbol" onClick="vbcode(this.form,'copy','')" name="button7" >
<input type="button" class="bginput" value="&reg;" title="Insert Registered Symbol" onClick="vbcode(this.form,'reg','')" name="button8" >
<input type="button" class="bginput" value="TM" title="Insert Trademark Symbol" onClick="vbcode(this.form,'tm','')" name="button9" >
<input type="button" class="bginput" value="&ordm;" title="Insert Degree Symbol" onClick="vbcode(this.form,'deg','')" name="button10" >
<input type="button" class="bginput" value="&cent;" title="Insert Cent Symbol" onClick="vbcode(this.form,'cent','')" name="button11" >


I assume I need to edit some javascript somewhere to do this...?

I'm attaching a screenshot of my current vbcode buttons panel, which works perfectly:

OpalCat
Tue 19th Mar '02, 10:59am
No Javascript whizzes out there who know how to do this?

OpalCat
Tue 19th Mar '02, 11:43am
I think I know how to do it! The smiley code! I just need to figure out how to get a button to make a "smilie".... anyone know?

Here is the code for a vbcode button:

<input type="button" class="bginput" value="&cent;" title="Insert Cent Symbol" onClick="vbcode(this.form,'cent','')" name="button" >

Here is the code for a smilie:

<a href="javascript:smilie(':)')"><img src="images/smilies/smile.gif" border="0" alt="smile"></a>


So how would I make a button that made a smilie? How do I transform the link javascript into form button javascript?

OpalCat
Tue 19th Mar '02, 12:42pm
I got it!!!

here is the code if anyone else comes along with the same question:

<input type="button" class="bginput" value="¢" title="Insert Cent Symbol" onClick="smilie('[cent]','')" name="button" >