Makes it possible to use wysiwyg completely without smileys
authorMatthias Schmidt <gravatronics@live.com>
Wed, 7 Aug 2013 16:55:27 +0000 (18:55 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Wed, 7 Aug 2013 16:55:27 +0000 (18:55 +0200)
com.woltlab.wcf/templates/wysiwyg.tpl
com.woltlab.wcf/templates/wysiwygToolbar.tpl

index 6eb7619fec5b8f02ac4b6f38dfd8938158c1b164..ba5dfb452dd7dad9cea3f535984a7fe1f768472b 100644 (file)
@@ -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'}
index 4952c3e51b6d5d6c18a3997bf198790ef4fbc21c..ba2ef85820e442ec4ed8814f0857ea738b26ab46 100644 (file)
@@ -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}