<div>
{include file=footerMenu}
</div>
- <small class="copyright"><a href="http://www.woltlab.com" title="Go to the WoltLab website">Copyright © 2001-2011 WoltLab® GmbH</a></small>
+ {event name='copyright'}
</footer>
<!-- /FOOTER -->
<a id="bottom"></a>
WCF.User.init({@$__wcf->user->userID}, '{@$__wcf->user->username|encodeJS}');
//]]>
</script>
-
-{*
-{if $specialStyles|isset}
- <!-- special styles -->
- {@$specialStyles}
-{/if}
-*}
+{event name='javascriptInclude'}
<!-- Stylesheets -->
<style type="text/css">
@import url("{@RELATIVE_WCF_DIR}acp/style/style.css") screen;
- {*
+ {*
@import url("{@RELATIVE_WCF_DIR}acp/style/style-{@$__wcf->getLanguage()->getPageDirection()}.css") screen;
@import url("{@RELATIVE_WCF_DIR}acp/style/print.css") print;
*}
+
+ {event name='stylesheetImport'}
</style>
+
+<script type="text/javascript">
+ //<![CDATA[
+ $(function() {
+ WCF.Language.addObject({
+ 'wcf.global.button.next': '{lang}wcf.global.button.next{/lang}',
+ 'wcf.global.loading': '{lang}wcf.global.loading{/lang}',
+ 'wcf.date.relative.minutes': '{capture assign=relativeMinutes}{lang}wcf.date.relative.minutes{/lang}{/capture}{@$relativeMinutes|encodeJS}',
+ 'wcf.date.relative.hours': '{capture assign=relativeHours}{lang}wcf.date.relative.hours{/lang}{/capture}{@$relativeHours|encodeJS}',
+ 'wcf.date.relative.pastDays': '{capture assign=relativePastDays}{lang}wcf.date.relative.pastDays{/lang}{/capture}{@$relativePastDays|encodeJS}',
+ 'wcf.date.dateTimeFormat': '{lang}wcf.date.dateTimeFormat{/lang}',
+ '__days': [ '{lang}wcf.date.day.sunday{/lang}', '{lang}wcf.date.day.monday{/lang}', '{lang}wcf.date.day.tuesday{/lang}', '{lang}wcf.date.day.wednesday{/lang}', '{lang}wcf.date.day.thursday{/lang}', '{lang}wcf.date.day.friday{/lang}', '{lang}wcf.date.day.saturday{/lang}' ],
+ 'wcf.global.thousandsSeparator': '{capture assign=thousandsSeparator}{lang}wcf.global.thousandsSeparator{/lang}{/capture}{@$thousandsSeparator|encodeJS}',
+ 'wcf.global.decimalPoint': '{capture assign=decimalPoint}{lang}wcf.global.decimalPoint{/lang}{/capture}{$decimalPoint|encodeJS}',
+ 'wcf.global.page.next': '{capture assign=pageNext}{lang}wcf.global.page.next{/lang}{/capture}{@$pageNext|encodeJS}',
+ 'wcf.global.page.previous': '{capture assign=pagePrevious}{lang}wcf.global.page.previous{/lang}{/capture}{@$pagePrevious|encodeJS}'
+ {event name='javascriptLanguageImport'}
+ });
+ new WCF.Date.Time();
+ new WCF.Effect.SmoothScroll();
+ new WCF.Effect.BalloonTooltip();
+
+ {event name='javascriptInit'}
+ });
+ //]]>
+</script>
\ No newline at end of file
<a id="top"></a>
<!-- HEADER -->
<header class="pageHeader">
- {event name='pageHeaderStart'}
-
- {include file=headerMenu}
-
- {event name='pageHeaderEnd'}
+ <div>
+ {hascontent}
+ <!-- top menu -->
+ <nav id="topMenu" class="topMenu">
+ <div>
+ <ul>
+ {content}{event name='topMenu'}{/content}
+ </ul>
+ </div>
+ </nav>
+ <!-- /top menu -->
+ {/hascontent}
+
+ <!-- logo -->
+ <div id="logo" class="logo">
+ <!-- clickable area -->
+ <a href="{link}index.php{/link}">
+ <!-- *** insert header logo here -->
+ </a>
+ <!-- /clickable area -->
+
+ <!-- search area -->
+ {event name='searchArea'}
+ <!-- /search area -->
+ </div>
+ <!-- /logo -->
+
+ <!-- main menu -->
+ {include file='mainMenu'}
+ <!-- /main menu -->
+
+ <!-- header navigation -->
+ <nav class="headerNavigation">
+ <div>
+ <ul>
+ {event name='headerNavigation'}
+ <li id="toBottomLink" class="toBottomLink"><a href="#bottom" title="{lang}wcf.global.scrollDown{/lang}" class="balloonTooltip"><img src="{@RELATIVE_WCF_DIR}icon/toBottom.svg" alt="" /> <span class="invisible">{lang}wcf.global.scrollDown{/lang}</span></a></li>
+ </ul>
+ </div>
+ </nav>
+ <!-- /header navigation -->
+ </div>
</header>
<!-- /HEADER -->
+++ /dev/null
-{if $__wcf->getPageMenu()->getMenuItems('header')|count > 0}
- <nav id="mainMenu" class="mainMenu">
- <ul>
- {foreach from=$__wcf->getPageMenu()->getMenuItems('header') item=menuItem}
- <li><a href="{$menuItem->menuItemLink}">{$menuItem->menuItem} ({#$menuItem->getProcessor()->getNotifications()})</a>
-
- {if $__wcf->getPageMenu()->getMenuItems($menuItem->menuItem)|count > 0}
- <ul>
- {foreach from=$__wcf->getPageMenu()->getMenuItems($menuItem->menuItem) item=subMenuItem}
- <li><a href="{$subMenuItem->menuItemLink}">{$subMenuItem->menuItem} ({#$subMenuItem->getProcessor()->getNotifications()})</a></li>
- {/foreach}
- </ul>
- {/if}
-
- </li>
- {/foreach}
- </ul>
- </nav>
-{/if}
--- /dev/null
+{if $__wcf->getPageMenu()->getMenuItems('header')|count > 0}
+ <nav id="mainMenu" class="mainMenu">
+ <ul>
+ {foreach from=$__wcf->getPageMenu()->getMenuItems('header') item=menuItem}
+ <li><a href="{$menuItem->menuItemLink}">{$menuItem->menuItem} ({#$menuItem->getProcessor()->getNotifications()})</a>
+
+ {if $__wcf->getPageMenu()->getMenuItems($menuItem->menuItem)|count > 0}
+ <ul>
+ {foreach from=$__wcf->getPageMenu()->getMenuItems($menuItem->menuItem) item=subMenuItem}
+ <li><a href="{$subMenuItem->menuItemLink}">{$subMenuItem->menuItem} ({#$subMenuItem->getProcessor()->getNotifications()})</a></li>
+ {/foreach}
+ </ul>
+ {/if}
+
+ </li>
+ {/foreach}
+ </ul>
+ </nav>
+{/if}
*/
protected function loadTemplateListenerCode($templateName) {
// cache was already loaded
- if (count($this->templateListeners[$templateName])) return;
+ if (!isset($this->templateListeners[$templateName]) || count($this->templateListeners[$templateName])) return;
$cacheName = PACKAGE_ID.'-'.$this->environment.'-'.$templateName;
CacheHandler::getInstance()->addResource(
<?php
namespace wcf\system\template\plugin;
use wcf\system\template\TemplateScriptingCompiler;
+use wcf\system\WCF;
/**
* The 'event' prefilter inserts template listener's code before compilation.
public function execute($templateName, $sourceContent, TemplateScriptingCompiler $compiler) {
$ldq = preg_quote($compiler->getLeftDelimiter(), '~');
$rdq = preg_quote($compiler->getRightDelimiter(), '~');
- $sourceContent = preg_replace("~{$ldq}event\ name\=\'([\w]+)\'{$rdq}~e", 'wcf\system\WCF::getTPL()->getTemplateListenerCode(\''.$templateName.'\', \'$1\')', $sourceContent);
+ $sourceContent = preg_replace_callback("~{$ldq}event\ name\=\'([\w]+)\'{$rdq}~", function ($match) use ($templateName) {
+ return WCF::getTPL()->getTemplateListenerCode($templateName, $match[1]);
+ }, $sourceContent);
return $sourceContent;
}