From ef118b53e4696f35502b9929b9798cf59f41fcde Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Wed, 7 Aug 2013 18:55:27 +0200 Subject: [PATCH] Makes it possible to use wysiwyg completely without smileys --- com.woltlab.wcf/templates/wysiwyg.tpl | 16 +++++++++------- com.woltlab.wcf/templates/wysiwygToolbar.tpl | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/com.woltlab.wcf/templates/wysiwyg.tpl b/com.woltlab.wcf/templates/wysiwyg.tpl index 6eb7619fec..ba5dfb452d 100644 --- a/com.woltlab.wcf/templates/wysiwyg.tpl +++ b/com.woltlab.wcf/templates/wysiwyg.tpl @@ -38,13 +38,15 @@ $(function() { toolbarCanCollapse: false, enterMode: CKEDITOR.ENTER_BR, minHeight: 200, - toolbar: __CKEDITOR_TOOLBAR, - smiley_images: [ - {implode from=$defaultSmilies item=smiley}'{@$smiley->smileyPath|encodeJS}'{/implode} - ], - smiley_descriptions: [ - {implode from=$defaultSmilies item=smiley}'{@$smiley->smileyCode|encodeJS}'{/implode} - ] + toolbar: __CKEDITOR_TOOLBAR + {if $defaultSmilies|isset} + ,smiley_images: [ + {implode from=$defaultSmilies item=smiley}'{@$smiley->smileyPath|encodeJS}'{/implode} + ], + smiley_descriptions: [ + {implode from=$defaultSmilies item=smiley}'{@$smiley->smileyCode|encodeJS}'{/implode} + ] + {/if} }; {event name='javascriptInit'} diff --git a/com.woltlab.wcf/templates/wysiwygToolbar.tpl b/com.woltlab.wcf/templates/wysiwygToolbar.tpl index 4952c3e51b..ba2ef85820 100644 --- a/com.woltlab.wcf/templates/wysiwygToolbar.tpl +++ b/com.woltlab.wcf/templates/wysiwygToolbar.tpl @@ -60,7 +60,7 @@ var $other = [ ]; {if $__wcf->getBBCodeHandler()->isAvailableBBCode('table')} $other.push('Table'); {/if} -{if MODULE_SMILEY && (!$permissionCanUseSmilies|isset || $__wcf->getSession()->getPermission($permissionCanUseSmilies)) && defaultSmilies|count} +{if MODULE_SMILEY && (!$permissionCanUseSmilies|isset || $__wcf->getSession()->getPermission($permissionCanUseSmilies)) && $defaultSmilies|isset && $defaultSmilies|count} $other.push('Smiley'); {/if} -- 2.20.1