Merge branch '2.0'
[GitHub/WoltLab/WCF.git] / com.woltlab.wcf / templates / headInclude.tpl
1 <base href="{$baseHref}" />
2 <meta charset="utf-8" />
3 <meta name="viewport" content="width=device-width, initial-scale=1" />
4 <meta name="format-detection" content="telephone=no" />
5 {if $allowSpidersToIndexThisPage|empty}<meta name="robots" content="noindex,nofollow" />{/if}
6 {implode from=$__wcf->getMetaTagHandler() item=__metaTag glue="\n"}{@$__metaTag}{/implode}
7 {event name='metaTags'}
8
9 <script data-relocate="true">
10 //<![CDATA[
11 var SID_ARG_2ND = '{@SID_ARG_2ND_NOT_ENCODED}';
12 var WCF_PATH = '{@$__wcf->getPath()}';
13 var SECURITY_TOKEN = '{@SECURITY_TOKEN}';
14 var LANGUAGE_ID = {@$__wcf->getLanguage()->languageID};
15 var TIME_NOW = {@TIME_NOW};
16 //]]>
17 </script>
18 {if JQUERY_SOURCE == 'google'}
19 <script data-relocate="true" src="//ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
20 <script data-relocate="true" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
21 {elseif JQUERY_SOURCE == 'microsoft'}
22 <script data-relocate="true" src="//ajax.aspnetcdn.com/ajax/jQuery/jquery-2.1.0.min.js"></script>
23 <script data-relocate="true" src="//ajax.aspnetcdn.com/ajax/jquery.ui/1.10.4/jquery-ui.min.js"></script>
24 {elseif JQUERY_SOURCE == 'cloudflare'}
25 <script data-relocate="true" src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
26 <script data-relocate="true" src="//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
27 {else}
28 <script data-relocate="true" src="{@$__wcf->getPath()}js/3rdParty/jquery.min.js?v={@$__wcfVersion}"></script>
29 <script data-relocate="true" src="{@$__wcf->getPath()}js/3rdParty/jquery-ui.min.js?v={@$__wcfVersion}"></script>
30 {/if}
31 {if JQUERY_SOURCE != 'local'}
32 <script data-relocate="true">
33 //<![CDATA[
34 if (!window.jQuery) {
35 document.write('<script data-relocate="true" src="{@$__wcf->getPath()}js/3rdParty/jquery.min.js?v={@$__wcfVersion}"><\/script>');
36 document.write('<script data-relocate="true" src="{@$__wcf->getPath()}js/3rdParty/jquery-ui.min.js?v={@$__wcfVersion}"><\/script>');
37 }
38 //]]>
39 </script>
40 {/if}
41 <script data-relocate="true" src="{@$__wcf->getPath()}js/3rdParty/jquery-ui.nestedSortable{if !ENABLE_DEBUG_MODE}.min{/if}.js?v={@$__wcfVersion}"></script>
42 <script data-relocate="true" src="{@$__wcf->getPath()}js/3rdParty/jquery-ui.timepicker{if !ENABLE_DEBUG_MODE}.min{/if}.js?v={@$__wcfVersion}"></script>
43
44 {if ENABLE_DEBUG_MODE}
45 <script data-relocate="true" src="{@$__wcf->getPath()}js/WCF.js?v={@$__wcfVersion}"></script>
46 <script data-relocate="true" src="{@$__wcf->getPath()}js/WCF.Like.js?v={@$__wcfVersion}"></script>
47 <script data-relocate="true" src="{@$__wcf->getPath()}js/WCF.ACL.js?v={@$__wcfVersion}"></script>
48 <script data-relocate="true" src="{@$__wcf->getPath()}js/WCF.Attachment.js?v={@$__wcfVersion}"></script>
49 <script data-relocate="true" src="{@$__wcf->getPath()}js/WCF.ColorPicker.js?v={@$__wcfVersion}"></script>
50 <script data-relocate="true" src="{@$__wcf->getPath()}js/WCF.Comment.js?v={@$__wcfVersion}"></script>
51 <script data-relocate="true" src="{@$__wcf->getPath()}js/WCF.ImageViewer.js?v={@$__wcfVersion}"></script>
52 <script data-relocate="true" src="{@$__wcf->getPath()}js/WCF.Label.js?v={@$__wcfVersion}"></script>
53 <script data-relocate="true" src="{@$__wcf->getPath()}js/WCF.Location.js?v={@$__wcfVersion}"></script>
54 <script data-relocate="true" src="{@$__wcf->getPath()}js/WCF.Message.js?v={@$__wcfVersion}"></script>
55 <script data-relocate="true" src="{@$__wcf->getPath()}js/WCF.Moderation.js?v={@$__wcfVersion}"></script>
56 <script data-relocate="true" src="{@$__wcf->getPath()}js/WCF.Poll.js?v={@$__wcfVersion}"></script>
57 <script data-relocate="true" src="{@$__wcf->getPath()}js/WCF.Search.Message.js?v={@$__wcfVersion}"></script>
58 <script data-relocate="true" src="{@$__wcf->getPath()}js/WCF.Tagging.js?v={@$__wcfVersion}"></script>
59 <script data-relocate="true" src="{@$__wcf->getPath()}js/WCF.User.js?v={@$__wcfVersion}"></script>
60 {else}
61 <script data-relocate="true" src="{@$__wcf->getPath()}js/WCF.Combined.min.js?v={@$__wcfVersion}"></script>
62 {/if}
63
64 <script data-relocate="true">
65 //<![CDATA[
66 WCF.User.init({@$__wcf->user->userID}, '{@$__wcf->user->username|encodeJS}');
67 //]]>
68 </script>
69
70 {event name='javascriptInclude'}
71
72 <!-- Stylesheets -->
73 {@$__wcf->getStyleHandler()->getStylesheet()}
74 {event name='stylesheets'}
75
76 <!-- Icons -->
77 <link rel="icon" href="{@$__wcf->getPath()}images/favicon.ico" type="image/x-icon" />
78 <link rel="apple-touch-icon" href="{@$__wcf->getPath()}images/apple-touch-icon.png" />
79
80 <noscript>
81 <style type="text/css">
82 .jsOnly {
83 display: none !important;
84 }
85
86 .noJsOnly {
87 display: block !important;
88 }
89 </style>
90 </noscript>
91
92 <script data-relocate="true">
93 //<![CDATA[
94 $(function() {
95 WCF.Language.addObject({
96 '__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}' ],
97 '__daysShort': [ '{lang}wcf.date.day.sun{/lang}', '{lang}wcf.date.day.mon{/lang}', '{lang}wcf.date.day.tue{/lang}', '{lang}wcf.date.day.wed{/lang}', '{lang}wcf.date.day.thu{/lang}', '{lang}wcf.date.day.fri{/lang}', '{lang}wcf.date.day.sat{/lang}' ],
98 '__months': [ '{lang}wcf.date.month.january{/lang}', '{lang}wcf.date.month.february{/lang}', '{lang}wcf.date.month.march{/lang}', '{lang}wcf.date.month.april{/lang}', '{lang}wcf.date.month.may{/lang}', '{lang}wcf.date.month.june{/lang}', '{lang}wcf.date.month.july{/lang}', '{lang}wcf.date.month.august{/lang}', '{lang}wcf.date.month.september{/lang}', '{lang}wcf.date.month.october{/lang}', '{lang}wcf.date.month.november{/lang}', '{lang}wcf.date.month.december{/lang}' ],
99 '__monthsShort': [ '{lang}wcf.date.month.short.jan{/lang}', '{lang}wcf.date.month.short.feb{/lang}', '{lang}wcf.date.month.short.mar{/lang}', '{lang}wcf.date.month.short.apr{/lang}', '{lang}wcf.date.month.short.may{/lang}', '{lang}wcf.date.month.short.jun{/lang}', '{lang}wcf.date.month.short.jul{/lang}', '{lang}wcf.date.month.short.aug{/lang}', '{lang}wcf.date.month.short.sep{/lang}', '{lang}wcf.date.month.short.oct{/lang}', '{lang}wcf.date.month.short.nov{/lang}', '{lang}wcf.date.month.short.dec{/lang}' ],
100 'wcf.clipboard.item.unmarkAll': '{lang}wcf.clipboard.item.unmarkAll{/lang}',
101 'wcf.date.relative.now': '{lang}wcf.date.relative.now{/lang}',
102 'wcf.date.relative.minutes': '{capture assign=relativeMinutes}{lang}wcf.date.relative.minutes{/lang}{/capture}{@$relativeMinutes|encodeJS}',
103 'wcf.date.relative.hours': '{capture assign=relativeHours}{lang}wcf.date.relative.hours{/lang}{/capture}{@$relativeHours|encodeJS}',
104 'wcf.date.relative.pastDays': '{capture assign=relativePastDays}{lang}wcf.date.relative.pastDays{/lang}{/capture}{@$relativePastDays|encodeJS}',
105 'wcf.date.dateFormat': '{lang}wcf.date.dateFormat{/lang}',
106 'wcf.date.dateTimeFormat': '{lang}wcf.date.dateTimeFormat{/lang}',
107 'wcf.date.shortDateTimeFormat': '{lang}wcf.date.shortDateTimeFormat{/lang}',
108 'wcf.date.hour': '{lang}wcf.date.hour{/lang}',
109 'wcf.date.minute': '{lang}wcf.date.minute{/lang}',
110 'wcf.date.timeFormat': '{lang}wcf.date.timeFormat{/lang}',
111 'wcf.date.firstDayOfTheWeek': '{lang}wcf.date.firstDayOfTheWeek{/lang}',
112 'wcf.global.button.add': '{lang}wcf.global.button.add{/lang}',
113 'wcf.global.button.cancel': '{lang}wcf.global.button.cancel{/lang}',
114 'wcf.global.button.close': '{lang}wcf.global.button.close{/lang}',
115 'wcf.global.button.collapsible': '{lang}wcf.global.button.collapsible{/lang}',
116 'wcf.global.button.delete': '{lang}wcf.global.button.delete{/lang}',
117 'wcf.global.button.disable': '{lang}wcf.global.button.disable{/lang}',
118 'wcf.global.button.disabledI18n': '{lang}wcf.global.button.disabledI18n{/lang}',
119 'wcf.global.button.edit': '{lang}wcf.global.button.edit{/lang}',
120 'wcf.global.button.enable': '{lang}wcf.global.button.enable{/lang}',
121 'wcf.global.button.next': '{lang}wcf.global.button.next{/lang}',
122 'wcf.global.button.preview': '{lang}wcf.global.button.preview{/lang}',
123 'wcf.global.button.reset': '{lang}wcf.global.button.reset{/lang}',
124 'wcf.global.button.save': '{lang}wcf.global.button.save{/lang}',
125 'wcf.global.button.search': '{lang}wcf.global.button.search{/lang}',
126 'wcf.global.button.submit': '{lang}wcf.global.button.submit{/lang}',
127 'wcf.global.confirmation.cancel': '{lang}wcf.global.confirmation.cancel{/lang}',
128 'wcf.global.confirmation.confirm': '{lang}wcf.global.confirmation.confirm{/lang}',
129 'wcf.global.confirmation.title': '{lang}wcf.global.confirmation.title{/lang}',
130 'wcf.global.decimalPoint': '{capture assign=decimalPoint}{lang}wcf.global.decimalPoint{/lang}{/capture}{$decimalPoint|encodeJS}',
131 'wcf.global.error.timeout': '{lang}wcf.global.error.timeout{/lang}',
132 'wcf.global.error.title': '{lang}wcf.global.error.title{/lang}',
133 'wcf.global.form.error.empty': '{lang}wcf.global.form.error.empty{/lang}',
134 'wcf.global.form.error.greaterThan': '{lang}wcf.global.form.error.greaterThan.javaScript{/lang}',
135 'wcf.global.form.error.lessThan': '{lang}wcf.global.form.error.lessThan.javaScript{/lang}',
136 'wcf.global.language.noSelection': '{lang}wcf.global.language.noSelection{/lang}',
137 'wcf.global.loading': '{lang}wcf.global.loading{/lang}',
138 'wcf.global.page.jumpTo': '{lang}wcf.global.page.jumpTo{/lang}',
139 'wcf.global.page.jumpTo.description': '{lang}wcf.global.page.jumpTo.description{/lang}',
140 'wcf.global.page.pageNavigation': '{lang}wcf.global.page.pageNavigation{/lang}',
141 'wcf.global.page.next': '{capture assign=pageNext}{lang}wcf.global.page.next{/lang}{/capture}{@$pageNext|encodeJS}',
142 'wcf.global.page.previous': '{capture assign=pagePrevious}{lang}wcf.global.page.previous{/lang}{/capture}{@$pagePrevious|encodeJS}',
143 'wcf.global.pageDirection': '{lang}wcf.global.pageDirection{/lang}',
144 'wcf.global.reason': '{lang}wcf.global.reason{/lang}',
145 'wcf.global.sidebar.hideLeftSidebar': '{lang}wcf.global.sidebar.hideLeftSidebar{/lang}',
146 'wcf.global.sidebar.hideRightSidebar': '{lang}wcf.global.sidebar.hideRightSidebar{/lang}',
147 'wcf.global.sidebar.showLeftSidebar': '{lang}wcf.global.sidebar.showLeftSidebar{/lang}',
148 'wcf.global.sidebar.showRightSidebar': '{lang}wcf.global.sidebar.showRightSidebar{/lang}',
149 'wcf.global.success': '{lang}wcf.global.success{/lang}',
150 'wcf.global.success.add': '{lang}wcf.global.success.add{/lang}',
151 'wcf.global.success.edit': '{lang}wcf.global.success.edit{/lang}',
152 'wcf.global.thousandsSeparator': '{capture assign=thousandsSeparator}{lang}wcf.global.thousandsSeparator{/lang}{/capture}{@$thousandsSeparator|encodeJS}',
153 'wcf.page.sitemap': '{lang}wcf.page.sitemap{/lang}',
154 'wcf.style.changeStyle': '{lang}wcf.style.changeStyle{/lang}'
155 {if MODULE_LIKE}
156 ,'wcf.like.button.like': '{lang}wcf.like.button.like{/lang}',
157 'wcf.like.button.dislike': '{lang}wcf.like.button.dislike{/lang}',
158 'wcf.like.tooltip': '{lang}wcf.like.jsTooltip{/lang}',
159 'wcf.like.summary': '{lang}wcf.like.summary{/lang}',
160 'wcf.like.details': '{lang}wcf.like.details{/lang}'
161 {/if}
162
163 {event name='javascriptLanguageImport'}
164 });
165
166 WCF.Dropdown.init();
167 WCF.System.Mobile.UX.init();
168
169 new WCF.Date.Time();
170 new WCF.Effect.SmoothScroll();
171 new WCF.Effect.BalloonTooltip();
172 new WCF.Sitemap();
173 {if $__wcf->getStyleHandler()->countStyles() > 1}new WCF.Style.Chooser();{/if}
174 WCF.System.PageNavigation.init('.pageNavigation');
175 WCF.Date.Picker.init();
176 new WCF.User.ProfilePreview();
177 WCF.System.FlexibleMenu.init();
178
179 {event name='javascriptInit'}
180
181 {if $executeCronjobs}
182 new WCF.Action.Proxy({
183 autoSend: true,
184 data: {
185 className: 'wcf\\data\\cronjob\\CronjobAction',
186 actionName: 'executeCronjobs'
187 },
188 showLoadingOverlay: false,
189 failure: function() {
190 return false;
191 }
192 });
193 {/if}
194 {if $__sessionKeepAlive|isset}
195 new WCF.System.KeepAlive({@$__sessionKeepAlive});
196 {/if}
197
198 if ($.browser.msie) {
199 window.onbeforeunload = function() {
200 /* Prevent "Back navigation caching" (http://msdn.microsoft.com/en-us/library/ie/dn265017%28v=vs.85%29.aspx) */
201 };
202 }
203 });
204 //]]>
205 </script>
206 <!--[IF IE 9]>
207 <script data-relocate="true">
208 $(function() {
209 function fixButtonTypeIE9() {
210 $('button').each(function(index, button) {
211 var $button = $(button);
212 if (!$button.attr('type')) {
213 $button.attr('type', 'button');
214 }
215 });
216 }
217
218 WCF.DOMNodeInsertedHandler.addCallback('WCF.FixButtonTypeIE9', fixButtonTypeIE9);
219 fixButtonTypeIE9();
220 });
221 </script>
222 <![ENDIF]-->
223
224 {include file='imageViewer'}