MyBB Community Forums

Full Version: Issue with making own smilie box work
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
EDIT: Solved. I had to place the $smilieinserter variable above the $codebuttons variable. If I place it underneth the $codebuttons variable, there will be a javascript issue which will result in non-clickable smilies.



Hi,

after I have modified the new reply template (tableless) I figured the Smilie Inserter box not working anymore. If I click a smilie nothing happens.

But I don't mind the default Smilie Inserter box. I want to make my own.

I have placed right underneth the editor a fieldset with the {$smilies} variable. While smilies show up they cannot be clicked and nothing gets inserted into the editor.

I have analysed on this site how smilie insertion works: http://community.mybb.com/misc.php?actio...ableEditor

Smilies are placed with this javascript into the editor:

onclick="insertSmilie('test');"

For instance the code for the lightbulb smilie is this:

<img onclick="insertSmilie(':lightbulb:');" title=":lightbulb:" alt=":lightbulb:" src="images/smilies/lightbulb.gif">

To test this I have copied this particular code manually via Firebug in the fieldset underneth the editor and while the smilie showed up, clicking it resulted in the error "insertSmilie not defined". What is that supposed to mean? Why is this not defined?