bbcode buttons for commentform

Creating and modifying plugins.
Post Reply
Matthias2
Regular
Posts: 71
Joined: Sun Sep 17, 2006 2:22 pm

bbcode buttons for commentform

Post by Matthias2 »

Hi there,

I´m searchin a plugin that shows bbcode buttons (or text instead of buttons) above the commentform (as we see it here in s9y forum above the textform). Is there such an plugin? I could not find anything but I think it would be a good help für all visitors who want to leave a comment in someones´s blog an want to format there text.

thanks for help.
Matthias2
Regular
Posts: 71
Joined: Sun Sep 17, 2006 2:22 pm

I tried this

Post by Matthias2 »

I use a standard JS-File with functions like this

Code: Select all

function insertHTMLCode(tag)
	{
		switch(tag)
		{
			case "b":
				value = prompt("fett gedruckter Text:", "");
				code = (value != null ) ? "[b]"+value+"[/b] " : "";
			break;

			case "code":
				code = "[code]
";
break;
}
...
[/code]

And I integrated according Links into commentform.tpl above comment field.

Code: Select all

<a accesskey="b" href="javascript:insertHTMLCode('b')" title="fett gedruckter Text (Alt+B)"><strong>fett</strong></a>
What have I to do, that these BBCodes are inserted into commentfield? I tried several things but nothing took effect?

Am I on the wrong track?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: I tried this

Post by garvinhicking »

Hi!

Did you try to insert that into your commentform.tpl template file?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply