comparison src/nabble/view/naml/utilities.naml @ 0:7ecd1a4ef557

add content
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 21 Mar 2019 19:15:52 -0600
parents
children e0c501fb5229
comparison
equal deleted inserted replaced
-1:000000000000 0:7ecd1a4ef557
1
2 override this macro to create skins
3 <macro name="html" parameters="head,body">
4 <n.html_impl>
5 <head>
6 <n.head/>
7 </head>
8 <body>
9 <n.top_bar/>
10 <n.body/>
11 <n.nabble_footer/>
12 </body>
13 </n.html_impl>
14 </macro>
15
16 <macro name="html_impl" parameters="head,body" requires="servlet">
17 <n.page_start/>
18 <n.update_default_permissions/>
19 <n.nabble_html>
20 <do>
21 <n.embedding_redirection_js/>
22 <n.put_in_head.head/>
23 <n.body/>
24 <n.load_call_later_script/>
25 </do>
26 <output>
27 <![CDATA[<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">]]>
28 <html>
29 <head>
30 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
31 <n.nabble_stylesheets/>
32 <n.nabble_javascript_libraries/>
33 <n.html_head_content/>
34 <n.nabble_shared_scripts/>
35 </head>
36 <body>
37 <div id="notice" class="notice rounded-bottom"></div>
38 <div class="nabble macro_[n.page_template/]" id="nabble">
39 <n.apply_filters.html_body_content/>
40 </div>
41 <n.bottom_scripts/>
42 <n.as_html_comments.site_information/>
43 </body>
44 </html>
45 </output>
46 </n.nabble_html>
47 </macro>
48
49 <macro name="page_start">
50 <n.comment.>To be overridden</n.comment.>
51 </macro>
52
53 <macro name="apply_filters" dot_parameter="do">
54 <n.comment.>To be overridden</n.comment.>
55 <n.do/>
56 </macro>
57
58 <macro name="bottom_scripts">
59 <script src="/trk5.js" async="true"></script>
60 <script src="/trk0.js" async="true"></script>
61 </macro>
62
63 <macro name="site_information">
64 <n.default_host_name/> | Site ID = <n.site_id/>
65 </macro>
66
67 <macro name="nabble_stylesheets">
68 <link rel="stylesheet" href="/nabble.css?v=[n.css_version/]" type="text/css" />
69 <link rel="stylesheet" href="/template/NamlServlet.jtp?macro=site_style" type="text/css" />
70 </macro>
71
72 <macro name="site_style" unindent="true">
73 <n.uncache_for/>
74 <n.set_response_header name="Content-Type" value="text/css"/>
75 <n.comment.>To be overridden</n.comment.>
76 </macro>
77
78 <macro name="jquery_library">
79 <script src="/util/jquery-1.7.2.pack.js" type="text/javascript"></script>
80 </macro>
81
82 <macro name="nabble_javascript_libraries">
83 <n.jquery_library/>
84 <script src="/util/nabbledropdown-2.4.1.js" type="text/javascript"></script>
85 <script src="[n.javascript_library_path/]" type="text/javascript"></script>
86 </macro>
87
88 <macro name="nabble_shared_scripts">
89 <script type="text/javascript">
90 Nabble.setFontSize();
91 <n.if.request_method_is_post>
92 <then>var loginNextUrl = '/';</then>
93 </n.if.request_method_is_post>
94 </script>
95 <n.nabble_analytics/>
96 </macro>
97
98 <macro name="nabble_analytics">
99 <script type="text/javascript">
100 if (Nabble.analytics) Nabble.analytics();
101 </script>
102 <n.js_google_analytics/>
103 </macro>
104
105 <macro name="js_google_analytics">
106 <!-- Start Google Analytics -->
107 <script>
108 (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
109 (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
110 m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
111 })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
112
113 ga('create', 'UA-91855-9', 'auto', 'nabble');
114 ga('nabble.send', 'pageview');
115 </script>
116 <!-- End Google Analytics -->
117 </macro>
118
119 <macro name="nabble_footer">
120 <table class="footer-table shaded-bg-color">
121 <tr>
122 <td class="footer-left weak-color">
123 <n.nabble_footer_left/>
124 </td>
125 <td class="footer-right">
126 <n.disable_ads_link/>
127 <n.macro_viewer_page_link/>
128 </td>
129 </tr>
130 </table>
131 </macro>
132
133 <macro name="disable_ads_link">
134 <script>
135 if( window.nbl_disableAdsLink && window.localStorage && !localStorage.nbl_noAds ) {
136 document.write("<a href='javascript:localStorage.nbl_noAds=true;location.reload();'>"+nbl_disableAdsLink+"</a> | ");
137 }
138 </script>
139 </macro>
140
141 <macro name="nabble_footer_left">
142 <n.nabble_homepage_link.>Free forum by Nabble</n.nabble_homepage_link.>
143 </macro>
144
145 <macro name="nabble_homepage_link" dot_parameter="text" parameters="class">
146 <a href="[n.nabble_homepage/]" class="[n.class/]" target="_top"><n.default. to="Nabble"><n.text/></n.default.></a>
147 </macro>
148
149 <macro name="forum_footer">
150 <n.page_node.>
151 <div id="forum-footer" class="forum-footer nowrap">
152 <img src="/images/feeds.png" width="16" height="16" align="absmiddle" alt="feeds"/>
153 <n.feeds_link/>
154 <span class="weak-color" style="padding-left:.5em">|</span>
155 <t>Created by <t.author.owner.avatar_and_link/></t>
156 <span class="weak-color" style="padding-left:.5em">|</span>
157 <n.views show_text="true"/>
158 </div>
159 </n.page_node.>
160 </macro>
161
162 <macro name="avatar_and_link" requires="user">
163 <n.avatar size="small"/>
164 <n.user_link/>
165 </macro>
166
167 <macro name="top_bar">
168 <div class="top-bar">
169 <div class="breadcrumbs" style="float:left">
170 <n.breadcrumbs/>
171 </div>
172 <div style="text-align:right;">
173 <n.user_header/>
174 </div>
175 </div>
176 </macro>
177
178 <macro name="breadcrumbs">
179 <span id="breadcrumbs" class="weak-color">
180 <n.breadcrumbs_content/>
181 </span>
182 </macro>
183
184 <macro name="breadcrumbs_content">
185 <n.root_node.node_breadcrumbs />
186 </macro>
187
188 <macro name="breadcrumbs_content" requires="node_page">
189 <n.page_node.node_breadcrumbs />
190 </macro>
191
192 <macro name="node_breadcrumbs" requires="node">
193 <n.if.is_in_app>
194 <then>
195 <n.get_app_node.>
196 <n.ancestors_list. order="reverse">
197 <n.loop.>
198 <n.current_node.node_link/>
199 <span> &rsaquo; </span>
200 </n.loop.>
201 </n.ancestors_list.>
202 <n.node_link/>
203 </n.get_app_node.>
204 </then>
205 </n.if.is_in_app>
206 </macro>
207
208 <macro name="separator">
209 <div style="height:.8em"></div>
210 </macro>
211
212 <macro name="hide_if" dot_parameter="text" parameters="equals">
213 <n.if.not.equal value1="[n.text/]" value2="[n.equals/]">
214 <then><n.text/></then>
215 </n.if.not.equal>
216 </macro>
217
218 <macro name="hide_if_equals" dot_parameter="text" parameters="value1,value2">
219 <n.if.not.equal value1="[n.value1/]" value2="[n.value2/]">
220 <then><n.text/></then>
221 </n.if.not.equal>
222 </macro>
223
224 <macro name="newsflash">
225 <div id="nabble-newsflash" class="info-message" style="display:none;padding:.5em;margin-bottom:.5em"></div>
226 <n.call_later param="newsflash"/>
227 </macro>
228
229 <macro name="newsflash_js">
230 <n.param_loop. param="newsflash">
231 <n.if.not.is_null.get_newsflash>
232 <then>
233 var newsDiv = Nabble.get('nabble-newsflash');
234 newsDiv.innerHTML = "<n.get_newsflash/>";
235 newsDiv.style.display = 'block';
236 </then>
237 </n.if.not.is_null.get_newsflash>
238 </n.param_loop.>
239 </macro>
240
241 <macro name="show_administrator_notice">
242 <div id="admin-notice" class="info-message" style="display:none;padding:.5em;margin-bottom:.5em"></div>
243 <n.call_later param="adminNotice"/>
244 </macro>
245
246 <macro name="show_administrator_notice_js">
247 <n.param_loop. param="adminNotice">
248 <n.if.both condition1="[n.visitor.is_site_admin/]" condition2="[n.not.is_empty.administrator_notice/]">
249 <then>
250 function closeAdminNotice() {
251 $('#admin-notice').slideUp();
252 Nabble.setPersistentCookie('admin-notice','<n.administrator_notice_version/>');
253 NabbleDropdown.show('adminNotice');
254 };
255 if (Nabble.getCookie('admin-notice') != '<n.administrator_notice_version/>') {
256 var html = "<table><tr><td style='width:100%'>";
257 html += "<n.javascript_string_encode.administrator_notice/>";
258 html += "</td><td style='vertical-align:top;cursor:pointer;line-height:.3em;font-size:200%' onclick='closeAdminNotice()'>&times;</td>";
259 html += "</tr></table>";
260 $("#admin-notice").html(html).show();
261 } else {
262 Nabble.addUserHeaderListener(function() {
263 NabbleDropdown.show('adminNotice');
264 });
265 }
266 </then>
267 </n.if.both>
268 </n.param_loop.>
269 </macro>
270
271 <macro name="increment_view_count" requires="node_page,servlet">
272 <n.call_later value="[n.page_node.id/]" param="incViewCount"/>
273 </macro>
274
275 <macro name="increment_view_count_js">
276 <n.param_loop. param="incViewCount">
277 <n.increment_node_view_count node_id="[n.current_parameter_value/]" />
278 </n.param_loop.>
279 </macro>
280
281 <macro name="mailing_list_information">
282 <n.if.is_associated_with_mailing_list_archive>
283 <then>
284 <n.get_associated_mailing_list_archive.>
285 <div style="margin:.5em 0">
286 <t>This forum is an archive for the mailing list</t>
287 <strong><n.mailing_list_address/></strong> (<n.mailing_list_options_link.><t>more options</t></n.mailing_list_options_link.>)
288 <t>Messages posted here will be sent to this mailing list.</t>
289 </div>
290 </n.get_associated_mailing_list_archive.>
291 </then>
292 </n.if.is_associated_with_mailing_list_archive>
293 </macro>
294
295
296 EDIT NODE
297
298 <macro name="edit_header" parameters="first_text,second_text">
299 <div class="big-title second-font shaded-bg-color" style="padding: .4em;margin-top:.1em">
300 <n.first_text/>
301 <n.if.not.is_null.second_text>
302 <then>
303 <span class="weak-color">
304 <n.prepend. prefix="&ndash; "><n.second_text/></n.prepend.>
305 </span>
306 </then>
307 </n.if.not.is_null.second_text>
308 </div>
309 </macro>
310
311 <macro name="input" requires="field" parameters="size,tabindex,type,maxlength">
312 <input id="[n.name/]" name="[n.name/]" value="[n.value/]" size="[n.size/]" maxlength="[n.maxlength/]" tabindex="[n.tabindex/]" type="[n.type/]" />
313 </macro>
314
315 <macro name="hidden" requires="field">
316 <n.if.not.is_null.value>
317 <then>
318 <input type="hidden" id="[n.name/]" name="[n.name/]" value="[n.value/]"/>
319 </then>
320 </n.if.not.is_null.value>
321 </macro>
322
323 <macro name="checkbox" parameters="style" requires="field">
324 <input id="[n.name/]" type="checkbox" name="[n.name/]" value="[n.true/]" checked="[n.false_to_null.value/]" style="[n.style/]"/>
325 </macro>
326
327 <macro name="is_checked" requires="field">
328 <n.null_to_false.value/>
329 </macro>
330
331 <macro name="select" dot_parameter="options" parameters="onchange,style" requires="field">
332 <select id="[n.name/]" name="[n.name/]" onchange="[n.onchange/]" style="[n.style/]">
333 <n.options/>
334 </select>
335 </macro>
336
337 <macro name="focus" requires="field">
338 <script type="text/javascript">
339 $(document).ready(function() {
340 if (Nabble.isEmbedded) {
341 Nabble.resizeFrames('', 1);
342 }
343 $("#<n.name/>").focus();
344 });
345 </script>
346 </macro>
347
348 <macro name="select_option" parameters="value,selectedValue,class" dot_parameter="text">
349 <option value="[n.value/]" class="[n.class/]" selected="[n.if][condition.equal][value1.value/][value2.selectedValue/][/condition.equal][then.true/][else.null/][/n.if]"><n.text/></option>
350 </macro>
351
352 <macro name="null_to_false" dot_parameter="value">
353 <n.default to="[n.false/]" text="[n.value/]" />
354 </macro>
355
356 <macro name="false_to_null" dot_parameter="value">
357 <n.to_null_if value="[n.value/]" equals="[n.false/]" />
358 </macro>
359
360 <macro name="to_null_if" dot_parameter="value" parameters="equals">
361 <n.if.equal value1="[n.value/]" value2="[n.equals/]">
362 <then><n.null/></then>
363 <else><n.value/></else>
364 </n.if.equal>
365 </macro>
366
367 <macro name="radio" requires="field" parameters="id,option_value">
368 <n.if.equal value1="[n.value/]" value2="[n.option_value/]">
369 <then><input type="radio" id="[n.id/]" name="[n.name/]" value="[n.option_value/]" checked="true"/></then>
370 <else><input type="radio" id="[n.id/]" name="[n.name/]" value="[n.option_value/]" /></else>
371 </n.if.equal>
372 </macro>
373
374 <macro name="textarea" requires="field" parameters="wrap,tabindex,style,maxlength">
375 <textarea name="[n.name/]" id="[n.name/]" wrap="[n.wrap/]" maxlength="[n.maxlength/]" tabindex="[n.tabindex/]" style="[n.style/]"><n.hide_null.value/></textarea>
376 </macro>
377
378 <macro name="format_error" dot_parameter="message" parameters="prompt">
379 <n.set_var. name="message"><n.message/></n.set_var.>
380 <n.set_var. name="prompt"><n.prompt/></n.set_var.>
381 <n.if.not.is_empty.trim.var name="message">
382 <then>
383 <table class="error-message" style="width:100%">
384 <tr>
385 <td style="padding:.4em;width:40px;">
386 <img src="/images/icon_alert.png" class="image32"/>
387 </td>
388 <td style="padding:.4em;">
389 <strong><n.var name="message"/></strong>
390 <n.if.not.is_null.var name="prompt">
391 <then><div style="padding-top:.3em"><n.prompt/></div></then>
392 </n.if.not.is_null.var>
393 </td>
394 </tr>
395 </table>
396 </then>
397 </n.if.not.is_empty.trim.var>
398 </macro>
399
400 <macro name="view_name" requires="node">
401 <n.trim.switch. value="[n.app_or_root.type/]">
402 <n.case. value="category"><t>Category</t></n.case.>
403 <n.case. value="board"><t>Board</t></n.case.>
404 <n.case. value="gallery"><t>Gallery</t></n.case.>
405 <n.case. value="blog"><t>Blog</t></n.case.>
406 <n.case. value="news"><t>News</t></n.case.>
407 <n.default_case.><t>Forum</t></n.default_case.>
408 </n.trim.switch.>
409 </macro>
410
411 <macro name="lower_case_view_name" requires="node">
412 <n.trim.switch. value="[n.app_or_root.type/]">
413 <n.case. value="category"><t>category</t></n.case.>
414 <n.case. value="board"><t>board</t></n.case.>
415 <n.case. value="gallery"><t>gallery</t></n.case.>
416 <n.case. value="blog"><t>blog</t></n.case.>
417 <n.case. value="news"><t>news</t></n.case.>
418 <n.default_case.><t>forum</t></n.default_case.>
419 </n.trim.switch.>
420 </macro>
421
422 <macro name="child_name" requires="node">
423 <n.if.regex_matches text="[n.type/]" pattern="forum|category|mixed">
424 <then><t>Sub-Forum</t></then>
425 <else><t>Subcategory</t></else>
426 </n.if.regex_matches>
427 </macro>
428
429 <macro name="child_name_plural" requires="node">
430 <n.if.type equals="forum">
431 <then><t>Sub-Forums</t></then>
432 <else><t>Subcategories</t></else>
433 </n.if.type>
434 </macro>
435
436 <macro name="user_link" requires="user" parameters="title, class">
437 <a href="[n.path/]" title="[n.title/]" class="[n.class/]"><n.name/></a>
438 </macro>
439
440 <macro name="node_text" requires="node" dot_parameter="text">
441 <n.default. to="[n.subject/]"><n.text/></n.default.>
442 </macro>
443
444 <macro name="node_href" requires="node" dot_parameter="href">
445 <n.default. to="[n.path/]"><n.href/></n.default.>
446 </macro>
447
448 <macro name="node_link" requires="node" dot_parameter="href" parameters="text, title, class, target">
449 <a href="[n.node_href.href/]" title="[n.title/]" class="[n.class/]" target="[n.target/]"><n.node_text.text/></a>
450 </macro>
451
452 <macro name="title" dot_parameter="text">
453 <title><n.root_node.subject/> - <n.text/></title>
454 </macro>
455
456 <macro name="register_link" dot_parameter="text" parameters="title">
457 <a href="[n.register_path /]" title="[n.title/]" rel="nofollow"><n.default to="[t]Register[/t]" text="[n.text/]"/></a>
458 </macro>
459
460 <macro name="register_path" parameters="nextUrl">
461 <n.encode_url.remove_spaces.>
462 /template/NamlServlet.jtp?macro=start_registration_page
463 <n.add_to_path name="nextUrl" value="[n.nextUrl/]" />
464 </n.encode_url.remove_spaces.>
465 </macro>
466
467 <macro name="terms_link" dot_parameter="text" parameters="title">
468 <a href="[n.terms_of_use_url is_registration_form='true'/]" target="_new" title="[n.title/]" rel="nofollow"><n.default to="[t]Terms of Use[/t]" text="[n.text/]"/></a>
469 </macro>
470
471 <macro name="reply_link" requires="node" parameters="title, href">
472 <n.set_var. name="href"><n.default text="[n.href/]" to="[n.reply_path/]" /></n.set_var.>
473 <a href="[n.var name='href'/]" title="[n.title/]" rel="nofollow"><t>Reply</t></a>
474 </macro>
475
476 <macro name="reply_path" requires="node">
477 <n.encode_url.>
478 /template/NamlServlet.jtp?macro=reply&node=<n.id/>
479 </n.encode_url.>
480 </macro>
481
482 <macro name="new_topic_link" requires="node" dot_parameter="text" parameters="title, class, href">
483 <n.set_var. name="href"><n.default text="[n.href/]" to="[n.new_topic_path/]" /></n.set_var.>
484 <a href="[n.var name='href'/]" class="[n.class/]" title="[n.title/]" rel="nofollow"><n.text/></a>
485 </macro>
486
487 <macro name="people_link" requires="node" dot_parameter="text" parameters="title, class">
488 <a href="[n.people_path/]" class="[n.class/]" rel="nofollow" title="[n.title/]"><n.default. to="[t]People[/t]"><n.text/></n.default.></a>
489 </macro>
490
491 <macro name="feeds_link" requires="node" dot_parameter="text" parameters="title, class">
492 <a href="[n.feeds_path/]" class="[n.class/]" rel="nofollow" title="[n.title/]"><n.default. to="[t]Feeds[/t]"><n.text/></n.default.></a>
493 </macro>
494
495 <macro name="feeds_path" requires="node">
496 <n.encode_url.>
497 /template/NamlServlet.jtp?macro=feeds&node=<n.id/>
498 </n.encode_url.>
499 </macro>
500
501 <macro name="subscribe_link" requires="node" dot_parameter="text" parameters="title, class">
502 <a href="[n.subscribe_path/]" class="[n.class/]" rel="nofollow" title="[n.title/]"><n.default. to="[t]Subscribe via email[/t]"><n.text/></n.default.></a>
503 </macro>
504
505 <macro name="subscribe_path" requires="node">
506 <n.encode_url.>
507 /template/NamlServlet.jtp?macro=subscribe&node=<n.id/>
508 </n.encode_url.>
509 </macro>
510
511 <macro name="post_by_email_link" requires="node" dot_parameter="text" parameters="title, class">
512 <a href="[n.post_by_email_path/]" class="[n.class/]" rel="nofollow" title="[n.title/]"><n.default. to="[t]Post by email[/t]"><n.text/></n.default.></a>
513 </macro>
514
515 <macro name="post_by_email_path" requires="node">
516 <n.encode_url.>
517 /template/NamlServlet.jtp?macro=post_by_email_page&node=<n.id/>
518 </n.encode_url.>
519 </macro>
520
521 <macro name="edit_subject_and_message_link" requires="node" dot_parameter="text" parameters="title, class">
522 <a href="[n.edit_subject_and_message_path/]" class="[n.class/]" rel="nofollow" title="[n.title/]"><n.default. to="[t]Edit name & description[/t]"><n.text/></n.default.></a>
523 </macro>
524
525 <macro name="edit_subject_and_message_path" requires="node">
526 <n.encode_url.>
527 /template/NamlServlet.jtp?macro=edit_app&node=<n.id/>
528 </n.encode_url.>
529 </macro>
530
531 <macro name="change_appearance_link" dot_parameter="text" parameters="title, class">
532 <a href="[n.change_appearance_path/]" class="[n.class/]" rel="nofollow" title="[n.title/]"><n.default. to="[t]Change appearance[/t]"><n.text/></n.default.></a>
533 </macro>
534
535 <macro name="change_appearance_path">
536 <n.encode_url.>
537 /template/NamlServlet.jtp?macro=change_appearance
538 </n.encode_url.>
539 </macro>
540
541 <macro name="change_language_link" requires="node" dot_parameter="text" parameters="title, class">
542 <a href="[n.change_language_path/]" class="[n.class/]" rel="nofollow" title="[n.title/]"><n.default. to="[t]Change language[/t]"><n.text/></n.default.></a>
543 </macro>
544
545 <macro name="extras_and_addons_link" requires="node" dot_parameter="text" parameters="title, class">
546 <a href="[n.extras_and_addons_path/]" class="[n.class/]" rel="nofollow" title="[n.title/]"><n.default. to="[t]Extras & add-ons[/t]"><n.text/></n.default.></a>
547 </macro>
548
549 <macro name="change_type_link" requires="node" dot_parameter="text" parameters="title, class">
550 <a href="[n.change_type_path/]" class="[n.class/]" rel="nofollow" title="[n.title/]"><n.default. to="[t]Change application type[/t]"><n.text/></n.default.></a>
551 </macro>
552
553 <macro name="send_email_link" requires="user" dot_parameter="text" parameters="title, class">
554 <a href="[n.send_email_path/]" class="[n.class/]" rel="nofollow" title="[n.title/]"><n.text/></a>
555 </macro>
556
557 <macro name="mailing_list_options_link" requires="mailing_list" dot_parameter="text" parameters="title, class">
558 <a href="[n.mailing_list_options_path/]" class="[n.class/]" rel="nofollow" title="[n.title/]"><n.text/></a>
559 </macro>
560
561 <macro name="change_type_path" requires="node">
562 <n.encode_url.>
563 /template/NamlServlet.jtp?macro=change_app_type&node=<n.id/>
564 </n.encode_url.>
565 </macro>
566
567 <macro name="change_domain_name_link" requires="node" dot_parameter="text" parameters="title, class">
568 <a href="[n.change_domain_name_path/]" class="[n.class/]" rel="nofollow" title="[n.title/]"><n.default. to="[t]Change domain name[/t]"><n.text/></n.default.></a>
569 </macro>
570
571 <macro name="create_sub_app_link" requires="node" dot_parameter="text" parameters="title, class">
572 <a href="[n.create_sub_app_path/]" class="[n.class/]" rel="nofollow" title="[n.title/]"><n.default. to="[t]Create new [t.element.to_lower_case.child_name/][/t]"><n.text/></n.default.></a>
573 </macro>
574
575 <macro name="create_sub_app_path" requires="node">
576 <n.encode_url.>
577 /template/NamlServlet.jtp?macro=create_sub_app&node=<n.id/>
578 </n.encode_url.>
579 </macro>
580
581 <macro name="manage_pinned_topics_link" requires="node" dot_parameter="text" parameters="title, class">
582 <a href="[n.manage_pinned_topics_path/]" class="[n.class/]" rel="nofollow" title="[n.title/]"><n.default. to="[t]Manage pinned topics[/t]"><n.text/></n.default.></a>
583 </macro>
584
585 <macro name="manage_sub_apps_link" requires="node" dot_parameter="text" parameters="title, class">
586 <a href="[n.manage_sub_apps_path/]" class="[n.class/]" rel="nofollow" title="[n.title/]"><n.default. to="[t]Manage [t.items.to_lower_case.child_name_plural/][/t]"><n.text/></n.default.></a>
587 </macro>
588
589 <macro name="parent_options_link" requires="node" dot_parameter="text" parameters="title, class">
590 <a href="[n.parent_options_path/]" class="[n.class/]" rel="nofollow" title="[n.title/]"><n.default. to="[t]Change parent[/t]"><n.text/></n.default.></a>
591 </macro>
592
593 <macro name="change_permissions_link" requires="node" dot_parameter="text" parameters="title, class">
594 <a href="[n.change_permissions_path/]" class="[n.class/]" rel="nofollow" title="[n.title/]"><n.default. to="[t]Change permissions[/t]"><n.text/></n.default.></a>
595 </macro>
596
597 <macro name="change_permissions_path" requires="node">
598 <n.encode_url.>
599 /template/NamlServlet.jtp?macro=change_permissions&node=<n.id/>
600 </n.encode_url.>
601 </macro>
602
603 <macro name="manage_users_and_groups_link" dot_parameter="text" parameters="title, class">
604 <a href="[n.manage_users_and_groups_path/]" class="[n.class/]" rel="nofollow" title="[n.title/]"><n.default. to="[t]Manage users & groups[/t]"><n.text/></n.default.></a>
605 </macro>
606
607 <macro name="manage_subscribers_link" requires="node" dot_parameter="text" parameters="title, class">
608 <a href="[n.manage_subscribers_path/]" class="[n.class/]" rel="nofollow" title="[n.title/]"><n.default. to="[t]Manage subscribers[/t]"><n.text/></n.default.></a>
609 </macro>
610
611 <macro name="manage_banned_users_link" dot_parameter="text" parameters="title, class">
612 <a href="[n.manage_banned_users_path/]" class="[n.class/]" rel="nofollow" title="[n.title/]"><n.default. to="[t]Manage banned users[/t]"><n.text/></n.default.></a>
613 </macro>
614
615 <macro name="manage_banned_users_path">
616 <n.encode_url.>
617 /template/NamlServlet.jtp?macro=manage_banned_users
618 </n.encode_url.>
619 </macro>
620
621 <macro name="mailing_list_archive_settings_link" requires="node" dot_parameter="text" parameters="title, class">
622 <a href="[n.mailing_list_archive_settings_path/]" class="[n.class/]" rel="nofollow" title="[n.title/]"><n.default. to="[t]Mailing list archive settings[/t]"><n.text/></n.default.></a>
623 </macro>
624
625 <macro name="mailing_list_archive_settings_path" requires="node">
626 <n.encode_url.>
627 /template/NamlServlet.jtp?macro=mailing_list_archive_settings&node=<n.id/>
628 </n.encode_url.>
629 </macro>
630
631 <macro name="embedding_options_link" requires="node" dot_parameter="text" parameters="title, class">
632 <a href="[n.embedding_options_path/]" class="[n.class/]" rel="nofollow" title="[n.title/]"><n.default. to="[t]Embedding options[/t]"><n.text/></n.default.></a>
633 </macro>
634
635 <macro name="delete_link" requires="node" dot_parameter="text" parameters="title, class">
636 <a href="[n.delete_path/]" class="[n.class/]" rel="nofollow" title="[n.title/]"><n.default. to="[t]Delete[/t]"><n.text/></n.default.></a>
637 </macro>
638
639 <macro name="delete_path" requires="node">
640 <n.encode_url.>
641 /template/NamlServlet.jtp?macro=delete_app&node=<n.id/>
642 </n.encode_url.>
643 </macro>
644
645 <macro name="delete_post_link" requires="node" dot_parameter="text" parameters="title, class">
646 <a href="javascript: void(0)" onclick="Nabble.deletePost([n.id/])" class="[n.class/]" rel="nofollow" title="[n.title/]"><n.default. to="[t]Delete this post[/t]"><n.text/></n.default.></a>
647 </macro>
648
649 <macro name="delete_recursively_link" requires="node" dot_parameter="text" parameters="title, class">
650 <a href="javascript: void(0)" onclick="Nabble.deleteFromSite([n.id/])" class="[n.class/]" rel="nofollow" title="[n.title/]"><n.default. to="[t]Delete this post and replies[/t]"><n.text/></n.default.></a>
651 </macro>
652
653 <macro name="edit_post_link" requires="node" dot_parameter="text" parameters="title, class">
654 <a href="[n.edit_post_path/]" class="[n.class/]" rel="nofollow" title="[n.title/]"><n.default. to="[t]Edit post[/t]"><n.text/></n.default.></a>
655 </macro>
656
657 <macro name="edit_post_path" requires="node">
658 <n.encode_url.>
659 /template/NamlServlet.jtp?macro=edit_post&node=<n.id/>
660 </n.encode_url.>
661 </macro>
662
663 <macro name="move_post_link" requires="node" dot_parameter="text" parameters="title, class">
664 <a href="[n.move_post_path/]" class="[n.class/]" rel="nofollow" title="[n.title/]"><n.default. to="[t]Move post[/t]"><n.text/></n.default.></a>
665 </macro>
666
667 <macro name="move_post_path" requires="node">
668 <n.encode_url.>
669 /template/NamlServlet.jtp?macro=move_node&node=<n.id/>
670 </n.encode_url.>
671 </macro>
672
673 <macro name="permalink" requires="node">
674 <a href="javascript: void(0)" onclick="prompt('Copy this:','[n.url/]')"><t>Permalink</t></a>
675 </macro>
676
677 <macro name="embed_post_link" requires="node" dot_parameter="text" parameters="title, class">
678 <a href="[n.embed_post_path/]" class="[n.class/]" rel="nofollow" title="[n.title/]"><n.default. to="[t]Embed post[/t]"><n.text/></n.default.></a>
679 </macro>
680
681 <macro name="print_post_link" requires="node" dot_parameter="text" parameters="title, class">
682 <a href="[n.print_post_path/]" class="[n.class/]" rel="nofollow" title="[n.title/]"><n.default. to="[t]Print post[/t]"><n.text/></n.default.></a>
683 </macro>
684
685 <macro name="print_post_path" requires="node">
686 <n.encode_url.>
687 /template/NamlServlet.jtp?macro=print_post&node=<n.id/>
688 </n.encode_url.>
689 </macro>
690
691 <macro name="reply_to_author_link" requires="node" dot_parameter="text" parameters="title, class">
692 <a href="[n.reply_to_author_path/]" class="[n.class/]" rel="nofollow" title="[n.title/]"><n.default. to="[t]Reply to author[/t]"><n.text/></n.default.></a>
693 </macro>
694
695 <macro name="change_post_date_link" requires="node" dot_parameter="text" parameters="title, class">
696 <a href="[n.change_post_date_path/]" class="[n.class/]" rel="nofollow" title="[n.title/]"><n.default. to="[t]Change post date[/t]"><n.text/></n.default.></a>
697 </macro>
698
699 <macro name="change_post_date_path" requires="node">
700 <n.encode_url.>
701 /template/NamlServlet.jtp?macro=change_post_date&node=<n.id/>
702 </n.encode_url.>
703 </macro>
704
705 <macro name="raw_mail_link" requires="node" dot_parameter="text" parameters="title, class">
706 <a href="[n.raw_mail_path/]" class="[n.class/]" rel="nofollow" title="[n.title/]"><n.default. to="[t]Raw mail[/t]"><n.text/></n.default.></a>
707 </macro>
708
709 <macro name="raw_mail_path" requires="node">
710 <n.encode_url.>
711 /template/NamlServlet.jtp?macro=raw_mail&node=<n.id/>
712 </n.encode_url.>
713 </macro>
714
715 <macro name="change_user_groups_path" requires="user">
716 <n.encode_url.>
717 /template/NamlServlet.jtp?macro=change_user_groups&user=<n.id/>
718 </n.encode_url.>
719 </macro>
720
721 <macro name="send_email_path" requires="user">
722 <n.encode_url.>
723 /user/SendEmail.jtp?type=user&user=<n.id/>
724 </n.encode_url.>
725 </macro>
726
727 <macro name="user_profile_path">
728 <n.encode_url.>
729 /template/NamlServlet.jtp?macro=user_profile
730 </n.encode_url.>
731 </macro>
732
733 <macro name="edit_profile_path" requires="user">
734 <n.encode_url.>
735 /template/NamlServlet.jtp?macro=edit_profile&user=<n.id/>
736 </n.encode_url.>
737 </macro>
738
739 <macro name="ban_path" requires="user">
740 <n.encode_url.>
741 /template/NamlServlet.jtp?macro=ban_user&user=<n.id/>
742 </n.encode_url.>
743 </macro>
744
745 <macro name="unban_path" requires="user">
746 <n.encode_url.>
747 /template/NamlServlet.jtp?macro=unban_user&user=<n.id/>
748 </n.encode_url.>
749 </macro>
750
751 <macro name="one_or_many" dot_parameter="n" parameters="one_text, many_text">
752 <n.if.equal value1="[n.n/]" value2="1">
753 <then>
754 1 <n.one_text/>
755 </then>
756 <else>
757 <n.n/> <n.many_text/>
758 </else>
759 </n.if.equal>
760 </macro>
761
762 <macro name="comments_link" requires="node">
763 <a href="[n.first_reply.url/]"><n.one_or_many.replies>
764 <one_text><t>comment</t></one_text>
765 <many_text><t>comments</t></many_text>
766 </n.one_or_many.replies></a>
767 </macro>
768
769 <macro name="replies_link" requires="node">
770 <a href="[n.first_reply.url/]"><n.one_or_many.replies>
771 <one_text><t>reply</t></one_text>
772 <many_text><t>replies</t></many_text>
773 </n.one_or_many.replies></a>
774 </macro>
775
776 <macro name="view_logs_link" requires="node" dot_parameter="text" parameters="title, class">
777 <a href="[n.view_log_path/]" class="[n.class/]" rel="nofollow" title="[n.title/]"><n.default. to="[t]View logs[/t]"><n.text/></n.default.></a>
778 </macro>
779
780 <macro name="view_log_path">
781 <n.encode_url.>
782 /template/NamlServlet.jtp?macro=view_log
783 </n.encode_url.>
784 </macro>
785
786 <macro name="search_box" requires="node">
787 <n.search_form.>
788 <input id="search-input" name="query" size="18" class="medium-border-color"/>
789 <n.search_box_dropdown/>
790 </n.search_form.>
791 </macro>
792
793 <macro name="search_box_dropdown" requires="node">
794 <n.put_in_head.>
795 <style type="text/css">
796 #search-box-dropdown {
797 text-align:left;
798 position:absolute;
799 display:none;
800 z-index:1000;
801 overflow:hidden;
802 }
803 </style>
804 <script type="text/javascript">
805 $(document).ready(function() {
806 var $sdd = $('#search-box-dropdown');
807 var $sb = $('#search-input');
808 var $form = $sb.parent();
809 var timeout;
810 $(document).click(function(o){
811 var $target = $(o.target);
812 if ($target.parents().hasClass('search-box-dropdown')) {
813 clearTimeout(timeout);
814 $sb.focus();
815 }
816 });
817 $sb.focusin(function(e) {
818 $sdd.css('left', $sb.position().left - 5);
819 $sdd.width($sb.outerWidth() + 10);
820 $sdd.show();
821 });
822 $sb.focusout(function() {
823 timeout = setTimeout(function() {
824 $sdd.hide();
825 },250);
826 });
827 <n.if.not.is_root>
828 <then>
829 $('input[type=radio]', $sdd).change(function() {
830 var nodeId = $(this).val();
831 $('input[name="node"]', $form).val(nodeId);
832 });
833 $('input[name="node"]', $form).val(<n.root_node.id/>);
834 </then>
835 </n.if.not.is_root>
836 });
837 </script>
838 </n.put_in_head.>
839 <div id="search-box-dropdown" class="search-box-dropdown light-bg-color drop-shadow border1 medium-border-color rounded-bottom">
840 <n.if.not.is_root>
841 <then>
842 <div style="margin:.5em .5em 0 .5em">
843 <b><t>Search</t></b><br/>
844 <input id="search-root-node" type="radio" name="n" value="[n.root_node.id/]" checked="true"/>
845 <label for="search-root-node"><t>everywhere</t></label><br/>
846
847 <input id="search-this-node" type="radio" name="n" value="[n.id/]"/>
848 <label for="search-this-node">
849 <n.if.is_post>
850 <then><t>only in this topic</t></then>
851 <else><t>in <t.location.subject/></t></else>
852 </n.if.is_post>
853 </label>
854 </div>
855 </then>
856 </n.if.not.is_root>
857 <div style="margin:.5em;line-height:2em">
858 <input class="toolbar action-button float-right" type="submit" value="[t]Search[/t]"/>
859 <a href="[n.advanced_search_path/]" rel="nofollow" style="font-size:80%"><t>Advanced Search</t></a>
860 </div>
861 </div>
862 </macro>
863
864 <macro name="force_wrap" dot_parameter="text">
865 <n.regex_replace_all. pattern="\s+" replacement="[n.lt/]br/[n.gt/]">
866 <n.text/>
867 </n.regex_replace_all.>
868 </macro>
869
870 <macro name="truncated" requires="message" parameters="size">
871 <n.truncate. size="[n.size/]"><n.as_text/></n.truncate.>
872 </macro>
873
874 <macro name="views" requires="node" parameters="show_text">
875 <n.if.equal value1="[n.show_text/]" value2="true">
876 <then>
877 <span id="v[n.id/]" style="display:none">1 <t>view</t>|%1 <t>views</t></span>
878 </then>
879 <else>
880 <span id="v[n.id/]" style="display:none"></span>
881 </else>
882 </n.if.equal>
883 <n.put_in_head.>
884 <script type="text/javascript">
885 Nabble.nViews = function(id, views) {
886 var $v = $('#v'+id);
887 var pos = views=='1'?0:1;
888 var t = $v.html()? $v.html().split('|')[pos]:'';
889 $v.html(t == ''? views : t.replace(/%1/g,views)).show();
890 };
891 </script>
892 </n.put_in_head.>
893 <n.call_later value="[n.id/]" param="views"/>
894 </macro>
895
896 <macro name="views_js">
897 <n.param_loop. param="views">
898 Nabble.nViews(<n.current_parameter_value/>,'<n.node_views node_id="[n.current_parameter_value/]" />');
899 </n.param_loop.>
900 </macro>
901
902 <macro name="loop" requires="sequence" dot_parameter="do" parameters="by">
903 <n.while.next_element inc="[n.by/]">
904 <loop>
905 <n.do/>
906 </loop>
907 </n.while.next_element>
908 </macro>
909
910 <macro name="filter_by" requires="list" dot_parameter="filter">
911 <n.loop.>
912 <n.if.not.filter>
913 <then.remove_current_element/>
914 </n.if.not.filter>
915 </n.loop.>
916 <n.reset_list_index/>
917 </macro>
918
919 <macro name="regex_matches" parameters="pattern,text">
920 <n.regex. pattern="[n.pattern/]" text="[n.text/]">
921 <n.matches/>
922 </n.regex.>
923 </macro>
924
925 <macro name="did_find" parameters="group" requires="regex">
926 <n.not.is_null.found group="[n.group/]" />
927 </macro>
928
929 <macro name="all_true" dot_parameter="text">
930 <n.regex_matches pattern="(\s*true)*\s*" text="[n.text/]" />
931 </macro>
932
933 <macro name="neither" parameters="condition1,condition2">
934 <n.both condition1="[n.not.condition1/]" condition2="[n.not.condition2/]"/>
935 </macro>
936
937 <macro name="page_node" dot_parameter="do" requires="js_loop">
938 <n.get_node_from_id. node_id="[n.value/]">
939 <n.do/>
940 </n.get_node_from_id.>
941 </macro>
942
943 <macro name="page_user" dot_parameter="do" requires="js_loop">
944 <n.get_user_from_id. user_id="[n.value/]">
945 <n.do/>
946 </n.get_user_from_id.>
947 </macro>
948
949 <macro name="form" dot_parameter="content" parameters="macro,method,onsubmit" requires="servlet">
950 <n.set_var. name="macro"><n.default. to="[n.page_template/]"><n.macro/></n.default.></n.set_var.>
951 <form method="[n.default. to='POST'][n.method/][/n.default.]" action="/template/NamlServlet.jtp?[n.var name='macro'/]" onsubmit="[n.onsubmit/]" accept-charset="UTF-8">
952 <input type="hidden" name="macro" value="[n.var name='macro'/]" />
953 <n.node_field.hidden/>
954 <n.user_field.hidden/>
955 <n.content/>
956 </form>
957 </macro>
958
959 <macro name="is_submitted_form" requires="servlet">
960 <n.request_method_is_post/>
961 </macro>
962
963 <macro name="request_method_is_post" requires="servlet">
964 <n.equal value1="[n.request_method/]" value2="POST"/>
965 </macro>
966
967 <macro name="node_field" dot_parameter="do">
968 <n.field. name="node"><n.do/></n.field.>
969 </macro>
970
971 <macro name="user_field" dot_parameter="do">
972 <n.field. name="user"><n.do/></n.field.>
973 </macro>
974
975 <macro name="node_page" dot_parameter="do" requires="servlet">
976 <n.get_node_from_parameter.as_node_page.do/>
977 </macro>
978
979 <macro name="get_node_from_parameter" dot_parameter="do" requires="servlet">
980 <n.catch_exception. id="get-node-block">
981 <n.get_node_from_request_parameter.do/>
982 </n.catch_exception.><n.handle_exception. for="get-node-block">
983 <n.exception. name="node_not_found">
984 <n.send_http_error code="404" text="Node Not Found" />
985 </n.exception.>
986 </n.handle_exception.>
987 </macro>
988
989 <macro name="get_node_from_parameter" dot_parameter="do">
990 <n.get_node_from_request_parameter.do/>
991 </macro>
992
993 <macro name="user_page" dot_parameter="do" requires="servlet">
994 <n.get_user_from_parameter.as_user_page.do/>
995 </macro>
996
997 <macro name="width_style" dot_parameter="width">
998 <n.style. property='width'><n.width/></n.style.>
999 </macro>
1000
1001 <macro name="has_parent" parameters="node">
1002 <n.not.is_root/>
1003 </macro>
1004
1005 <macro name="zebra_table_javascript" parameters="table_selector">
1006 <n.put_in_head.>
1007 <script type="text/javascript">
1008 $(document).ready(function() {
1009 $('<n.table_selector/> > tbody > tr:even').filter(':gt(0)').addClass('light-bg-color');
1010 });
1011 </script>
1012 </n.put_in_head.>
1013 </macro>
1014
1015 <macro name="bold_label_style">
1016 <style type="text/css">
1017 label { font-weight:bold; }
1018 </style>
1019 </macro>
1020
1021 <macro name="fix_link_in" dot_parameter="text" parameters="url">
1022 <n.regex_replace_all. pattern="[n.lt/]a[n.gt/]" replacement="[n.lt/]a href='[n.url/]' rel='nofollow'[n.gt/]">
1023 <n.text/>
1024 </n.regex_replace_all.>
1025 </macro>
1026
1027 <macro name="remove_spaces" dot_parameter="text">
1028 <n.regex_replace_all. pattern="\s+" replacement="">
1029 <n.text/>
1030 </n.regex_replace_all.>
1031 </macro>
1032
1033 <macro name="remove_spaces_between_tags" dot_parameter="text">
1034 <n.regex_replace_all. pattern="[n.gt/]\s+[n.lt/]" replacement="[n.gt/][n.lt/]">
1035 <n.text/>
1036 </n.regex_replace_all.>
1037 </macro>
1038
1039 <macro name="compress" dot_parameter="text">
1040 <n.regex_replace_all. pattern="\s+" replacement=" ">
1041 <n.trim.text/>
1042 </n.regex_replace_all.>
1043 </macro>
1044
1045 <macro name="remove_html_tags" dot_parameter="text">
1046 <n.set_var. name='tag_regex'><n.lt/>[^<n.gt/>]*<n.gt/></n.set_var.>
1047 <n.regex_replace_all. pattern="[n.var name='tag_regex'/]" replacement="">
1048 <n.text/>
1049 </n.regex_replace_all.>
1050 </macro>
1051
1052 <macro name="add_line_numbers_to" dot_parameter="text">
1053 <n.string_list. values="[n.text/]" separator="\n" trim="[n.false/]">
1054 <n.int. n="1">
1055 <n.loop.>
1056 <n.inc/> <n.current_string/><n.crlf/>
1057 </n.loop.>
1058 </n.int.>
1059 </n.string_list.>
1060 </macro>
1061
1062 <macro name="hidden_if" dot_parameter="condition">
1063 <n.if.condition>
1064 <then>display:none;</then>
1065 </n.if.condition>
1066 </macro>
1067
1068 <macro name="return_to_link" requires="node">
1069 <n.app_or_root.>
1070 &laquo;
1071 <a href="[n.path/]"><t>Return to <t.location.subject/></t></a>
1072 </n.app_or_root.>
1073 </macro>
1074
1075 <macro name="small_notice" dot_parameter="text">
1076 <p style="clear:both;font-size:80%;padding-top:.5em">
1077 <n.text/>
1078 </p>
1079 </macro>
1080
1081 <macro name="is_ajax">
1082 <n.is_in_command name="ajax" />
1083 </macro>
1084
1085 <macro name="ajax" dot_parameter="do" parameters="is_cached" requires="servlet">
1086 <n.use_html_encoder.>
1087 <n.do/>
1088 <n.if.is_cached>
1089 <then.load_call_later_script/>
1090 <else>
1091 <script type="text/javascript">
1092 <n.compress.run_call_later_now/>
1093 </script>
1094 </else>
1095 </n.if.is_cached>
1096 </n.use_html_encoder.>
1097 </macro>
1098
1099 <macro name="cache" parameters="var" dot_parameter="value">
1100 <n.if.not.global_is_var_set name="[n.var/]">
1101 <then.global_set_var name="[n.var/]" value="[n.value/]" />
1102 </n.if.not.global_is_var_set>
1103 <n.global_var name="[n.var/]"/>
1104 </macro>
1105
1106 <macro name="has_parameter" dot_parameter="name" requires="http_request">
1107 <n.not.is_null.get_parameter name="[n.name/]" />
1108 </macro>
1109
1110 <macro name="javascript_response" requires="servlet">
1111 <n.set_response_header name="Content-Type" value="application/x-javascript" />
1112 </macro>
1113
1114 <macro name="xml_response" requires="servlet">
1115 <n.set_response_header name="Content-Type" value="application/xml" />
1116 </macro>
1117
1118 <macro name="text_response" requires="servlet">
1119 <n.set_response_header name="Content-Type" value="text/plain" />
1120 </macro>
1121
1122 <macro name="italic" dot_parameter="text">
1123 <i><n.text/></i>
1124 </macro>
1125
1126 <macro name="bold" dot_parameter="text">
1127 <b><n.text/></b>
1128 </macro>
1129
1130
1131 <macro name="set_local_user" dot_parameter="user">
1132 <n.uplevel_set_var name="local_user" value="[n.user/]" />
1133 </macro>
1134
1135 <macro name="local_user" dot_parameter="do">
1136 <n.get_user user="[n.uplevel_var name='local_user'/]" do="[n.do/]" />
1137 </macro>
1138
1139 <macro name="set_local_node" dot_parameter="node">
1140 <n.if.is_null.node>
1141 <then.throw_runtime_exception text="can't set_local_node to null" />
1142 </n.if.is_null.node>
1143 <n.uplevel_set_var name="local_node" value="[n.node/]" />
1144 </macro>
1145
1146 <macro name="local_node" dot_parameter="do">
1147 <n.get_node node="[n.uplevel_var name='local_node'/]" do="[n.do/]" />
1148 </macro>
1149
1150 <macro name="set_local_subscription" dot_parameter="subscription">
1151 <n.uplevel_set_var name="local_subscription" value="[n.subscription/]" />
1152 </macro>
1153
1154 <macro name="local_subscription" dot_parameter="do">
1155 <n.get_subscription subscription="[n.uplevel_var name='local_subscription'/]" do="[n.do/]" />
1156 </macro>
1157
1158 <macro name="has_topic_node" requires="node">
1159 <n.is_post/>
1160 </macro>
1161
1162 <macro name="as_html_comments" dot_parameter="text">
1163 <n.lt/>!-- <n.text/> --<n.gt/>
1164 </macro>
1165
1166 <macro name="encode_text" dot_parameter="text">
1167 <n.encode.use_text_encoder.text/>
1168 </macro>
1169
1170 <macro name="encode_url" dot_parameter="text">
1171 <n.encode.use_url_encoder.text/>
1172 </macro>
1173
1174 <macro name="comment" dot_parameter="text">
1175 </macro>
1176
1177 <macro name="array_of_user_ids" parameters="var_name, group">
1178 <script type="text/javascript">
1179 var <n.var_name/> = [<n.compress.>
1180 <n.users_in_group. group="[n.group/]">
1181 <n.loop.>
1182 <n.if.not.is_first_element>
1183 <then>,</then>
1184 </n.if.not.is_first_element>
1185 <n.current_user.id/>
1186 </n.loop.>
1187 </n.users_in_group.>
1188 </n.compress.>];
1189 </script>
1190 </macro>
1191
1192 <macro name="doc for visible_for_admins">
1193 <n.doc_text.>
1194 Shows the HTML elements returned by the <i>selector</i> parameter if the current visitor is an administrator.
1195 This is very helpful in cached pages, where you can't use the visitor command.
1196 So the solution is to use javascript to perform this check.
1197 </n.doc_text.>
1198 </macro>
1199
1200 <macro name="visible_for_admins" parameters="selector">
1201 <n.put_in_head.>
1202 <n.array_of_user_ids var_name="site_admins" group="[n.administrators_group/]"/>
1203 </n.put_in_head.>
1204 <script type="text/javascript">
1205 $(document).ready(function() {
1206 if (Nabble.userId && site_admins.indexOf(Number(Nabble.userId)) >= 0)
1207 $('<n.selector/>').show();
1208 });
1209 </script>
1210 </macro>
1211
1212 <macro name="alternate" parameters="var, first_value, second_value">
1213 <n.if.not.global_is_var_set name="[n.var/]">
1214 <then.global_set_var name="[n.var/]" value="[n.true/]" />
1215 </n.if.not.global_is_var_set>
1216 <n.if.global_var name="[n.var/]">
1217 <then.first_value/>
1218 <else.second_value/>
1219 </n.if.global_var>
1220 <n.global_set_var. name="[n.var/]">
1221 <n.not.global_var name="[n.var/]" />
1222 </n.global_set_var.>
1223 </macro>
1224
1225 <macro name="add_to_path" parameters="name,default_value" dot_parameter="value">
1226 <n.if.not.is_null.value>
1227 <then>
1228 <n.if.not.equal value1="[n.value/]" value2="[n.default_value/]">
1229 <then>
1230 &<n.name/>=<n.encode_text.value/>
1231 </then>
1232 </n.if.not.equal>
1233 </then>
1234 </n.if.not.is_null.value>
1235 </macro>
1236
1237 <macro name="support_link">
1238 <n.if.is_null.support_url>
1239 <then.null/>
1240 <else>
1241 <a href="[n.support_url/]" target='_top'><t>Nabble Support</t></a>
1242 </else>
1243 </n.if.is_null.support_url>
1244 </macro>
1245
1246 <macro name="important" dot_parameter="text">
1247 <span class="important"><n.text/></span>
1248 </macro>
1249
1250 <macro name="subject" requires="node">
1251 <n.subject_impl/>
1252 </macro>
1253
1254 <macro name="signature" dot_parameter="do" requires="user">
1255 <n.signature_impl.do/>
1256 </macro>