Thanx, I didn't realize that forum templates are theme-specific, and to be honest, i had no idea that BBcode control is in the template file. So I replaced the bbfontstyle & bbstyle functions from the standalone phpBB code, works great! 8)
While researching the problem, I even came across the smilie fix for Mozilla. Smilies are always inserted at the end of the post, instead of the cursor position. Here's the code that I found at
http://nukecops.com/postitle35863-0-0-bbcode.html
Quote:
function emoticon(text) {
text = ' ' + text + ' ';
if (document.post.message.createTextRange && document.post.message.caretPos) {
var caretPos = document.post.message.caretPos;
caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text;
document.post.message.focus();
} else {
posttextarea = document.post.message;
selected=(posttextarea.value).substring(posttextar ea.selectionStart,posttextarea.selectionEnd);
str=' ' + text + ' ';
posttextarea.focus();
start=posttextarea.selectionStart;
end=posttextarea.textLength;
endtext=posttextarea.value.substring(posttextarea. selectionEnd,end);
starttext=posttextarea.value.substring(0,start);
posttextarea.value=starttext + str + endtext;
posttextarea.selectionStart=start;
posttextarea.selectionEnd=start;
return;
}
}
|
I know next to nothing about PHP and Javascript, so I really have no clue how this works. But it does work, though I noticed it only works for regular smilies, the additional ones (from the "View more Emoticons" popup) still don't work properly.