ok so ive figured this out
seems to work fine except does not give easybb options when editing a comment (because it tries to put it in the post form not the edit form so I just left the option out)
to see it in action you will have to goto my site and open an account as guests can't comment.
this is how to do it.
Open your template.html file and stick this javascript in the header:
<script type="text/javascript">
function insert_text(open, close){
msgfield = (document.all) ? document.all.msg_body : document.forms['post']['msg_body'];
// IE support
if (document.selection && document.selection.createRange)
{
msgfield.focus();
sel = document.selection.createRange();
sel.text = open + sel.text + close;
msgfield.focus();
}
// Moz support
else if (msgfield.selectionStart || msgfield.selectionStart == '0')
{
var startPos = msgfield.selectionStart;
var endPos = msgfield.selectionEnd;
msgfield.value = msgfield.value.substring(0, startPos) + open + msgfield.value.substring(startPos, endPos) + close + msgfield.value.substring(endPos, msgfield.value.length);
msgfield.selectionStart = msgfield.selectionEnd = endPos + open.length + close.length;
msgfield.focus();
}
// Fallback support for other browsers
else
{
msgfield.value += open + close;
msgfield.focus();
}
return;
}</script>
Then open themes.inc.php and search for <!-- END input_box_smilies --> (must have smilies enabled otherwise use the without smilies input box)
add this code just before that:
<div style="padding-top: 4px">
<input type="button" value=" B " name="B" onclick="insert_text('[b]','[/b]')" />
<input type="button" value=" I " name="I" onclick="insert_text('[i]','[/i]')" />
<input type="button" value="http://" name="Url" onclick="insert_text('[url]','[/url]')" />
<input type="button" value="Img" name="Img" onclick="insert_text('[img]','[/img]')" />
</div>
Hope this is clear enough...give me a shout if you need help with this.
Cheers
Nick