--- /dev/null
+<ul class="inlineList smileyList">
+ {foreach from=$smilies item=smiley}
+ <li><a title="{lang}{$smiley->smileyTitle}{/lang}" class="jsTooltip jsSmiley">{@$smiley->getHtml()}</a></li>
+ {/foreach}
+</ul>
\ No newline at end of file
{event name='messageFields'}
</div>
+
+ {include file='messageFormTabs' wysiwygContainerID='content0'}
{else}
<div class="section tabMenuContainer">
<nav class="tabMenu">
{event name='messageFieldsMultilingual'}
</div>
+
+ {include file='messageFormTabs' wysiwygContainerID='content'|concat:$availableLanguage->languageID}
</div>
{/foreach}
</div>
</dd>
</dl>
</div>
+
+ {if $boxType == 'text'}
+ {include file='messageFormTabs' wysiwygContainerID='content0'}
+ {/if}
{else}
<div class="tabMenuContainer">
<nav class="menu">
{/if}
</dd>
</dl>
+
+ {if $boxType == 'text'}
+ {include file='messageFormTabs' wysiwygContainerID='content'|concat:$availableLanguage->languageID}
+ {/if}
{/if}
</div>
</div>
--- /dev/null
+{if !$__messageFormSmiliesJavascript|isset}
+ {assign var='__messageFormSmiliesJavascript' value=true}
+
+ {js application='wcf' file='WCF.Message' bundle='WCF.Combined'}
+{/if}
+
+{assign var=__tabCount value=0}
+{capture assign=__categoryTabs}
+ {foreach from=$smileyCategories item=smileyCategory}
+ {assign var=__tabCount value=$__tabCount + 1}
+ {assign var='__smileyAnchor' value='smilies-'|concat:$smileyCategory->categoryID}
+ <li data-name="smilies-{@$smileyCategory->categoryID}" data-smiley-category-id="{@$smileyCategory->categoryID}"><a>{$smileyCategory->title|language}</a></li>
+ {/foreach}
+{/capture}
+
+<div class="messageTabMenuContent{if $__tabCount} messageTabMenu{/if}" data-preselect="true" data-collapsible="false" id="smilies-{if $wysiwygSelector|isset}{$wysiwygSelector}{else}text{/if}">
+ {capture assign=__defaultSmilies}
+ {assign var='__firstSmileyCategory' value=$smileyCategories|reset}
+ {if $__firstSmileyCategory->categoryID}
+ {include file='__messageFormSmilies' smilies=$__wcf->getSmileyCache()->getCategorySmilies($__firstSmileyCategory->categoryID)}
+ {else}
+ {include file='__messageFormSmilies' smilies=$__wcf->getSmileyCache()->getCategorySmilies()}
+ {/if}
+ {/capture}
+
+ {if $__tabCount > 1}
+ <nav class="jsOnly">
+ <ul>
+ {@$__categoryTabs}
+ </ul>
+ </nav>
+
+ {foreach from=$smileyCategories item=smileyCategory}
+ <div class="messageTabMenuContent" id="smilies-{if $wysiwygSelector|isset}{$wysiwygSelector|encodeJS}{else}text{/if}-{@$smileyCategory->categoryID}">
+ {if !$smileyCategory->categoryID}{@$__defaultSmilies}{/if}
+ </div>
+ {/foreach}
+
+ <script data-relocate="true">
+ $(function() {
+ new WCF.Message.SmileyCategories('{if $wysiwygSelector|isset}{$wysiwygSelector|encodeJS}{else}text{/if}');
+ });
+ </script>
+ {else}
+ {@$__defaultSmilies}
+ {/if}
+
+ {event name='fields'}
+
+ <script data-relocate="true">
+ $(function() {
+ new WCF.Message.Smilies('{if $wysiwygSelector|isset}{$wysiwygSelector|encodeJS}{else}text{/if}');
+ });
+ </script>
+</div>
--- /dev/null
+{hascontent}
+ <div class="messageTabMenu" data-preselect="{if $preselectTabMenu|isset}{$preselectTabMenu}{else}false{/if}" data-wysiwyg-container-id="{if $wysiwygContainerID|isset}{$wysiwygContainerID}{else}text{/if}">
+ <nav class="messageTabMenuNavigation jsOnly">
+ <ul>
+ {content}
+ {if MODULE_SMILEY && !$smileyCategories|empty}<li data-name="smilies"><a><span class="icon icon16 fa-smile-o"></span> <span>{lang}wcf.message.smilies{/lang}</span></a></li>{/if}
+ {event name='tabMenuTabs'}
+ {/content}
+ </ul>
+ </nav>
+
+ {if MODULE_SMILEY && !$smileyCategories|empty}{include file='messageFormSmilies'}{/if}
+
+ {event name='tabMenuContents'}
+ </div>
+
+ <script data-relocate="true">
+ $(function() {
+ $('.messageTabMenu').messageTabMenu();
+ });
+ </script>
+{/hascontent}
</dd>
</dl>
+ {if $pageType == 'text'}
+ {include file='messageFormTabs' wysiwygContainerID='content0'}
+ {/if}
+
<dl{if $errorField == 'metaDescription'} class="formError"{/if}>
<dt><label for="metaDescription">{lang}wcf.acp.page.metaDescription{/lang}</label></dt>
<dd>
</dd>
</dl>
+ {if $pageType == 'text'}
+ {include file='messageFormTabs' wysiwygContainerID='content'|concat:$availableLanguage->languageID}
+ {/if}
+
{assign var='__errorFieldName' value='metaDescription_'|concat:$availableLanguage->languageID}
<dl{if $errorField == $__errorFieldName} class="formError"{/if}>
<dt><label for="metaDescription{@$availableLanguage->languageID}">{lang}wcf.acp.page.metaDescription{/lang}</label></dt>
use wcf\data\language\Language;
use wcf\data\media\Media;
use wcf\data\media\ViewableMediaList;
+use wcf\data\smiley\SmileyCache;
use wcf\data\user\User;
use wcf\form\AbstractForm;
use wcf\system\cache\builder\ArticleCategoryLabelCacheBuilder;
public function assignVariables() {
parent::assignVariables();
+ SmileyCache::getInstance()->assignVariables();
+
WCF::getTPL()->assign([
'action' => 'add',
'isMultilingual' => $this->isMultilingual,
use wcf\data\object\type\ObjectTypeCache;
use wcf\data\page\Page;
use wcf\data\page\PageNodeTree;
+use wcf\data\smiley\SmileyCache;
use wcf\form\AbstractForm;
use wcf\system\acl\simple\SimpleAclHandler;
use wcf\system\box\IBoxController;
public function assignVariables() {
parent::assignVariables();
+ SmileyCache::getInstance()->assignVariables();
+
WCF::getTPL()->assign([
'action' => 'add',
'isMultilingual' => $this->isMultilingual,
use wcf\data\page\PageAction;
use wcf\data\page\PageEditor;
use wcf\data\page\PageNodeTree;
+use wcf\data\smiley\SmileyCache;
use wcf\form\AbstractForm;
use wcf\system\acl\simple\SimpleAclHandler;
use wcf\system\exception\IllegalLinkException;
public function assignVariables() {
parent::assignVariables();
+ SmileyCache::getInstance()->assignVariables();
+
WCF::getTPL()->assign([
'action' => 'add',
'parentPageID' => $this->parentPageID,
use wcf\system\cache\builder\SmileyCacheBuilder;
use wcf\system\category\CategoryHandler;
use wcf\system\SingletonFactory;
+use wcf\system\WCF;
/**
* Manages the smiley cache.
return [];
}
+
+ /**
+ * Assigns the smilies and their categories to the template.
+ *
+ * @since 3.2
+ */
+ public function assignVariables() {
+ if (!MODULE_SMILEY) {
+ return;
+ }
+
+ $smileyCategories = $this->getVisibleCategories();
+ $firstCategory = reset($smileyCategories);
+ $defaultSmilies = [];
+ if ($firstCategory) {
+ $defaultSmilies = $this->getCategorySmilies($firstCategory->categoryID ?: null);
+ }
+
+ WCF::getTPL()->assign([
+ 'defaultSmilies' => $defaultSmilies,
+ 'smileyCategories' => $smileyCategories,
+ ]);
+ }
}