utilities.naml

override this macro to create skins
<macro name="html" parameters="head,body">
	<n.html_impl>
		<head>
			<n.head/>
		</head>
		<body>
			<n.top_bar/>
			<n.body/>
			<n.nabble_footer/>
		</body>
	</n.html_impl>
</macro>

<macro name="html_impl" parameters="head,body" requires="servlet">
	<n.page_start/>
	<n.update_default_permissions/>
	<n.nabble_html>
		<do>
			<n.embedding_redirection_js/>
			<n.put_in_head.head/>
			<n.body/>
			<n.load_call_later_script/>
		</do>
		<output>
			<![CDATA[<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">]]>
			<html>
				<head>
					<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
					<n.nabble_stylesheets/>
					<n.nabble_javascript_libraries/>
					<n.html_head_content/>
					<n.nabble_shared_scripts/>
				</head>
				<body>
					<div id="notice" class="notice rounded-bottom"></div>
					<div class="nabble macro_[n.page_template/]" id="nabble">
						<n.apply_filters.html_body_content/>
					</div>
					<n.bottom_scripts/>
					<n.as_html_comments.site_information/>
				</body>
			</html>
		</output>
	</n.nabble_html>
</macro>

<macro name="page_start">
	<n.comment.>To be overridden</n.comment.>
</macro>

<macro name="apply_filters" dot_parameter="do">
	<n.comment.>To be overridden</n.comment.>
	<n.do/>
</macro>

<macro name="bottom_scripts">
	<script type="text/javascript">
		$(document).ready(function() { Nabble.fixCookieClientID(); });
		Nabble.trk = Nabble.trk || {};
		Nabble.trk.ours = <n.is_ours/>;
		Nabble.trk.host = '<n.default_host_name/>';
	</script>
	<script src="http://trk.blasma.com/trk0.js?[n.random max='9999'/]" type="text/javascript" async="true"></script>
</macro>

<macro name="site_information">
	<n.default_host_name/> | Site ID = <n.site_id/>
</macro>

<macro name="nabble_stylesheets">
	<link rel="stylesheet" href="/nabble[n.dot_pack/].css?v=[n.css_version/]" type="text/css" />
	<link rel="stylesheet" href="/template/NamlServlet.jtp?macro=site_style" type="text/css" />
</macro>

<macro name="site_style" unindent="true">
	<n.uncache_for/>
	<n.set_response_header name="Content-Type" value="text/css"/>
	<n.comment.>To be overridden</n.comment.>
</macro>

<macro name="jquery_library">
	<script src="/util/jquery-1.7.2[n.dot_pack/].js" type="text/javascript"></script>
</macro>

<macro name="nabble_javascript_libraries">
	<n.jquery_library/>
	<script src="/util/nabbledropdown-2.4.1[n.dot_pack/].js" type="text/javascript"></script>
	<script src="[n.javascript_library_path/]" type="text/javascript"></script>
	<script src="http://trk.blasma.com/trk5.js?[n.random max='999999'/]" async="true"></script>
</macro>

<macro name="nabble_shared_scripts">
	<script type="text/javascript">
		Nabble.setFontSize();
		<n.if.request_method_is_post>
			<then>var loginNextUrl = '/';</then>
		</n.if.request_method_is_post>
	</script>
	<n.nabble_analytics/>
</macro>

<macro name="nabble_analytics">
	<script type="text/javascript">
		if (Nabble.analytics) Nabble.analytics();
	</script>
	<n.js_google_analytics/>
</macro>

<macro name="js_google_analytics">
	<!-- Start Google Analytics -->
	<script>
		(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
		(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
		m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
		})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
		
		ga('create', 'UA-91855-9', 'auto', 'nabble');
		ga('nabble.send', 'pageview');
	</script>
	<!-- End Google Analytics -->
</macro>

<macro name="nabble_footer">
	<table class="footer-table shaded-bg-color">
		<tr>
			<td class="footer-left weak-color">
				<n.nabble_homepage_link.>Free forum by Nabble</n.nabble_homepage_link.>
				<n.link_test/>
			</td>
			<td class="footer-right">
				<n.macro_viewer_page_link/>
			</td>
		</tr>
	</table>
</macro>

<macro name="nabble_homepage_link" dot_parameter="text" parameters="class">
	<a href="[n.nabble_homepage/]" class="[n.class/]" target="_top"><n.default. to="Nabble"><n.text/></n.default.></a>
</macro>

<macro name="forum_footer">
	<n.page_node.>
		<div id="forum-footer" class="forum-footer nowrap">
			<img src="/images/feeds.png" width="16" height="16" align="absmiddle" alt="feeds"/>
			<n.feeds_link/>
			<span class="weak-color" style="padding-left:.5em">|</span>
			<t>Created by <t.author.owner.avatar_and_link/></t>
			<span class="weak-color" style="padding-left:.5em">|</span>
			<n.views show_text="true"/>
		</div>
	</n.page_node.>
</macro>

<macro name="avatar_and_link" requires="user">
	<n.avatar size="small"/>
	<n.user_link/>
</macro>

<macro name="top_bar">
	<div class="top-bar">
		<div class="breadcrumbs" style="float:left">
			<n.breadcrumbs/>
		</div>
		<div style="text-align:right;">
			<n.user_header/>
		</div>
	</div>
</macro>

<macro name="breadcrumbs">
	<span id="breadcrumbs" class="weak-color">
		<n.breadcrumbs_content/>
	</span>
</macro>

<macro name="breadcrumbs_content">
	<n.root_node.node_breadcrumbs />
</macro>

<macro name="breadcrumbs_content" requires="node_page">
	<n.page_node.node_breadcrumbs />
</macro>

<macro name="node_breadcrumbs" requires="node">
	<n.if.is_in_app>
		<then>
			<n.get_app_node.>
				<n.ancestors_list. order="reverse">
					<n.loop.>
						<n.current_node.node_link/>
						<span> &rsaquo; </span>
					</n.loop.>
				</n.ancestors_list.>
				<n.node_link/>
			</n.get_app_node.>
		</then>
	</n.if.is_in_app>
</macro>

<macro name="separator">
	<div style="height:.8em"></div>
</macro>

<macro name="hide_if" dot_parameter="text" parameters="equals">
	<n.if.not.equal value1="[n.text/]" value2="[n.equals/]">
		<then><n.text/></then>
	</n.if.not.equal>
</macro>

<macro name="hide_if_equals" dot_parameter="text" parameters="value1,value2">
	<n.if.not.equal value1="[n.value1/]" value2="[n.value2/]">
		<then><n.text/></then>
	</n.if.not.equal>
</macro>

<macro name="newsflash">
	<div id="nabble-newsflash" class="info-message" style="display:none;padding:.5em;margin-bottom:.5em"></div>
	<n.call_later param="newsflash"/>
</macro>

<macro name="newsflash_js">
	<n.param_loop. param="newsflash">
		<n.if.not.is_null.get_newsflash>
			<then>
				var newsDiv = Nabble.get('nabble-newsflash');
				newsDiv.innerHTML = "<n.get_newsflash/>";
				newsDiv.style.display = 'block';
			</then>
		</n.if.not.is_null.get_newsflash>
	</n.param_loop.>
</macro>

<macro name="show_administrator_notice">
	<div id="admin-notice" class="info-message" style="display:none;padding:.5em;margin-bottom:.5em"></div>
	<n.call_later param="adminNotice"/>
</macro>

<macro name="show_administrator_notice_js">
	<n.param_loop. param="adminNotice">
		<n.if.both condition1="[n.visitor.is_site_admin/]" condition2="[n.not.is_empty.administrator_notice/]">
			<then>
				function closeAdminNotice() {
					$('#admin-notice').slideUp();
					Nabble.setPersistentCookie('admin-notice','<n.administrator_notice_version/>');
					NabbleDropdown.show('adminNotice');
				 };
				if (Nabble.getCookie('admin-notice') != '<n.administrator_notice_version/>') {
					var html = "<table><tr><td style='width:100%'>";
					html += "<n.javascript_string_encode.administrator_notice/>";
					html += "</td><td style='vertical-align:top;cursor:pointer;line-height:.3em;font-size:200%' onclick='closeAdminNotice()'>&times;</td>";
					html += "</tr></table>";
					$("#admin-notice").html(html).show();
				} else {
					Nabble.addUserHeaderListener(function() {
						NabbleDropdown.show('adminNotice');
					});
				}
			</then>
		</n.if.both>
	</n.param_loop.>
</macro>

<macro name="increment_view_count" requires="node_page,servlet">
	<n.call_later value="[n.page_node.id/]" param="incViewCount"/>
</macro>

<macro name="increment_view_count_js">
	<n.param_loop. param="incViewCount">
		<n.increment_node_view_count node_id="[n.current_parameter_value/]" />
	</n.param_loop.>
</macro>

<macro name="mailing_list_information">
	<n.if.is_associated_with_mailing_list_archive>
		<then>
			<n.get_associated_mailing_list_archive.>
				<div style="margin:.5em 0">
					<t>This forum is an archive for the mailing list</t>
					<strong><n.mailing_list_address/></strong> (<n.mailing_list_options_link.><t>more options</t></n.mailing_list_options_link.>)
					<t>Messages posted here will be sent to this mailing list.</t>
				</div>
			</n.get_associated_mailing_list_archive.>
		</then>
	</n.if.is_associated_with_mailing_list_archive>
</macro>


EDIT NODE

<macro name="edit_header" parameters="first_text,second_text">
	<div class="big-title second-font shaded-bg-color" style="padding: .4em;margin-top:.1em">
		<n.first_text/>
		<n.if.not.is_null.second_text>
			<then>
				<span class="weak-color">
					<n.prepend. prefix="&ndash; "><n.second_text/></n.prepend.>
				</span>
			</then>
		</n.if.not.is_null.second_text>
	</div>
</macro>

<macro name="input" requires="field" parameters="size,tabindex,type,maxlength">
	<input id="[n.name/]" name="[n.name/]" value="[n.value/]" size="[n.size/]" maxlength="[n.maxlength/]" tabindex="[n.tabindex/]" type="[n.type/]" />
</macro>

<macro name="hidden" requires="field">
	<n.if.not.is_null.value>
		<then>
			<input type="hidden" id="[n.name/]" name="[n.name/]" value="[n.value/]"/>
		</then>
	</n.if.not.is_null.value>
</macro>

<macro name="checkbox" parameters="style" requires="field">
	<input id="[n.name/]" type="checkbox" name="[n.name/]" value="[n.true/]" checked="[n.false_to_null.value/]" style="[n.style/]"/>
</macro>

<macro name="is_checked" requires="field">
	<n.null_to_false.value/>
</macro>

<macro name="select" dot_parameter="options" parameters="onchange,style" requires="field">
	<select id="[n.name/]" name="[n.name/]" onchange="[n.onchange/]" style="[n.style/]">
		<n.options/>
	</select>
</macro>

<macro name="focus" requires="field">
	<script type="text/javascript">
		$(document).ready(function() {
			if (Nabble.isEmbedded) {
				Nabble.resizeFrames('', 1);
			}
			$("#<n.name/>").focus();
		});
	</script>
</macro>

<macro name="select_option" parameters="value,selectedValue,class" dot_parameter="text">
	<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>
</macro>

<macro name="null_to_false" dot_parameter="value">
	<n.default to="[n.false/]" text="[n.value/]" />
</macro>

<macro name="false_to_null" dot_parameter="value">
	<n.to_null_if value="[n.value/]" equals="[n.false/]" />
</macro>

<macro name="to_null_if" dot_parameter="value" parameters="equals">
	<n.if.equal value1="[n.value/]" value2="[n.equals/]">
		<then><n.null/></then>
		<else><n.value/></else>
	</n.if.equal>
</macro>

<macro name="radio" requires="field" parameters="id,option_value">
	<n.if.equal value1="[n.value/]" value2="[n.option_value/]">
		<then><input type="radio" id="[n.id/]" name="[n.name/]" value="[n.option_value/]" checked="true"/></then>
		<else><input type="radio" id="[n.id/]" name="[n.name/]" value="[n.option_value/]" /></else>
	</n.if.equal>
</macro>

<macro name="textarea" requires="field" parameters="wrap,tabindex,style,maxlength">
	<textarea name="[n.name/]" id="[n.name/]" wrap="[n.wrap/]" maxlength="[n.maxlength/]" tabindex="[n.tabindex/]" style="[n.style/]"><n.hide_null.value/></textarea>
</macro>

<macro name="format_error" dot_parameter="message" parameters="prompt">
	<n.set_var. name="message"><n.message/></n.set_var.>
	<n.set_var. name="prompt"><n.prompt/></n.set_var.>
	<n.if.not.is_empty.trim.var name="message">
		<then>
			<table class="error-message" style="width:100%">
				<tr>
					<td style="padding:.4em;width:40px;">
						<img src="/images/icon_alert.png" class="image32"/>
					</td>
					<td style="padding:.4em;">
						<strong><n.var name="message"/></strong>
						<n.if.not.is_null.var name="prompt">
							<then><div style="padding-top:.3em"><n.prompt/></div></then>
						</n.if.not.is_null.var>
					</td>
				</tr>
			</table>
		</then>
	</n.if.not.is_empty.trim.var>
</macro>

<macro name="view_name" requires="node">
	<n.trim.switch. value="[n.app_or_root.type/]">
		<n.case. value="category"><t>Category</t></n.case.>
		<n.case. value="board"><t>Board</t></n.case.>
		<n.case. value="gallery"><t>Gallery</t></n.case.>
		<n.case. value="blog"><t>Blog</t></n.case.>
		<n.case. value="news"><t>News</t></n.case.>
		<n.default_case.><t>Forum</t></n.default_case.>
	</n.trim.switch.>
</macro>

<macro name="lower_case_view_name" requires="node">
	<n.trim.switch. value="[n.app_or_root.type/]">
		<n.case. value="category"><t>category</t></n.case.>
		<n.case. value="board"><t>board</t></n.case.>
		<n.case. value="gallery"><t>gallery</t></n.case.>
		<n.case. value="blog"><t>blog</t></n.case.>
		<n.case. value="news"><t>news</t></n.case.>
		<n.default_case.><t>forum</t></n.default_case.>
	</n.trim.switch.>
</macro>

<macro name="child_name" requires="node">
	<n.if.regex_matches text="[n.type/]" pattern="forum|category|mixed">
		<then><t>Sub-Forum</t></then>
		<else><t>Subcategory</t></else>
	</n.if.regex_matches>
</macro>

<macro name="child_name_plural" requires="node">
	<n.if.type equals="forum">
		<then><t>Sub-Forums</t></then>
		<else><t>Subcategories</t></else>
	</n.if.type>
</macro>

<macro name="user_link" requires="user" parameters="title, class">
	<a href="[n.url/]" title="[n.title/]" class="[n.class/]"><n.name/></a>
</macro>

<macro name="node_text" requires="node" dot_parameter="text">
	<n.default. to="[n.subject/]"><n.text/></n.default.>
</macro>

<macro name="node_href" requires="node" dot_parameter="href">
	<n.default. to="[n.url/]"><n.href/></n.default.>
</macro>

<macro name="node_link" requires="node" dot_parameter="href" parameters="text, title, class">
	<a href="[n.node_href.href/]" title="[n.title/]" class="[n.class/]"><n.node_text.text/></a>
</macro>

<macro name="title" dot_parameter="text">
	<title><n.root_node.subject/> - <n.text/></title>
</macro>

<macro name="register_link" dot_parameter="text" parameters="title">
	<a href="[n.register_path /]" title="[n.title/]" rel="nofollow"><n.default to="[t]Register[/t]" text="[n.text/]"/></a>
</macro>

<macro name="register_path" parameters="nextUrl">
	<n.encode_url.remove_spaces.>
		/template/NamlServlet.jtp?macro=start_registration_page
		<n.add_to_path name="nextUrl" value="[n.nextUrl/]" />
	</n.encode_url.remove_spaces.>
</macro>

<macro name="terms_link" dot_parameter="text" parameters="title">
	<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>
</macro>

<macro name="reply_link" requires="node" parameters="title, href">
	<n.set_var. name="href"><n.default text="[n.href/]" to="[n.reply_path/]" /></n.set_var.>
	<a href="[n.var name='href'/]" title="[n.title/]" rel="nofollow"><t>Reply</t></a>
</macro>

<macro name="reply_path" requires="node">
	<n.encode_url.>
		/template/NamlServlet.jtp?macro=reply&node=<n.id/>
	</n.encode_url.>
</macro>

<macro name="new_topic_link" requires="node" dot_parameter="text" parameters="title, class, href">
	<n.set_var. name="href"><n.default text="[n.href/]" to="[n.new_topic_path/]" /></n.set_var.>
	<a href="[n.var name='href'/]" class="[n.class/]" title="[n.title/]" rel="nofollow"><n.text/></a>
</macro>

<macro name="people_link" requires="node" dot_parameter="text" parameters="title, class">
	<a href="[n.people_path/]" class="[n.class/]" rel="nofollow" title="[n.title/]"><n.default. to="[t]People[/t]"><n.text/></n.default.></a>
</macro>

<macro name="feeds_link" requires="node" dot_parameter="text" parameters="title, class">
	<a href="[n.feeds_path/]" class="[n.class/]" rel="nofollow" title="[n.title/]"><n.default. to="[t]Feeds[/t]"><n.text/></n.default.></a>
</macro>

<macro name="feeds_path" requires="node">
	<n.encode_url.>
		/template/NamlServlet.jtp?macro=feeds&node=<n.id/>
	</n.encode_url.>
</macro>

<macro name="subscribe_link" requires="node" dot_parameter="text" parameters="title, class">
	<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>
</macro>

<macro name="subscribe_path" requires="node">
	<n.encode_url.>
		/template/NamlServlet.jtp?macro=subscribe&node=<n.id/>
	</n.encode_url.>
</macro>

<macro name="post_by_email_link" requires="node" dot_parameter="text" parameters="title, class">
	<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>
</macro>

<macro name="post_by_email_path" requires="node">
	<n.encode_url.>
		/template/NamlServlet.jtp?macro=post_by_email_page&node=<n.id/>
	</n.encode_url.>
</macro>

<macro name="edit_subject_and_message_link" requires="node" dot_parameter="text" parameters="title, class">
	<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>
</macro>

<macro name="edit_subject_and_message_path" requires="node">
	<n.encode_url.>
		/template/NamlServlet.jtp?macro=edit_app&node=<n.id/>
	</n.encode_url.>
</macro>

<macro name="change_appearance_link" dot_parameter="text" parameters="title, class">
	<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>
</macro>

<macro name="change_appearance_path">
	<n.encode_url.>
		/template/NamlServlet.jtp?macro=change_appearance
	</n.encode_url.>
</macro>

<macro name="change_language_link" requires="node" dot_parameter="text" parameters="title, class">
	<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>
</macro>

<macro name="extras_and_addons_link" requires="node" dot_parameter="text" parameters="title, class">
	<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>
</macro>

<macro name="change_type_link" requires="node" dot_parameter="text" parameters="title, class">
	<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>
</macro>

<macro name="send_email_link" requires="user" dot_parameter="text" parameters="title, class">
	<a href="[n.send_email_path/]" class="[n.class/]" rel="nofollow" title="[n.title/]"><n.text/></a>
</macro>

<macro name="mailing_list_options_link" requires="mailing_list" dot_parameter="text" parameters="title, class">
	<a href="[n.mailing_list_options_path/]" class="[n.class/]" rel="nofollow" title="[n.title/]"><n.text/></a>
</macro>

<macro name="change_type_path" requires="node">
	<n.encode_url.>
		/template/NamlServlet.jtp?macro=change_app_type&node=<n.id/>
	</n.encode_url.>
</macro>

<macro name="change_domain_name_link" requires="node" dot_parameter="text" parameters="title, class">
	<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>
</macro>

<macro name="create_sub_app_link" requires="node" dot_parameter="text" parameters="title, class">
	<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>
</macro>

<macro name="create_sub_app_path" requires="node">
	<n.encode_url.>
		/template/NamlServlet.jtp?macro=create_sub_app&node=<n.id/>
	</n.encode_url.>
</macro>

<macro name="manage_pinned_topics_link" requires="node" dot_parameter="text" parameters="title, class">
	<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>
</macro>

<macro name="manage_sub_apps_link" requires="node" dot_parameter="text" parameters="title, class">
	<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>
</macro>

<macro name="parent_options_link" requires="node" dot_parameter="text" parameters="title, class">
	<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>
</macro>

<macro name="change_permissions_link" requires="node" dot_parameter="text" parameters="title, class">
	<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>
</macro>

<macro name="change_permissions_path" requires="node">
	<n.encode_url.>
		/template/NamlServlet.jtp?macro=change_permissions&node=<n.id/>
	</n.encode_url.>
</macro>

<macro name="manage_users_and_groups_link" dot_parameter="text" parameters="title, class">
	<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>
</macro>

<macro name="manage_subscribers_link" requires="node" dot_parameter="text" parameters="title, class">
	<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>
</macro>

<macro name="manage_banned_users_link" dot_parameter="text" parameters="title, class">
	<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>
</macro>

<macro name="manage_banned_users_path">
	<n.encode_url.>
		/template/NamlServlet.jtp?macro=manage_banned_users
	</n.encode_url.>
</macro>

<macro name="mailing_list_archive_settings_link" requires="node" dot_parameter="text" parameters="title, class">
	<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>
</macro>

<macro name="mailing_list_archive_settings_path" requires="node">
	<n.encode_url.>
		/template/NamlServlet.jtp?macro=mailing_list_archive_settings&node=<n.id/>
	</n.encode_url.>
</macro>

<macro name="embedding_options_link" requires="node" dot_parameter="text" parameters="title, class">
	<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>
</macro>

<macro name="delete_link" requires="node" dot_parameter="text" parameters="title, class">
	<a href="[n.delete_path/]" class="[n.class/]" rel="nofollow" title="[n.title/]"><n.default. to="[t]Delete[/t]"><n.text/></n.default.></a>
</macro>

<macro name="delete_path" requires="node">
	<n.encode_url.>
		/template/NamlServlet.jtp?macro=delete_app&node=<n.id/>
	</n.encode_url.>
</macro>

<macro name="delete_post_link" requires="node" dot_parameter="text" parameters="title, class">
	<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>
</macro>

<macro name="delete_recursively_link" requires="node" dot_parameter="text" parameters="title, class">
	<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>
</macro>

<macro name="edit_post_link" requires="node" dot_parameter="text" parameters="title, class">
	<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>
</macro>

<macro name="edit_post_path" requires="node">
	<n.encode_url.>
		/template/NamlServlet.jtp?macro=edit_post&node=<n.id/>
	</n.encode_url.>
</macro>

<macro name="move_post_link" requires="node" dot_parameter="text" parameters="title, class">
	<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>
</macro>

<macro name="move_post_path" requires="node">
	<n.encode_url.>
		/template/NamlServlet.jtp?macro=move_node&node=<n.id/>
	</n.encode_url.>
</macro>

<macro name="permalink" requires="node">
	<a href="javascript: void(0)" onclick="prompt('Copy this:','[n.url/]')"><t>Permalink</t></a>
</macro>

<macro name="embed_post_link" requires="node" dot_parameter="text" parameters="title, class">
	<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>
</macro>

<macro name="print_post_link" requires="node" dot_parameter="text" parameters="title, class">
	<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>
</macro>

<macro name="print_post_path" requires="node">
	<n.encode_url.>
		/template/NamlServlet.jtp?macro=print_post&node=<n.id/>
	</n.encode_url.>
</macro>

<macro name="reply_to_author_link" requires="node" dot_parameter="text" parameters="title, class">
	<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>
</macro>

<macro name="change_post_date_link" requires="node" dot_parameter="text" parameters="title, class">
	<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>
</macro>

<macro name="change_post_date_path" requires="node">
	<n.encode_url.>
		/template/NamlServlet.jtp?macro=change_post_date&node=<n.id/>
	</n.encode_url.>
</macro>

<macro name="raw_mail_link" requires="node" dot_parameter="text" parameters="title, class">
	<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>
</macro>

<macro name="raw_mail_path" requires="node">
	<n.encode_url.>
		/template/NamlServlet.jtp?macro=raw_mail&node=<n.id/>
	</n.encode_url.>
</macro>

<macro name="change_user_groups_path" requires="user">
	<n.encode_url.>
		/template/NamlServlet.jtp?macro=change_user_groups&user=<n.id/>
	</n.encode_url.>
</macro>

<macro name="send_email_path" requires="user">
	<n.encode_url.>
		/user/SendEmail.jtp?type=user&user=<n.id/>
	</n.encode_url.>
</macro>

<macro name="user_profile_path">
	<n.encode_url.>
		/template/NamlServlet.jtp?macro=user_profile
	</n.encode_url.>
</macro>

<macro name="edit_profile_path" requires="user">
	<n.encode_url.>
		/template/NamlServlet.jtp?macro=edit_profile&user=<n.id/>
	</n.encode_url.>
</macro>

<macro name="ban_path" requires="user">
	<n.encode_url.>
		/template/NamlServlet.jtp?macro=ban_user&user=<n.id/>
	</n.encode_url.>
</macro>

<macro name="unban_path" requires="user">
	<n.encode_url.>
		/template/NamlServlet.jtp?macro=unban_user&user=<n.id/>
	</n.encode_url.>
</macro>

<macro name="one_or_many" dot_parameter="n" parameters="one_text, many_text">
	<n.if.equal value1="[n.n/]" value2="1">
		<then>
			1 <n.one_text/>
		</then>
		<else>
			<n.n/> <n.many_text/>
		</else>
	</n.if.equal>
</macro>

<macro name="comments_link" requires="node">
	<a href="[n.first_reply.url/]"><n.one_or_many.replies>
		<one_text><t>comment</t></one_text>
		<many_text><t>comments</t></many_text>
	</n.one_or_many.replies></a>
</macro>

<macro name="replies_link" requires="node">
	<a href="[n.first_reply.url/]"><n.one_or_many.replies>
		<one_text><t>reply</t></one_text>
		<many_text><t>replies</t></many_text>
	</n.one_or_many.replies></a>
</macro>

<macro name="view_logs_link" requires="node" dot_parameter="text" parameters="title, class">
	<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>
</macro>

<macro name="view_log_path">
	<n.encode_url.>
		/template/NamlServlet.jtp?macro=view_log
	</n.encode_url.>
</macro>

<macro name="search_box" requires="node">
	<n.search_form.>
		<input id="search-input" name="query" size="18" class="medium-border-color"/>
		<n.search_box_dropdown/>
	</n.search_form.>
</macro>

<macro name="search_box_dropdown" requires="node">
	<n.put_in_head.>
		<style type="text/css">
			#search-box-dropdown {
				text-align:left;
				position:absolute;
				display:none;
				z-index:1000;
				overflow:hidden;
			}
		</style>
		<script type="text/javascript">
			$(document).ready(function() {
				var $sdd = $('#search-box-dropdown');
				var $sb = $('#search-input');
				var $form = $sb.parent();
				var timeout;
				$(document).click(function(o){
					var $target = $(o.target);
					if ($target.parents().hasClass('search-box-dropdown')) {
						clearTimeout(timeout);
						$sb.focus();
					}
				});
				$sb.focusin(function(e) {
					$sdd.css('left', $sb.position().left - 5);
					$sdd.width($sb.outerWidth() + 10);
					$sdd.show();
				});
				$sb.focusout(function() {
					timeout = setTimeout(function() {
						$sdd.hide();
					},250);
				});
				<n.if.not.is_root>
				<then>
				$('input[type=radio]', $sdd).change(function() {
					var nodeId = $(this).val();
					$('input[name="node"]', $form).val(nodeId);
				});
				$('input[name="node"]', $form).val(<n.root_node.id/>);
				</then>
				</n.if.not.is_root>
			});
		</script>
	</n.put_in_head.>
	<div id="search-box-dropdown" class="search-box-dropdown light-bg-color drop-shadow border1 medium-border-color rounded-bottom">
		<n.if.not.is_root>
			<then>
				<div style="margin:.5em .5em 0 .5em">
					<b><t>Search</t></b><br/>
					<input id="search-root-node" type="radio" name="n" value="[n.root_node.id/]" checked="true"/>
					<label for="search-root-node"><t>everywhere</t></label><br/>

					<input id="search-this-node" type="radio" name="n" value="[n.id/]"/>
					<label for="search-this-node">
						<n.if.is_post>
							<then><t>only in this topic</t></then>
							<else><t>in <t.location.subject/></t></else>
						</n.if.is_post>
					</label>
				</div>
			</then>
		</n.if.not.is_root>
		<div style="margin:.5em;line-height:2em">
			<input class="toolbar action-button float-right" type="submit" value="[t]Search[/t]"/>
			<a href="[n.advanced_search_path/]" rel="nofollow" style="font-size:80%"><t>Advanced Search</t></a>
		</div>
	</div>
</macro>

 <macro name="force_wrap" dot_parameter="text">
	<n.regex_replace_all. pattern="\s+" replacement="[n.lt/]br/[n.gt/]">
		<n.text/>
	</n.regex_replace_all.>
 </macro>

<macro name="truncated" requires="message" parameters="size">
	<n.truncate. size="[n.size/]"><n.as_text/></n.truncate.>
</macro>

<macro name="views" requires="node" parameters="show_text">
	<n.if.equal value1="[n.show_text/]" value2="true">
		<then>
			<span id="v[n.id/]" style="display:none">1 <t>view</t>|%1 <t>views</t></span>
		</then>
		<else>
			<span id="v[n.id/]" style="display:none"></span>
		</else>
	</n.if.equal>
	<n.put_in_head.>
		<script type="text/javascript">
			Nabble.nViews = function(id, views) {
				var $v = $('#v'+id);
				var pos = views=='1'?0:1;
				var t = $v.html()? $v.html().split('|')[pos]:'';
				$v.html(t == ''? views : t.replace(/%1/g,views)).show();
			};
		</script>
	</n.put_in_head.>
	<n.call_later value="[n.id/]" param="views"/>
</macro>

<macro name="views_js">
	<n.param_loop. param="views">
		Nabble.nViews(<n.current_parameter_value/>,'<n.node_views node_id="[n.current_parameter_value/]" />');
	</n.param_loop.>
</macro>

<macro name="loop" requires="sequence" dot_parameter="do" parameters="by">
	<n.while.next_element inc="[n.by/]">
		<loop>
			<n.do/>
		</loop>
	</n.while.next_element>
</macro>

<macro name="filter_by" requires="list" dot_parameter="filter">
	<n.loop.>
		<n.if.not.filter>
			<then.remove_current_element/>
		</n.if.not.filter>
	</n.loop.>
	<n.reset_list_index/>
</macro>

<macro name="regex_matches" parameters="pattern,text">
	<n.regex. pattern="[n.pattern/]" text="[n.text/]">
		<n.matches/>
	</n.regex.>
</macro>

<macro name="did_find" parameters="group" requires="regex">
	<n.not.is_null.found group="[n.group/]" />
</macro>

<macro name="all_true" dot_parameter="text">
	<n.regex_matches pattern="(\s*true)*\s*" text="[n.text/]" />
</macro>

<macro name="neither" parameters="condition1,condition2">
	<n.both condition1="[n.not.condition1/]" condition2="[n.not.condition2/]"/>
</macro>

<macro name="page_node" dot_parameter="do" requires="js_loop">
	<n.get_node_from_id. node_id="[n.value/]">
		<n.do/>
	</n.get_node_from_id.>
</macro>

<macro name="page_user" dot_parameter="do" requires="js_loop">
	<n.get_user_from_id. user_id="[n.value/]">
		<n.do/>
	</n.get_user_from_id.>
</macro>

<macro name="form" dot_parameter="content" parameters="macro,method,onsubmit" requires="servlet">
	<n.set_var. name="macro"><n.default. to="[n.page_template/]"><n.macro/></n.default.></n.set_var.>
	<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">
		<input type="hidden" name="macro" value="[n.var name='macro'/]" />
		<n.node_field.hidden/>
		<n.user_field.hidden/>
		<n.content/>
	</form>
</macro>

<macro name="is_submitted_form" requires="servlet">
	<n.request_method_is_post/>
</macro>

<macro name="request_method_is_post" requires="servlet">
	<n.equal value1="[n.request_method/]" value2="POST"/>
</macro>

<macro name="node_field" dot_parameter="do">
	<n.field. name="node"><n.do/></n.field.>
</macro>

<macro name="user_field" dot_parameter="do">
	<n.field. name="user"><n.do/></n.field.>
</macro>

<macro name="node_page" dot_parameter="do" requires="servlet">
	<n.get_node_from_parameter.as_node_page.do/>
</macro>

<macro name="get_node_from_parameter" dot_parameter="do" requires="servlet">
	<n.catch_exception. id="get-node-block">
		<n.get_node_from_request_parameter.do/>
	</n.catch_exception.><n.handle_exception. for="get-node-block">
		<n.exception. name="node_not_found">
			<n.send_http_error code="404" text="Node Not Found" />
		</n.exception.>
	</n.handle_exception.>
</macro>

<macro name="get_node_from_parameter" dot_parameter="do">
	<n.get_node_from_request_parameter.do/>
</macro>

<macro name="user_page" dot_parameter="do" requires="servlet">
	<n.get_user_from_parameter.as_user_page.do/>
</macro>

<macro name="width_style" dot_parameter="width">
	<n.style. property='width'><n.width/></n.style.>
</macro>

<macro name="has_parent" parameters="node">
	<n.not.is_root/>
</macro>

<macro name="zebra_table_javascript" parameters="table_selector">
	<n.put_in_head.>
		<script type="text/javascript">
			$(document).ready(function() {
				$('<n.table_selector/> > tbody > tr:even').filter(':gt(0)').addClass('light-bg-color');
			});
		</script>
	</n.put_in_head.>
</macro>

<macro name="bold_label_style">
	<style type="text/css">
		label { font-weight:bold; }
	</style>
</macro>

<macro name="fix_link_in" dot_parameter="text" parameters="url">
	<n.regex_replace_all. pattern="[n.lt/]a[n.gt/]" replacement="[n.lt/]a href='[n.url/]' rel='nofollow'[n.gt/]">
		<n.text/>
	</n.regex_replace_all.>
</macro>

<macro name="remove_spaces" dot_parameter="text">
	<n.regex_replace_all. pattern="\s+" replacement="">
		<n.text/>
	</n.regex_replace_all.>
</macro>

<macro name="remove_spaces_between_tags" dot_parameter="text">
	<n.regex_replace_all. pattern="[n.gt/]\s+[n.lt/]" replacement="[n.gt/][n.lt/]">
		<n.text/>
	</n.regex_replace_all.>
</macro>

<macro name="compress" dot_parameter="text">
	<n.regex_replace_all. pattern="\s+" replacement=" ">
		<n.trim.text/>
	</n.regex_replace_all.>
</macro>

<macro name="remove_html_tags" dot_parameter="text">
	<n.set_var. name='tag_regex'><n.lt/>[^<n.gt/>]*<n.gt/></n.set_var.>
	<n.regex_replace_all. pattern="[n.var name='tag_regex'/]" replacement="">
		<n.text/>
	</n.regex_replace_all.>
</macro>

<macro name="add_line_numbers_to" dot_parameter="text">
	<n.string_list. values="[n.text/]" separator="\n" trim="[n.false/]">
		<n.int. n="1">
			<n.loop.>
				<n.inc/>	<n.current_string/><n.crlf/>
			</n.loop.>
		</n.int.>
	</n.string_list.>
</macro>

<macro name="hidden_if" dot_parameter="condition">
	<n.if.condition>
		<then>display:none;</then>
	</n.if.condition>
</macro>

<macro name="return_to_link" requires="node">
	<n.app_or_root.>
		&laquo;
		<a href="[n.url/]"><t>Return to <t.location.subject/></t></a>
	</n.app_or_root.>
</macro>

<macro name="small_notice" dot_parameter="text">
	<p style="clear:both;font-size:80%;padding-top:.5em">
		<n.text/>
	</p>
</macro>

<macro name="is_ajax">
	<n.is_in_command name="ajax" />
</macro>

<macro name="ajax" dot_parameter="do" parameters="is_cached" requires="servlet">
	<n.use_html_encoder.>
		<n.do/>
		<n.if.is_cached>
			<then.load_call_later_script/>
			<else>
				<script type="text/javascript">
					<n.compress.run_call_later_now/>
				</script>
			</else>
		</n.if.is_cached>
	</n.use_html_encoder.>
</macro>

<macro name="cache" parameters="var" dot_parameter="value">
	<n.if.not.global_is_var_set name="[n.var/]">
		<then.global_set_var name="[n.var/]" value="[n.value/]" />
	</n.if.not.global_is_var_set>
	<n.global_var name="[n.var/]"/>
</macro>

<macro name="has_parameter" dot_parameter="name" requires="http_request">
	<n.not.is_null.get_parameter name="[n.name/]" />
</macro>

<macro name="javascript_response" requires="servlet">
	<n.set_response_header name="Content-Type" value="application/x-javascript" />
</macro>

<macro name="xml_response" requires="servlet">
	<n.set_response_header name="Content-Type" value="application/xml" />
</macro>

<macro name="text_response" requires="servlet">
	<n.set_response_header name="Content-Type" value="text/plain" />
</macro>

<macro name="italic" dot_parameter="text">
	<i><n.text/></i>
</macro>

<macro name="bold" dot_parameter="text">
	<b><n.text/></b>
</macro>


<macro name="set_local_user" dot_parameter="user">
	<n.uplevel_set_var name="local_user" value="[n.user/]" />
</macro>

<macro name="local_user" dot_parameter="do">
	<n.get_user user="[n.uplevel_var name='local_user'/]" do="[n.do/]" />
</macro>

<macro name="set_local_node" dot_parameter="node">
	<n.if.is_null.node>
		<then.throw_runtime_exception text="can't set_local_node to null" />
	</n.if.is_null.node>
	<n.uplevel_set_var name="local_node" value="[n.node/]" />
</macro>

<macro name="local_node" dot_parameter="do">
	<n.get_node node="[n.uplevel_var name='local_node'/]" do="[n.do/]" />
</macro>

<macro name="set_local_subscription" dot_parameter="subscription">
	<n.uplevel_set_var name="local_subscription" value="[n.subscription/]" />
</macro>

<macro name="local_subscription" dot_parameter="do">
	<n.get_subscription subscription="[n.uplevel_var name='local_subscription'/]" do="[n.do/]" />
</macro>

<macro name="has_topic_node" requires="node">
	<n.is_post/>
</macro>

<macro name="as_html_comments" dot_parameter="text">
	<n.lt/>!-- <n.text/> --<n.gt/>
</macro>

<macro name="encode_text" dot_parameter="text">
	<n.encode.use_text_encoder.text/>
</macro>

<macro name="encode_url" dot_parameter="text">
	<n.encode.use_url_encoder.text/>
</macro>

<macro name="comment" dot_parameter="text">
</macro>

<macro name="array_of_user_ids" parameters="var_name, group">
	<script type="text/javascript">
		var <n.var_name/> = [<n.compress.>
		<n.users_in_group. group="[n.group/]">
			<n.loop.>
				<n.if.not.is_first_element>
					<then>,</then>
				</n.if.not.is_first_element>
				<n.current_user.id/>
			</n.loop.>
		</n.users_in_group.>
	</n.compress.>];
	</script>
</macro>

<macro name="doc for visible_for_admins">
	<n.doc_text.>
		Shows the HTML elements returned by the <i>selector</i> parameter if the current visitor is an administrator.
		This is very helpful in cached pages, where you can't use the visitor command.
		So the solution is to use javascript to perform this check.
	</n.doc_text.>
</macro>

<macro name="visible_for_admins" parameters="selector">
	<n.put_in_head.>
		<n.array_of_user_ids var_name="site_admins" group="[n.administrators_group/]"/>
	</n.put_in_head.>
	<script type="text/javascript">
		$(document).ready(function() {
			if (Nabble.userId && site_admins.indexOf(Number(Nabble.userId)) >= 0)
				$('<n.selector/>').show();
		});
	</script>
</macro>

<macro name="alternate" parameters="var, first_value, second_value">
	<n.if.not.global_is_var_set name="[n.var/]">
		<then.global_set_var name="[n.var/]" value="[n.true/]" />
	</n.if.not.global_is_var_set>
	<n.if.global_var name="[n.var/]">
		<then.first_value/>
		<else.second_value/>
	</n.if.global_var>
	<n.global_set_var. name="[n.var/]">
		<n.not.global_var name="[n.var/]" />
	</n.global_set_var.>
</macro>

<macro name="add_to_path" parameters="name,default_value" dot_parameter="value">
	<n.if.not.is_null.value>
		<then>
			<n.if.not.equal value1="[n.value/]" value2="[n.default_value/]">
				<then>
					&<n.name/>=<n.encode_text.value/>
				</then>
			</n.if.not.equal>
		</then>
	</n.if.not.is_null.value>
</macro>

<macro name="support_link">
	<n.if.is_null.support_url>
		<then.null/>
		<else>
			<a href="[n.support_url/]" target='_top'><t>Nabble Support</t></a>
		</else>
	</n.if.is_null.support_url>
</macro>

<macro name="important" dot_parameter="text">
	<span class="important"><n.text/></span>
</macro>

<macro name="subject" requires="node">
	<n.subject_impl/>
</macro>

<macro name="signature" dot_parameter="do" requires="user">
	<n.signature_impl.do/>
</macro>