<ul class="smileyList">
{foreach from=$smilies item=smiley}
- <li><a title="{lang}{$smiley->smileyTitle}{/lang}" class="jsTooltip jsSmiley" data-smiley-code="{$smiley->smileyCode}"><img src="{$smiley->getURL()}" alt="{$smiley->smileyCode}" /></a></li>
+ <li><a title="{lang}{$smiley->smileyTitle}{/lang}" class="jsTooltip jsSmiley" data-smiley-code="{$smiley->smileyCode}" data-smiley-path="{$smiley->smileyPath}"><img src="{$smiley->getURL()}" alt="{$smiley->smileyCode}" /></a></li>
{/foreach}
</ul>
\ No newline at end of file
_smileyClick: function(event) {
var $target = $(event.currentTarget);
var $smileyCode = $target.data('smileyCode');
+ var $smileyPath = $target.data('smileyPath');
// get ckEditor
var $ckEditor = this._ckEditor.ckeditorGet();
- // get smiley path
- var $smileyPath = $target.find('img').attr('src');
// add smiley to config
if (!WCF.inArray($smileyCode, $ckEditor.config.smiley_descriptions)) {
// in design mode
var $img = $ckEditor.document.createElement('img', {
attributes: {
- src: $smileyPath,
+ src: $ckEditor.config.smiley_path + $smileyPath,
'class': 'smiley',
alt: $smileyCode
}