<?xml version="1.0" encoding="utf-8"?>
<admin_templates>
  <template title="addon_delete"><![CDATA[<xen:title>{xen:phrase confirm_uninstallation_of_add_on}: {$addOn.title}</xen:title>
<xen:h1>{xen:phrase confirm_uninstallation_of_add_on}</xen:h1>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'add-ons/edit', $addOn}">{$addOn.title}</xen:breadcrumb>
</xen:navigation>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'add-ons/delete', $addOn}" class="deleteConfirmForm formOverlay">

	<p>{xen:phrase please_confirm_that_you_want_to_uninstall_following_add_on}:</p>
	<strong><a href="{xen:adminlink 'add-ons/edit', $addOn}">{$addOn.title}</a></strong>

	<xen:submitunit save="{xen:phrase uninstall_add_on}" />
	
	<input type="hidden" name="_xfConfirm" value="1" />
</xen:form>]]></template>
  <template title="addon_edit"><![CDATA[<xen:title>{xen:if '{$addOn.addon_id}', '{xen:phrase edit_add_on}: {$addOn.title}', '{xen:phrase create_new_add_on}'}</xen:title>

<xen:if is="{$addOn.addon_id}">
	<xen:navigation>
		<xen:breadcrumb href="{xen:adminlink add-ons}#{xen:helper listitemid, $addOn.addon_id}">{$addOn.title}</xen:breadcrumb>
	</xen:navigation>
	
	<xen:topctrl>
		<a href="{xen:adminlink add-ons/upgrade, $addOn}" class="button OverlayTrigger">{xen:phrase upgrade_add_on}</a>
		<a href="{xen:adminlink add-ons/export, $addOn}" class="button">{xen:phrase export}</a>
	</xen:topctrl>
</xen:if>

<xen:form action="{xen:adminlink 'add-ons/save'}" class="AutoValidator" data-redirect="yes">

	<xen:textboxunit label="{xen:phrase add_on_id}:" name="addon_id" value="{$addOn.addon_id}" />

	<xen:textboxunit label="{xen:phrase title}:" name="title" value="{$addOn.title}" data-livetitletemplate="{xen:if {$addOn.addon_id},
		'{xen:phrase edit_add_on}: <em>%s</em>',
		'{xen:phrase create_new_add_on}: <em>%s</em>'}" />

	<xen:checkboxunit label="">
		<xen:option name="active" selected="{$addOn.active}">{xen:phrase addon_is_active}</xen:option>
	</xen:checkboxunit>

	<fieldset>
		<xen:textboxunit label="{xen:phrase version_string}:" name="version_string" value="{$addOn.version_string}">
			<xen:explain>{xen:phrase this_string_will_be_displayed_to_end_user}</xen:explain>
		</xen:textboxunit>
		<xen:spinboxunit label="{xen:phrase version_id}:" name="version_id" value="{$addOn.version_id}" min="0">
			<xen:explain>{xen:phrase this_integer_will_be_used_for_internal_version_comparisons}</xen:explain>
		</xen:spinboxunit>
	</fieldset>

	<xen:textboxunit label="{xen:phrase url}:" name="url" value="{$addOn.url}" />

	<fieldset>
		<xen:controlunit label="{xen:phrase installation_code}:">
			<xen:textbox placeholder="{xen:phrase class}" name="install_callback_class" value="{$addOn.install_callback_class}" size="25" />
			::
			<xen:textbox placeholder="{xen:phrase method}" name="install_callback_method" value="{$addOn.install_callback_method}" size="25" />
		</xen:controlunit>

		<xen:controlunit label="{xen:phrase uninstallation_code}:">
			<xen:textbox placeholder="{xen:phrase class}" name="uninstall_callback_class" value="{$addOn.uninstall_callback_class}" size="25" />
			::
			<xen:textbox placeholder="{xen:phrase method}" name="uninstall_callback_method" value="{$addOn.uninstall_callback_method}" size="25" />
		</xen:controlunit>
	</fieldset>

	<input type="hidden" name="original_addon_id" value="{$addOn.addon_id}" />

	<xen:submitunit save="{xen:phrase save_add_on}">
		<xen:if is="{$addOn.addon_id}">
			<input type="button" value="{xen:phrase uninstall_add_on}..." accesskey="d" class="button OverlayTrigger"
				data-href="{xen:adminlink add-ons/delete, $addOn}" />
		</xen:if>
	</xen:submitunit>
</xen:form>]]></template>
  <template title="addon_install"><![CDATA[<xen:title>{xen:phrase install_new_add_on}</xen:title>

<xen:form action="{xen:adminlink 'add-ons/install'}" upload="true">
	<xen:uploadunit label="{xen:phrase install_from_uploaded_file}:" name="upload_file" />
	<xen:textboxunit label="{xen:phrase install_from_file_on_server}:" name="server_file" />
	
	<xen:submitunit save="{xen:phrase install_add_on}" />
	<input type="hidden" name="_xfConfirm" value="1" />
</xen:form>]]></template>
  <template title="addon_list"><![CDATA[<xen:title>{xen:phrase installed_add_ons}</xen:title>

<xen:topctrl>
	<a href="{xen:adminlink 'add-ons/install'}" class="button">+ {xen:phrase install_add_on}</a>
	<xen:if is="{$debugMode}"><a href="{xen:adminlink 'add-ons/add'}" class="button">+ {xen:phrase create_add_on}</a></xen:if>
</xen:topctrl>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<xen:form action="{xen:adminlink add-ons/toggle}" class="section AutoValidator">

	<xen:if is="{$addOns}">
		<h2 class="subHeading">
			<xen:include template="filter_list_controls" />
			{xen:phrase installed_add_ons}
		</h2>

		<ol class="FilterList">
			<xen:foreach loop="$addOns" key="$addOnId" value="$addOn">
				<xen:listitem id="{$addOn.addon_id}"
					label="{$addOn.title}"
					snippet="{$addOn.version_string}"
					href="{xen:if $canAccessDevelopment, {xen:adminlink 'add-ons/edit', $addOn}, {$addOn.url}}"
					delete="{xen:adminlink 'add-ons/delete', $addOn}"
					deletehint="{xen:phrase uninstall}"
					tooltip="{xen:phrase add_on_id_version_id, 'addon_id={$addOn.addon_id}', 'version_id={$addOn.version_id}'}"
					toggle="{$addOn.active}"
					toggletitle="{xen:phrase enable_disable_x, 'title={$addOn.title}'}">
					<xen:popup title="{xen:phrase controls}" ctrlclass="toolsCtrl">
						<xen:link href="{xen:adminlink 'add-ons/upgrade', $addOn}">{xen:phrase upgrade_add_on}</xen:link>
						<xen:link href="{xen:adminlink 'add-ons/disable', $addOn, '_xfToken={$visitor.csrf_token_page}'}" displayif="{$addOn.active}">{xen:phrase disable}</xen:link>
						<xen:link href="{xen:adminlink 'add-ons/enable', $addOn, '_xfToken={$visitor.csrf_token_page}'}" displayif="!{$addOn.active}">{xen:phrase enable}</xen:link>
						<xen:link href="{xen:adminlink 'add-ons/delete', $addOn}">{xen:phrase uninstall}</xen:link>
						<xen:link href="{xen:adminlink 'add-ons/edit', $addOn}" displayif="{$canAccessDevelopment}">{xen:phrase edit}</xen:link>
						<xen:link href="{xen:adminlink 'add-ons/export', $addOn}" displayif="{$canAccessDevelopment}">{xen:phrase export}</xen:link>
					</xen:popup>
				</xen:listitem>
			</xen:foreach>
		</ol>

		<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:count $addOns}</span>', 'total={xen:count $addOns}'}</p>

	<xen:else />
		<div class="noResults">{xen:phrase no_add_ons_have_been_installed_yet}</div>
	</xen:if>

</xen:form>]]></template>
  <template title="addon_upgrade"><![CDATA[<xen:title>{xen:phrase upgrade_add_on}: {$addOn.title}</xen:title>

<xen:form action="{xen:adminlink 'add-ons/upgrade', $addOn}" upload="true">
	<xen:uploadunit label="{xen:phrase upgrade_from_uploaded_file}:" name="upload_file" />
	<xen:textboxunit label="{xen:phrase upgrade_from_file_on_server}:" name="server_file" />
		
	<xen:submitunit save="{xen:phrase upgrade_add_on}" />
	<input type="hidden" name="_xfConfirm" value="1" />
</xen:form>]]></template>
  <template title="admin.css"><![CDATA[.pageWidth
{
	{xen:property pageWidth}

	min-width: 960px;
	max-width: 1200px;
	margin: 0 auto;
}

#body
{
	padding-top: 75px;
	position: relative;
}

/* breadcrumbly */

#breadcrumbs
{
	overflow: hidden; zoom: 1;
	font-size: 11px;
}

	#breadcrumbs li
	{
		float: left;
		margin-right: 10px;
	}
	
		#breadcrumbs li:after
		{
			content: ' > ';
		}

/* title bar */

.titleBar
{
	padding: 5px 0;
	border-bottom: 1px solid {xen:property primaryLighterStill};
	margin: 0px auto 10px;
}

#contentContainer
{
	position: absolute;
	top: 75px;
	left: 180px;
	right: 20px;
	z-index: 5;
}

	#content
	{
		min-height: 450px;
		padding: 10px 20px 20px;
		
		background: {xen:property contentBackground};
		
		border-bottom-left-radius: 5px;
		border-bottom-right-radius: 5px;
		box-shadow: 0px 5px 30px {xen:property primaryDark};
	}
	
		.Touch #content
		{
			box-shadow: none;
		}
	
/* side nav column */
	
#sideNav
{
	width: 180px;
	margin-left: 20px;
	z-index: 0;
	background: {xen:property primaryDark};
	border-bottom-left-radius: 5px;
	border-bottom-right-radius: 5px;
	min-height: 350px;
}

	#sideNav > *
	{
		padding: 5px;
		/*margin-bottom: 1px;*/
	}
	
	#sideNav > *:first-child
	{
		padding-top: 8px;
	}
	
		#sideNav > li > a
		{
			color: {xen:property primaryLighterStill};
			font-weight: bold;
			border-bottom: 1px solid {xen:property primaryMedium};
			padding-left: 5px;
			padding-top: 2px;
			padding-bottom: 2px;
		}
	
		#sideNav a
		{
			color: {xen:property primaryLighter};
			font-size: 11px;
			display: block;
			padding-left: 10px;
			padding-right: 25px;
			padding-top: 1px;
			padding-bottom: 1px;
			outline: 0;
			border-radius: 2px;
		}
		
		#sideNav a:link:hover,
		#sideNav a:visited:hover
		{
			background-color: {xen:property primaryMedium};
			color: {xen:property primaryLighterStill};
			text-decoration: none;
		}
	
/* Container for popup choosers above the main content */
	
.topChoosers
{
	margin: 10px 0;
}

{xen:helper clearfix, '.topChoosers'}

	.topChoosers .Popup
	{
		float: left;
		margin-right: 10px;
		font-size: 11px;
	}

/* options */

.optionEditLink
{
	font-size: 10px;
	line-height: 25px;
	position: absolute;
	top: 5px;
	right: 0px;
}
	.optionEditLink .editText
	{	
		display: inline-block;
		width: 16px;
		height: 16px;
		overflow: hidden;
		white-space: nowrap;
		text-indent: 9999em;
		
		background: transparent url('{xen:property imagePath}/xenforo/widgets/edit-sprite.png') no-repeat 0px;
	}

		a.optionEditLink:hover,
		.optionEditLink a:hover
		{
			text-decoration: none;
		}

		.optionEditLink:hover .editText
		{
			background-position: -16px;
		}

/** User message **/

.userMessage .secondaryContent
{
	overflow: hidden; zoom: 1;
}

.userMessage .avatar
{
	float: left;
}

.userMessage .message
{
	margin-left: 60px;
}

	.userMessage h2
	{
		font-size: 13pt;
		color: {xen:property primaryDark};
		margin: 5px 0;
	}

/** Error message **/

#htmlError > h2
{
	font-size: 11px;
	padding-bottom: 5px;
	border-bottom: solid 1px {xen:property primaryLighterStill};
	margin-bottom: 5px;
}

#htmlError #errorMessage
{
}

.alertText
{
	font-weight: bold;
	color: red;
}

/** Simple page output **/

.Admin body.simple #content
{
	padding: 75px 50px 150px;
	width: 800px;
	min-height: 0;
	margin: 50px auto 0;
	border-radius: 5px;
}

.optionGroupDescription
{
	font-family: {xen:property messageText.font-family};
	/*margin: 0 {xen:property ctrlUnitEdgeSpacer};*/
}

/* Quick Search */

#AdminSearchMenu
{
	position: fixed;
}

#AdminSearchForm
{
	width: auto;
	margin: 0;
	font-size: 11px;
	color: {xen:property primaryLightest};
	font-weight: bold;
	padding: 0px 5px 3px;
	background-color: {xen:property menu.border-top-color};
}

	#AdminSearchInput
	{
		font-weight: bold;
		width: 340px;
		box-sizing: border-box;
	}
	
		#AdminSearchInput input.textCtrl:focus
		{
			background-image: none;
		}

#AdminSearchResults
{
	width: 350px;
	max-height: 425px;
	overflow: auto;
}

#AdminSearchResults table
{
	width: 100%;
}

	#AdminSearchResults tr
	{
		vertical-align: top;
	}

		#AdminSearchResults th
		{		
			width: 125px;
			padding: 7px 5px;
			box-sizing: border-box;
			
			text-align: right;
			border-right: 1px solid {xen:property primaryLighter};
			border-bottom: none;
			color: {xen:property mutedTextColor};
		}
		
		#AdminSearchResults .secondaryContent
		{
			padding: 0;
		}
	
		#AdminSearchResults .blockLinksList
		{
			width: 225px;
			box-sizing: border-box;
			max-height: none;
			overflow: hidden;
		}
		
			#AdminSearchResults .blockLinksList > li
			{
				overflow: hidden; zoom: 1;
			}
		
			#AdminSearchResults .blockLinksList a
			{
				overflow: hidden;
				text-overflow: ellipsis;
			}
		
				#AdminSearchResults .blockLinksList dfn
				{
					font-size: 10px;
					color: {xen:property mutedTextColor};
				}
				
			#AdminSearchResults .blockLinksList .icon
			{
				float: left;
				margin: 3px 5px 0;
			}
		
		#AdminSearchResults tr:last-child .secondaryContent
		{
			border-bottom: none;
		}
		
		#AdminSearchResults .noResults
		{
			margin: 0;
			padding: 7px 12px;
		}
		
/** footer controls (usually at the bottom of the content area **/

.footerControls
{
	overflow: hidden;
	zoom: 1;
	font-size: 11px;
}

	.footerControls .navSide
	{
		float: left;
	}
	
		.footerControls .navSide .footerControl
		{
			margin-right: 10px;
		}
	
	.footerControls .scrollSide
	{
		float: right;
	}
	
		.footerControls .scrollSide .footerControl
		{
			margin-left: 10px;
		}
		
/** manual defer execution overlay **/

#ManualDeferOverlay
{
	padding: 20px;
		
	background: {xen:property contentBackground};
	
	border-radius: 5px;
	box-shadow: 0px 5px 30px {xen:property primaryDark};
}

	#ManualDeferOverlay h2
	{
		{xen:property h1}
	}
	
	#ManualDeferOverlay .CancelDeferred
	{
		float: right;
	}
	
	#ManualDeferOverlay .close
	{
		display: none;
	}

/** misc **/

.noResults
{
	margin: 10px 0;
}

.xenForm.section
{
	max-width: none;
}

@media (max-width:960px)
{
	#AdminSearchMenu
	{
		position: absolute;
	}
}]]></template>
  <template title="admin_delete"><![CDATA[<xen:title>{xen:phrase confirm_deletion_of_administrator}: {$admin.username}</xen:title>
<xen:h1>{xen:phrase confirm_deletion_of_administrator}</xen:h1>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'admins/edit', $admin}">{$admin.username}</xen:breadcrumb>
</xen:navigation>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'admins/delete', $admin}" class="deleteConfirmForm formOverlay">

	<p>{xen:phrase please_confirm_that_you_want_to_delete_following_administrator}:</p>
	<strong><a href="{xen:adminlink 'admins/edit', $admin}">{$admin.username}</a></strong>

	<xen:passwordunit label="{xen:phrase your_password}:" name="visitor_password">
		<xen:explain>{xen:phrase you_must_enter_your_current_password_to_validate_this_request}</xen:explain>
	</xen:passwordunit>

	<xen:submitunit save="{xen:phrase delete_administrator}" />
	
	<input type="hidden" name="_xfConfirm" value="1" />
</xen:form>]]></template>
  <template title="admin_edit"><![CDATA[<xen:title>{xen:if '{$admin.user_id}', '{xen:phrase edit_administrator}: {$admin.username}', '{xen:phrase add_new_administrator}'}</xen:title>

<xen:require css="permission.css" />

<xen:if is="{$admin.user_id}">
	<xen:navigation>
		<xen:breadcrumb href="{xen:adminlink admins}#{xen:helper listitemid, $admin.user_id}">{$admin.username}</xen:breadcrumb>
	</xen:navigation>
	
	<xen:h1>{xen:phrase edit_administrator}: <em>{$admin.username}</em></xen:h1>
	
	<xen:if is="{$admin.is_super_admin}">
		<xen:topctrl><h2>{xen:phrase super_administrator}</h2></xen:topctrl>
	</xen:if>
</xen:if>

<xen:form action="{xen:adminlink 'admins/save', $admin}" class="AutoValidator" data-redirect="on">

	<fieldset>
		<xen:passwordunit label="{xen:phrase your_password}:" name="visitor_password" class="NoAutoValidate">
			<xen:explain>{xen:phrase you_must_enter_your_current_password_to_validate_this_request}</xen:explain>
		</xen:passwordunit>
	</fieldset>

	<xen:if is="!{$admin.user_id}">
		<xen:textboxunit label="{xen:phrase user}:" name="username" inputclass="AutoComplete AcSingle" data-livetitletemplate="{xen:phrase add_new_administrator}: <em>%s</em>" />
	</xen:if>

	<fieldset id="addUserGroups">
	
		<xen:checkboxunit label="{xen:phrase add_user_to_user_groups}:" name="extra_user_group_ids" listclass="checkboxColumns">
			<xen:hint><br /><label><input type="checkbox" class="CheckAll" data-target="#addUserGroups" /> {xen:phrase select_all}</label></xen:hint>
			<xen:options source="$userGroupOptions" />
		</xen:checkboxunit>	
	
	</fieldset>
	
	<fieldset id="piGroups">
	
		<xen:checkboxunit label="{xen:phrase permissions}:" name="permissions" listclass="checkboxColumns">
			<xen:hint><br /><label><input type="checkbox" class="CheckAll" data-target="#piGroups" /> {xen:phrase select_all}</label></xen:hint>
			<xen:options source="$permissionOptions" />
		</xen:checkboxunit>
		
	</fieldset>

	<xen:submitunit save="{xen:phrase save_administrator}">
		<xen:if is="{$admin.user_id}">
			<input type="button" value="{xen:phrase delete_administrator}..." accesskey="d" class="button OverlayTrigger"
				data-href="{xen:adminlink 'admins/delete', $admin}" />
		</xen:if>
	</xen:submitunit>

</xen:form>]]></template>
  <template title="admin_list"><![CDATA[<xen:title>{xen:phrase administrators}</xen:title>

<xen:topctrl><a href="{xen:adminlink 'admins/add'}" class="button">+ {xen:phrase create_new_administrator}</a></xen:topctrl>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<xen:form action="{xen:adminlink admins}" class="section">

	<h2 class="subHeading">
		<xen:include template="filter_list_controls" />
		{xen:phrase administrators}
	</h2>

	<ol class="FilterList Scrollable">
		<xen:foreach loop="$admins" value="$admin">
			<xen:listitem id="{$admin.user_id}"
				label="{$admin.username}"
				snippet="{xen:if {$admin.is_super_admin}, '{xen:phrase super_administrator}'}"
				href="{xen:adminlink 'admins', $admin}"
				delete="{xen:adminlink 'admins/delete', $admin}"
				deletehint="{xen:phrase revoke_admin_privileges}">
				<xen:beforelabel>
					<img src="{xen:helper avatar, $admin, s}" alt="" class="listAvatar" />
				</xen:beforelabel>
				<xen:html>
					<a href="{xen:adminlink users/edit, $admin}" class="secondaryContent">{xen:phrase user_info}</a>
				</xen:html>
			</xen:listitem>
		</xen:foreach>
	</ol>

	<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:count $admins}</span>', 'total={xen:count $admins}'}</p>
</xen:form>]]></template>
  <template title="admin_navigation_delete"><![CDATA[<xen:title>{xen:phrase confirm_deletion_of_admin_navigation}: {$navigation.title}</xen:title>
<xen:h1>{xen:phrase confirm_deletion_of_admin_navigation}</xen:h1>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'admin-navigation/tab/navigation', $navigation}">{$navigation.title}</xen:breadcrumb>
</xen:navigation>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'admin-navigation/delete', $navigation}" class="deleteConfirmForm formOverlay">

	<p>{xen:phrase please_confirm_that_you_want_to_delete_following_admin_navigation}:</p>
	<strong><a href="{xen:adminlink 'admin-navigation/tab/navigation', $navigation}">{$navigation.title}</a></strong>

	<xen:submitunit save="{xen:phrase delete_admin_navigation}" />
	<input type="hidden" name="_xfConfirm" value="1" />
	
</xen:form>]]></template>
  <template title="admin_navigation_edit"><![CDATA[<xen:title>{xen:if '{$navigation.navigation_id}', '{xen:phrase edit_admin_navigation_link}: {$masterTitle}', '{xen:phrase create_new_admin_navigation_link}'}</xen:title>

<xen:if is="{$navigation.navigation_id}">
	<xen:navigation>
		<xen:breadcrumb href="{xen:adminlink admin-navigation}#{xen:helper listitemid, $navigation.navigation_id}">{$masterTitle}</xen:breadcrumb>
	</xen:navigation>
</xen:if>

<xen:form action="{xen:adminlink 'admin-navigation/save', $navigation}" class="AutoValidator" data-redirect="yes">
	<fieldset>
		<xen:textboxunit label="{xen:phrase admin_navigation_id}:" name="new_navigation_id" value="{$navigation.navigation_id}" />
		<xen:textboxunit label="{xen:phrase title}:" name="title" value="{$masterTitle}" data-livetitletemplate="{xen:if {$navigation.navigation_id},
			'{xen:phrase edit_admin_navigation_link}: <em>%s</em>',
			'{xen:phrase create_new_admin_navigation_link}: <em>%s</em>'}" />
		<xen:textboxunit label="{xen:phrase link}:" name="link" value="{$navigation.link}" />
	</fieldset>
	
	<fieldset>
		<xen:selectunit label="{xen:phrase parent_navigation_entry}:" name="parent_navigation_id" value="{$navigation.parent_navigation_id}">
			<xen:option value="">&nbsp;</xen:option>
			<xen:options source="$navigationOptions" />
		</xen:selectunit>
		<xen:textboxunit label="{xen:phrase display_order}:" name="display_order" value="{$navigation.display_order}" />
	</fieldset>
	
	<fieldset>
		<xen:selectunit label="{xen:phrase required_admin_permission}:" name="admin_permission_id" value="{$navigation.admin_permission_id}">
			<xen:option value="">&nbsp;</xen:option>
			<xen:options source="$adminPermissionOptions" />
		</xen:selectunit>
		<xen:checkboxunit label="">
			<xen:option name="debug_only" selected="{$navigation.debug_only}">{xen:phrase display_this_navigation_in_debug_mode_only}</xen:option>
			<xen:option name="hide_no_children" selected="{$navigation.hide_no_children}">{xen:phrase hide_this_navigation_when_there_no_viewable_children}</xen:option>
		</xen:checkboxunit>
	</fieldset>
	
	<xen:include template="helper_addon_unit" />
	
	<xen:submitunit save="{xen:phrase save_admin_navigation}">
		<xen:if is="{$navigation.navigation_id}">
			<input type="button" value="{xen:phrase delete_admin_navigation}..." accesskey="d" class="button OverlayTrigger"
				data-href="{xen:adminlink 'admin-navigation/delete', $navigation}" />
		</xen:if>
	</xen:submitunit>
</xen:form>]]></template>
  <template title="admin_navigation_list"><![CDATA[<xen:title>{xen:phrase admin_navigation}</xen:title>

<xen:topctrl><a href="{xen:adminlink 'admin-navigation/add'}" class="button">+ {xen:phrase create_admin_navigation}</a></xen:topctrl>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<xen:form action="{xen:adminlink admin-navigation}" class="section">

	<h2 class="subHeading">
		<xen:include template="filter_list_controls" />
		{xen:phrase admin_navigation}
	</h2>

	<ol class="FilterList Scrollable">
		<xen:foreach loop="$navigation" value="$nav">
			<xen:listitem
				id="{$nav.navigation_id}"
				label="{$nav.title}"
				snippet="{$nav.link}"
				href="{xen:adminlink 'admin-navigation/edit', $nav}"
				class="_depth{$nav.depth}"
				delete="{xen:adminlink 'admin-navigation/delete', $nav}">
				<xen:html>
					<a href="{xen:adminlink 'admin-navigation/add', '', 'parent={$nav.navigation_id}'}" class="secondaryContent">{xen:phrase create_child}</a>
				</xen:html>
			</xen:listitem>
		</xen:foreach>
	</ol>

	<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:count $navigation}</span>', 'total={xen:count $navigation}'}</p>

</xen:form>]]></template>
  <template title="admin_permission_delete"><![CDATA[<xen:title>{xen:phrase confirm_deletion_of_admin_permission}: {$adminPermission.title}</xen:title>
<xen:h1>{xen:phrase confirm_deletion_of_admin_permission}</xen:h1>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'admin-permissions/edit', $adminPermission}">{$adminPermission.title}</xen:breadcrumb>
</xen:navigation>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'admin-permissions/delete', $adminPermission}" class="deleteConfirmForm formOverlay">

	<p>{xen:phrase please_confirm_that_you_want_to_delete_following_admin_permission}:</p>
	<strong><a href="{xen:adminlink 'admin-permissions/edit', $adminPermission}">{$adminPermission.title}</a></strong>

	<xen:submitunit save="{xen:phrase delete_permission}" />
	<input type="hidden" name="_xfConfirm" value="1" />
	
</xen:form>]]></template>
  <template title="admin_permission_edit"><![CDATA[<xen:title>{xen:if '{$adminPermission.admin_permission_id}', '{xen:phrase edit_admin_permission}: {$masterTitle}', '{xen:phrase create_new_admin_permission}'}</xen:title>

<xen:if is="{$adminPermission.admin_permission_id}">
	<xen:navigation>
		<xen:breadcrumb href="{xen:adminlink admin-permissions}#{xen:helper listitemid, $adminPermission.admin_permission_id}">{$masterTitle}</xen:breadcrumb>
	</xen:navigation>
</xen:if>

<xen:form action="{xen:adminlink 'admin-permissions/save', $adminPermission}" class="AutoValidator" data-redirect="yes">
	<fieldset>
		<xen:textboxunit label="{xen:phrase permission_id}:" name="new_admin_permission_id" value="{$adminPermission.admin_permission_id}" />
		<xen:textboxunit label="{xen:phrase title}:" name="title" value="{$masterTitle}" data-livetitletemplate="{xen:if {$adminPermission.admin_permission_id},
			'{xen:phrase edit_admin_permission}: <em>%s</em>',
			'{xen:phrase create_new_admin_permission}: <em>%s</em>'}" />
	</fieldset>
			
	<xen:textboxunit label="{xen:phrase display_order}:" name="display_order" value="{$adminPermission.display_order}" />
		
	<xen:include template="helper_addon_unit" />
		
	<xen:submitunit save="{xen:phrase save_permission}">
		<xen:if is="{$adminPermission.admin_permission_id}">
			<input type="button" value="{xen:phrase delete_permission}..." accesskey="d" class="button OverlayTrigger"
				data-href="{xen:adminlink 'admin-permissions/delete', $adminPermission}" />
		</xen:if>
	</xen:submitunit>
</xen:form>]]></template>
  <template title="admin_permission_list"><![CDATA[<xen:title>{xen:phrase admin_permission_definitions}</xen:title>

<xen:topctrl><a href="{xen:adminlink 'admin-permissions/add'}" class="button">+ {xen:phrase create_new_admin_permission}</a></xen:topctrl>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<xen:form action="{xen:adminlink admin-permissions}" class="section">

	<h2 class="subHeading">
		<xen:include template="filter_list_controls" />
		{xen:phrase admin_permissions_definitions}
	</h2>

	<ol class="FilterList">
		<xen:foreach loop="$adminPermissions" value="$permission">
			<xen:listitem
				id="{$permission.admin_permission_id}"
				href="{xen:adminlink 'admin-permissions/edit', $permission}"
				label="{$permission.title}"
				delete="{xen:adminlink 'admin-permissions/delete', $permission}"
				snippet="{xen:if '{$permission.addon_id} != "XenForo" AND {$permission.addon_id} != ""', '{$permission.addon_id} / '}{$permission.admin_permission_id}" />
		</xen:foreach>
	</ol>

	<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:count $adminPermissions}</span>', 'total={xen:count $adminPermissions}'}</p>

</xen:form>]]></template>
  <template title="admin_style_property_group_list"><![CDATA[<xen:title>{xen:phrase admin_style_property_groups}</xen:title>

<xen:if is="{$canEditDefinition}">
	<xen:topctrl>
		<xen:if is="{$group.canEdit}"><a href="{xen:adminlink 'style-property-groups/edit', $group}" class="button">{xen:phrase edit_group}</a></xen:if>
		<a href="{xen:adminlink 'style-property-groups/add', '', 'style_id=-1'}" class="button">+ {xen:phrase create_new_group}</a>
	</xen:topctrl>
</xen:if>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<xen:form action="{xen:adminlink admin-style-properties}" class="section">
	
	<h2 class="subHeading">{xen:phrase admin_style_property_groups}</h2>
	
	<ol class="FilterList">
		<xen:foreach loop="$groups" value="$group">
			<xen:listitem
				id="{$group.group_name}"
				label="{$group.title}"
				href="{xen:adminlink admin-style-properties, '', 'group={$group.group_name}'}"
				snippet="{$group.description}" />
		</xen:foreach>
	</ol>
	
	<p class="sectionFooter">{xen:phrase showing_x_admin_style_property_groups, 'groups={xen:count $groups}'}</p>
	
</xen:form>]]></template>
  <template title="admin_style_property_list"><![CDATA[<xen:title>{$group.title}</xen:title>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink admin-style-properties, $group}#{xen:helper listitemid, $group.group_name}">{xen:phrase admin_style_property_groups}</xen:breadcrumb>
</xen:navigation>

<xen:if is="{$canEditDefinition}">
	<xen:topctrl>
		<a href="{xen:adminlink 'style-property-defs/add', '', 'style_id=-1'}" class="button">+ {xen:phrase create_new_property}</a>
	</xen:topctrl>
</xen:if>

<form action="{xen:adminlink 'admin-style-properties/save'}" method="post" id="PropertyForm">
	<xen:if is="{$group.group_name} == 'color'">
		<xen:include template="style_property_list_color_palette" />
	<xen:else />
		<xen:include template="style_property_list_js" />
		<xen:include template="style_property_list_contents" />
	</xen:if>

	<div class="propertySubmit">
		<input type="submit" value="{xen:phrase update_style_properties}" class="button primary" />
		<input type="reset" value="{xen:phrase undo_changes}" class="button" />
	</div>

	<input type="hidden" name="group" value="{$group.group_name}" />
	<input type="hidden" name="_xfToken" value="{$visitor.csrf_token_page}" />
	<input type="hidden" name="tab_id" value="0" />
</form>

<xen:include template="color_picker" />
<xen:include template="style_property_list_js" />]]></template>
  <template title="admin_template_delete"><![CDATA[<xen:title>{xen:phrase confirm_deletion_of_admin_template}: {$template.title}</xen:title>
<xen:h1>{xen:phrase confirm_deletion_of_admin_template}</xen:h1>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'admin-templates/edit', $template}">{$template.title}</xen:breadcrumb>
</xen:navigation>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'admin-templates/delete'}" class="deleteConfirmForm">
	<p>{xen:phrase please_confirm_that_you_want_to_delete_following_admin_template}:</p>
	<strong><a href="{xen:adminlink 'admin-templates/edit', $template}">{$template.title}</a></strong>

	<input type="hidden" name="template_id" value="{$template.template_id}" />

	<xen:submitunit save="{xen:phrase delete_template}" />

	<input type="hidden" name="_xfConfirm" value="1" />
</xen:form>]]></template>
  <template title="admin_template_edit"><![CDATA[<xen:title>{xen:if '{$template.title}', '{xen:phrase edit_admin_template}: {$template.title}', '{xen:phrase create_new_admin_template}'}</xen:title>

<xen:require css="template_edit.css" />
<xen:require js="js/xenforo/template_edit.js" />

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink admin-templates}#{xen:helper listitemid, $template.title}">{xen:phrase template_list}</xen:breadcrumb>
</xen:navigation>

<xen:topctrl>
	<div class="Popup" id="ColorPopup">
		<a rel="Menu" class="textCtrl Tooltip colorMenuControl NoPopupGadget" data-tipclass="flipped" data-offsetx="3" title="{xen:phrase color_palette}">{xen:phrase color_palette}</a>
		<div class="Menu" id="ColorMenu"
			data-contentsrc="{xen:adminlink 'admin-style-properties/color-reference'}"
			data-contentdest="#ColorPlaceHolder"
			data-insertfn="replaceAll"
		>
			<div class="blackOut" id="ColorPlaceHolder"><img src="{xen:property imagePath}/xenforo/widgets/ajaxload.info_FFFFFF_facebook.gif" alt="{xen:phrase loading}..." /></div>
		</div>
	</div>
</xen:topctrl>

<xen:form action="{xen:adminlink 'admin-templates/save'}" id="templateEditor"
	data-loadurl="{xen:adminlink 'admin-templates/load-multiple'}"
	data-saveurl="{xen:adminlink 'admin-templates/save-multiple'}"
	data-deleteurl="{xen:adminlink 'admin-templates/delete'}"
	data-progressurl="{xen:property imagePath}/xenforo/widgets/ajaxload.info_000000_facebook.gif"
	data-untitled="untitled template">
		
	<xen:textboxunit name="title" value="{$template.title}" label="{xen:phrase template_name}:" hint="{xen:phrase must_be_unique}" class="fullWidth" id="templateTitle" data-livetitletemplate="{xen:if {$template.title},
		'{xen:phrase edit_admin_template}: <em>%s</em>',
		'{xen:phrase create_new_admin_template}: <em>%s</em>'}" />

	<ul class="tabs" id="editorTabs">
		<li class="active" id="templateTab"><a><span class="tabText"><xen:if is="{$template.title}">{$template.title}<xen:else /><i>{xen:phrase untitled_template}</i></xen:if></span></a></li>
	</ul>
	
	<xen:textboxunit name="template" value="{$template.template}" label="{xen:phrase template}:" rows="20" code="true" class="fullWidth surplusLabel" id="templateTextarea">
		<xen:explain>{xen:phrase you_may_use_xenforo_admin_template_syntax_here}</xen:explain>
	</xen:textboxunit>

	<xen:include template="helper_addon_unit" />

	<input type="hidden" name="template_id" value="{$template.template_id}" id="templateId" />
	<input type="hidden" name="title_original" value="{$template.title}" id="templateTitleOriginal" />

	<xen:submitunit>
		<input type="submit" name="reload" value="Save Template" accesskey="s" class="button primary" id="saveReloadButton" data-ajaxvalue="{xen:phrase save_all_changes}" />
		<input type="submit" name="saveexit" value="{xen:phrase save_and_exit}" accesskey="e" class="button" id="saveExitButton" />
		<input type="button" name="delete" value="{xen:phrase delete_template}..." accesskey="d" class="button OverlayTrigger"
			data-href="{xen:adminlink admin-templates/delete, $template}"
			id="TemplateDeleteButton" {xen:if '!{$template.template_id}', 'style="display: none"'}
		/>
	</xen:submitunit>

</xen:form>]]></template>
  <template title="admin_template_list"><![CDATA[<xen:title>{xen:phrase admin_templates}</xen:title>

<xen:topctrl>
	<a href="{xen:adminlink 'admin-templates/add'}" class="button" accesskey="a">+ {xen:phrase create_new_admin_template}</a>
</xen:topctrl>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<xen:form action="{xen:adminlink admin-templates}" class="section">

	<h2 class="subHeading">
		<xen:include template="filter_list_controls" />
		{xen:phrase admin_templates}
	</h2>

	<ol class="FilterList Scrollable">
		<xen:foreach loop="$templates" value="$template">
			<xen:listitem
				id="{$template.template_id}"
				label="{$template.title}"
				snippet="{$template.addonTitle}"
				href="{xen:adminlink 'admin-templates/edit', $template}"
				delete="{xen:adminlink 'admin-templates/delete', $template}" />
		</xen:foreach>
	</ol>

	<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:count $templates}</span>', 'total={xen:count $templates}'}</p>

</xen:form>]]></template>
  <template title="admin_template_modification_delete"><![CDATA[<xen:include template="base_template_modification_delete">
	<xen:set var="$prefix" value="admin-template-mods" />
</xen:include>]]></template>
  <template title="admin_template_modification_edit"><![CDATA[<xen:include template="base_template_modification_edit">
	<xen:set var="$prefix" value="admin-template-mods" />
</xen:include>]]></template>
  <template title="admin_template_modification_list"><![CDATA[<xen:title>{xen:phrase admin_template_modifications}</xen:title>

<xen:include template="base_template_modification_list">
	<xen:set var="$prefix" value="admin-template-mods" />
</xen:include>]]></template>
  <template title="admin_template_modification_log"><![CDATA[<xen:include template="base_template_modification_log" />]]></template>
  <template title="admin_template_modification_test"><![CDATA[<xen:include template="base_template_modification_test" />]]></template>
  <template title="admin_template_search"><![CDATA[<xen:title>{xen:phrase search_admin_templates}</xen:title>

<xen:form action="{xen:adminlink admin-templates/search}" method="get">
	
	<xen:textboxunit label="{xen:phrase title_contains}:" name="title" type="search" results="5" />
	
	<fieldset>
		<xen:textboxunit label="{xen:phrase template_contains}:" name="template" inputclass="Elastic code" rows="2">
			<xen:html>		
				<xen:checkbox>
					<xen:option name="template_case_sensitive">{xen:phrase case_sensitive}</xen:option>
				</xen:checkbox>
			</xen:html>
		</xen:textboxunit>
	</fieldset>
	
	<xen:submitunit save="{xen:phrase search_templates}" />

	<input type="hidden" name="search" value="1" />
</xen:form>]]></template>
  <template title="admin_template_search_results"><![CDATA[<xen:title>{xen:phrase admin_template_search_results}</xen:title>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<xen:form action="{xen:adminlink admin-templates/search}" class="section">

	<h2 class="subHeading">
		<xen:include template="filter_list_controls" />
		{xen:phrase templates}
	</h2>

	<ol class="FilterList Scrollable">
	<xen:foreach loop="$templates" value="$template">
		<xen:listitem
			id="{$template.template_id}"
			label="{$template.title}"
			snippet="{$template.addonTitle}"
			href="{xen:adminlink 'admin-templates/edit', $template}"
			delete="{xen:adminlink 'admin-templates/delete', $template}"
			target="_blank" />
		
	</xen:foreach>
	</ol>

	<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:count $templates}</span>', 'total={xen:count $templates}'}</p>

</xen:form>]]></template>
  <template title="appearance_splash"><![CDATA[<xen:title>{xen:phrase appearance}</xen:title>

<xen:topctrl>
	<xen:if is="{$canEditStyles}"><a href="{xen:adminlink styles/import}" class="button">{xen:phrase import_style}</a></xen:if>
	<xen:if is="{$canEditLanguages}"><a href="{xen:adminlink languages/import}" class="button">{xen:phrase import_language}</a></xen:if>
</xen:topctrl>

<xen:require css="splash.css" />

<div class="splash">
	<div class="iconicContainer">
	<ul class="iconic">
	
	<xen:hook name="admin_icons_appearance">
	
	<xen:if is="{$canEditStyles}">
			
		<li><a href="{xen:adminlink 'style-properties/color'}" class="palette">
			<span class="icon"><span></span></span>
			<span class="linkText">{xen:phrase color_palette}</span>
			</a></li>
			
		<!-- slot: pre_style_properties -->
			
		<li><a href="{xen:adminlink 'style-properties'}" class="style_properties">
			<span class="icon"><span></span></span>
			<span class="linkText">{xen:phrase style_properties}</span>
			</a></li>
			
		<!-- slot: pre_templates -->
			
		<li><a href="{xen:adminlink 'templates'}" class="styles_templates">
			<span class="icon"><span></span></span>
			<span class="linkText">{xen:phrase templates}</span>
			</a></li>
		
		<!-- slot: pre_styles -->
			
		<li><a href="{xen:adminlink 'styles'}" class="styles">
			<span class="icon"><span></span></span>
			<span class="linkText">{xen:phrase styles}</span>
			</a></li>
	</xen:if>
	
	<xen:if is="{$canEditLanguages}">	
		<!-- slot: pre_languages -->
		
		<li><a href="{xen:adminlink 'languages'}" class="languages">
			<span class="icon"><span></span></span>
			<span class="linkText">{xen:phrase languages}</span>
			</a></li>
			
		<!-- slot: pre_phrases -->
			
		<li><a href="{xen:adminlink 'phrases'}" class="phrases">
			<span class="icon"><span></span></span>
			<span class="linkText">{xen:phrase phrases}</span>
			</a></li>
	</xen:if>
	
	</xen:hook>
	
	</ul>
	</div>

	<div class="sidebar">
		
		<xen:hook name="admin_sidebar_appearance">
		
		<xen:if is="{$canEditStyles}">
		<div class="section">
			<h3 class="textHeading">{xen:phrase styles}</h3>
			<xen:form action="{xen:adminlink templates/search}" method="get">
				<xen:textbox name="template" type="search" results="5" inputclass="quickSearchText" placeholder="{xen:phrase template_code}..." />
				<input type="submit" class="button primary quick{xen:phrase search}Button" value="{xen:phrase search}" />
				<input type="hidden" name="search" value="1" />
			</xen:form>
			
			<!-- slot: pre_styles -->
			
			<xen:form action="{xen:adminlink 'options/save'}" class="section AutoValidator">
				<table>
					<tr>
						<th class="subHeading">{xen:phrase title}</th>
						<th class="subHeading total" title="{xen:phrase customized_templates}">{xen:phrase templates}</th>
					</tr>
				</table>
				<table>
					<col />
					<col style="width: 100%" />
					<col />
					<xen:if is="{$masterStyle}">
					<tr>
						<td colspan="2"><a href="{xen:adminlink styles/templates, $masterStyle}" class="primaryContent">{xen:phrase master_style}</a></td>
						<td class="secondaryContent total">{xen:number $masterTemplates}</td>
					</tr>
					</xen:if>
					<xen:foreach loop="$styles" value="$style">
					<tr>
						<td class="secondaryContent Tooltip" title="{xen:phrase set_x_as_default_style, 'title={$style.title}'}" data-offsetx="3">
							<input type="radio" name="options[defaultStyleId]" class="SubmitOnChange"
								value="{$style.style_id}" {xen:checked '{$xenOptions.defaultStyleId} == {$style.style_id}'} /></td>
						<td><a href="{xen:adminlink styles/templates, $style}" class="primaryContent _depth{$style.depth}">{$style.title}</a></td>
						<td class="secondaryContent total" title="{xen:phrase customized_templates}">{xen:number $style.templateCount}</td>
					</tr>
					</xen:foreach>
				</table>
				<div class="sectionFooter"><a href="{xen:adminlink styles/import}">{xen:phrase import_style}</a></div>
			</xen:form>
		</div>
		</xen:if>
		
		<xen:if is="{$canEditLanguages}">		
		<!-- slot: pre_languages -->
		
		<div class="section">
			<h3 class="textHeading">{xen:phrase languages}</h3>
			<xen:form action="{xen:adminlink phrases/search}" method="get" class="section">
				<xen:textbox name="phrase_text" type="search" results="5" inputclass="quickSearchText" placeholder="{xen:phrase phrase_text}..." />
				<input type="submit" class="button primary quick{xen:phrase search}Button" value="{xen:phrase search}" />
				<input type="hidden" name="search" value="1" />
			</xen:form>			
			<xen:form action="{xen:adminlink 'options/save'}" class="section AutoValidator">
				<table>
					<tr>
						<th class="subHeading">{xen:phrase title}</th>
						<th class="subHeading total" title="{xen:phrase translated_phrases}">{xen:phrase phrases}</th>
					</tr>
				</table>
				<table>
					<col />
					<col style="width: 100%" />
					<col />
					<xen:if is="{$masterLanguage}">
					<tr>
						<td colspan="2"><a href="{xen:adminlink languages/phrases, $masterLanguage}" class="primaryContent">{xen:phrase master_language}</a></td>
						<td class="secondaryContent total">{xen:number $masterPhrases}</td>
					</tr>
					</xen:if>
					<xen:foreach loop="$languages" value="$language">
					<tr>
						<td class="secondaryContent Tooltip" title="{xen:phrase set_x_as_default_language, 'title={$language.title}'}" data-offsetx="3">
							<input type="radio" name="options[defaultLanguageId]" class="SubmitOnChange"
								value="{$language.language_id}" {xen:checked '{$xenOptions.defaultLanguageId} == {$language.language_id}'} /></td>
						<td><a href="{xen:adminlink languages/phrases, $language}" class="primaryContent _depth{$language.depth}">{$language.title}</a></td>
						<td class="secondaryContent total" title="{xen:phrase translated_phrases}">{xen:number $language.phraseCount}</td>
					</tr>
					</xen:foreach>
				</table>
				<div class="sectionFooter"><a href="{xen:adminlink languages/import}">{xen:phrase import_language}</a></div>
			</xen:form>
		</div>
		</xen:if>	
	
		</xen:hook>
	</div>
	
</div>]]></template>
  <template title="application_splash"><![CDATA[<xen:title>{xen:phrase applications}</xen:title>

<xen:if is="{$canManageNodes}">
<xen:topctrl>
	<a href="{xen:adminlink nodes/add}" class="button">+ {xen:phrase create_new_node}</a>
	<a href="{xen:adminlink node-permissions}" class="button">{xen:phrase node_permissions}</a>
</xen:topctrl>
</xen:if>

<xen:require css="splash.css" />

<div class="splash">
	<div class="iconicContainer">
	<ul class="iconic">
	
	<xen:hook name="admin_icons_application">
	
	<xen:if is="{$canManageNodes}">
		<li><a href="{xen:adminlink 'nodes'}" class="nodes">
			<span class="icon"><span></span></span>
			<span class="linkText">{xen:phrase display_node_tree}</span>
			</a></li>
			
		<!-- slot: pre_nodes_add -->
			
		<li><a href="{xen:adminlink 'nodes/add'}" class="nodes_add">
			<span class="icon"><span></span></span>
			<span class="linkText">{xen:phrase create_new_node}</span>
			</a></li>
			
		<!-- slot: pre_node_permissions -->
			
		<li><a href="{xen:adminlink 'node-permissions'}" class="node_permissions">
			<span class="icon"><span></span></span>
			<span class="linkText">{xen:phrase node_permissions}</span>
			</a></li>
			
		<!-- slot: pre_feeder -->
			
		<li><a href="{xen:adminlink 'feeds'}" class="feeder">
			<span class="icon"><span></span></span>
			<span class="linkText">{xen:phrase registered_feeds}</span>
			</a></li>
	</xen:if>
	
	<!-- slot: pre_spam_cleaner -->
		
	<xen:if is="{$canManageSpamCleaner}">
		<li><a href="{xen:adminlink 'spam-cleaner'}" class="spam_cleaner">
			<span class="icon"><span></span></span>
			<span class="linkText">{xen:phrase spam_cleaner_log}</span>
			</a></li>
	</xen:if>
	
	</xen:hook>
	
	</ul>
	</div>

	<div class="sidebar">
		
		<xen:hook name="admin_sidebar_applications">
		
		<div class="section">		
			<div class="secondaryContent">
				<h3 class="textHeading">{xen:phrase forum_statistics}</h3>
				<div class="statsBlock">
					<a href="{xen:adminlink nodes}"><span class="label">{xen:phrase discussions}:</span> <strong>{xen:number $boardTotals.discussions}</strong></a>	
					<a href="{xen:adminlink nodes}"><span class="label">{xen:phrase messages}:</span> <strong>{xen:number $boardTotals.messages}</strong></a>
				</div>
			</div>
		</div>
		
		<!-- slot: pre_spam_cleaner -->
		
		<xen:if is="{$canManageSpamCleaner}">
		<div class="section">
			<!--div class="secondaryContent">-->
				<h3 class="textHeading">{xen:phrase recent_spam_cleaning}</h3>
				<xen:if hascontent="true">
					<table>
					<tr>
						<th class="subHeading">{xen:phrase user}</th>
						<th class="subHeading">{xen:phrase date}</th>
						<th class="subHeading">{xen:phrase moderator}</th>
					</tr>
					<xen:contentcheck>
						<xen:foreach loop="$spamCleanerRecents" value="$log">
							<tr>
								<td><a href="{xen:adminlink users/edit, $log}" class="primaryContent">{$log.username}</a></td>
								<td class="secondaryContent"><xen:datetime time="$log.application_date" class="muted" /></td>
								<td class="primaryContent">{$log.applying_username}</td>
							</tr>
						</xen:foreach>
					</xen:contentcheck>
					</table>
				<xen:else />
					<p class="secondaryContent noContentMessage">{xen:phrase there_no_records_of_spam_cleaner_having_been_run}</p>
				</xen:if>
				<div class="sectionFooter">
					<a href="{xen:adminlink spam-cleaner}"><span class="label">{xen:phrase total_spam_cleaner_executions}:</span> <strong>{xen:number $spamCleanerExecutions}</strong></a>
				</div>
			<!--</div>-->
		</div>
		</xen:if>
		
		</xen:hook>
		
	</div>
	
</div>]]></template>
  <template title="attachment_delete"><![CDATA[<xen:title>{xen:phrase confirm_deletion_of_attachments}</xen:title>
<xen:h1>{xen:phrase confirm_deletion_of_attachments}</xen:h1>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'attachments', '', '_params={$filterParams}'}">{xen:phrase attachment_browser}</xen:breadcrumb>
</xen:navigation>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'attachments/delete'}" class="deleteConfirmForm formOverlay">

	<xen:if is="{$attachment}">
		<p>{xen:phrase please_confirm_that_you_want_to_delete_following_attachment}:</p>
		<strong>{$attachment.filename}</strong>
	<xen:else />
		<p>{xen:phrase please_confirm_that_you_want_to_delete_x_attachments, 'number={xen:count $attachmentIds}'}</p>
	</xen:if>

	<xen:submitunit save="{xen:phrase delete_attached_files}" />
	
	<input type="hidden" name="_xfConfirm" value="1" />
	
	<xen:foreach loop="$attachmentIds" value="$attachmentId">
		<input type="hidden" name="attachment_ids[]" value="{$attachmentId}" />
	</xen:foreach>
	
	<xen:foreach loop="$filterParams" key="$key" value="$value">
		<input type="hidden" name="{$key}" value="{$value}" />
	</xen:foreach>
</xen:form>]]></template>
  <template title="attachment_list"><![CDATA[<xen:title>{xen:phrase attachment_browser}</xen:title>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<xen:set var="$thumbHeight">44</xen:set>

<style>

#attachmentBrowser .subHeading,
#attachmentBrowser .footerControls { overflow: hidden; zoom: 1; }

#attachmentBrowser .subHeading .RadioTablets { float: left; }

#attachmentBrowser .subHeading label.checkAll { float: right; }

#attachmentBrowser .secondaryContent .secondRow { width: 100px; }

</style>

<xen:form action="{xen:adminlink attachments}" method="get" id="attachmentBrowser">

	<script>
	$(function()
	{
		$('#DatePresets').change(function(e)
		{
			var $ctrl = $(this),
				value = $ctrl.val(),
				$form = $ctrl.closest('form');
				
			if (value == -1)
			{
				return;
			}
			
			$form.find($ctrl.data('start') || 'input[name=start]').val(value);
			$form.find($ctrl.data('end') || 'input[name=end]').val('');
			$form.submit();
		});
	});
	</script>
		
	<xen:select name="content_type" value="{$contentType}" title="{xen:phrase show_only_files_attached_to_content_type}" inputclass="Tooltip" id="ctrl_content_type">
		<xen:option value="" label="({xen:phrase all_content_types})" />
		<xen:optgroup label="">
		<xen:foreach loop="$contentTypes" key="$_contentType" value="$contentTypePhrase">
			<xen:option value="{$_contentType}" label="{$contentTypePhrase}" />
		</xen:foreach>
		</xen:optgroup>
	</xen:select>
	
	<xen:textbox name="username" value="{$username}" placeholder="{xen:phrase user_name}" size="15" title="{xen:phrase show_only_attachments_uploaded_by}" inputclass="Tooltip AutoComplete AcSingle" />
	
	<xen:textbox type="date" name="start" value="{$start}" size="10" placeholder="{xen:phrase start_date}" title="{xen:phrase show_only_attachments_uploaded_after}" inputclass="Tooltip" />
	
	<xen:textbox type="date" name="end" value="{$end}" size="10" placeholder="{xen:phrase end_date}" title="{xen:phrase show_only_attachments_uploaded_before}" inputclass="Tooltip" />
		
	<xen:select name="date_preset" value="-1" id="DatePresets" title="{xen:phrase show_attachments_uploaded_since}" inputclass="autoSize Tooltip">
		<xen:option value="-1">{xen:phrase date_presets}:</xen:option>
		<xen:optgroup label="">
			<xen:foreach loop="{$datePresets}" key="$offset" value="$phrase">
				<xen:option value="{$offset}">{$phrase}</xen:option>
			</xen:foreach>
			<xen:option value="1995-01-01">{xen:phrase all_time}</xen:option>
		</xen:optgroup>
	</xen:select>
	
	<input type="submit" value="{xen:phrase go}" class="button" />

	<xen:if is="{$attachments}">
		<div class="section">		
		
			<h2 class="subHeading">
				<span class="RadioTablets">
					<label><input type="radio" name="mode" value="recent" {xen:checked "{$mode} == 'recent'"} /> {xen:phrase attachment_browser_most_recently_uploaded}</label>
					<label><input type="radio" name="mode" value="size" {xen:checked "{$mode} == 'size'"} /> {xen:phrase attachment_browser_largest_files}</label>
				</span>
				<label class="checkAll"><input type="checkbox" class="CheckAll" data-target="#AttachmentList" /> {xen:phrase select_all}</label>
			</h2>
		
			<ol id="AttachmentList" class="FilterList Scrollable secondRow SquareThumbs"
				data-thumb-height="44"
				data-thumb-selector="a.SquareThumb">
				<xen:foreach loop="$attachments" value="$attachment">
					<xen:listitem id="{$attachment.attachment_id}"
						href="{xen:adminlink attachments/view, $attachment}"
						delete="{xen:adminlink attachments/delete, $attachment}">
						<xen:beforelabel>
							<a href="{xen:adminlink attachments/view, $attachment}" class="SquareThumb">{xen:if {$attachment.thumbnailUrl}, '<img src="{$attachment.thumbnailUrl}" alt="{$attachment.filename}" />'}</a>
						</xen:beforelabel>
						<xen:label>
							{$attachment.filename}
							<span class="secondRow">
								<xen:datetime time="{$attachment.upload_date}" class="faint" />
								{xen:phrase by_x, 'name={$attachment.username}'}
								-
								{xen:number $attachment.file_size, size}
							</span>
						</xen:label>
						<xen:html>
							<label class="secondaryContent"><input type="checkbox" name="attachment_ids[]" value="{$attachment.attachment_id}" class="AttachmentCheck" /></label>
							<xen:if is="{$attachment.content_link}">
								<a href="{$attachment.content_link}" class="secondaryContent" target="_blank">{xen:phrase view_host_content}<span class="secondRow">({$contentTypes.{$attachment.content_type}})</span></a>
							<xen:else />
								<a class="secondaryContent">&nbsp;<span class="secondRow">({$contentTypes.{$attachment.content_type}})</span></a>
							</xen:if>
						</xen:html>
					</xen:listitem>
				</xen:foreach>
			</ol>
		
			<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:count $attachments}</span>', 'total={xen:number $total}'}</p>
		
		</div>
				
		<div class="footerControls">
			<input type="submit" name="delete_selected" value="{xen:phrase delete_selected_attachments}" class="button OverlayTrigger" style="float: right" />
	
			<xen:adminpagenav page="{$page}" perpage="{$perPage}" total="{$total}" link="attachments" linkparams="{$pageParams}" />
		</div>
	<xen:else />
		<div class="noResults">{xen:phrase no_results_found}</div>
	</xen:if>
	
</xen:form>]]></template>
  <template title="ban_email_list"><![CDATA[<xen:title>{xen:phrase banned_email_addresses}</xen:title>

<xen:form action="{xen:adminlink 'banning/emails/delete'}">
	<h3 class="subHeading">{xen:phrase banned_email_addresses}</h3>
	
	<xen:if is="{$bannedEmails}">
		<ul class="primaryContent threeColumnList">
		<xen:foreach loop="$bannedEmails" value="$bannedEmail">
			<li><input type="checkbox" name="delete[]" value="{$bannedEmail.banned_email}" /> {$bannedEmail.banned_email}</li>
		</xen:foreach>
		</ul>
		
		<xen:submitunit save="{xen:phrase delete_selected_emails}" />
	<xen:else />
		<div class="primaryContent">{xen:phrase no_email_addresses_have_been_banned}</div>
	</xen:if>
</xen:form>


<xen:form action="{xen:adminlink 'banning/emails/add'}">
	<h3 class="subHeading">{xen:phrase ban_email_address}</h3>
		<xen:textboxunit label="{xen:phrase email_to_ban}:" name="email">
			<xen:explain>{xen:phrase you_may_use_star_to_represent_wildcards_automatically_added}</xen:explain>
		</xen:textboxunit>
		
		<xen:submitunit save="{xen:phrase ban_email_address}" />
</xen:form>]]></template>
  <template title="ban_ip"><![CDATA[<xen:title>{xen:phrase confirm_ip_ban}: {$ip}</xen:title>
<xen:h1>{xen:phrase confirm_ip_ban}</xen:h1>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'banning/discouraged-ips', '', 'ip={$ip}'}">{xen:phrase discouraged_ip_addresses}</xen:breadcrumb>
</xen:navigation>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'banning/ips-add', '', 'ip={$ip}'}" class="deleteConfirmForm formOverlay AutoValidator">

	<p>{xen:phrase please_confirm_that_you_want_to_ban_following_ip}:</p>
	<strong><a href="{xen:adminlink 'users/ip-users', '', 'ip={$ip}'}">{$ip}</a></strong>

	<xen:submitunit save="{xen:phrase ban_ip}" />
	
	<input type="hidden" name="_xfConfirm" value="1" />
</xen:form>]]></template>
  <template title="ban_ip_list"><![CDATA[<xen:title>{xen:phrase banned_ips}</xen:title>

<xen:form action="{xen:adminlink 'banning/ips/delete'}">
	<h3 class="subHeading">{xen:phrase banned_ips}</h3>
	
	<xen:if is="{$bannedIps}">
		<ul class="threeColumnList primaryContent">
			<xen:foreach loop="$bannedIps" value="$bannedIp">
				<li><label><input type="checkbox" name="delete[]" value="{$bannedIp.ip}" /> {$bannedIp.ip}</label></li>
			</xen:foreach>
		</ul>
		
		<xen:submitunit save="{xen:phrase delete_selected_ips}" />
	<xen:else />
		<div class="primaryContent">{xen:phrase no_ips_have_been_banned}</div>
	</xen:if>
</xen:form>


<xen:form action="{xen:adminlink 'banning/ips/add'}">
	<h3 class="subHeading">{xen:phrase ban_ip}</h3>
	
	<xen:textboxunit label="{xen:phrase ip_to_ban}:" name="ip" value="{$ipToBan}">
		<xen:explain>{xen:phrase you_may_enter_partial_ip_v4_v6}</xen:explain>
	</xen:textboxunit>
	
	<xen:submitunit save="{xen:phrase ban_ip}" />
	
	<input type="hidden" name="_xfConfirm" value="1" />
</xen:form>]]></template>
  <template title="ban_user_edit"><![CDATA[<xen:title>{xen:if '{$bannedUser.user_id}', '{xen:phrase edit_banned_user}: {$bannedUser.username}', '{xen:phrase ban_user}'}</xen:title>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'banning/users'}#{xen:helper listitemid, $bannedUser.user_id}">{xen:phrase banned_users}</xen:breadcrumb>
</xen:navigation>

<xen:form action="{xen:adminlink 'banning/users/save', $bannedUser}" class="formOverlay">

	<xen:if is="{$bannedUser.user_id}">
		<xen:controlunit label="{xen:phrase user_name}:">{$bannedUser.username}</xen:controlunit>
		<input type="hidden" name="user_id" value="{$bannedUser.user_id}" />

		<xen:if is="{$bannedUser.banning_username}">
			<xen:controlunit label="{xen:phrase banned_by}:">{$bannedUser.banning_username}</xen:controlunit>
		</xen:if>

		<xen:controlunit label="{xen:phrase ban_started}:">{xen:datetime $bannedUser.ban_date}</xen:controlunit>

		<xen:controlunit label="{xen:phrase ban_ends}:"><xen:if is="{$bannedUser.end_date}">{xen:datetime $bannedUser.end_date}<xen:else />{xen:phrase never}</xen:if></xen:controlunit>
	<xen:else />
		<xen:textboxunit label="{xen:phrase user_name}:" name="username" value="{$bannedUser.username}" inputclass="AutoComplete AcSingle" data-livetitletemplate="{xen:phrase ban_user}: <em>%s</em>" />
	</xen:if>

	<xen:radiounit label="{xen:phrase ban_length}:" name="ban_length">
		<xen:option value="permanent" selected="{$bannedUser.end_date} == 0">{xen:phrase permanent}</xen:option>
		<xen:option value="temporary" selected="{$bannedUser.end_date} > 0">
			<xen:label>{xen:phrase until}:</xen:label>
			<xen:textbox type="date" name="end_date" value="{xen:if $bannedUser.end_date, {xen:date $bannedUser.end_date, picker}, ''}" />
		</xen:option>
	</xen:radiounit>

	<xen:textboxunit label="{xen:phrase reason_for_banning}:" name="user_reason" value="{$bannedUser.user_reason}" maxlength="255">
		<xen:explain>{xen:phrase this_will_be_shown_to_user_if_provided}</xen:explain>
	</xen:textboxunit>

	<xen:submitunit save="{xen:phrase ban_user}">
		<xen:if is="{$bannedUser.user_id}">
			<input type="button" value="{xen:phrase lift_ban}" accesskey="d" class="button OverlayTrigger" data-href="{xen:adminlink 'banning/users/lift', $bannedUser}" />
		</xen:if>
	</xen:submitunit>
	
</xen:form>]]></template>
  <template title="ban_user_lift"><![CDATA[<xen:title>{xen:phrase confirm_lifting_of_ban}: {$bannedUser.username}</xen:title>
<xen:h1>{xen:phrase confirm_lifting_of_ban}</xen:h1>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'banning/users'}">{xen:phrase banned_users}</xen:breadcrumb>
	<xen:breadcrumb href="{xen:adminlink 'banning/users', $bannedUser}">{$bannedUser.username}</xen:breadcrumb>
</xen:navigation>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'banning/users/lift', $bannedUser}" class="deleteConfirmForm formOverlay">

	<p>{xen:phrase please_confirm_that_you_want_to_lift_ban_on_following_user}:</p>
	<strong><a href="{xen:adminlink 'banning/users', $bannedUser}">{$bannedUser.username}</a></strong>
	<p>{xen:phrase x_was_banned_by_y, 'name={$bannedUser.username}', 'banning_user={$bannedUser.banning_username}'}, <xen:datetime time="$bannedUser.ban_date" />.
		<xen:if is="{$bannedUser.end_date}">
			{xen:phrase ban_will_be_automatically_lifted_on_x, "date={xen:date $bannedUser.end_date, 'absolute'}"}
		<xen:else />
			{xen:phrase ban_is_permanent}
		</xen:if>
	</p>
	<xen:if is="{$bannedUser.user_reason}"><p>{xen:phrase reason_for_ban}: <i>{$bannedUser.user_reason}</i></p></xen:if>

	<xen:submitunit save="{xen:phrase lift_ban}" />
	<input type="hidden" name="_xfConfirm" value="1" />
	
</xen:form>]]></template>
  <template title="ban_user_list"><![CDATA[<xen:title>{xen:phrase banned_users}</xen:title>

<xen:topctrl>
	<a href="{xen:adminlink 'banning/users/add'}" class="button">{xen:phrase ban_user}</a>
</xen:topctrl>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<xen:form action="{xen:adminlink banning/users}" class="section">	
	<xen:if is="{$bannedUsers}">
		
		<h2 class="subHeading">
			<xen:include template="filter_list_controls" />
			{xen:phrase banned_users}
		</h2>
		
		<ol class="FilterList Scrollable" data-ajaxfilter="true">
			<xen:include template="ban_user_list_items" />
		</ol>
		
		<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count={xen:count $bannedUsers}', 'total={xen:number $totalBanned}'}</p>
	
		{xen:adminpagenav {$perPage}, {$totalBanned}, {$page}, 'banning/users'}	
	<xen:else />
		<div class="noResults">{xen:phrase there_no_banned_users}</div>
	</xen:if>
</xen:form>]]></template>
  <template title="ban_user_list_items"><![CDATA[<xen:foreach loop="$bannedUsers" value="$bannedUser">
	<xen:listitem
		id="{$bannedUser.user_id}"
		label="{$bannedUser.username}"
		href="{xen:adminlink 'banning/users', $bannedUser}"
		delete="{xen:adminlink 'banning/users/lift', $bannedUser}"
		deletehint="{xen:phrase lift_ban}">
		<xen:snippet>
			{xen:if {$bannedUser.user_reason}, '{xen:phrase reason}: <span class="muted">{$bannedUser.user_reason}</span>'}
			{xen:phrase ban_ends}: <span class="muted">{xen:if $bannedUser.end_date, {xen:datetime $bannedUser.end_date}, '{xen:phrase never}'}</span>
		</xen:snippet>
		<xen:beforelabel>
			<img src="{xen:helper avatar, $bannedUser, s}" alt="" class="listAvatar" />
		</xen:beforelabel>
		<xen:html>
			<a href="{xen:adminlink 'users/edit', $bannedUser}" class="secondaryContent">{xen:phrase user_info}</a>
		</xen:html>
	</xen:listitem>
</xen:foreach>
<xen:if is="{$filterMore}">
	<li class="listNote">{xen:phrase more_records_matching_filter_more_specific}</li>
</xen:if>]]></template>
  <template title="base_template_modification.css"><![CDATA[#TemplateContents
{
	max-width: 100%;
	border: 1px solid #ccc;
	border-radius: 5px;
	background: #f2f2f2;
	max-height: 250px;
	min-height: 15px;
	overflow: auto;
	white-space: pre;
	word-wrap: normal;
	font-family: Consolas, "Courier New", Courier, monospace;
	direction: ltr;
	padding: 4px;
}]]></template>
  <template title="base_template_modification_delete"><![CDATA[<xen:title>{xen:phrase confirm_deletion_of_template_modification}</xen:title>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink '{$prefix}/edit', $modification}">{$modification.template}</xen:breadcrumb>
</xen:navigation>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink '{$prefix}/delete', $modification}" class="deleteConfirmForm">
	<p>{xen:phrase please_confirm_that_you_want_to_delete_following_template_modification}:</p>
	<strong><a href="{xen:adminlink '{$prefix}/edit', $modification}">{$modification.template}<xen:if is="{$modification.description}"> - {$modification.description}</xen:if></a></strong>

	<xen:submitunit save="{xen:phrase delete_template_modification}" />

	<input type="hidden" name="_xfConfirm" value="1" />
</xen:form>]]></template>
  <template title="base_template_modification_edit"><![CDATA[<xen:title>{xen:if {$modification.modification_id}, '{xen:phrase edit_template_modification}', '{xen:phrase create_template_modification}'}</xen:title>

<xen:require css="base_template_modification.css" />

<xen:if is="{$modification.modification_id}">
	<xen:navigation>
		<xen:breadcrumb href="{xen:adminlink $prefix}#{xen:helper listitemid, $modification.modification_id}">{$modification.template}</xen:breadcrumb>
	</xen:navigation>
</xen:if>

<xen:form action="{xen:adminlink '{$prefix}/save', $modification}" class="AutoValidator" data-redirect="yes">
	
	<xen:if is="!{$canEdit}">
		<p class="importantMessage">{xen:phrase this_modification_can_only_be_enabled_or_disabled}</p>
	</xen:if>

	<xen:textboxunit label="{xen:phrase template}:" id="TemplateModificationTemplate" name="template" value="{$modification.template}" maxlength="50" readonly="!{$canEdit}" inputclass="AutoComplete AcSingle" data-acurl="{xen:adminlink '{$prefix}/auto-complete'}" />
	<xen:textboxunit label="{xen:phrase modification_key}:" explain="{xen:phrase this_is_used_to_uniquely_identify_modification_across_add_on_upgrades}" name="modification_key" value="{$modification.modification_key}" maxlength="50" readonly="!{$canEdit}" />
	<xen:textboxunit label="{xen:phrase description}:" name="description" value="{$modification.description}" readonly="!{$canEdit}" />

	<div class="formGroup">
		{xen:raw $extraInsertHtml}

		<xen:controlunit label="{xen:phrase template_contents}:">
			<div id="TemplateContents" data-contents-url="{xen:adminlink '{$prefix}/contents'}"><i>{xen:phrase requested_template_not_found}</i></div>
		</xen:controlunit>

		<xen:radiounit label="{xen:phrase search_type}:" name="action" value="{$modification.action}" readonly="!{$canEdit}">
			<xen:option value="str_replace" label="{xen:phrase simple_replacement}" />
			<xen:option value="preg_replace" label="{xen:phrase regular_expression}" hint="{xen:phrase search_text_must_contain_delimiters_modifiers_for_regex}" />
			<xen:option value="callback" label="{xen:phrase php_callback}" hint="{xen:phrase search_text_must_be_full_regular_expression}" />
		</xen:radiounit>

		<xen:textboxunit label="{xen:phrase find}:" name="find" value="{$modification.find}" inputclass="Elastic code" rows="2" readonly="!{$canEdit}" />
		<xen:textboxunit label="{xen:phrase replace}:" name="replace" value="{$modification.replace}" inputclass="Elastic code" rows="2" readonly="!{$canEdit}">
			<xen:explain>{xen:phrase template_modification_replace_description}</xen:explain>
		</xen:textboxunit>
	</div>

	<xen:spinboxunit label="{xen:phrase execution_order}:" name="execution_order" value="{$modification.execution_order}" min="0" readonly="!{$canEdit}" />
	<xen:checkboxunit label="">
		<xen:option name="enabled" value="1" selected="{$modification.enabled}">{xen:phrase automatically_apply_template_modification}</xen:option>
	</xen:checkboxunit>

	<xen:if is="{$canEdit}">
		<xen:include template="helper_addon_unit" />
	<xen:else />
		<input type="hidden" name="addon_id" value="{$modification.addon_id}" />
	</xen:if>
	
	<xen:submitunit save="{xen:phrase save_template_modification}">
		<input type="submit" name="test" value="{xen:phrase test_modification}" class="button OverlayTrigger" />
		<xen:if is="{$modification.modification_id} AND {$canEdit}">
			<input type="button" value="{xen:phrase delete_template_modification}..." accesskey="d" class="button OverlayTrigger"
				data-href="{xen:adminlink '{$prefix}/delete', $modification}" /></xen:if>
	</xen:submitunit>
</xen:form>

<script>
$(function() {
	var $templateInput = $('#TemplateModificationTemplate'),
		$contents = $('#TemplateContents'),
		$contentsCtrl = $contents.closest('.ctrlUnit'),
		invalidContents = $contents.html();
		updateContents = function(templateName)
		{
			if (templateName === '')
			{
				if ($contentsCtrl.is(':visible'))
				{
					$contentsCtrl.xfFadeUp();
				}
				return;
			}

			XenForo.ajax(
				$contents.data('contents-url'),
				{template: templateName},
				function(data) {
					if (!$contentsCtrl.is(':visible'))
					{
						$contentsCtrl.xfFadeDown();
					}

					if (data.template !== false)
					{
						$contents.text(data.template);
					}
					else
					{
						$contents.html(invalidContents);
					}
				}
			);
		};

	if ($templateInput.val())
	{
		updateContents($templateInput.val());
	}
	else
	{
		$contentsCtrl.hide();
	}

	var timer;

	$templateInput.on('change AutoComplete', function() {
		if (timer)
		{
			clearTimeout(timer);
		}
		timer = setTimeout(function() {
			updateContents($templateInput.val());
		}, 200);
	});
});
</script>]]></template>
  <template title="base_template_modification_list"><![CDATA[<xen:if is="{$canCreateModification}">
	<xen:topctrl>
		<a href="{xen:adminlink '{$prefix}/add'}" class="button">+ {xen:phrase create_template_modification}</a>
	</xen:topctrl>
</xen:if>

<xen:require css="template_modification.css" />
<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<xen:form action="{xen:adminlink '{$prefix}/toggle'}" class="section AutoValidator">

	<xen:if is="{$groupedModifications}">

		<h2 class="subHeading">
			<xen:include template="filter_list_controls" />
			{xen:phrase template_modifications}
		</h2>

		<ol class="FilterList Scrollable">
		<xen:foreach loop="$groupedModifications" key="$addOnId" value="$modifications">
			<li>
				<xen:if is="{$addOnId}">
					<xen:set var="$addOn" value="{$addOns.{$addOnId}}" />
					<xen:if is="{$addOn}">
						<h3 class="textHeading{xen:if '!{$addOn.active}', ' disabled'}">{$addOn.title}</h3>
					<xen:else />
						<h3 class="textHeading">{$addOnId}</h3>
					</xen:if>
				<xen:else />
					<h3 class="textHeading">{xen:phrase custom_modifications}</h3>
				</xen:if>
				<ol>
				<xen:foreach loop="$modifications" value="$modification">
					<xen:if is="{$logSummary.{$modification.modification_id}}">
						<xen:set var="$summary" value="{$logSummary.{$modification.modification_id}}" />
					<xen:else />
						<xen:set var="$summary" value="{xen:array 'ok=0', 'error=0', 'not_found=0'}" />
					</xen:if>
					<xen:listitem
						id="{$modification.modification_id}"
						label="{$modification.template}"
						href="{xen:adminlink '{$prefix}/edit', $modification}"
						snippet="{$modification.description}"
						delete="{xen:adminlink '{$prefix}/delete', $modification}"
						toggle="{$modification.enabled}"
						toggletitle="{xen:phrase enable_disable_modification}"
					>
						<xen:html>
							<a href="{xen:adminlink '{$prefix}/log', $modification}" class="secondaryContent logSummary OverlayTrigger">
								<span class="ok {xen:if $summary.ok, active}">{$summary.ok}</span>
								/ <span class="notFound {xen:if $summary.not_found, active}">{$summary.not_found}</span>
								/ <span class="error {xen:if $summary.error, active}">{$summary.error}</span></a>
						</xen:html>
					</xen:listitem>
				</xen:foreach>
				</ol>
			</li>
		</xen:foreach>
		</ol>

		<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:number $modificationCount}</span>', 'total={xen:number $modificationCount}'}</p>
		
	<xen:else />
		<div class="noResults">{xen:phrase no_template_modifications_have_been_defined_yet}</div>
	</xen:if>	
		
</xen:form>]]></template>
  <template title="base_template_modification_log"><![CDATA[<xen:title>{xen:phrase template_modification_log}</xen:title>

<div class="section">
	<div class="primaryContent overlayScroll">
		<table class="dataTable">
		<tr class="dataRow">
			<th>{xen:phrase template}</th>
			<xen:if is="{$styles}"><th>{xen:phrase style}</th></xen:if>
			<th>{xen:phrase status}</th>
			<th>{xen:phrase apply_count}</th>
		</tr>
		<xen:if is="{$logs}">
			<xen:foreach loop="$logs" value="$log">
				<xen:set var="$template" value="{$templates.{$log.template_id}}" />
				<xen:if is="{$template}">
					<tr class="dataRow">
						<td>{$template.title}</td>
						<xen:if is="{$styles}"><td><xen:if is="{$template.style_id}">{$styles.{$template.style_id}.title}<xen:else />{xen:phrase master_style}</xen:if></td></xen:if>
						<xen:if is="{$log.status} == 'ok'">
							<td>OK</td>
							<td>{$log.apply_count}</td>
						<xen:else />
							<td>
								<xen:if is="{$log.status} == 'error_compile'">{xen:phrase compiler_error_may_be_from_another_template_modification}
								<xen:elseif is="{$log.status} == 'error_invalid_regex'" />{xen:phrase invalid_regular_expression}
								<xen:elseif is="{$log.status} == 'error_unknown_action'" />{xen:phrase unknown_action}
								<xen:elseif is="{$log.status} == 'error_invalid_callback'" />{xen:phrase invalid_callback}
								<xen:elseif is="{$log.status} == 'error_callback_failed'" />{xen:phrase callback_failed}
								</xen:if>
							</td>
							<td>-</td>
						</xen:if>
					</tr>
				</xen:if>
			</xen:foreach>
		<xen:else />
			<tr class="dataRow">
				<td colspan="{xen:if $styles, 4, 3}">{xen:phrase this_template_modification_does_not_match_any_templates}</td>
			</tr>
		</xen:if>
		</table>
	</div>
</div>]]></template>
  <template title="base_template_modification_test"><![CDATA[<xen:title>{xen:phrase template_modification_test}</xen:title>

<xen:require css="template_modification.css" />
<xen:require css="diff.css" />

<div class="section">
	<div class="overlayScroll primaryContent ltr">
		<ul class="diffList code">
		<xen:foreach loop="$diffs" value="$diff">
			<xen:set var="$diffHtml" value="{xen:helper implode, '<br />', {$diff.1}}" />
			<li class="diffLine diff_{$diff.0}">{xen:if "trim({$diffHtml}) !== ''", {xen:raw $diffHtml}, '&nbsp;'}</li>
		</xen:foreach>
		</ul>
	</div>
</div>]]></template>
  <template title="bb_code_delete"><![CDATA[<xen:title>{xen:phrase confirm_deletion_of_custom_bb_code}: [{$bbCode.bb_code_id}]</xen:title>
<xen:h1>{xen:phrase confirm_deletion_of_custom_bb_code}</xen:h1>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'bb-codes/edit', $bbCode}">[{$bbCode.bb_code_id}]</xen:breadcrumb>
</xen:navigation>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'bb-codes/delete', $bbCode}" class="deleteConfirmForm formOverlay">
	<p>{xen:phrase please_confirm_that_you_want_to_delete_following_bb_code}:</p>
	<strong><a href="{xen:adminlink 'bb-codes/edit', $site}">[{$bbCode.bb_code_id}]</a></strong>

	<xen:submitunit save="{xen:phrase delete_custom_bb_code}" />
	<input type="hidden" name="_xfConfirm" value="1" />
</xen:form>]]></template>
  <template title="bb_code_edit"><![CDATA[<xen:title>{xen:if '{$bbCode.bb_code_id}', '{xen:phrase edit_custom_bb_code}: [{$bbCode.bb_code_id}]', '{xen:phrase add_new_custom_bb_code}'}</xen:title>

<xen:if is="{$bbCode.bb_code_id}">
	<xen:navigation>
		<xen:breadcrumb href="{xen:adminlink bb-codes}#bb_code_{xen:helper listitemid, $bbCode.bb_code_id}">[{$bbCode.bb_code_id}]</xen:breadcrumb>
	</xen:navigation>
</xen:if>

<xen:form action="{xen:adminlink 'bb-codes/save', $bbCode}" class="AutoValidator" data-redirect="on">

	<ul class="tabs Tabs" data-panes="#bbCodePanes > li">
		<li class="active"><a>{xen:phrase basic_information}</a></li>
		<li><a>{xen:phrase advanced_options}</a></li>
	</ul>
	
	<ul id="bbCodePanes">
		<li>
			<xen:textboxunit label="{xen:phrase bb_code_tag}:" name="new_bb_code_id" value="{$bbCode.bb_code_id}" />
	
			<xen:textboxunit label="{xen:phrase title}:" name="title" value="{$title}" />
			<xen:textboxunit label="{xen:phrase description}:" name="description" value="{$description}" rows="2" inputclass="Elastic" />

			<xen:radiounit label="{xen:phrase replacement_mode}:" name="bb_code_mode" value="{$bbCode.bb_code_mode}">
				<xen:option value="replace">{xen:phrase simple_replacement}</xen:option>
				<xen:option value="callback">{xen:phrase php_callback}</xen:option>
			</xen:radiounit>
			
			<xen:radiounit label="{xen:phrase supports_option_parameter}:" name="has_option" value="{$bbCode.has_option}">
				<xen:option value="yes">{xen:phrase yes}</xen:option>
				<xen:option value="no">{xen:phrase no}</xen:option>
				<xen:option value="optional" hint="{xen:phrase bb_code_tag_will_work_with_and_without_option_provided}">{xen:phrase optional}</xen:option>
			</xen:radiounit>

			<xen:textboxunit label="{xen:phrase html_replacement}:" name="replace_html" value="{$bbCode.replace_html}" code="true" rows="2" inputclass="Elastic">
				<xen:explain>{xen:phrase use_option_and_text_in_custom_bb_code}</xen:explain>
			</xen:textboxunit>

			<xen:controlunit label="{xen:phrase php_callback}:">
				<xen:html>
					<xen:textbox placeholder="{xen:phrase class}" name="callback_class" value="{$bbCode.callback_class}" size="25" />
					::
					<xen:textbox placeholder="{xen:phrase method}" name="callback_method" value="{$bbCode.callback_method}" size="25" />
				</xen:html>
				<xen:explain>{xen:phrase custom_bb_code_callback_will_receive_parameters}</xen:explain>
			</xen:controlunit>

			<xen:textboxunit label="{xen:phrase example_usage}:" name="example" value="{$bbCode.example}" rows="2" inputclass="Elastic">
				<xen:explain>{xen:phrase if_provide_example_bb_code_appear_on_bb_code_help_page}</xen:explain>
			</xen:textboxunit>

			<xen:checkboxunit label="">
				<xen:option name="allow_signature" value="1" selected="{$bbCode.allow_signature}">{xen:phrase allow_this_bb_code_in_signatures}</xen:option>
			</xen:checkboxunit>
			
			<xen:include template="helper_addon_unit" />

			<xen:checkboxunit label="">
				<xen:option name="active" value="1" selected="{$bbCode.active}">{xen:phrase enabled}</xen:option>
			</xen:checkboxunit>
		</li>
		<li>
			<xen:textboxunit label="{xen:phrase option_match_regular_expression}:" name="option_regex" value="{$bbCode.option_regex}" code="true" rows="2" inputclass="Elastic">
				<xen:explain>{xen:phrase if_provided_tag_only_be_valid_if_option_matches_regex}</xen:explain>
			</xen:textboxunit>

			<xen:checkboxunit label="{xen:phrase within_this_bb_code}:">
				<xen:option name="disable_smilies" value="1" selected="{$bbCode.disable_smilies}">{xen:phrase disable_smilies}</xen:option>
				<xen:option name="disable_nl2br" value="1" selected="{$bbCode.disable_nl2br}">{xen:phrase disable_line_break_conversion}</xen:option>
				<xen:option name="disable_autolink" value="1" selected="{$bbCode.disable_autolink}">{xen:phrase disable_auto_linking}</xen:option>
				<xen:option name="plain_children" value="1" selected="{$bbCode.plain_children}">{xen:phrase stop_parsing_bb_code}</xen:option>
			</xen:checkboxunit>

			<xen:checkboxunit label="">
				<xen:option name="allow_empty" value="1" selected="{$bbCode.allow_empty}" label="{xen:phrase display_html_replacement_when_empty}" hint="{xen:phrase if_selected_replacement_html_displayed_no_text_inside_bb_code}" />
			</xen:checkboxunit>

			<xen:spinboxunit label="{xen:phrase trim_line_breaks_after}:" name="trim_lines_after" value="{$bbCode.trim_lines_after}" min="0" max="10">
				<xen:explain>{xen:phrase if_tag_is_block_level_may_want_to_ignore_line_breaks}</xen:explain>
			</xen:spinboxunit>

			<fieldset>
				<xen:textboxunit label="{xen:phrase editor_icon_url}:" name="editor_icon_url" value="{$bbCode.editor_icon_url}">
					<xen:explain>{xen:phrase if_provided_icon_to_insert_bb_code_appear_in_editor}</xen:explain>
				</xen:textboxunit>

				<xen:checkboxunit label="{xen:phrase sprite_mode}:">
					<xen:option name="sprite_mode" label="{xen:phrase enable_sprite_mode_with_following_parameters}" selected="{$bbCode.sprite_mode}" />
				</xen:checkboxunit>
				
				<xen:controlunit label="{xen:phrase sprite_position}:">
					<xen:spinbox name="sprite_params[x]" value="{$bbCode.spriteParams.x}" title="{xen:phrase background_position_x}" inputclass="Tooltip OptOut" />
					<xen:spinbox name="sprite_params[y]" value="{$bbCode.spriteParams.y}" title="{xen:phrase background_position_y}" inputclass="Tooltip OptOut" />
					px
				</xen:controlunit>
			</fieldset>

			<xen:textboxunit label="{xen:phrase html_email_replacement}:" name="replace_html_email" value="{$bbCode.replace_html_email}" code="true" rows="2" inputclass="Elastic">
				<xen:explain>{xen:phrase if_provided_bb_code_replace_html_email_desc}</xen:explain>
			</xen:textboxunit>

			<xen:textboxunit label="{xen:phrase text_replacement}:" name="replace_text" value="{$bbCode.replace_text}" code="true" rows="2" inputclass="Elastic">
				<xen:explain>{xen:phrase if_provided_bb_code_replace_text_desc}</xen:explain>
			</xen:textboxunit>
		</li>
	</ul>
		
	<xen:submitunit save="{xen:phrase save_custom_bb_code}">
		<xen:if is="{$bbCode.bb_code_id}">
			<input type="button" value="{xen:phrase delete_custom_bb_code}..." accesskey="d" class="button OverlayTrigger"
				data-href="{xen:adminlink 'bb-codes/delete', $bbCode}" />
		</xen:if>
	</xen:submitunit>
</xen:form>]]></template>
  <template title="bb_code_import"><![CDATA[<xen:title>{xen:phrase import_custom_bb_codes}</xen:title>

<xen:form action="{xen:adminlink bb-codes/import}" class="formOverlay" upload="true">

	<xen:uploadunit label="{xen:phrase import_from_uploaded_xml_file}:" name="upload" />
	
	<xen:submitunit save="{xen:phrase import_custom_bb_codes}" />

	<input type="hidden" name="_xfConfirm" value="1" />
</xen:form>]]></template>
  <template title="bb_code_list"><![CDATA[<xen:title>{xen:phrase custom_bb_codes}</xen:title>

<xen:topctrl>
<a href="{xen:adminlink 'bb-codes/add'}" class="button">+ {xen:phrase add_new_custom_bb_code}</a>
<a href="{xen:adminlink bb-codes/import}" class="button OverlayTrigger">{xen:phrase import_custom_bb_codes}</a>
<xen:if is="{$bbCodes}">
	<a href="{xen:adminlink bb-codes, '', 'export={xen:if $exportView, "", 1}'}" class="button">{xen:phrase export_custom_bb_codes}</a>
</xen:if>
</xen:topctrl>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<xen:form action="{xen:adminlink {xen:if $exportView, bb-codes/export, bb-codes/toggle}}" class="section {xen:if $exportView, '', AutoValidator}">
	<xen:if is="{$bbCodes}">

		<h2 class="subHeading">
			<xen:include template="filter_list_controls" />
			{xen:phrase custom_bb_codes}
		</h2>

		<ol class="FilterList">
			<xen:foreach loop="$bbCodes" value="$bbCode">
				<xen:if is="{$exportView}">
					<xen:listitem
						id="bb_code_{$bbCode.bb_code_id}"
						label="[{$bbCode.bb_code_id}] - {$bbCode.title}"
						snippet="{$bbCode.description}"
						href="{xen:adminlink 'bb-codes/edit', $bbCode}"
						selectable="true"
						selectdisabled="{xen:if $bbCode.addon_id, 1, 0}"
						selecttooltip="{xen:if $bbCode.addon_id, {xen:phrase bb_codes_for_addon_not_exported_independently}}"
						selectname="export[]"
						selectvalue="{$bbCode.bb_code_id}">
					</xen:listitem>
				<xen:else />
					<xen:listitem
						id="bb_code_{$bbCode.bb_code_id}"
						label="[{$bbCode.bb_code_id}] - {$bbCode.title}"
						snippet="{$bbCode.description}"
						href="{xen:adminlink 'bb-codes/edit', $bbCode}"
						toggle="{$bbCode.active}"
						toggletitle="{xen:phrase enable_disable_x, 'title=[{$bbCode.bb_code_id}]'}"
						delete="{xen:adminlink 'bb-codes/delete', $bbCode}">
					</xen:listitem>
				</xen:if>
			</xen:foreach>
		</ol>

		<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:count $bbCodes}</span>', 'total={xen:count $bbCodes}'}</p>
		
		<xen:if is="{$exportView}">
			<div class="section"><input type="submit" value="{xen:phrase export_selected_bb_codes}" class="button" /></div>
		</xen:if>

	<xen:else />
		<div class="noResults">{xen:phrase no_items_have_been_created_yet}</div>
	</xen:if>
</xen:form>]]></template>
  <template title="bb_code_media_site_delete"><![CDATA[<xen:title>{xen:phrase confirm_deletion_of_bb_code_media_site}: {$site.site_title}</xen:title>
<xen:h1>{xen:phrase confirm_deletion_of_bb_code_media_site}</xen:h1>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'bb-code-media-sites/edit', $site}">{$site.site_title}</xen:breadcrumb>
</xen:navigation>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'bb-code-media-sites/delete', $site}" class="deleteConfirmForm formOverlay">
	<p>{xen:phrase please_confirm_that_you_want_to_delete_following_bb_code_media_site}:</p>
	<strong><a href="{xen:adminlink 'bb-code-media-sites/edit', $site}">{$site.site_title}</a></strong>

	<xen:submitunit save="{xen:phrase delete_bb_code_media_site}" />
	<input type="hidden" name="_xfConfirm" value="1" />
</xen:form>]]></template>
  <template title="bb_code_media_site_edit"><![CDATA[<xen:title>{xen:if '{$site.site_title}', '{xen:phrase edit_bb_code_media_site}: {$site.site_title}', '{xen:phrase add_new_bb_code_media_site}'}</xen:title>

<xen:if is="{$site.media_site_id}">
	<xen:navigation>
		<xen:breadcrumb href="{xen:adminlink bb-code-media-sites}#{xen:helper listitemid, $site.media_site_id}">{$site.site_title}</xen:breadcrumb>
	</xen:navigation>
</xen:if>

<xen:form action="{xen:adminlink 'bb-code-media-sites/save', $site}" class="AutoValidator" data-redirect="on">

	<ul class="tabs Tabs" data-panes="#mediaSitePanes > li">
		<li class="active"><a>{xen:phrase basic_information}</a></li>
		<li><a>{xen:phrase advanced_options}</a></li>
	</ul>
	
	<ul id="mediaSitePanes">
		<li>
			<xen:textboxunit label="{xen:phrase media_site_id}:" name="new_media_site_id" value="{$site.media_site_id}" explain="{xen:phrase this_will_be_used_to_identify_media_site_to_load_in_bb_code}" />
	
			<xen:include template="helper_addon_unit" />
			
			<fieldset>
				<xen:textboxunit label="{xen:phrase site_title}:" name="site_title" value="{$site.site_title}" data-livetitletemplate="{xen:if {$site.site_title},
					'{xen:phrase edit_bb_code_media_site}: <em>%s</em>',
					'{xen:phrase add_new_bb_code_media_site}: <em>%s</em>'}" />
				<xen:textboxunit label="{xen:phrase site_url}:" name="site_url" value="{$site.site_url}" />
				
				<xen:checkboxunit label="">
					<xen:option name="supported" value="1" selected="{$site.supported}">{xen:phrase show_this_site_on_list_of_supported_sites_shown_to_visitors}</xen:option>
				</xen:checkboxunit>
			</fieldset>
			
			<fieldset>
				<xen:textboxunit label="{xen:phrase match_urls}:" name="match_urls" value="{$site.match_urls}" rows="2" inputclass="Elastic">
					<xen:explain>{xen:phrase you_may_use_star_as_wildcard_and_id_to_point_to_media_id}</xen:explain>
				</xen:textboxunit>
			</fieldset>
			
			<fieldset>
				<xen:textboxunit label="{xen:phrase embed_html}:" name="embed_html" value="{$site.embed_html}" rows="7" inputclass="Elastic" code="true">
					<xen:explain>{xen:phrase enter_id_where_you_want_user_entered_media_id_to_be_used}</xen:explain>
				</xen:textboxunit>
			</fieldset>
		</li>
		<li>		
			<xen:checkboxunit label="{xen:phrase regular_expression_matching}:">
				<xen:option name="match_is_regex" selected="{$site.match_is_regex}" label="{xen:phrase match_urls_are_regex}" />
				<xen:explain>{xen:phrase match_urls_are_regex_explain}</xen:explain>
			</xen:checkboxunit>
			
			<fieldset>
				<xen:controlunit label="{xen:phrase match_url_callback}:">
					<xen:textbox placeholder="{xen:phrase class}" name="match_callback_class" value="{$site.match_callback_class}" size="25" maxlength="75" />
					::
					<xen:textbox placeholder="{xen:phrase method}" name="match_callback_method" value="{$site.match_callback_method}" size="25" maxlength="50" />
					<p class="explain">{xen:phrase match_url_callback_explain}</p>
				</xen:controlunit>
			</fieldset>
			
			<fieldset>
				<xen:controlunit label="{xen:phrase embed_html_callback}:">
					<xen:textbox placeholder="{xen:phrase class}" name="embed_html_callback_class" value="{$site.embed_html_callback_class}" size="25" maxlength="75" />
					::
					<xen:textbox placeholder="{xen:phrase method}" name="embed_html_callback_method" value="{$site.embed_html_callback_method}" size="25" maxlength="50" />
					<p class="explain">{xen:phrase embed_html_callback_explain}</p>
				</xen:controlunit>
			</fieldset>
		</li>
	</ul>
		
	<xen:submitunit save="{xen:phrase save_bb_code_media_site}">
		<xen:if is="{$site.media_site_id}">
			<input type="button" value="{xen:phrase delete_bb_code_media_site}..." accesskey="d" class="button OverlayTrigger"
				data-href="{xen:adminlink 'bb-code-media-sites/delete', $site}" />
		</xen:if>
	</xen:submitunit>
</xen:form>]]></template>
  <template title="bb_code_media_site_list"><![CDATA[<xen:title>{xen:phrase bb_code_media_sites}</xen:title>

<xen:topctrl><a href="{xen:adminlink 'bb-code-media-sites/add'}" class="button">+ {xen:phrase add_bb_code_media_site}</a></xen:topctrl>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<xen:form action="{xen:adminlink bb-code-media-sites}" class="section">
	<xen:if is="{$sites}">

		<h2 class="subHeading">
			<xen:include template="filter_list_controls" />
			{xen:phrase bb_code_media_sites}
		</h2>

		<ol class="FilterList">
			<xen:foreach loop="$sites" value="$site">
				<xen:listitem
					id="{$site.media_site_id}"
					label="{$site.site_title}"
					snippet="{$site.site_url}"
					href="{xen:adminlink 'bb-code-media-sites/edit', $site}"
					delete="{xen:adminlink 'bb-code-media-sites/delete', $site}">
					<xen:html>
						<a href="{$site.site_url}" target="_{$site.media_site_id}" class="secondaryContent">{xen:phrase visit_site}</a>
					</xen:html>
				</xen:listitem>
			</xen:foreach>
		</ol>

		<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:count $sites}</span>', 'total={xen:count $sites}'}</p>

	<xen:else />
		<div class="noResults">{xen:phrase no_bb_code_media_sites_have_been_added_yet}</div>
	</xen:if>
</xen:form>]]></template>
  <template title="captcha_question_delete"><![CDATA[<xen:title>{xen:phrase confirm_deletion_of_captcha_question}: {$captchaQuestion.question}</xen:title>
<xen:h1>{xen:phrase confirm_deletion_of_captcha_question}</xen:h1>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink captcha-questions, $captchaQuestion}">{xen:phrase question_and_answer_captchas}</xen:breadcrumb>
	<xen:breadcrumb href="{xen:adminlink captcha-questions/edit, $captchaQuestion}">{$captchaQuestion.question}</xen:breadcrumb>
</xen:navigation>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'captcha-questions/delete', $captchaQuestion}" class="deleteConfirmForm formOverlay">

	<p>{xen:phrase please_confirm_that_you_want_to_delete_following_question}:</p>
	<strong><a href="{xen:adminlink 'captcha-questions/edit', $captchaQuestion}">{$captchaQuestion.question}</a> <dfn>{$captchaQuestion.answersArray.0}</dfn></strong>

	<xen:submitunit save="{xen:phrase delete_question}" />
	
	<input type="hidden" name="_xfConfirm" value="1" />
</xen:form>]]></template>
  <template title="captcha_question_edit"><![CDATA[<xen:title>{xen:if '{$captchaQuestion.captcha_question_id}', '{xen:phrase edit_question}: {$captchaQuestion.question}', {xen:phrase add_new_question}}</xen:title>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink captcha-questions}#{xen:helper listitemid, $captchaQuestion.captcha_question_id}">{xen:phrase question_and_answer_captchas}</xen:breadcrumb>
</xen:navigation>

<xen:form class="AutoValidator"
	action="{xen:adminlink captcha-questions/save, $captchaQuestion}"
	data-redirect="on">
	
	<xen:textboxunit label="{xen:phrase question}:" name="question" value="{$captchaQuestion.question}" data-livetitletemplate="{xen:if {$captchaQuestion.captcha_question_id},
		'{xen:phrase edit_question}: <em>%s</em>',
		'{xen:phrase add_new_question}: <em>%s</em>'}" />
		
	<xen:controlunit label="{xen:phrase correct_answers}:">
		<xen:html>
			<ul id="CaptchaAnswers">
				<xen:foreach loop="$captchaQuestion.answersArray" value="$answer">
					<li><input type="text" name="answers[]" value="{$answer}" class="textCtrl" placeholder="{xen:phrase answer}..." /></li>
				</xen:foreach>
			</ul>
			<input type="button" value="{xen:phrase add_additional_answer}" class="button smallButton FieldAdder" data-source="#CaptchaAnswers > li" />
		</xen:html>
		<xen:explain>{xen:phrase captcha_question_answers_explain}</xen:explain>
	</xen:controlunit>
	
	<fieldset>
		<xen:checkboxunit label="">
			<xen:option name="active" selected="{$captchaQuestion.active}">
				<xen:label>{xen:phrase question_is_active}</xen:label>
				<xen:hint>{xen:phrase inactive_questions_are_not_presented_to_visitors}</xen:hint>
			</xen:option>
		</xen:checkboxunit>
	</fieldset>
	
	<xen:submitunit save="{xen:phrase save_question}">
		<xen:if is="{$captchaQuestion.captcha_question_id}"><a href="{xen:adminlink captcha-questions/delete, $captchaQuestion}" class="button OverlayTrigger">{xen:phrase delete_question}...</a></xen:if>
	</xen:submitunit>
</xen:form>]]></template>
  <template title="captcha_question_list"><![CDATA[<xen:title>{xen:phrase question_and_answer_captchas}</xen:title>

<xen:topctrl><a href="{xen:adminlink captcha-questions/add}" class="button">+ {xen:phrase add_new_question}</a></xen:topctrl>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<xen:form action="{xen:adminlink captcha-questions/toggle}" class="section AutoValidator">

	<xen:if is="{$captchaQuestions}">
		<h2 class="subHeading">
			<xen:include template="filter_list_controls" />
			{xen:phrase question_and_answer_captchas}
		</h2>

		<ol class="FilterList Scrollable">
			<xen:foreach loop="$captchaQuestions" value="$captchaQuestion">
				<xen:listitem id="{$captchaQuestion.captcha_question_id}"
					label="{$captchaQuestion.question}"
					labelclass="{xen:if '!{$captchaQuestion.active}', 'disabled'}"
					snippet="{xen:helper implode, ', ', $captchaQuestion.answersArray}"
					href="{xen:adminlink 'captcha-questions/edit', $captchaQuestion}"
					delete="{xen:adminlink 'captcha-questions/delete', $captchaQuestion}"
					toggle="{$captchaQuestion.active}"
					toggletitle="{xen:phrase enable_disable_x, 'title={$captchaQuestion.question}'}" />
			</xen:foreach>
		</ol>

		<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:count $captchaQuestions}</span>', 'total={xen:count $captchaQuestions}'}</p>

	<xen:else />
		<div class="noResults">{xen:phrase no_questions_have_been_created_yet}</div>
	</xen:if>

</xen:form>]]></template>
  <template title="category_delete"><![CDATA[<xen:title>{xen:phrase confirm_deletion_of_category}: {$category.title}</xen:title>
<xen:h1>{xen:phrase confirm_deletion_of_category}</xen:h1>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'categories/edit', $category}">{$category.title}</xen:breadcrumb>
</xen:navigation>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'categories/delete'}" class="deleteConfirmForm formOverlay">

	<p>{xen:phrase please_confirm_that_you_want_to_delete_following_category}:</p>
	<strong><a href="{xen:adminlink 'categories/edit', $category}">{$category.title}</a></strong>

	<xen:include template="helper_node_delete_children" />

	<input type="hidden" name="node_id" value="{$category.node_id}" />
	<input type="hidden" name="_xfConfirm" value="1" />

	<xen:submitunit save="{xen:phrase delete_category}" />
</xen:form>]]></template>
  <template title="category_edit"><![CDATA[<xen:title>{xen:if {$category.node_id}, '{xen:phrase edit_category}: {$category.title}', '{xen:phrase create_new_category}'}</xen:title>

<xen:if is="{$category.node_id}">
	<xen:navigation>
		<xen:breadcrumb href="{xen:adminlink nodes}#{xen:helper listitemid, $category.node_id}">{$category.title}</xen:breadcrumb>
	</xen:navigation>

	<xen:topctrl>
		<a href="{xen:adminlink 'nodes/add', '', 'parent_node_id={$category.node_id}'}" class="button">+ {xen:phrase add_child}</a>
		<a href="{xen:adminlink 'nodes/add', '', 'parent_node_id={$category.parent_node_id}'}" class="button">+ {xen:phrase add_sibling}</a>
	</xen:topctrl>
</xen:if>

<xen:form action="{xen:adminlink 'categories/save', $category}"
	class="AutoValidator"
	data-fieldvalidatorurl="{xen:adminlink 'categories/validate-field', $category}"
	data-redirect="yes">

	<xen:hook name="admin_category_edit">
	
	<fieldset>
		<!-- slot: before_title -->
		
		<xen:textboxunit name="title" value="{$category.title}" label="{xen:phrase title}:" data-livetitletemplate="{xen:if {$category.node_id},
			'{xen:phrase edit_category}: <em>%s</em>',
			'{xen:phrase create_new_category}: <em>%s</em>'}">
		</xen:textboxunit>
	
		<!-- slot: after_title -->

		<xen:textboxunit name="description" value="{$category.description}" label="{xen:phrase description}:" hint="{xen:phrase you_may_use_html}" explain="{xen:phrase node_description_explain}" rows="2" inputclass="Elastic">
		</xen:textboxunit>
		
		<!-- slot: after_description -->
	</fieldset>
	
	<!-- slot: after_first_fieldset -->

	<fieldset>	
		<!-- slot: before_parent_node_id -->
		
		<xen:selectunit name="parent_node_id" value="{$category.parent_node_id}" label="{xen:phrase parent_node}:">
			<xen:options source="$nodeParentOptions" />
		</xen:selectunit>
		
		<!-- slot: after_parent_node_id -->
		
		<xen:textboxunit name="display_order" value="{$category.display_order}" label="{xen:phrase display_order}:">
			<xen:explain>{xen:phrase position_of_this_item_relative_to_other_nodes_with_same_parent}</xen:explain>
		</xen:textboxunit>
		
		<!-- slot: after_display_order -->
		
		<xen:checkboxunit label="">
			<xen:option name="display_in_list" label="{xen:phrase display_in_node_list}" selected="{$category.display_in_list}">
				<xen:hint>{xen:phrase if_unselected_users_will_not_see_this_node_in_list}</xen:hint>
			</xen:option>
		</xen:checkboxunit>
		
		<!-- slot: after_display_in_list -->
	</fieldset>
	
	<!-- slot: before_style_override -->

	<xen:checkboxunit label="">
		<xen:option name="style_override" label="{xen:phrase override_user_style_choice}" selected="{$category.style_id}">
			<xen:disabled>
				<xen:select name="style_id" value="{$category.style_id}">
					<xen:options source="$styleOptions" />
				</xen:select>
			</xen:disabled>
		</xen:option>
		<xen:explain>{xen:phrase if_specified_all_visitors_view_using_selected_style}</xen:explain>
	</xen:checkboxunit>
	
	</xen:hook>

	<input type="hidden" name="node_type_id" value="Category" />

	<xen:submitunit save="{xen:phrase save_category}">
		<xen:if is="{$category.node_id}">
			<input type="button" value="{xen:phrase delete_category}..." accesskey="d" class="button OverlayTrigger"
				data-href="{xen:adminlink categories/delete, $category}"  />
		</xen:if>
	</xen:submitunit>

</xen:form>]]></template>
  <template title="code_event.css"><![CDATA[.eventDescription
{
	font-size: 11px;
	color: {xen:property dimmedTextColor};
	margin-right: 30px;
	padding: 5px;
}

.eventDescription code,
.eventDescription pre
{
	{xen:property textCtrlCode}
}

.eventDescription code
{
	color: black;
	font-weight: bold;
	white-space: normal;
}

.eventDescription pre
{
	{xen:property textCtrl.background}
	{xen:property textCtrl.border}
	{xen:property textCtrl.padding}
	
	color: black;
	overflow: auto;
}

.eventDescription code em
{
	font-weight: normal;
	font-style: normal;
	color: {xen:property primaryMedium};
}]]></template>
  <template title="code_event_delete"><![CDATA[<xen:title>{xen:phrase confirm_deletion_of_code_event}: {$event.event_id}</xen:title>
<xen:h1>{xen:phrase confirm_deletion_of_code_event}</xen:h1>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'code-events/edit', $event}">{$event.event_id}</xen:breadcrumb>
</xen:navigation>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'code-events/delete', $event}" class="deleteConfirmForm formOverlay">

	<p>{xen:phrase please_confirm_that_you_want_to_delete_following_code_event}:</p>
	<strong><a href="{xen:adminlink 'code-events/edit', $event}">{$event.event_id}</a></strong>

	<xen:submitunit save="{xen:phrase delete_code_event}" />
	<input type="hidden" name="_xfConfirm" value="1" />
	
</xen:form>]]></template>
  <template title="code_event_edit"><![CDATA[<xen:title>{xen:if '{$event.event_id}', '{xen:phrase edit_code_event}: {$event.event_id}', '{xen:phrase create_new_code_event}'}</xen:title>

<xen:if is="{$event.event_id}">
	<xen:navigation>
		<xen:breadcrumb href="{xen:adminlink code-events}#{xen:helper listitemid, $event.event_id}">{$event.event_id}</xen:breadcrumb>
	</xen:navigation>
</xen:if>

<xen:form action="{xen:adminlink 'code-events/save'}" class="AutoValidator" data-redirect="yes">
	<xen:textboxunit label="{xen:phrase event_id}:" name="event_id" value="{$event.event_id}" data-livetitletemplate="{xen:if {$event.event_id},
		'{xen:phrase edit_code_event}: <em>%s</em>',
		'{xen:phrase create_new_code_event}: <em>%s</em>'}"
	/>
	<xen:textboxunit label="{xen:phrase description}:" hint="{xen:phrase you_may_use_html}" name="description" value="{$event.description}" rows="2" inputclass="Elastic" />
	<xen:include template="helper_addon_unit" />
		
	<input type="hidden" name="original_event_id" value="{$event.event_id}" />

	<xen:submitunit save="{xen:phrase save_code_event}">
		<xen:if is="{$event.event_id}">
			<input type="button" value="{xen:phrase delete_code_event}..." accesskey="d" class="button OverlayTrigger"
				data-href="{xen:adminlink 'code-events/delete', $event}" />
		</xen:if>
	</xen:submitunit>

</xen:form>]]></template>
  <template title="code_event_list"><![CDATA[<xen:title>{xen:phrase code_events}</xen:title>

<xen:topctrl>
	<a href="{xen:adminlink 'code-events/add'}" class="button">+ {xen:phrase create_new_code_event}</a>
</xen:topctrl>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<xen:form action="{xen:adminlink code-events}" class="section">

	<h2 class="subHeading">
		<xen:include template="filter_list_controls" />
		{xen:phrase code_events}
	</h2>

	<ol class="FilterList Scrollable">
		<xen:foreach loop="$events" value="$event">
			<xen:listitem
				id="{$event.event_id}"
				label="{$event.event_id}"
				snippet="{$event.addon_id}"
				href="{xen:adminlink 'code-events/edit', $event}"
				delete="{xen:adminlink 'code-events/delete', $event}" />
		</xen:foreach>
	</ol>

	<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:count $events}</span>', 'total={xen:count $events}'}</p>

</xen:form>]]></template>
  <template title="code_event_listener_delete"><![CDATA[<xen:title>{xen:phrase confirm_deletion_of_code_event_listener}: {$listener.event_id}<xen:if is="{$addOn.title}"> ({$addOn.title})</xen:if></xen:title>
<xen:h1>{xen:phrase confirm_deletion_of_code_event_listener}</xen:h1>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'code-event-listeners/edit', $listener}">{$listener.event_id}</xen:breadcrumb>
</xen:navigation>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'code-event-listeners/delete', $listener}" class="deleteConfirmForm formOverlay">

	<p>{xen:phrase please_confirm_that_you_want_to_delete_following_code_event_listener}:</p>
	<strong><a href="{xen:adminlink 'code-event-listeners/edit', $listener}">{$listener.event_id}</a>
		<xen:if is="{$addOn.title}">({xen:phrase add_on}: {$addOn.title})</xen:if>
	</strong>

	<xen:submitunit save="{xen:phrase delete_event_listener}" />
	<input type="hidden" name="_xfConfirm" value="1" />
	
</xen:form>]]></template>
  <template title="code_event_listener_edit"><![CDATA[<xen:title>{xen:phrase code_event_listener_editor}</xen:title>

<xen:if is="{$listener.event_listener_id}">
	<xen:navigation>
		<xen:breadcrumb href="{xen:adminlink code-event-listeners}#{xen:helper listitemid, $listener.event_listener_id}">{$listener.event_id}</xen:breadcrumb>
	</xen:navigation>
</xen:if>

<xen:require js="js/xenforo/event_listener.js" />
<xen:require css="code_event.css" />

<xen:form action="{xen:adminlink 'code-event-listeners/save'}" class="AutoValidator" data-redirect="yes">
	
	<xen:selectunit label="{xen:phrase listen_to_event}:" name="event_id" value="{$listener.event_id}" 
		inputclass="EventListenerOption" data-descurl="{xen:adminlink code-events/description}" data-desctarget="#EventDescriptionTarget">
		<xen:option value=""></xen:option>
		<xen:options source="$eventOptions" />
		<xen:html><div id="EventDescriptionTarget" class="eventDescription baseHtml"></div></xen:html>
	</xen:selectunit>

	<xen:textboxunit label="{xen:phrase event_hint}:" name="hint" value="{$listener.hint}" maxlength="255">
		<xen:explain>{xen:phrase certain_events_take_hints_that_can_limit_when_listener_is_run}</xen:explain>
	</xen:textboxunit>
	
	<fieldset>
		<xen:controlunit label="{xen:phrase execute_callback}:">
			<xen:textbox placeholder="{xen:phrase class}" name="callback_class" value="{$listener.callback_class}" size="25" />
			::
			<xen:textbox placeholder="{xen:phrase method}" name="callback_method" value="{$listener.callback_method}" size="25" />
		</xen:controlunit>
		
		<xen:spinboxunit label="{xen:phrase callback_execution_order}:" explain="{xen:phrase code_event_execution_order_desc}" name="execute_order" value="{$listener.execute_order}" min="0" size="10" />
		
		<xen:checkboxunit label="">
			<xen:option name="active" selected="{$listener.active}">{xen:phrase enable_callback_execution}</xen:option>
		</xen:checkboxunit>
	</fieldset>
		
	<xen:textboxunit label="{xen:phrase description}:" name="description" value="{$listener.description}" />
		
	<xen:include template="helper_addon_unit" />
		
	<input type="hidden" name="event_listener_id" value="{$listener.event_listener_id}" />

	<xen:submitunit save="{xen:phrase save_event_listener}">
		<xen:if is="{$listener.event_listener_id}">
			<input type="button" value="{xen:phrase delete_event_listener}..." accesskey="d" class="button OverlayTrigger"
				data-href="{xen:adminlink 'code-event-listeners/delete', $listener}" />
		</xen:if>
	</xen:submitunit>

</xen:form>]]></template>
  <template title="code_event_listener_list"><![CDATA[<xen:title>{xen:phrase code_event_listeners}</xen:title>

<xen:topctrl>
	<a href="{xen:adminlink 'code-event-listeners/add'}" class="button">+ {xen:phrase create_new_code_event_listener}</a>
</xen:topctrl>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<xen:form action="{xen:adminlink 'code-event-listeners/toggle'}" class="section AutoValidator">

	<h2 class="subHeading">
		<xen:include template="filter_list_controls" />
		{xen:phrase code_event_listeners}
	</h2>

	<ul class="FilterList">
		<xen:if is="{$customListeners}">
			<li>
				<h3 class="textHeading">{xen:phrase custom_event_listeners}</h3>
				<ol>
					<xen:foreach loop="$customListeners" value="$listener">
						<xen:listitem
							id="{$listener.event_listener_id}"
							label="{$listener.event_id}"
							href="{xen:adminlink 'code-event-listeners/edit', $listener}"
							snippet="{$listener.description}"
							delete="{xen:adminlink 'code-event-listeners/delete', $listener}"
							toggle="{$listener.active}"
							toggletitle="{xen:phrase enable_disable_x, 'title={$listener.event_id}'}" />
					</xen:foreach>
				</ol>
			</li>
		</xen:if>
		<xen:foreach loop="$addOns" value="$addOn">
			<xen:if is="{$listeners.{$addOn.addon_id}}">
				<li>
					<h3 class="textHeading{xen:if '!{$addOn.active}', ' disabled'}">{$addOn.title}</h3>
					<ol>
					<xen:foreach loop="$listeners.{$addOn.addon_id}" value="$listener">
						<xen:listitem
							id="{$listener.event_listener_id}"
							href="{xen:adminlink 'code-event-listeners/edit', $listener}"
							label="{$listener.event_id}"
							labelclass="{xen:if '!{$addOn.active}', ' parentDisabled'}"
							snippet="{$listener.description}"
							delete="{xen:adminlink 'code-event-listeners/delete', $listener}"
							toggle="{$listener.active}"
							toggletitle="{xen:phrase enable_disable_x, 'title={$listener.event_id}'}" />
					</xen:foreach>
					</ol>
				</li>
			</xen:if>
		</xen:foreach>
	</ul>

	<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:number $totalListeners}</span>', 'total={xen:number $totalListeners}'}</p>

</xen:form>]]></template>
  <template title="color_picker"><![CDATA[<xen:require css="color_picker.css" />
<xen:require js="js/xenforo/color_picker.js" />

<div id="ColorPickerInstance" class="xenOverlay">
	<!--<a class="close OverlayCloser"></a>-->
	<form class="colorPickerForm formOverlay">
	
		<div class="ColorPickerTabs">
	
			<ul class="tabs" data-panes="#ColorPickerInstance .tabPanel">
				<li><a>{xen:phrase color_palette}</a></li>
				<li><a>{xen:phrase color_picker}</a></li>
			</ul>
			
			<fieldset class="tabPanel PaletteTab">
				<xen:if is="{$colorsGrouped}">
					<ul>
					<xen:foreach loop="$colorsGrouped" value="$colors">
						<xen:foreach loop="$colors" value="$color">
							<li title="@{$color.property_name}: {$color.propertyValueScalar}"
								data-colorname="{$color.property_name}"
								data-colorcss="{$color.propertyValueScalar}">{$color.title}</li>
						</xen:foreach>
					</xen:foreach>
					</ul>
				</xen:if>
			</fieldset>
			
			<fieldset class="tabPanel PickerTab">
				<div class="gradientContainer"><div class="gradient"><span class="circle"></span></div></div>
				<div class="barContainer"><div class="bar"><span class="arrow"></span></div></div>
			</fieldset>
			
		</div>
		
		<div class="fixedColumn">
		
			<div class="colorPreview">
				<div class="preview"></div>
				<div class="currentPreview"></div>
			</div>
			
			<ul class="inputs">
				<li><label for="pctrl_h">#</label> <input type="text" class="textCtrl" id="pctrl_h" name="hex" /></li>
				<li>
					<ul>
						<li><label for="pctrl_r">R</label> <input type="text" class="textCtrl ltr" id="pctrl_r" name="r" /></li>
						<li><label for="pctrl_g">G</label> <input type="text" class="textCtrl ltr" id="pctrl_g" name="g" /></li>
						<li><label for="pctrl_b">B</label> <input type="text" class="textCtrl ltr" id="pctrl_b" name="b" /></li>
					</ul>
				</li>
				<li><label for="pctrl_r">A</label> <input type="text" class="textCtrl ltr" id="pctrl_a" name="a" /></li>
			</ul>
		
		</div>
		
		<div class="fixedBottom">
			<input type="text" name="final" class="textCtrl finalValue ltr" />
				
			<label class="remove"><input type="checkbox" name="remove" value="1" /> {xen:phrase clear_value}</label>
			
			<span class="buttons">
				<input type="button" class="button primary save" value="{xen:phrase okay}" />
				<input type="button" class="button OverlayCloser" value="{xen:phrase cancel}" />
			</span>			
		</div>
		
	</form>
</div>]]></template>
  <template title="color_picker.css"><![CDATA[.colorPickerPlaceholder
{
	cursor: pointer;
	display: inline-block;
	zoom: 1;
	width: 30px;
	padding: 2px;
	padding-right: 21px;
	background-image: url('{xen:property imagePath}/xenforo/color-picker/palette.png');
	background-position: right center;
	background-repeat: no-repeat;
}

	.colorPickerPlaceholder span
	{
		display: block;
		cursor: pointer;
		border-radius: 2px;
		height: 17px;
	} 

		.colorPickerPlaceholder span.undefined
		{ 
			background: transparent url('{xen:property imagePath}/xenforo/color-picker/undefined.png'); 
			height: 17px; 
		} 

#ColorPickerInstance
{
	width: 486px;
}

.colorPickerForm
{
	overflow: hidden; zoom: 1;
}

/* tabs */

.ColorPickerTabs
{
	width: 316px;
	float: left;
}

.ColorPickerTabs .tabs
{
	padding-left: 10px;
	margin-bottom: -1px;
	background: transparent;
}

/* palette tab */

.PaletteTab ul
{
	overflow: auto;
	height: 280px;
}

	.PaletteTab li
	{
		overflow: hidden; zoom: 1;
		border-bottom: 1px solid {xen:property primaryLightish};
		cursor: pointer;
		padding: 0 5px;
		line-height: 26px;
		font-size: 11px;
	}

		.PaletteTab li.selected
		{
			background: rgba(255,255,255, 0.5);
			color: black;
			font-weight: bold;
		}

			.PaletteTab li:hover,
			.PaletteTab li.selected:hover
			{
				background: rgba(255,255,255, 0.25);
				color: inherit;
			}

		.PaletteTab li .swatch
		{
			float: left;
			margin-right: 5px;
			width: 35px;
			height: 24px;
			border: 1px solid black;
		}
		


/* picker tab */

.PickerTab .gradientContainer
{
	float: left;
	width: 258px;
	height: 258px;
	margin: 10px;
	border: 1px solid {xen:property primaryLighter};
}


	.PickerTab .gradient
	{
		position: relative;
		width: 256px;
		height: 256px;
		overflow: hidden;
		background-image: url('{xen:property imagePath}/xenforo/color-picker/gradient.png');
		border: 1px solid black;
		cursor: crosshair;
	}

		.PickerTab .gradient .circle
		{
			position: absolute;
			width: 10px;
			height: 10px;
			background-image: url('{xen:property imagePath}/xenforo/color-picker/circle.png');
			margin: -5px 0 0 -5px;
		}
	
.PickerTab .barContainer
{
	float: left;
	margin: 10px 0;
	width: 22px;
	height: 258px;
	border: 1px solid {xen:property primaryLighter};
}

	.PickerTab .bar
	{
		position: relative;
		width: 20px;
		height: 256px;
		background-image: url('{xen:property imagePath}/xenforo/color-picker/bar.png');
		border: 1px solid black;
	}

		.PickerTab .bar .arrow
		{
			position: absolute;
			width: 36px;
			height: 9px;
			background-image: url('{xen:property imagePath}/xenforo/color-picker/arrows.png');
			left: -8px;
			margin-top: -5px;
		}
		
/* fixed column */

.fixedColumn
{
	float: left;
	margin-left: 10px;
	margin-top: 19px; /* tab height */
}

	#ColorPickerInstance .colorPreview
	{
		width: 68px;
		border: 1px solid {xen:property primaryLighter};
		background: transparent url('{xen:property imagePath}/xenforo/color-picker/undefined.png');
		margin-bottom: 10px;
	}
	
		#ColorPickerInstance .preview,
		#ColorPickerInstance .currentPreview
		{
			height: 38px;
			border: 1px solid black;
		}
			
			#ColorPickerInstance .preview
			{
				border-bottom: none;
			}
		
			#ColorPickerInstance .currentPreview
			{
				border-top: none;
			}
			
	#ColorPickerInstance .inputs li
	{
		overflow: hidden; zoom: 1;
	}

	#ColorPickerInstance .inputs label
	{
		display: inline-block;
		width: 15px;
		float: left;
	}
	
	#ColorPickerInstance .inputs .textCtrl
	{
		width: 55px;
		box-sizing: border-box;
		text-align: right;
		float: left;
	}
	
	#ColorPickerInstance .inputs ul
	{
		margin: 10px 0;
	}




.fixedBottom
{
	clear: both;
	overflow: hidden; zoom: 1;
	padding-top: 10px;
}

.fixedBottom .finalValue
{
	width: 150px;
}

.fixedBottom .remove
{
	font-size: 11px;
}

.fixedBottom .buttons
{
	float: right;
}

	.fixedBottom .button
	{
		margin-left: 3px;
		min-width: 60px;
	}]]></template>
  <template title="content_header"><![CDATA[<div id="breadcrumbsContainer">
	<ul id="breadcrumbs">
		<xen:if is="{$adminNavigation.breadCrumb}">
				<xen:foreach loop="$adminNavigation.breadCrumb" value="$breadcrumb">
					<li><a{xen:if {$breadcrumb.link}, ' href="{xen:adminlink $breadcrumb.link}"'}>{$breadcrumb.title}</a></li>
				</xen:foreach>
		</xen:if>
		<xen:if is="{$navigation}">
				<xen:foreach loop="$navigation" value="$breadcrumb">
					<li><a href="{xen:raw $breadcrumb.href}">{xen:raw $breadcrumb.value}</a></li>
				</xen:foreach>
		</xen:if>
	</ul>
</div>
			
<div class="titleBar">
	<xen:if is="{$topctrl}"><div class="topCtrl">{xen:raw $topctrl}</div></xen:if>
	<h1><xen:if is="{$h1}">{xen:raw $h1}<xen:elseif is="{$title}" />{xen:raw $title}<xen:else />{xen:phrase admin_control_panel} - {$xenOptions.boardTitle}</xen:if></h1>
	<xen:if is="{$pageDescription.content}"><p id="pageDescription" class="muted {$pageDescription.class}">{xen:raw $pageDescription.content}</p></xen:if>
</div>]]></template>
  <template title="cron_delete"><![CDATA[<xen:title>{xen:phrase confirm_deletion_of_cron_entry}: {$entry.title}</xen:title>
<xen:h1>{xen:phrase confirm_deletion_of_cron_entry}</xen:h1>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'cron/edit', $entry}">{$entry.title}</xen:breadcrumb>
</xen:navigation>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'cron/delete', $entry}" class="deleteConfirmForm">
	<p>{xen:phrase please_confirm_that_you_want_to_delete_following_cron_entry}:</p>
	<strong><a href="{xen:adminlink 'cron/edit', $entry}">{$entry.title}</a></strong>

	<xen:submitunit save="{xen:phrase delete_cron_entry}" />

	<input type="hidden" name="_xfConfirm" value="1" />
</xen:form>]]></template>
  <template title="cron_edit"><![CDATA[<xen:title>{xen:if {$entry.entry_id}, "{xen:phrase edit_cron_entry}: {$entry.title}", '{xen:phrase create_new_cron_entry}'}</xen:title>

<xen:if is="{$entry.entry_id}">
	<xen:navigation>
		<xen:breadcrumb href="{xen:adminlink cron}#{xen:helper listitemid, $entry.entry_id}">{$entry.title}</xen:breadcrumb>
	</xen:navigation>
</xen:if>

<xen:comment><!-- The {xen:raw $entry.runRules.x} calls are needed as the values are arrays --></xen:comment>

<xen:form action="{xen:adminlink 'cron/save'}" class="AutoValidator" data-redirect="yes">
	<fieldset>
		<xen:textboxunit label="{xen:phrase cron_entry_id}:" name="entry_id" value="{$entry.entry_id}" />
		<xen:textboxunit label="{xen:phrase title}:" name="title" value="{$entry.title}" data-livetitletemplate="{xen:if {$entry.entry_id},
			'{xen:phrase edit_cron_entry}: <em>%s</em>',
			'{xen:phrase create_new_cron_entry}: <em>%s</em>'}" />
	</fieldset>

	<xen:controlunit label="{xen:phrase cron_callback}:">
		<xen:textbox placeholder="{xen:phrase class}" name="cron_class" value="{$entry.cron_class}" size="25" />
		::
		<xen:textbox placeholder="{xen:phrase method}" name="cron_method" value="{$entry.cron_method}" size="25" />
	</xen:controlunit>

	<fieldset>
		<xen:radiounit label="{xen:phrase run_on_type_of_day}:" name="run_rules[day_type]" value="{$entry.runRules.day_type}">
			<xen:option label="{xen:phrase day_of_month}:" value="dom">
				<xen:select name="run_rules[dom]" value="{xen:raw $entry.runRules.dom}" multiple="true" size="8">
					<xen:option value="-1">{xen:phrase any}</xen:option>
					<xen:option value="1">1</xen:option>
					<xen:option value="2">2</xen:option>
					<xen:option value="3">3</xen:option>
					<xen:option value="4">4</xen:option>
					<xen:option value="5">5</xen:option>
					<xen:option value="6">6</xen:option>
					<xen:option value="7">7</xen:option>
					<xen:option value="8">8</xen:option>
					<xen:option value="9">9</xen:option>
					<xen:option value="10">10</xen:option>
					<xen:option value="11">11</xen:option>
					<xen:option value="12">12</xen:option>
					<xen:option value="13">13</xen:option>
					<xen:option value="14">14</xen:option>
					<xen:option value="15">15</xen:option>
					<xen:option value="16">16</xen:option>
					<xen:option value="17">17</xen:option>
					<xen:option value="18">18</xen:option>
					<xen:option value="19">19</xen:option>
					<xen:option value="20">20</xen:option>
					<xen:option value="21">21</xen:option>
					<xen:option value="22">22</xen:option>
					<xen:option value="23">23</xen:option>
					<xen:option value="24">24</xen:option>
					<xen:option value="25">25</xen:option>
					<xen:option value="26">26</xen:option>
					<xen:option value="27">27</xen:option>
					<xen:option value="28">28</xen:option>
					<xen:option value="29">29</xen:option>
					<xen:option value="30">30</xen:option>
					<xen:option value="31">31</xen:option>
				</xen:select>
			</xen:option>
			<xen:option label="{xen:phrase day_of_week}:" value="dow">
				<xen:select name="run_rules[dow]" value="{xen:raw $entry.runRules.dow}" multiple="true" size="8">
					<xen:option value="-1">{xen:phrase any}</xen:option>
					<xen:option value="0">{xen:phrase day_sunday}</xen:option>
					<xen:option value="1">{xen:phrase day_monday}</xen:option>
					<xen:option value="2">{xen:phrase day_tuesday}</xen:option>
					<xen:option value="3">{xen:phrase day_wednesday}</xen:option>
					<xen:option value="4">{xen:phrase day_thursday}</xen:option>
					<xen:option value="5">{xen:phrase day_friday}</xen:option>
					<xen:option value="6">{xen:phrase day_saturday}</xen:option>
				</xen:select>
			</xen:option>
		</xen:radiounit>

		<xen:selectunit label="{xen:phrase run_at_hours}:" name="run_rules[hours]" value="{xen:raw $entry.runRules.hours}" multiple="true" size="8">
			<xen:option value="-1">{xen:phrase any}</xen:option>
			<xen:option value="0">0 ({xen:phrase midnight})</xen:option>
			<xen:option value="1">1</xen:option>
			<xen:option value="2">2</xen:option>
			<xen:option value="3">3</xen:option>
			<xen:option value="4">4</xen:option>
			<xen:option value="5">5</xen:option>
			<xen:option value="6">6</xen:option>
			<xen:option value="7">7</xen:option>
			<xen:option value="8">8</xen:option>
			<xen:option value="9">9</xen:option>
			<xen:option value="10">10</xen:option>
			<xen:option value="11">11</xen:option>
			<xen:option value="12">12 ({xen:phrase noon})</xen:option>
			<xen:option value="13">13</xen:option>
			<xen:option value="14">14</xen:option>
			<xen:option value="15">15</xen:option>
			<xen:option value="16">16</xen:option>
			<xen:option value="17">17</xen:option>
			<xen:option value="18">18</xen:option>
			<xen:option value="19">19</xen:option>
			<xen:option value="20">20</xen:option>
			<xen:option value="21">21</xen:option>
			<xen:option value="22">22</xen:option>
			<xen:option value="23">23</xen:option>
		</xen:selectunit>

		<xen:selectunit label="{xen:phrase run_at_minutes}:" name="run_rules[minutes]" value="{xen:raw $entry.runRules.minutes}" multiple="true" size="8">
			<xen:option value="-1">{xen:phrase any}</xen:option>
			<xen:option value="0">0</xen:option>
			<xen:option value="1">1</xen:option>
			<xen:option value="2">2</xen:option>
			<xen:option value="3">3</xen:option>
			<xen:option value="4">4</xen:option>
			<xen:option value="5">5</xen:option>
			<xen:option value="6">6</xen:option>
			<xen:option value="7">7</xen:option>
			<xen:option value="8">8</xen:option>
			<xen:option value="9">9</xen:option>
			<xen:option value="10">10</xen:option>
			<xen:option value="11">11</xen:option>
			<xen:option value="12">12</xen:option>
			<xen:option value="13">13</xen:option>
			<xen:option value="14">14</xen:option>
			<xen:option value="15">15</xen:option>
			<xen:option value="16">16</xen:option>
			<xen:option value="17">17</xen:option>
			<xen:option value="18">18</xen:option>
			<xen:option value="19">19</xen:option>
			<xen:option value="20">20</xen:option>
			<xen:option value="21">21</xen:option>
			<xen:option value="22">22</xen:option>
			<xen:option value="23">23</xen:option>
			<xen:option value="24">24</xen:option>
			<xen:option value="25">25</xen:option>
			<xen:option value="26">26</xen:option>
			<xen:option value="27">27</xen:option>
			<xen:option value="28">28</xen:option>
			<xen:option value="29">29</xen:option>
			<xen:option value="30">30</xen:option>
			<xen:option value="31">31</xen:option>
			<xen:option value="32">32</xen:option>
			<xen:option value="33">33</xen:option>
			<xen:option value="34">34</xen:option>
			<xen:option value="35">35</xen:option>
			<xen:option value="36">36</xen:option>
			<xen:option value="37">37</xen:option>
			<xen:option value="38">38</xen:option>
			<xen:option value="39">39</xen:option>
			<xen:option value="40">40</xen:option>
			<xen:option value="41">41</xen:option>
			<xen:option value="42">42</xen:option>
			<xen:option value="43">43</xen:option>
			<xen:option value="44">44</xen:option>
			<xen:option value="45">45</xen:option>
			<xen:option value="46">46</xen:option>
			<xen:option value="47">47</xen:option>
			<xen:option value="48">48</xen:option>
			<xen:option value="49">49</xen:option>
			<xen:option value="50">50</xen:option>
			<xen:option value="51">51</xen:option>
			<xen:option value="52">52</xen:option>
			<xen:option value="53">53</xen:option>
			<xen:option value="54">54</xen:option>
			<xen:option value="55">55</xen:option>
			<xen:option value="56">56</xen:option>
			<xen:option value="57">57</xen:option>
			<xen:option value="58">58</xen:option>
			<xen:option value="59">59</xen:option>
		</xen:selectunit>
	</fieldset>

	<xen:checkboxunit label="">
		<xen:option name="active" selected="{$entry.active}">{xen:phrase allow_cron_entry_to_run_automatically_when_scheduled}</xen:option>
	</xen:checkboxunit>

	<xen:include template="helper_addon_unit" />

	<xen:submitunit save="{xen:phrase save_cron_entry}">
		<xen:if is="{$entry.entry_id}"><a href="{xen:adminlink 'cron/delete', $entry}" class="button OverlayTrigger">{xen:phrase delete_cron_entry}...</a></xen:if>
	</xen:submitunit>

	<input type="hidden" name="original_entry_id" value="{$entry.entry_id}" />
</xen:form>]]></template>
  <template title="cron_list"><![CDATA[<xen:title>{xen:phrase cron_entries}</xen:title>

<xen:topctrl><a href="{xen:adminlink 'cron/add'}" class="button">+ {xen:phrase create_new_cron_entry}</a></xen:topctrl>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<xen:form action="{xen:adminlink cron/toggle}" class="section AutoValidator">

	<h2 class="subHeading">
		<xen:include template="filter_list_controls" />
		{xen:phrase cron_entries}
	</h2>

	<ol class="FilterList">
	<xen:foreach loop="$entries" value="$cron">
		<xen:listitem
			id="{$cron.entry_id}"
			label="{$cron.title}"
			snippet="{xen:if $cron.active, '{xen:phrase next_run}: {xen:datetime $cron.next_run, absolute}'}"
			href="{xen:adminlink cron/edit, $cron}"
			delete="{xen:adminlink cron/delete, $cron}"
			toggle="{$cron.active}"
			toggletitle="{xen:phrase enable_disable_x, 'title={$cron.title}'}">
			<xen:popup title="{xen:phrase controls}" ctrlclass="toolsCtrl">
				<xen:link href="{xen:adminlink 'cron/disable', $cron, '_xfToken={$visitor.csrf_token_page}'}" displayif="{$cron.active}">{xen:phrase disable}</xen:link>
				<xen:link href="{xen:adminlink 'cron/enable', $cron, '_xfToken={$visitor.csrf_token_page}'}" displayif="!{$cron.active}">{xen:phrase enable}</xen:link>
				<xen:link href="{xen:adminlink 'cron/run', $cron, '_xfToken={$visitor.csrf_token_page}'}">{xen:phrase run}</xen:link>
			</xen:popup>
		</xen:listitem>
	</xen:foreach>
	</ol>

</xen:form>]]></template>
  <template title="custom_fields_edit"><![CDATA[<xen:foreach loop="$customFields" value="$field">
	<xen:if is="{$field.field_type} == 'textbox'">
		<xen:textboxunit label="{$field.title}:" explain="{xen:raw $field.description}"
			name="custom_fields[{$field.field_id}]" id="ctrl_custom_field_{$field.field_id}"
			value="{$field.field_value}" maxlength="{xen:if $field.max_length, $field.max_length}"
			data-validatorname="custom_field_{$field.field_id}"
		/>
	<xen:elseif is="{$field.field_type} == 'textarea'" />
		<xen:textboxunit label="{$field.title}:" explain="{xen:raw $field.description}"
			name="custom_fields[{$field.field_id}]" id="ctrl_custom_field_{$field.field_id}"
			value="{$field.field_value}" rows="2" inputclass="Elastic"
			data-validatorname="custom_field_{$field.field_id}"
		/>
	<xen:elseif is="{$field.field_type} == 'radio'" />
		<xen:radiounit label="{$field.title}:" explain="{xen:raw $field.description}"
			name="custom_fields[{$field.field_id}]" id="ctrl_custom_field_{$field.field_id}" value="{$field.field_value}"
		>
			<xen:option value=""><span class="muted">{xen:phrase no_selection}</span></xen:option>
			<xen:options source="$field.fieldChoices" />
		</xen:radiounit>
	<xen:elseif is="{$field.field_type} == 'select'" />
		<xen:selectunit label="{$field.title}:" explain="{xen:raw $field.description}"
			name="custom_fields[{$field.field_id}]" id="ctrl_custom_field_{$field.field_id}" value="{$field.field_value}"
		>
			<xen:option value="">&nbsp;</xen:option>
			<xen:options source="$field.fieldChoices" />
		</xen:selectunit>
	<xen:elseif is="{$field.field_type} == 'checkbox'" />
		<xen:checkboxunit label="{$field.title}:" explain="{xen:raw $field.description}"
			name="custom_fields[{$field.field_id}]" id="ctrl_custom_field_{$field.field_id}" value="{$field.field_value}"
		>
			<xen:foreach loop="$field.fieldChoices" key="$_choiceId" value="$_choice">
				<xen:option value="{$_choiceId}" selected="isset({$field.field_value.{$_choiceId}})">{$_choice}</xen:option>
			</xen:foreach>
		</xen:checkboxunit>
	<xen:elseif is="{$field.field_type} == 'multiselect'" />
		<xen:selectunit label="{$field.title}:" explain="{xen:raw $field.description}"
			name="custom_fields[{$field.field_id}]" id="ctrl_custom_field_{$field.field_id}" value="{xen:raw $field.field_value}"
			size="7" multiple="multiple"
		>
			<xen:option value="">&nbsp;</xen:option>
			<xen:options source="$field.fieldChoices" />
		</xen:selectunit>
	</xen:if>
	<input type="hidden" name="custom_fields_shown[]" value="{$field.field_id}" />
</xen:foreach>]]></template>
  <template title="DEFAULT"><![CDATA[<xen:title>{$controllerName}::action{$controllerAction}() | {$viewName}</xen:title>
<xen:h1>{$controllerName}::action{$controllerAction}()</xen:h1>
<xen:description>{xen:phrase this_is_the_default_content_template, 'view_name={$viewName}'}</xen:description>
<xen:container var="$head.robots"><meta name="robots" content="noindex" /></xen:container>

<table class="dataTable">
	<caption>{xen:phrase available_template_parameters}</caption>
	<tr class="dataRow">
		<th>{xen:phrase variable_name}</th>
		<th>{xen:phrase data_type}</th>
	</tr>
	<xen:foreach loop="$__params" key="$key" value="$value">
		<tr class="dataRow">
			<td>${$key}</td>
			<td>{xen:helper type, $value}</td>
		</tr>
	</xen:foreach>
</table>]]></template>
  <template title="delete_confirmation.css"><![CDATA[/** Confirm deletion of something **/

.deleteConfirmForm p,
.deleteConfirmForm strong
{
}

.deleteConfirmForm strong dfn
{
display: block;
font-size: 11px;
color: {xen:property mutedTextColor};
}

.deleteConfirmForm p em
{
	font-style: italic;
}

.deleteConfirmForm strong
{
	display: block;
	margin: 10px;
	margin-left: 20px;
	font-size: 14pt;
}]]></template>
  <template title="development_splash"><![CDATA[<xen:title>{xen:phrase development}</xen:title>

<xen:topctrl>
	<a href="{xen:adminlink add-ons/add}" class="button">+ {xen:phrase create_add_on}</a>
	<a href="{xen:adminlink 'admin-templates/add'}" class="button" accesskey="a">+ {xen:phrase create_new_admin_template}</a>
</xen:topctrl>

<xen:require css="splash.css" />

<div class="splash">
	<div class="iconicContainer">
	<ul class="iconic">
	
		<xen:hook name="admin_icons_development">
	
		<li><a href="{xen:adminlink 'add-ons/add'}" class="add_ons_add">
			<span class="icon"><span></span></span>
			<span class="linkText">{xen:phrase create_add_on}</span>
			</a></li>
			
		<!-- slot: pre_code_events -->
			
		<li><a href="{xen:adminlink 'code-events'}" class="code_events">
			<span class="icon"><span></span></span>
			<span class="linkText">{xen:phrase code_events}</span>
			</a></li>
			
		<!-- slot: pre_code_event_listeners -->
			
		<li><a href="{xen:adminlink 'code-event-listeners'}" class="code_event_listeners">
			<span class="icon"><span></span></span>
			<span class="linkText">{xen:phrase code_event_listeners}</span>
			</a></li>
			
		<!-- slot: pre_admin_templates -->
			
		<li><a href="{xen:adminlink 'admin-templates'}" class="admin_templates">
			<span class="icon"><span></span></span>
			<span class="linkText">{xen:phrase admin_templates}</span>
			</a></li>
			
		<!-- slot: pre_admin_style_properties -->
			
		<li><a href="{xen:adminlink 'admin-style-properties'}" class="admin_style_properties">
			<span class="icon"><span></span></span>
			<span class="linkText">{xen:phrase admin_style_properties}</span>
			</a></li>
			
		<!-- slot: pre_admin_navigation -->
			
		<li><a href="{xen:adminlink 'admin-navigation'}" class="admin_navigation">
			<span class="icon"><span></span></span>
			<span class="linkText">{xen:phrase admin_navigation}</span>
			</a></li>
			
		<!-- slot: pre_route_prefixes -->
			
		<li><a href="{xen:adminlink 'route-prefixes'}" class="route_prefixes">
			<span class="icon"><span></span></span>
			<span class="linkText">{xen:phrase route_prefixes}</span>
			</a></li>
			
		<!-- slot: pre_email_templates -->
			
		<li><a href="{xen:adminlink 'email-templates'}" class="email_templates">
			<span class="icon"><span></span></span>
			<span class="linkText">{xen:phrase email_templates}</span>
			</a></li>
			
		</xen:hook>	
	</ul>
	</div>

	<div class="sidebar">
	
		<xen:hook name="admin_sidebar_development">
	
		<xen:include template="sidebar_installed_addons" />
		
		</xen:hook>
			
	</div>
	
</div>]]></template>
  <template title="diff.css"><![CDATA[.diffList.code
{
	width: 100%;
	display: table;
	direction: ltr;
}

.diffList.contained
{
	overflow: auto;
	max-height: 400px;
	width: auto;
	display: block;
}

.diffList .diffLine
{
	padding: 0 {xen:property subHeading.padding-left} 0 {xen:property subHeading.padding-right};
	line-height: 1.5;
	min-height: 8px;
}

.diffList.code .diffLine
{
	white-space: pre;
	word-wrap: normal;
	font-family: Consolas, 'Courier New', Courier, monospace;
}

.diffList.code.wrapped .diffLine
{
	white-space: pre-wrap;
	word-wrap: break-word;
}

.diffList .diff_d
{
	background-color: #FAE4E4;
	color: #882020;
	border: 1px solid #C86060;
}

.diffList .diff_d + .diff_i,
.diffList .diff_i + .diff_d
{
	border-top: none;
}

.diffList .diff_i
{
	background-color: #E4FBE4;
	color: #208820;
	border: 1px solid #60C860;
}

.diffList .diff_u
{
	background-color: #F0F8FF;
	color: #4040A0;
	border: 1px solid #D0D8DF;
}

.diffList .conflict
{
	background-color: #FFFADD;
	color: #4F4A2D;
	border: 1px solid #DDCAAD;
}

	.diffList .conflict .resolve
	{
		text-align: center;
		padding: 5px 0;
		border-top: 1px solid #DDCAAD;
		border-bottom: 1px solid #DDCAAD;
	}

.diffList textarea.editor
{
	box-sizing: border-box;
	width: 100%;
	margin: 0;
	margin-top: 5px;
}

	.diffList.code textarea.editor
	{
		font-family: Consolas, 'Courier New', Courier, monospace;
	}

.diffList.editable .diff_u, .diffList.editable .conflict.resolved .chosen
{
	cursor: pointer
}]]></template>
  <template title="discouraged_ip_list"><![CDATA[<xen:title>{xen:phrase discouraged_ip_addresses}</xen:title>

<xen:form action="{xen:adminlink 'banning/discouraged-ips/delete'}">
	<h3 class="subHeading">{xen:phrase discouraged_ip_addresses}</h3>
	
	<xen:if is="{$discouragedIps}">
		<ul class="threeColumnList primaryContent">
			<xen:foreach loop="$discouragedIps" value="$discouragedIp">
				<li><label><input type="checkbox" name="delete[]" value="{$discouragedIp.ip}" /> {$discouragedIp.ip}</label></li>
			</xen:foreach>
		</ul>
		
		<xen:submitunit save="{xen:phrase delete_selected_ips}" />
	<xen:else />
		<div class="primaryContent">{xen:phrase no_ips_have_been_discouraged}</div>
	</xen:if>
</xen:form>


<xen:form action="{xen:adminlink 'banning/discouraged-ips/add'}">
	<h3 class="subHeading">{xen:phrase discourage_ip}</h3>
	
	<xen:textboxunit label="{xen:phrase ip_to_discourage}:" name="ip" value="{$ipToDiscourage}">
		<xen:explain>{xen:phrase you_may_enter_partial_ip_v4_v6}</xen:explain>
	</xen:textboxunit>
	
	<xen:submitunit save="{xen:phrase discourage_ip}" />
	
	<input type="hidden" name="_xfConfirm" value="1" />
</xen:form>]]></template>
  <template title="discourage_ip"><![CDATA[<xen:title>{xen:phrase confirm_ip_discouragement}: {$ip}</xen:title>
<xen:h1>{xen:phrase confirm_ip_discouragement}</xen:h1>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'banning/discouraged-ips', '', 'ip={$ip}'}">{xen:phrase discouraged_ip_addresses}</xen:breadcrumb>
</xen:navigation>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'banning/discouraged-ips-add', '', 'ip={$ip}'}" class="deleteConfirmForm formOverlay AutoValidator">

	<p>{xen:phrase please_confirm_that_you_want_to_discourage_following_ip}:</p>
	<strong><a href="{xen:adminlink 'users/ip-users', '', 'ip={$ip}'}">{$ip}</a></strong>

	<xen:submitunit save="{xen:phrase discourage_ip}" />
	
	<input type="hidden" name="_xfConfirm" value="1" />
</xen:form>]]></template>
  <template title="editor"><![CDATA[<xen:hook name="editor" params="{xen:array 'editorId={$editorId}'}">
<div>
	<xen:if is="{$showWysiwyg}">
		<textarea name="{$formCtrlNameHtml}" id="{$editorId}_html" class="textCtrl MessageEditor BbCodeWysiwygEditor {$editorOptions.extraClass}" style="display:none; {xen:if $height, 'height: {$height};'}" data-css-url="css.php?style={xen:urlencode $visitorStyle.style_id}&amp;css=editor_contents&amp;d={xen:urlencode $visitorStyle.last_modified_date}" data-dialog-url="index.php?editor/dialog&amp;style={$visitorStyle.style_id}" {xen:if $editorOptions.autoSaveUrl, 'data-auto-save-url="{$editorOptions.autoSaveUrl}"'} {xen:if $editorOptions.json, 'data-options="{xen:escape {xen:helper json, $editorOptions.json}}"'}>{$messageHtml}</textarea>
		<noscript><textarea name="{$formCtrlName}" id="{$editorId}" class="textCtrl MessageEditor {$editorOptions.extraClass}" style="{xen:if $height, 'height: {$height};'}">{$message}</textarea></noscript>
	<xen:else />
		<textarea name="{$formCtrlName}" id="{$editorId}" class="textCtrl MessageEditor {$editorOptions.extraClass}" style="{xen:if $height, 'height: {$height};'}">{$message}</textarea>
	</xen:if>
	<input type="hidden" name="_xfRelativeResolver" value="{$requestPaths.fullUri}" />
	
	<xen:if is="{$showWysiwyg}">
		<xen:include template="editor_js_setup" />
	</xen:if>
</div>
</xen:hook>]]></template>
  <template title="editor_js_setup"><![CDATA[<xen:if is="{$debugMode}">
	<xen:require js="js/redactor/redactor.full.js" />
<xen:else />
	<xen:require js="js/redactor/redactor.js" />
</xen:if>
<xen:require js="js/xenforo/bb_code_edit.js" />
<xen:require css="public:editor_ui.css" />

<script>
if (typeof RELANG === 'undefined')
{
	var RELANG = {};
}

RELANG.xf = {
	image: "{xen:jsescape {xen:phrase image}}",
	link: "{xen:jsescape {xen:phrase link}}",
	link_insert: "{xen:jsescape {xen:phrase link}}",
	unlink: "{xen:jsescape {xen:phrase unlink}}",
	quote: "{xen:jsescape {xen:phrase quote}}",
	code: "{xen:jsescape {xen:phrase code}}",
	bold: "{xen:jsescape {xen:phrase bold_ctrl_b}}",
	italic: "{xen:jsescape {xen:phrase italic_ctrl_i}}",
	fontcolor: "{xen:jsescape {xen:phrase text_color}}",
	unorderedlist: "{xen:jsescape {xen:phrase unordered_list}}",
	orderedlist: "{xen:jsescape {xen:phrase ordered_list}}",
	outdent: "{xen:jsescape {xen:phrase outdent}}",
	indent: "{xen:jsescape {xen:phrase indent}}",
	none: "{xen:jsescape {xen:phrase none}}",
	align_left:	"{xen:jsescape {xen:phrase align_left}}",
	align_center: "{xen:jsescape {xen:phrase align_center}}",
	align_right: "{xen:jsescape {xen:phrase align_right}}",
	deleted: "{xen:jsescape {xen:phrase strike_through}}",
	underline: "{xen:jsescape {xen:phrase underline_ctrl_u}}",
	alignment: "{xen:jsescape {xen:phrase alignment}}",
	undo: "{xen:jsescape {xen:phrase undo_ctrl_z}}",
	redo: "{xen:jsescape {xen:phrase redo_ctrl_y}}",
	spoiler: "{xen:jsescape {xen:phrase spoiler}}",
	insert: "{xen:jsescape {xen:phrase insert_editor_bb_code}}",

	remove_formatting: "{xen:jsescape {xen:phrase remove_formatting}}",
	font_size: "{xen:jsescape {xen:phrase font_size}}",
	font_family: "{xen:jsescape {xen:phrase font_family}}",
	smilies: "{xen:jsescape {xen:phrase smilies}}",
	media: "{xen:jsescape {xen:phrase media}}",
	
	drafts: "{xen:jsescape {xen:phrase drafts}}",
	save_draft: "{xen:jsescape {xen:phrase save_draft}}",
	delete_draft: "{xen:jsescape {xen:phrase delete_draft}}",
	draft_saved: "{xen:jsescape {xen:phrase draft_saved}}",
	draft_deleted: "{xen:jsescape {xen:phrase draft_deleted}}",

	switch_mode_bb: "{xen:jsescape {xen:phrase use_bb_code_editor}}",
	switch_mode_rich: "{xen:jsescape {xen:phrase use_rich_text_editor}}",
	
	reply_placeholder: "{xen:jsescape {xen:phrase reply_placeholder}}",
	
	drop_files_here_to_upload: "{xen:jsescape {xen:phrase drop_files_here_to_upload}}",
	uploads_are_not_available: "{xen:jsescape {xen:phrase uploads_are_not_available}}"
};
</script>]]></template>
  <template title="email_bounce_log"><![CDATA[<xen:title>{xen:phrase email_bounce_log}</xen:title>

<xen:if is="{$bounces}">
	<table class="dataTable" width="100%" style="table-layout: fixed">
	<tr class="dataRow">
		<th width="28%">{xen:phrase recipient}</th>
		<th width="19%">{xen:phrase date}</th>
		<th width="13%">{xen:phrase type}</th>
		<th width="25%">{xen:phrase action}</th>
		<th width="15%">&nbsp;</th>
	</tr>
	<xen:foreach loop="$bounces" value="$bounce">
	<tr class="dataRow">
		<td><span {xen:if $bounce.username, ' class="Tooltip" title="{$bounce.username}"'}>{$bounce.recipient}</span></td>
		<td><xen:datetime time="{$bounce.log_date}" /></td>
		<td>
			<xen:if is="{$bounce.message_type} == 'bounce'"><span class="Tooltip" title="{$bounce.status_code}">{xen:phrase bounce}</span>
			<xen:elseif is="{$bounce.message_type} == 'delay'" /><span class="muted">{xen:phrase delay}</span>
			<xen:elseif is="{$bounce.message_type} == 'challenge'" /><span class="muted">{xen:phrase challenge}</span>
			<xen:elseif is="{$bounce.message_type} == 'autoreply'" /><span class="muted">{xen:phrase auto_reply}</span>
			<xen:elseif is="{$bounce.message_type} == 'unknown'" />{xen:phrase unknown}
			<xen:else />{$bounce.message_type}
			</xen:if>
		</td>
		<td>
			<xen:if is="{$bounce.action_taken} == 'hard'">{xen:phrase hard_bounce}
			<xen:elseif is="{$bounce.action_taken} == 'soft'" />{xen:phrase soft_bounce_logged}
			<xen:elseif is="{$bounce.action_taken} == 'soft_hard'" />{xen:phrase too_many_soft_bounces}
			<xen:elseif is="{$bounce.action_taken} == 'untrusted'" /><span class="muted">{xen:phrase skipped_untrusted}</span>
			<xen:elseif is="{$bounce.action_taken} == ''" /><span class="muted">{xen:phrase none}</span>
			<xen:else />{$bounce.action_taken}
			</xen:if>
		</td>
		<td class="dataOptions"><a href="{xen:adminlink logs/email-bounces/view, '', 'bounce_id={$bounce.bounce_id}'}" class="secondaryContent" target="_blank">{xen:phrase view_original}</a></td>
	</tr>
	</xen:foreach>
	<tr>
		<td colspan="5" class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count={xen:count $bounces}', 'total={$totalBounces}'}</td>
	</tr>
	</table>
	
	<xen:adminpagenav page="{$page}" perpage="{$perPage}" total="{$totalBounces}" link="logs/email-bounces" />
<xen:else />
	<div class="noResults">{xen:phrase no_entries_have_been_logged}</div>
</xen:if>]]></template>
  <template title="email_template_delete"><![CDATA[<xen:title>{xen:phrase confirm_deletion_of_email_template}: {$template.title}</xen:title>
<xen:h1>{xen:phrase confirm_deletion_of_email_template}</xen:h1>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'email-templates/edit', $template}">{$template.title}</xen:breadcrumb>
</xen:navigation>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'email-templates/delete'}" class="deleteConfirmForm formOverlay">

	<p>{xen:phrase please_confirm_that_you_want_to_delete_following_email_template}:</p>
	<strong><a href="{xen:adminlink 'email-templates/edit', $template}">{$template.title}</a></strong>

	<input type="hidden" name="template_id" value="{$template.template_id}" />
	<input type="hidden" name="_xfConfirm" value="1" />

	<xen:submitunit save="{xen:phrase delete_template}" />
	
</xen:form>]]></template>
  <template title="email_template_edit"><![CDATA[<xen:title>{xen:if {$template.title}, '{xen:phrase edit_email_template}: {$template.title}', '{xen:phrase create_new_email_template}'}</xen:title>

<xen:if is="{$template.title}">
	<xen:navigation>
		<xen:breadcrumb href="{xen:adminlink email-templates}#{xen:helper listitemid, $template.title}">{$template.title}</xen:breadcrumb>
	</xen:navigation>
</xen:if>

<xen:form action="{xen:adminlink 'email-templates/save'}" class="AutoValidator" data-redirect="yes">
		
	<xen:textboxunit name="title" value="{$template.title}" label="{xen:phrase template_title}:" hint="{xen:phrase must_be_unique}" data-livetitletemplate="{xen:if {$template.title},
		'{xen:phrase edit_email_template}: <em>%s</em>',
		'{xen:phrase create_new_email_template}: <em>%s</em>'}" />
	
	<xen:textboxunit name="subject" value="{$template.subject}" label="{xen:phrase subject}:" rows="2" inputclass="Elastic" code="true" />
	<xen:textboxunit name="body_text" value="{$template.body_text}" label="{xen:phrase plain_text_body}:" rows="2" inputclass="Elastic" code="true" />
	<xen:textboxunit name="body_html" value="{$template.body_html}" label="{xen:phrase html_body}:" rows="2" inputclass="Elastic" code="true" />

	<xen:include template="helper_addon_unit" />

	<input type="hidden" name="template_id" value="{$template.template_id}"  />
	<input type="hidden" name="custom" value="{$template.custom}"  />

	<xen:submitunit>
		<input type="submit" name="reload" value="{xen:phrase save_template}" accesskey="s" class="button primary" />
		<input type="submit" name="saveexit" value="{xen:phrase save_and_exit}" accesskey="e" class="button" />
		<xen:if is="{$template.title}">
			<input type="button" value="{xen:phrase delete_template}..." accesskey="d" class="button OverlayTrigger"
				data-href="{xen:adminlink 'email-templates/delete', $template}" />
		</xen:if>
	</xen:submitunit>

</xen:form>]]></template>
  <template title="email_template_list"><![CDATA[<xen:title>{xen:phrase email_templates}</xen:title>

<xen:topctrl>
	<xen:if is="{$showCreateLink}"><a href="{xen:adminlink 'email-templates/add'}" class="button" accesskey="a">+ {xen:phrase create_email_template}</a></xen:if>
</xen:topctrl>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<xen:if is="{$showSwitchLink}">
	<xen:if is="{$showSwitchLink} == 'master'">
		<a href="{xen:adminlink 'email-templates'}" class="button">{xen:phrase show_master_templates}</a>
	<xen:else />
		<a href="{xen:adminlink 'email-templates', '', 'standard=1'}" class="button">{xen:phrase show_customizable_templates}</a>
	</xen:if>
</xen:if>

<xen:form action="{xen:adminlink 'email-templates'}" class="section">

	<h2 class="subHeading">
		<xen:include template="filter_list_controls" />
		{xen:phrase email_templates}
	</h2>

	<ol class="FilterList Scrollable">
		<xen:foreach loop="$templates" value="$template">
			<xen:listitem
				id="{$template.title}"
				label="{$template.title}"
				href="{xen:adminlink 'email-templates/edit', $template, 'custom={$customizeTemplate}'}"
				snippet="{$template.addonTitle}"
				delete="{xen:adminlink 'email-templates/delete', $template, 'custom={$customizeTemplate}'}" />
		</xen:foreach>
	</ol>

	<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:count $templates}</span>', 'total={xen:count $templates}'}</p>

</xen:form>]]></template>
  <template title="email_template_modification_delete"><![CDATA[<xen:include template="base_template_modification_delete">
	<xen:set var="$prefix" value="email-template-mods" />
</xen:include>]]></template>
  <template title="email_template_modification_edit"><![CDATA[<xen:include template="base_template_modification_edit">
	<xen:set var="$prefix" value="email-template-mods" />
	<xen:set var="$extraInsertHtml">
		<xen:radiounit label="{xen:phrase search_location}:" name="search_location" value="{$modification.search_location}" readonly="!{$canEdit}">
			<xen:option value="subject" label="{xen:phrase subject}" />
			<xen:option value="body_text" label="{xen:phrase plain_text_body}" />
			<xen:option value="body_html" label="{xen:phrase html_body}" />
		</xen:radiounit>
	</xen:set>
</xen:include>]]></template>
  <template title="email_template_modification_list"><![CDATA[<xen:title>{xen:phrase email_template_modifications}</xen:title>

<xen:include template="base_template_modification_list">
	<xen:set var="$prefix" value="email-template-mods" />
</xen:include>]]></template>
  <template title="email_template_modification_log"><![CDATA[<xen:include template="base_template_modification_log" />]]></template>
  <template title="email_template_modification_test"><![CDATA[<xen:include template="base_template_modification_test" />]]></template>
  <template title="emergency"><![CDATA[<xen:title>Transmogrification Reset Control</xen:title>

<xen:require css="emergency.css" />

<xen:form action="{xen:adminlink 'tools/transmogrifier-reset'}" class="transmogrifier">

	<p>Are you <i>sure</i> you want to issue a transmogrification reset imperative?</p>

	<fieldset><div><input type="submit" value="Reset Transmogrifier" /></div></fieldset>

	<input type="hidden" name="transmogrification_confirmation" value="1" />

</xen:form>]]></template>
  <template title="emergency.css"><![CDATA[.transmogrifier fieldset
{
border: none;
background-image: url({xen:property imagePath}/xenforo/warning_stripes.png);
padding: 10px 0;
width: 310px;
margin: 30px auto;
}

.transmogrifier fieldset div
{
padding: 20px 0;
background-color: #f0f0f0;
border: 1px solid black;
width: 280px;
text-align: center;
margin: auto;
}

.transmogrifier fieldset input
{
width: 240px;
background-color: white;
border: 2px outset black;
color: red;
font-size: 12pt;
font-weight: bold;
text-transform: uppercase;
padding: 10px;
box-shadow: 2px 2px 10px 0px rgba(0,0,0,0.5);
}

.transmogrifier fieldset input:hover
{
background-color: #ffff77;
}

.transmogrifier fieldset input:active
{
background-color: #ffff33;
box-shadow: 0 0 0 0 transparent;
text-shadow: 0 0 10px white;
}]]></template>
  <template title="emergency_reset"><![CDATA[<xen:title>Transmogrification Reset Successful</xen:title>

<xen:require css="emergency.css" />

<p class="successMessage">A transmogrification reset imperative was generated and executed successfully. Things should be better now.</p>

<dl class="pairsInline">
	<dt>Transmogrification Count:</dt>
		<dd>{xen:number $count}</dd>
</dl>]]></template>
  <template title="error"><![CDATA[<xen:title>{xen:phrase error}</xen:title>

<div class="errorOverlay">
	<a class="close OverlayCloser"></a>
	<xen:if is="{xen:count $error, false} == 1">
		<xen:if is="{$showHeading}"><h2 class="heading">{xen:phrase following_error_occurred}:</h2></xen:if>
		
		<div class="baseHtml">
		<xen:foreach loop="$error" key="$key" value="$value">
			<label for="ctrl_{$key}" class="OverlayCloser">{xen:raw $value}</label>
		</xen:foreach>
		</div>
	<xen:else />
		<xen:if is="{$showHeading}"><h2 class="heading">{xen:phrase please_correct_following_errors}:</h2></xen:if>
	
		<div class="baseHtml">
			<ul>
			<xen:foreach loop="$error" key="$key" value="$value">
				<li><label for="ctrl_{$key}" class="OverlayCloser">{xen:raw $value}</label></li>
			</xen:foreach>
			</ul>
		</div>
	</xen:if>
</div>]]></template>
  <template title="error_with_login"><![CDATA[<xen:title>{xen:phrase error}</xen:title>

{xen:raw $text}

<xen:include template="helper_login_form" />]]></template>
  <template title="feed_delete"><![CDATA[<xen:title>{xen:phrase confirm_deletion_of_feed}: {$feed.title}</xen:title>
<xen:h1>{xen:phrase confirm_deletion_of_feed}</xen:h1>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'feeds/edit', $feed}">{$feed.title}</xen:breadcrumb>
</xen:navigation>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'feeds/delete', $feed}" class="deleteConfirmForm formOverlay">

	<p>{xen:phrase please_confirm_that_you_want_to_delete_following_feed}:</p>
	<strong><a href="{xen:adminlink 'feeds/edit', $feed}">{$feed.title}</a> <dfn>{$feed.url}</dfn></strong>

	<xen:submitunit save="{xen:phrase delete_feed}" />
	
	<input type="hidden" name="_xfConfirm" value="1" />
</xen:form>]]></template>
  <template title="feed_edit"><![CDATA[<xen:title>{xen:if '{$feed.feed_id}', '{xen:phrase edit_feed}: {$feed.title}', '{xen:phrase register_new_feed}'}</xen:title>

<xen:if is="{$feed.feed_id}">
	<xen:navigation>
		<xen:breadcrumb href="{xen:adminlink feeds}#{xen:helper listitemid, $feed.feed_id}">{$feed.title}</xen:breadcrumb>
	</xen:navigation>
</xen:if>

<xen:require js="js/xenforo/feed_preview.js" />
<xen:require css="feed_preview.css" />

<xen:form class="AutoValidator" id="FeedForm"
	action="{xen:adminlink feeds/save, $feed}"
	data-redirect="on">
	
	<xen:if is="{$feed.feed_id}">
		<xen:textboxunit label="{xen:phrase title}:" name="title" value="{$feed.title}" data-livetitletemplate="{xen:if {$feed.feed_id},
			'{xen:phrase edit_feed}: <em>%s</em>',
			'{xen:phrase register_new_feed}: <em>%s</em>'}" />
	</xen:if>
	
	<xen:textboxunit label="{xen:phrase url}:" name="url" value="{$feed.url}" dir="ltr" maxlength="2083" />
	
	<xen:selectunit label="{xen:phrase fetch_new_entries_every}:" name="frequency" value="{$feed.frequency}">
		<xen:option value="600">{xen:phrase x_minutes, 'count=10'}</xen:option>
		<xen:option value="1200">{xen:phrase x_minutes, 'count=20'}</xen:option>
		<xen:option value="1800">{xen:phrase x_minutes, 'count=30'}</xen:option>
		<xen:option value="3600">{xen:phrase x_minutes, 'count=60'}</xen:option>
		<xen:option value="7200">{xen:phrase x_hours, 'count=2'}</xen:option>
		<xen:option value="14400">{xen:phrase x_hours, 'count=4'}</xen:option>
		<xen:option value="21600">{xen:phrase x_hours, 'count=6'}</xen:option>
		<xen:option value="43200">{xen:phrase x_hours, 'count=12'}</xen:option>
	</xen:selectunit>
	
	<xen:if is="{$feed.feed_id}">
		<xen:checkboxunit label="">
			<xen:option name="active" selected="{$feed.active}">
				<xen:label>{xen:phrase feed_is_active}</xen:label>
				<xen:hint>{xen:phrase disable_to_prevent_feed_import}</xen:hint>
			</xen:option>
		</xen:checkboxunit>
	<xen:else />
		<input type="hidden" name="active" value="1" />
	</xen:if>
	
	<fieldset>
		<xen:radiounit label="{xen:phrase posting_user}:" name="user_id" value="{$feed.user_id}">
			<xen:option value="0">{xen:phrase post_feed_entries_as_guest}</xen:option>
			<xen:option value="-1" label="{xen:phrase post_feed_entries_as_following_user}">
				<xen:textbox name="username" value="{$feed.username}" inputclass="AutoComplete AcSingle" placeholder="{xen:phrase user_name}..." size="40" />
			</xen:option>
		</xen:radiounit>
	</fieldset>
	
	<fieldset>
		<xen:controlunit label="{xen:phrase destination_forum}:">
			<xen:html><select name="node_id" class="textCtrl" id="ctrl_node_id">
				<option value="">{xen:phrase select_destination_forum_prompt}</option>
				<xen:foreach loop="$nodes" value="$node">
					<option value="{$node.node_id}" {xen:selected '{$node.node_id} == {$feed.node_id}'} {xen:if "{$node.node_type_id} != 'Forum'", 'disabled="disabled"'}>{xen:string repeat, '&nbsp; ', $node.depth}{$node.title}</option>
				</xen:foreach>
			</select></xen:html>
			<xen:explain>{xen:phrase select_forum_for_feed}</xen:explain>
		</xen:controlunit>
		
		<xen:require js="js/xenforo/title_prefix.js" />
		<xen:require css="public:title_prefix_edit.css" />
		<xen:require css="public:thread_prefixes.css" />
		
		<div id="PrefixContainer">
			<xen:selectunit name="prefix_id" value="{$feed.prefix_id}" label="{xen:phrase prefix}:"
				inputclass="TitlePrefix"
				data-container="#PrefixContainer"
				data-textbox="#ctrl_title_template"
				data-nodecontrol="#ctrl_node_id"
				data-prefixurl="{xen:adminlink forums/prefixes}">
				<xen:option value="0" label="({xen:phrase no_prefix})" data-css="" />
				<xen:options source="{$prefixes}" />
			</xen:selectunit>
		</div>
		
		<xen:textboxunit label="{xen:phrase title_template}:" name="title_template" value="{$feed.title_template}">
			<xen:hint>{xen:phrase optional}</xen:hint>
		</xen:textboxunit>
		
		<xen:textboxunit label="{xen:phrase message_template}:" name="message_template" value="{$feed.message_template}" inputclass="Elastic" rows="2">
			<xen:hint>{xen:phrase you_may_use_bb_code}</xen:hint>
			<xen:explain>{xen:phrase feed_message_template_explain}<br />{title} {content} {author} {link}</xen:explain>
		</xen:textboxunit>
		
		<xen:comment><xen:controlunit label="{xen:phrase message_template}:">
			<xen:hint>{xen:phrase you_may_use_bb_code}</xen:hint>
			<xen:explain>{xen:phrase feed_message_template_explain}<br />{title} {content} {author} {link}</xen:explain>
			<xen:html>{xen:raw $messageEditor}</xen:html>
		</xen:controlunit></xen:comment>
	</fieldset>
	
	<fieldset>	
		<xen:checkboxunit label="{xen:phrase options}:">
			<xen:option name="discussion_visible" selected="{$feed.discussion_visible}">
				<xen:label>{xen:phrase post_immediately}</xen:label>
				<xen:hint>{xen:phrase otherwise_insert_into_moderation_queue}</xen:hint>
			</xen:option>
			<xen:option name="discussion_open" selected="{$feed.discussion_open}">
				<xen:label>{xen:phrase open_thread}</xen:label>
				<xen:hint>{xen:phrase people_may_reply_to_this_thread}</xen:hint>
			</xen:option>
			<xen:option name="discussion_sticky" selected="{$feed.discussion_sticky}">
				<xen:label>{xen:phrase sticky}</xen:label>
				<xen:hint>{xen:phrase sticky_threads_appear_at_top_of_first_page_of_list_of_threads}</xen:hint>
			</xen:option>
		</xen:checkboxunit>	
	</fieldset>
	
	<xen:submitunit save="{xen:phrase save_feed}">
		<input type="submit" name="preview" value="{xen:phrase preview_feed_entry}" class="button" accesskey="p" />
		<xen:if is="{$feed.feed_id}"><a href="{xen:adminlink feeds/delete, $feed}" class="button OverlayTrigger">{xen:phrase delete_feed}...</a></xen:if>
	</xen:submitunit>
</xen:form>]]></template>
  <template title="feed_list"><![CDATA[<xen:title>{xen:phrase registered_feeds}</xen:title>

<xen:topctrl><a href="{xen:adminlink feeds/add}" class="button">+ {xen:phrase register_new_feed}</a></xen:topctrl>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<xen:form action="{xen:adminlink feeds/toggle}" class="section AutoValidator">

	<xen:if is="{$feeds}">
		<h2 class="subHeading">
			<xen:include template="filter_list_controls" />
			{xen:phrase registered_feeds}
		</h2>

		<ol class="FilterList Scrollable">
			<xen:foreach loop="$feeds" value="$feed">
				<xen:listitem id="{$feed.feed_id}"
					label="{$feed.title}"
					snippet="{$feed.url}"
					href="{xen:adminlink 'feeds/edit', $feed}"
					delete="{xen:adminlink 'feeds/delete', $feed}"
					toggle="{$feed.active}"
					toggletitle="{xen:phrase enable_disable_x, 'title={$feed.title}'}">
					<xen:html>
						<a href="{xen:adminlink 'feeds/import', $feed, '_xfToken={$visitor.csrf_token_page}'}" class="secondaryContent">{xen:phrase import_feed_now}</a>
					</xen:html>
				</xen:listitem>
			</xen:foreach>
		</ol>

		<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:count $feeds}</span>', 'total={xen:count $feeds}'}</p>

	<xen:else />
		<div class="noResults">{xen:phrase no_feeds_have_been_registered_yet}</div>
	</xen:if>

</xen:form>]]></template>
  <template title="feed_preview"><![CDATA[<xen:title>{$feed.title}</xen:title>

<xen:require css="feed_preview.css" />
<xen:require css="public:thread_prefixes.css" />

<div class="section feedPreview">
	<h3 class="subHeading">{xen:phrase preview_feed_entry}: <a href="{$feed.url}" target="_blank">{$feed.url}</a></h3>
	
	<div class="overlayScroll">
		<table>
			<tr>
				<th class="secondaryContent">{xen:phrase title}:</th>
				<td class="secondaryContent" colspan="3"><h4>{xen:helper threadPrefix, $feed}{$entry.title}</h4></td>
			</tr>
			<tr>
				<th class="primaryContent">{xen:phrase message}:</th>
				<td class="primaryContent messageText baseHtml" colspan="3">{xen:raw $entry.messageHtml}</td>
			</tr>
			<tr>
				<th class="primaryContent">{xen:phrase author}:</th>
				<td class="primaryContent">{$entry.author}</td>
				<th class="primaryContent">{xen:phrase last_modified}:</th>
				<td class="primaryContent">{$entry.date_modified}</td>
			</tr>
		</table>
	</div>
	
	<div class="sectionFooter"><input type="button" class="button OverlayOnly OverlayCloser" value="{xen:phrase close}" /></div>
</div>]]></template>
  <template title="feed_preview.css"><![CDATA[.feedPreview table
{
	width: 100%;
}

.feedPreview h4
{
	font-weight: bold;
}

.feedPreview tr
{
	vertical-align: top;
}

.feedPreview th
{
	white-space: nowrap;
	word-wrap: normal;
	text-align: right;
	border-right: 1px solid {xen:property primaryLighterStill};
}

.feedPreview .messageText
{
	{xen:property messageText}
}]]></template>
  <template title="filter_list.css"><![CDATA[.FilterList
{
	/*max-height: 150px;
	overflow: auto;*/
}

.FilterList.Scrollable,
.FilterList .Scrollable
{
	max-height: 403px;
	overflow: auto;
}

	.FilterList .Scrollable
	{
		max-height: 250px;
	}
	
	.Touch .FilterList.Scrollable,
	.Touch .FilterList .Scrollable
	{
		max-height: none;
		overflow: visible;
	}

.FilterList .listItem
{
	overflow: hidden; zoom: 1;
	line-height: 20px;
	padding: 0;
	vertical-align: bottom;
}

.FilterList .listItem em,
.FilterList .listItem dfn
{
	font-style: normal;
}

.FilterList .listItem.Last h4
{
	background: {xen:property secondaryLightest} url('{xen:property imagePath}/xenforo/gradients/category-23px-light.png') repeat-x top;
}

.FilterList .listItem.Last em
{
	font-weight: bold;
}

.FilterList .selectListItem
{
	float: left !important;
}

.FilterList .primaryContent,
.FilterList .secondaryContent
{
	padding: 0;
}
	
	.FilterList .secondaryContent,
	.FilterList .Popup > a,
	.FilterList h4 a,
	.FilterList h4 label
	{
		padding: 5px;
		display: block;
		float: right;
		border-bottom: none;
		background-image: none;
		background-repeat: no-repeat;
		background-position: left center;
	}
	
	.FilterList .secondaryContent.toggler
	{
		background: none;
		border-left-color: {xen:property primaryLightest};
	}
	
	.FilterList .textHeading
	{
		{xen:property secondaryContent.background}
				
		padding: 5px;
		
		margin-bottom: 0;
		margin-top: 0;
		font-size: 11px;
		color: {xen:property primaryDark};
		overflow: hidden; zoom: 1;
		position: relative;
	}
	
		.FilterList .textHeading .count
		{
			font-weight: normal;
			color: {xen:property dimmedTextColor};
		}
		
		.FilterList .textHeading .controls
		{
			position: absolute;
			right: 5px;
			bottom: 5px;
			font-size: 10px;
			font-weight: normal;			
		}
		
		.FilterList .textHeading .checkAllColumn
		{
			position: absolute;
			right: 31px;
			bottom: 5px;
			display: block;
			padding: 0 10px;
		}
	
	.FilterList .textHeading + ol h4 a
	{
		padding-left: 20px;
	}
	
		.FilterList .textHeading + ol h4 label + a
		{
			padding-left: 5px; /* undo the previous if we have a label before the <a> */
		}
	
	.FilterList h4 a
	{
		float: none;
		white-space: nowrap;
		overflow: hidden;
	}
	
		.FilterList h4 a span.secondRow
		{
			font-size: 11px;
			color: {xen:property mutedTextColor};
			line-height: 14px;
			display: block;
		}
	
	.FilterList h4 a dfn
	{
		line-height: 14px;
	}

	.FilterList .secondaryContent
	{
		border-left: 1px solid {xen:property primaryLighterStill};
		padding: 5px 10px;
		font-size: 11px;
		text-align: center;
	}

		.FilterList .secondaryContent:hover
		{
			background-color: {xen:property primaryLighterStill};
		}
		
		.FilterList.secondRow .secondaryContent
		{
			height: 34px;
		}
		
			.FilterList.secondRow label.secondaryContent
			{
				line-height: 34px;
			}
			
			.FilterList.secondRow .secondaryContent .secondRow
			{
				font-size: 9px;
				line-height: 14px;
				display: block;
				text-align: center;
			}
		
	.FilterList .secondaryContent .textCtrl
	{
		margin: -2px 0;
		padding: 2px 3px;
		font-size: 12px;
	}
	
	.FilterList .fixedOptionBox
	{
		width: 125px;
		box-sizing: border-box;
		white-space: nowrap;
		overflow: hidden;
		text-align: center;
	}

	.FilterList .delete
	{
		padding: 0px;
		width: 30px;
		height: 30px;
	}
	
		.FilterList.secondRow .delete
		{
			height: 44px;
		}
			
		.FilterList .delete span,
		.FilterList .edit span
		{
			display: block;
			background: transparent url('{xen:property imagePath}/xenforo/permissions/deny.png') no-repeat center center;
			cursor: pointer;
		
			padding: 5px;
			width: 20px;
			height: 20px;
			
			overflow: hidden;
			white-space: nowrap;
			text-indent: -1000px;
		}
		
			.FilterList .edit span
			{
				background: transparent url('{xen:property imagePath}/xenforo/permissions/edit.png') no-repeat bottom;
				width: 10px;
				height: 10px;
			}
		
			.FilterList.secondRow .delete span
			{
				height: 34px;
			}
		
	.FilterList .Popup a
	{
		background-color: {xen:property primaryLightest};
		border-left: 1px solid {xen:property primaryLighterStill};
	}

	.FilterList a:hover
	{
		text-decoration: none;
	}
	
	.FilterList .listItem:hover h4
	{
		background-color: {xen:property secondaryLightest};
		
	}
	
	.FilterList .item_custom h4 a
	{
		color: red;
	}
	
	.FilterList .item_inherited h4 a
	{
		color: orange;
	}
	
		.FilterList h4 a dfn
		{
			font-size: 11px;
			color: {xen:property faintTextColor};
		}

	/* highlighted text */
	.FilterList h4 strong
	{
		color: red;
		text-decoration: underline;
		font-weight: normal;
	}
	
	.FilterList .Popup > a
	{
		font-size: 11px;
	}
	
	.subHeading .FilterControls
	{
		float: right;
		margin-top: -3px;
		max-height: 22px;
		overflow: hidden;
	}
	
		.FilterControls .textCtrl
		{
			padding-top: 2px;
			padding-bottom: 2px;
			font-size: 11px;
			height: 13px;
		}
		
		.FilterControls .button
		{
			padding-top: 0;
			padding-bottom: 0;
			height: 19px;
			line-height: 19px;
			font-size: 11px;
		}
		
	.FilterList + .sectionFooter
	{
		text-align: right;
		overflow: hidden; zoom: 1;
	}

.FilterList .listNote
{
	text-align: center;
	padding: 5px;
	font-style: italic;
}
		
/* filter list indenting */

._depth0 em { padding-left: 0em; }
._depth1 em { padding-left: 2em; }
._depth2 em { padding-left: 4em; }
._depth3 em { padding-left: 6em; }
._depth4 em { padding-left: 8em; }
._depth5 em { padding-left: 10em; }
._depth6 em { padding-left: 12em; }
._depth7 em { padding-left: 14em; }
._depth8 em { padding-left: 16em; }
._depth9 em { padding-left: 18em; }

/* special case buttons */

.FilterList .banCtrl,
.FilterList .liftCtrl
{
	min-width: 70px;
}

.FilterList .liftCtrl
{
	background-color: transparent;
}

.FilterList .hasPermissions
{
	background-color: {xen:property primaryLighter};
	color: {xen:property primaryLightest};
}

	.FilterList .hasPermissions:hover
	{
		color: {xen:property primaryMedium};
	}

/* smilie text */

.smilieText
{
	vertical-align: text-bottom;
	display: inline-block;
	padding: 1px 3px;
	border: 1px solid {xen:property faintTextColor};
	color: {xen:property mutedTextColor};
	border-radius: 3px;
	background: rgb(247,247,247);
	font-size: 11px;
}

/* label classes */

.FilterList h4.disabled em,
.FilterList .textHeading.disabled
{
	color: {xen:property mutedTextColor};
	text-decoration: line-through;
}

.FilterList h4.parentDisabled em
{
	color: {xen:property mutedTextColor};
}

/* user list avatars */

.FilterList .listAvatar
{
	width: 30px;
	float: left;
	/*margin-top: 1px;*/
}

/* radio tablets */

label.radioTablet
{
	background-color: {xen:property secondaryLight};
	line-height: inherit;
	height: auto;
	
	background: rgba(0,0,0, 0.1) url('{xen:property imagePath}/xenforo/gradients/form-button-white-25px.png') repeat-x top;
	margin: -3px 0;
	padding: 2px 6px;
	border: 1px outset rgba(0,0,0, 0.25);
	border-radius: 4px;
	cursor: pointer;
}

label.radioTablet:hover
{
	background-color: transparent;
}

label.radioTablet.checked
{
	border-style: inset;
	background-color: rgba(255,255,255, 0.75);
}

/* square thumbs */

.FilterList a.SquareThumb
{
	float: left;
	width: 44px;
	height: 44px;
	padding: 0;
}

/** this stuff allows toggler-select-all items to line up with togglers **/

.FilterList .togglerAll
{
	display: inline-block;
}

.FilterList .togglerAll .toggler
{
	display: inline-block;
	padding: 0 10px;
}

.FilterList .togglerAll .delete
{
	display: inline-block;
	width: 25px;
	height: 1px;
	margin-left: 1px;
}

.FilterList h3 .selectListItem
{
	padding: 0 5px;
	margin: 0 1px;
}

/* *** for Sortable... work to do here... *** */

.FilterList .sortable-placeholder
{
	background-color: {xen:property primaryLightest};
}]]></template>
  <template title="filter_list_controls"><![CDATA[<div class="FilterControls">
	<xen:textbox name="filter" value="{$filterParams.filter}" type="search" results="10" placeholder="{xen:if '{$placeholder}', $placeholder, {xen:phrase filter_items}}" />

	<label class="prefixCtrl">
		<input type="checkbox" name="prefixmatch" value="1"{xen:checked {$filterParams.prefixmatch}} />
		{xen:phrase prefix_match}
	</label>
	
	<input type="button" name="clearfilter" value="{xen:phrase clear}" title="{xen:phrase clear_filter_parameters}" class="button" />
</div>]]></template>
  <template title="filter_list_images.css"><![CDATA[.FilterList .imageContainer
{
	background-color: {xen:property primaryLightest};
	border: solid 1px {xen:property primaryLighterStill};
	text-align: center;
	width:100px;
	min-height: 35px;
	float: left;
	margin-right: 10px;
}

.FilterList .imageContainer img
{
	max-width: 100px;
	max-height: 75px;
	display: block;
	margin: auto;
}

.FilterList .imageContainer .recacheContainer
{
	padding-top: 6px;
}]]></template>
  <template title="footer"><![CDATA[<xen:edithint template="footer.css" />

<div id="footer">
	<xen:if is="{$debugMode}">
		<xen:if hascontent="true">
			<dl class="pairsInline" id="debugInfo" title="{$controllerName}-&gt;{$controllerAction}{xen:if $viewName, ' ({$viewName})'}">
			<xen:contentcheck>
				<xen:if is="{$page_time}"><dt>{xen:phrase timing}:</dt> <dd><a href="{$debug_url}" class="concealed">{xen:phrase x_seconds, 'time={xen:number {$page_time}, 4}'}</a></dd></xen:if>
				<xen:if is="{$memory_usage}"><dt>{xen:phrase memory}:</dt> <dd>{xen:phrase x_mb, 'size={xen:number {xen:calc "{$memory_usage} / 1024 / 1024"}, 3}'}</dd></xen:if>
				<xen:if is="{$db_queries}"><dt>{xen:phrase db_queries}:</dt> <dd>{xen:number {$db_queries}}</dd></xen:if>
			</xen:contentcheck>
			</dl>
		</xen:if>
	</xen:if>

	<div id="copyright">
		{xen:helper copyright}
		<xen:if is="{$hasManualDeferred} AND {$allowManualDeferredRun}"><span id="ManualDeferredTrigger"></span></xen:if>
	</div>
</div>]]></template>
  <template title="footer.css"><![CDATA[#footer
{
	margin: 20px 30px;
	font-size: 11px;
	color: {xen:property mutedTextColor};
	font-family: Eurostile, {xen:property body.font-family};
	
	/*background: {xen:property primaryLighterStill};
	margin: 20px 0;
	padding: 5px 20px;
	border-radius: 5px;
	box-shadow: 0px 5px 30px {xen:property primaryDark};*/
}

#footer #debugInfo
{
	float: right;
}]]></template>
  <template title="forum_delete"><![CDATA[<xen:title>{xen:phrase confirm_deletion_of_forum}: {$forum.title}</xen:title>
<xen:h1>{xen:phrase confirm_deletion_of_forum}</xen:h1>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'forums/edit', $forum}">{$forum.title}</xen:breadcrumb>
</xen:navigation>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'forums/delete'}" class="deleteConfirmForm formOverlay">
	<p>{xen:phrase please_confirm_want_to_delete_forum_and_discussions}:</p>
	<strong><a href="{xen:adminlink 'forums/edit', $forum}">{$forum.title}</a></strong>

	<xen:include template="helper_node_delete_children" />

	<input type="hidden" name="node_id" value="{$forum.node_id}" />
	<input type="hidden" name="_xfConfirm" value="1" />

	<xen:submitunit save="{xen:phrase delete_forum}" />
</xen:form>]]></template>
  <template title="forum_edit"><![CDATA[<xen:title>{xen:if {$forum.node_id}, '{xen:phrase edit_forum}: {$forum.title}', '{xen:phrase create_new_forum}'}</xen:title>

<xen:if is="{$forum.node_id}">
	<xen:navigation>
		<xen:breadcrumb href="{xen:adminlink nodes}#{xen:helper listitemid, $forum.node_id}">{$forum.title}</xen:breadcrumb>
	</xen:navigation>

	<xen:topctrl>
		<a href="{xen:adminlink 'nodes/add', '', 'parent_node_id={$forum.node_id}'}" class="button">+ {xen:phrase add_child}</a>
		<a href="{xen:adminlink 'nodes/add', '', 'parent_node_id={$forum.parent_node_id}'}" class="button">+ {xen:phrase add_sibling}</a>
	</xen:topctrl>
</xen:if>

<xen:form action="{xen:adminlink 'forums/save', $forum}"
	class="AutoValidator"
	data-fieldvalidatorurl="{xen:adminlink 'forums/validate-field', $forum}"
	data-redirect="on">

	<ul class="tabs Tabs" data-panes="#forumPanes > li">
		<xen:hook name="admin_forum_edit_tabs">
		<li class="active"><a>{xen:phrase basic_information}</a></li>
		<!-- slot: after_basic_information -->
		<li><a>{xen:phrase forum_options}</a></li>
		<!-- slot: after_forum_options -->
		<li><a>{xen:phrase thread_prefixes}</a></li>
		</xen:hook>
	</ul>

	<ul id="forumPanes">
		<xen:hook name="admin_forum_edit_panes">
		<li>
			<xen:hook name="forum_edit_basic_information">
			
			<xen:textboxunit name="title" value="{$forum.title}" label="{xen:phrase title}:" data-livetitletemplate="{xen:if {$forum.node_id},
				'{xen:phrase edit_forum}: <em>%s</em>',
				'{xen:phrase create_new_forum}: <em>%s</em>'}">
			</xen:textboxunit>
			
			<!-- slot: after_title -->
			
			<xen:textboxunit name="node_name" value="{$forum.node_name}" label="{xen:phrase url_portion}:" hint="{xen:phrase optional}">
				<xen:explain>{xen:phrase if_entered_url_to_forum_not_contain_id_change_breaks_urls}</xen:explain>
			</xen:textboxunit>
			
			<!-- slot: after_node_name -->
	
			<xen:textboxunit name="description" value="{$forum.description}" label="{xen:phrase description}:" hint="{xen:phrase you_may_use_html}" explain="{xen:phrase node_description_explain}" rows="2" inputclass="Elastic" />
			
			<!-- slot: after_description -->
			
			<fieldset>
				<!-- slot: before_parent_node_id -->
			
				<xen:selectunit name="parent_node_id" value="{$forum.parent_node_id}" label="{xen:phrase parent_node}:">
					<xen:options source="$nodeParentOptions" />
				</xen:selectunit>
				
				<!-- slot: after_parent_node_id -->
				
				<xen:textboxunit name="display_order" value="{$forum.display_order}" label="{xen:phrase display_order}:">
					<xen:explain>{xen:phrase position_of_this_item_relative_to_other_nodes_with_same_parent}</xen:explain>
				</xen:textboxunit>
				
				<!-- slot: after_display_order -->
				
				<xen:checkboxunit label="">
					<xen:option name="display_in_list" label="{xen:phrase display_in_node_list}" selected="{$forum.display_in_list}">
						<xen:hint>{xen:phrase if_unselected_users_will_not_see_this_node_in_list}</xen:hint>
					</xen:option>
				</xen:checkboxunit>
				
				<!-- slot: after_display_in_list -->
			</fieldset>
			
			<!-- slot: before_style_override -->
			
			<xen:checkboxunit label="{xen:phrase style}:">
				<xen:option name="style_override" label="{xen:phrase override_user_style_choice}" selected="{$forum.style_id}">
					<xen:select name="style_id" value="{$forum.style_id}">
						<xen:options source="$styleOptions" />
					</xen:select>
					<xen:hint>{xen:phrase if_specified_all_visitors_view_using_selected_style}</xen:hint>
				</xen:option>
			</xen:checkboxunit>
			
			</xen:hook>
		</li>
		<!-- slot: after_basic_information -->
		<li>
			<xen:hook name="admin_forum_edit_forum_options">
			
			<xen:checkboxunit label="">
				<xen:option name="allow_posting" label="{xen:phrase allow_new_messages_to_be_posted_in_this_forum}" selected="{$forum.allow_posting}">
					<xen:hint>{xen:phrase if_disabled_users_not_able_post_messages_in_forum}</xen:hint>
				</xen:option>

				<xen:option name="allow_poll" label="{xen:phrase allow_polls_to_be_created_in_this_forum}" selected="{$forum.allow_poll}">
					<xen:hint>{xen:phrase if_disabled_users_not_given_option_to_create_poll_with_thread}</xen:hint>
				</xen:option>
				
				<xen:option name="moderate_threads" label="{xen:phrase moderate_new_threads_posted_in_this_forum}" selected="{$forum.moderate_threads}">
					<xen:hint>{xen:phrase if_enabled_moderator_manually_approve_threads_posted_in_forum}</xen:hint>
				</xen:option>

				<xen:option name="moderate_replies" label="{xen:phrase moderate_replies_posted_in_this_forum}" selected="{$forum.moderate_replies}">
					<xen:hint>{xen:phrase if_enabled_moderator_manually_approve_replies_posted_in_forum}</xen:hint>
				</xen:option>
				
				<xen:option name="count_messages" label="{xen:phrase count_messages_in_forum_toward_user_total}" selected="{$forum.count_messages}">
					<xen:hint>{xen:phrase if_disabled_messages_posted_will_not_contribute_to_user_message_total}</xen:hint>
				</xen:option>
				
				<xen:option name="find_new" label="{xen:phrase include_forum_in_find_new_threads}" selected="{$forum.find_new}">
					<xen:hint>{xen:phrase if_disabled_messages_will_never_appear_in_find_new_threads}</xen:hint>
				</xen:option>
			</xen:checkboxunit>

			<xen:radiounit label="{xen:phrase forum_watch_notification_limit}:" name="allowed_watch_notifications" value="{$forum.allowed_watch_notifications}">
				<xen:option value="all">{xen:phrase new_messages}</xen:option>
				<xen:option value="thread">{xen:phrase new_threads}</xen:option>
				<xen:option value="none">{xen:phrase none}</xen:option>
				<xen:explain>{xen:phrase forum_watch_notification_limit_desc}</xen:explain>
			</xen:radiounit>

			<xen:controlunit label="{xen:phrase default_sort_order}:">
				<xen:select name="default_sort_order" value="{$forum.default_sort_order}" inputclass="autoSize">
					<xen:option value="last_post_date">{xen:phrase last_message}</xen:option>
					<xen:option value="post_date">{xen:phrase start_date}</xen:option>
					<xen:option value="title">{xen:phrase title}</xen:option>
					<xen:option value="reply_count">{xen:phrase replies}</xen:option>
					<xen:option value="view_count">{xen:phrase views}</xen:option>
				</xen:select>
				<xen:select name="default_sort_direction" value="{$forum.default_sort_direction}" inputclass="autoSize">
					<xen:option value="desc">{xen:phrase descending}</xen:option>
					<xen:option value="asc">{xen:phrase ascending}</xen:option>
				</xen:select>
			</xen:controlunit>

			<xen:selectunit label="{xen:phrase thread_list_date_limit}:" name="list_date_limit_days" value="{$forum.list_date_limit_days}">
				<xen:option value="0">{xen:phrase none}</xen:option>
				<xen:option value="7">{xen:phrase x_days, 'days=7'}</xen:option>
				<xen:option value="14">{xen:phrase x_days, 'days=14'}</xen:option>
				<xen:option value="30">{xen:phrase x_days, 'days=30'}</xen:option>
				<xen:option value="60">{xen:phrase x_months, 'months=2'}</xen:option>
				<xen:option value="90">{xen:phrase x_months, 'months=3'}</xen:option>
				<xen:option value="182">{xen:phrase x_months, 'months=6'}</xen:option>
				<xen:option value="365">{xen:phrase 1_year}</xen:option>
				<xen:explain>{xen:phrase thead_list_date_limit_used_on_busy_forums_to_improve_performance}</xen:explain>
			</xen:selectunit>
			
			</xen:hook>
		</li>
		<!-- slot: after_forum_options -->
		<li>
			<xen:hook name="admin_forum_edit_thread_prefixes">
			
			<xen:if is="{$prefixOptions}">
				<xen:require js="js/xenforo/acp_forum_editor.js" />
				
				<xen:controlunit label="{xen:phrase available_prefixes}:" class="multiple checkboxColumns AvailablePrefixes">
					<xen:hint><br /><label><input type="checkbox" class="CheckAll" data-target="dl.AvailablePrefixes" /> {xen:phrase select_all}</label></xen:hint>
					<xen:html>
						<xen:foreach loop="$prefixOptions" key="$prefixGroupId" value="$prefixes">
							<xen:checkbox>
								<xen:foreach loop="$prefixes" key="$prefixId" value="$prefix">
									<xen:option name="available_prefixes[]" value="{$prefixId}" selected="in_array({$prefixId}, {$nodePrefixes})">{$prefix.label}</xen:option>
								</xen:foreach>
							</xen:checkbox>
						</xen:foreach>
					</xen:html>
				</xen:controlunit>
				
				<!-- slot: after_available_prefixes -->
			
				<fieldset>
					<xen:selectunit name="default_prefix_id" value="{$forum.default_prefix_id}"
						label="{xen:phrase default_thread_prefix}:"
						inputclass="PrefixManager" data-checkboxes="dl.AvailablePrefixes input:checkbox">
						<xen:option label="({xen:phrase none})" value="0" />
						<xen:options source="$prefixOptions" />
						<xen:explain>{xen:phrase default_thread_prefix_explain}</xen:explain>
					</xen:selectunit>

					<xen:checkboxunit label="">
						<xen:option name="require_prefix" selected="{$forum.require_prefix}" hint="{xen:phrase if_selected_users_required_select_prefix_for_thread}">{xen:phrase require_users_to_select_prefix}</xen:option>
					</xen:checkboxunit>
				</fieldset>
				
				<!-- slot: after_default_prefix_id -->
				
			<xen:else />
				<xen:controlunit label="{xen:phrase available_prefixes}:">({xen:phrase none}) <a href="{xen:adminlink thread-prefixes/add}" target="_blank">{xen:phrase create_new_thread_prefix}</a></xen:controlunit>
				<input type="hidden" name="default_thread_prefix" value="0" />
				
				<!-- slot: after_available_prefixes_none -->
			</xen:if>
			
			</xen:hook>
		</li>
		</xen:hook>
	</ul>

	<xen:submitunit save="{xen:phrase save_forum}">
		<xen:if is="{$forum.node_id}"><a href="{xen:adminlink forums/delete-confirm, $forum}" class="button">{xen:phrase delete_forum}...</a></xen:if>
	</xen:submitunit>

	<input type="hidden" name="node_type_id" value="Forum" />

</xen:form>]]></template>
  <template title="header"><![CDATA[<xen:edithint template="header.css" />

<div id="header">

	<div id="logoLine">
		<div class="pageWidth">
			<img src="{xen:property imagePath}/xenforo/XenForo-small.png" id="logo" />
			  <h2 id="version">XenForo {$xenOptions.currentVersion}</h2>
			<a href="{xen:adminlink 'login/logout', '', '_xfToken={$visitor.csrf_token_page}'}" id="logoutLink">{xen:phrase log_out_x, 'name={$visitor.username}'}</a>
		</div>
	</div>
	
	<div id="tabsNav">
		<div class="pageWidth">
			<ul class="acpTabs">
				<xen:foreach loop="$adminNavigation.tabs" value="$navigationTab">
					<li{xen:if {$navigationTab.selected}, ' class="active"'}><a{xen:if {$navigationTab.link}, ' href="{xen:adminlink {$navigationTab.link}}"'}>{$navigationTab.title}</a></li>
				</xen:foreach>
				<li class="separated Popup" id="AdminSearch">
					<a rel="menu" class="PopupClosed" accesskey="f">{xen:phrase search}</a>
					<div class="Menu" id="AdminSearchMenu">
						<xen:form action="{xen:adminlink search}" id="AdminSearchForm" data-target="#AdminSearchResults">
							<label><!--{xen:phrase search}: --><xen:textbox name="q" type="search" id="AdminSearchInput" /></label>
						</xen:form>
						<div id="AdminSearchResults"></div>
					</div>
				</li>
				<li class="separated"><a href="{$publicUrl}" target="_blank">{$xenOptions.boardTitle}</a></li>
			</ul>
		</div>
		<div class="pad"></div>
	</div>
	
</div>]]></template>
  <template title="header.css"><![CDATA[/* header */

#header
{
	background: {xen:property primaryMedium};
	position: fixed;
	min-width: 100%;
	z-index: 10;
}

/* logo line */

#logoLine
{
	text-align: center;
	border-bottom: 1px solid #1d74b3;
	overflow: hidden; zoom: 1;
}

	#logoLine .pageWidth
	{
		position: relative;
	}
	
	#version,
	#logoutLink
	{
		position: absolute;
		top: 17px;
		left: 20px;
		font-size: 11px;
		color: {xen:property primaryLighter};
		padding: 0 11px;
		/*font-family: Eurostile, {xen:property body.font-family};*/
	}
	
		#logoLine a
		{
			color: {xen:property primaryLighter};
		}
	
		#logoLine a:hover
		{
			color: {xen:property primaryLightest};
			text-decoration: none;
		}
	
		#logoutLink
		{
			left: auto;
			right: 20px;
		}

	#logo
	{
		width: 100px;
		height: 30px;
	}
	
/* tab navigation */
	
#tabsNav
{
	background: transparent url('{xen:property imagePath}/xenforo/gradients/acp-banner-shadow.png') no-repeat top center;
	padding-top: 10px;
	border-top: 1px solid {xen:property primaryDark};
}
	
	#tabsNav .pad
	{
		background: {xen:property primaryLight};
		height: 7px;
		border-bottom: 1px solid {xen:property primaryMedium};
		zoom: 1;
	}

	.acpTabs
	{
		overflow: hidden; zoom: 1;
		height: 22px;
		font-size: 11px;
		padding: 0 20px;
	}
	
		.acpTabs li
		{
			float: left;
		}
		
		.acpTabs li.logout
		{
			float: right;
		}
		
			.acpTabs li.logout a
			{
				text-transform: none;
			}
	
		.acpTabs li a
		{
			display: block;
			height: 20px;
			line-height: 20px;
			padding: 3px 11px 0;
			color: {xen:property primaryLight};
			border-top-left-radius: 2px;
			border-top-right-radius: 5px;
			outline: 0;
		}
	
			.acpTabs li.active a,
			.acpTabs li.active:hover a
			{
				background: {xen:property primaryLight};
				color: {xen:property primaryLightest};
				padding: 2px 10px 0;
				border: 1px solid {xen:property primaryDarker};
				border-bottom: none;
				font-weight: bold;
				/*text-shadow: 0px 0px 3px {xen:property primaryMedium};*/
			}
	
		.acpTabs li:hover a,
		.acpTabs li.Popup:hover a.PopupControl.PopupClosed
		{
			background-color: {xen:property primaryMedium};
			color: {xen:property primaryLighterStill};
			text-decoration: none;
		}
		
			.acpTabs li#AdminSearch a.PopupControl .arrowWidget
			{
				background: transparent url('{xen:property imagePath}/xenforo/widgets/acp-search-sprite.png') no-repeat right 0px;
			}
		
			.acpTabs li#AdminSearch a.PopupControl.PopupOpen .arrowWidget
			{
				background-position: right -13px;
			}
		
		.acpTabs li.separated
		{
			float: right;
		}
		
@media (max-width:960px)
{
	#header
	{
		position: absolute;
	}
}]]></template>
  <template title="helper_addon_unit"><![CDATA[<xen:if is="{$addOnOptions}">
	<xen:selectunit label="{xen:phrase add_on}:" name="addon_id" value="{$addOnSelected}">
		<xen:options source="$addOnOptions" />
	</xen:selectunit>
<xen:else />
	<input type="hidden" name="addon_id" value="{$addOnSelected}" />
</xen:if>]]></template>
  <template title="helper_criteria.css"><![CDATA[.criteriaQualifier
{
	display: block;
	margin-left: 16px;
	margin-top: 3px;
}]]></template>
  <template title="helper_criteria_page"><![CDATA[<xen:require css="helper_criteria.css" />

<xen:controlunit label="{xen:phrase nodes}:">
<ul>		
	<li><label>
		<input type="checkbox" name="page_criteria[nodes][rule]" value="nodes" class="Disabler" id="pcrit_nodes" {xen:checked $pageCriteria.nodes} />
		{xen:phrase page_is_within_nodes}:</label>
		<div class="criteriaQualifier" id="pcrit_nodes_Disabler">
			<xen:select name="page_criteria[nodes][data][node_ids]" size="12" multiple="true">
				<xen:foreach loop="$pageCriteriaData.nodes" value="$_criteriaNode">
					<xen:option value="{$_criteriaNode.node_id}"
						selected="{$pageCriteria.nodes.node_ids} AND in_array({$_criteriaNode.node_id}, {$pageCriteria.nodes.node_ids})">
							{xen:string repeat, '&nbsp; &nbsp; ', $_criteriaNode.depth}{$_criteriaNode.title}</xen:option>
				</xen:foreach>
			</xen:select>
			<xen:checkbox>
				<xen:option name="page_criteria[nodes][data][node_only]" value="1" selected="{$pageCriteria.nodes.node_only}">{xen:phrase only_display_within_selected_nodes_no_children}</xen:option>
			</xen:checkbox>		
		</div>
	</li>
</ul>
</xen:controlunit>

<fieldset>
<xen:controlunit label="{xen:phrase page_information}:">
<ul>
	<xen:hook name="page_criteria_page_info">	
	<li><label>
		<input type="checkbox" name="page_criteria[tab][rule]" value="tab" class="Disabler" id="pcrit_tab" {xen:checked $pageCriteria.tab} />
		{xen:phrase selected_navigation_tab_id_is}:</label>
		<div class="criteriaQualifier" id="pcrit_tab_Disabler">
			<xen:textbox name="page_criteria[tab][data][id]" value="{$pageCriteria.tab.id}" size="50" />
			<p class="explain">{xen:phrase selected_tab_criteria_explain}</p>
		</div>
	</li>
	
	<!-- slot: controller -->
	<li><label>
		<input type="checkbox" name="page_criteria[controller][rule]" value="controller" class="Disabler" id="pcrit_controller" {xen:checked $pageCriteria.controller} />
		{xen:phrase controller_and_action_is}:</label>
		<div class="criteriaQualifier" id="pcrit_controller_Disabler">
			<xen:textbox name="page_criteria[controller][data][name]" value="{$pageCriteria.controller.name}" size="20" placeholder="{xen:phrase controller_name}" /> ::
			<xen:textbox name="page_criteria[controller][data][action]" value="{$pageCriteria.controller.action}" size="20" placeholder="{xen:phrase controller_action}" />	
			<p class="explain">{xen:phrase controller_and_action_criteria_explain}</p>
		</div>
	</li>
	
	<!-- slot: view -->
	<li><label>
		<input type="checkbox" name="page_criteria[view][rule]" value="view" class="Disabler" id="pcrit_view" {xen:checked $pageCriteria.view} />
		{xen:phrase view_class_is}:</label>
		<div class="criteriaQualifier" id="pcrit_view_Disabler">
			<xen:textbox name="page_criteria[view][data][name]" value="{$pageCriteria.view.name}" size="50" />
			<p class="explain">{xen:phrase view_class_criteria_explain}</p>
		</div>
	</li>
	
	<!-- slot: template -->
	<li><label>
		<input type="checkbox" name="page_criteria[template][rule]" value="template" class="Disabler" id="pcrit_template" {xen:checked $pageCriteria.template} />
		{xen:phrase content_template_is}:</label>
		<div class="criteriaQualifier" id="pcrit_template_Disabler">
			<xen:textbox name="page_criteria[template][data][name]" value="{$pageCriteria.template.name}" size="50" />
			<p class="explain">{xen:phrase content_template_criteria_explain}</p>
		</div>
	</li>
	</xen:hook>
</ul>
</xen:controlunit>
</fieldset>

<xen:hook name="page_criteria_extra" />]]></template>
  <template title="helper_criteria_user"><![CDATA[<xen:require css="helper_criteria.css" />

<xen:controlunit label="{xen:phrase privileges_and_status}:">
<ul>
	<xen:hook name="user_criteria_privs">
	<li><label>
		<input type="checkbox" name="user_criteria[is_guest][rule]" value="is_guest" {xen:checked $userCriteria.is_guest} />
		{xen:phrase user_is_guest}</label></li>
	
	<!-- slot: logged_in -->	
	<li><label>
		<input type="checkbox" name="user_criteria[is_logged_in][rule]" value="is_logged_in" {xen:checked $userCriteria.is_logged_in} />
		{xen:phrase user_is_logged_in}</label></li>
	
	<!-- slot: moderator -->	
	<li><label>
		<input type="checkbox" name="user_criteria[is_moderator][rule]" value="is_moderator" {xen:checked $userCriteria.is_moderator} />
		{xen:phrase user_is_moderator}</label></li>
	
	<!-- slot: admin -->	
	<li><label>
		<input type="checkbox" name="user_criteria[is_admin][rule]" value="is_admin" {xen:checked $userCriteria.is_admin} />
		{xen:phrase user_is_administrator}</label></li>
	
	<!-- slot: banned -->	
	<li><label>
		<input type="checkbox" name="user_criteria[is_banned][rule]" value="is_banned" {xen:checked $userCriteria.is_banned} />
		{xen:phrase user_is_banned}</label></li>
		
	<!-- slot: from_search -->	
	<li><label>
		<input type="checkbox" name="user_criteria[from_search][rule]" value="from_search" {xen:checked $userCriteria.from_search} />
		{xen:phrase user_referred_from_search}</label></li>
		
	<!-- slot: facebook -->	
	<li><label>
		<input type="checkbox" name="user_criteria[facebook][rule]" value="facebook" {xen:checked $userCriteria.facebook} />
		{xen:phrase user_associated_with_facebook}</label></li>

	<!-- slot: twitter -->	
	<li><label>
		<input type="checkbox" name="user_criteria[twitter][rule]" value="twitter" {xen:checked $userCriteria.twitter} />
		{xen:phrase user_associated_with_twitter}</label></li>

	<!-- slot: google -->	
	<li><label>
		<input type="checkbox" name="user_criteria[google][rule]" value="google" {xen:checked $userCriteria.google} />
		{xen:phrase user_associated_with_google}</label></li>
	
	<!-- slot: user_state -->
	<li><label>
		<input type="checkbox" name="user_criteria[user_state][rule]" value="user_state" class="Disabler" id="ucrit_user_state" {xen:checked $userCriteria.user_state} />
		{xen:phrase user_state_is}:</label>
		<div class="criteriaQualifier" id="ucrit_user_state_Disabler">
			<xen:select name="user_criteria[user_state][data][state]" value="{$userCriteria.user_state.state}" inputclass="autoSize">
				<xen:option value="valid">{xen:phrase valid}</xen:option>
				<xen:option value="email_confirm">{xen:phrase awaiting_email_confirmation}</xen:option>
				<xen:option value="email_confirm_edit">{xen:phrase awaiting_email_confirmation_from_edit}</xen:option>
				<xen:option value="email_bounce">{xen:phrase email_invalid_bounced}</xen:option>
				<xen:option value="moderated">{xen:phrase awaiting_approval}</xen:option>
			</xen:select>
		</div>
	</li>
	</xen:hook>
</ul>
</xen:controlunit>

<fieldset>
<xen:controlunit label="{xen:phrase user_groups}:">
<ul>
	<xen:hook name="user_criteria_user_groups">
	<li><label>
		<input type="checkbox" name="user_criteria[user_groups][rule]" value="user_groups" class="Disabler" id="ucrit_user_groups" {xen:checked $userCriteria.user_groups} />
		{xen:phrase user_is_member_of_any_of_selected_user_groups}:</label>
		<div class="criteriaQualifier" id="ucrit_user_groups_Disabler">
			<xen:select name="user_criteria[user_groups][data][user_group_ids]" size="4" multiple="true">
				<xen:foreach loop="$userCriteriaData.userGroups" value="$_criteriaUg">
					<xen:option value="{$_criteriaUg.user_group_id}" selected="{$userCriteria.user_groups.user_group_ids} AND in_array({$_criteriaUg.user_group_id}, {$userCriteria.user_groups.user_group_ids})">{$_criteriaUg.title}</xen:option>
				</xen:foreach>
			</xen:select>
		</div>
	</li>
	
	<!-- slot: not_user_groups -->	
	<li><label>
		<input type="checkbox" name="user_criteria[not_user_groups][rule]" value="not_user_groups" class="Disabler" id="ucrit_not_user_groups" {xen:checked $userCriteria.not_user_groups} />
		{xen:phrase user_is_not_member_of_any_of_selected_user_groups}:</label>
		<div class="criteriaQualifier" id="ucrit_not_user_groups_Disabler">
			<xen:select name="user_criteria[not_user_groups][data][user_group_ids]" size="4" multiple="true">
				<xen:foreach loop="$userCriteriaData.userGroups" value="$_criteriaUg">
					<xen:option value="{$_criteriaUg.user_group_id}" selected="{$userCriteria.not_user_groups.user_group_ids} AND in_array({$_criteriaUg.user_group_id}, {$userCriteria.not_user_groups.user_group_ids})">{$_criteriaUg.title}</xen:option>
				</xen:foreach>
			</xen:select> 
		</div>
	</li>
	</xen:hook>
</ul>
</xen:controlunit>
</fieldset>

<fieldset>
<xen:controlunit label="{xen:phrase content_and_achievements}:">
<ul>
	<xen:hook name="user_criteria_content">
	<li><label>
		<input type="checkbox" name="user_criteria[messages_posted][rule]" value="messages_posted" class="Disabler" id="ucrit_messages_posted" {xen:checked $userCriteria.messages_posted} />
		{xen:phrase user_has_posted_at_least_x_messages}:</label>
		<div class="criteriaQualifier" id="ucrit_messages_posted_Disabler">
			<xen:spinbox name="user_criteria[messages_posted][data][messages]" value="{$userCriteria.messages_posted.messages}" size="5" min="0" step="10" />
		</div>
	</li>
	<li><label>
		<input type="checkbox" name="user_criteria[messages_maximum][rule]" value="messages_maximum" class="Disabler" id="ucrit_messages_maximum" {xen:checked $userCriteria.messages_maximum} />
		{xen:phrase user_has_posted_no_more_than_x_messages}:</label>
		<div class="criteriaQualifier" id="ucrit_messages_maximum_Disabler">
			<xen:spinbox name="user_criteria[messages_maximum][data][messages]" value="{$userCriteria.messages_maximum.messages}" size="5" min="0" step="10" />
		</div>
	</li>
	
	<!-- slot: like_count -->	
	<li><label>
		<input type="checkbox" name="user_criteria[like_count][rule]" value="like_count" class="Disabler" id="ucrit_like_count" {xen:checked $userCriteria.like_count} />
		{xen:phrase user_has_received_at_least_x_likes}:</label>
		<div class="criteriaQualifier" id="ucrit_like_count_Disabler">
			<xen:spinbox name="user_criteria[like_count][data][likes]" value="{$userCriteria.like_count.likes}" size="5" min="0" step="10" />
		</div>
	</li>
	
	<!-- slot: like_ratio -->	
	<li><label>
		<input type="checkbox" name="user_criteria[like_ratio][rule]" value="like_ratio" class="Disabler" id="ucrit_like_ratio" {xen:checked $userCriteria.like_ratio} />
		{xen:phrase user_like_message_ratio_is_at_least}:</label>
		<div class="criteriaQualifier" id="ucrit_like_ratio_Disabler">
			<xen:spinbox name="user_criteria[like_ratio][data][ratio]" value="{$userCriteria.like_ratio.ratio}" size="5" min="0" step="0.1" />
			<p class="explain">{xen:phrase like_message_ratio_explanation}</p>
		</div>
	</li>
	
	<!-- slot: trophy_points -->	
	<li><label>
		<input type="checkbox" name="user_criteria[trophy_points][rule]" value="trophy_points" class="Disabler" id="ucrit_trophy_points" {xen:checked $userCriteria.trophy_points} />
		{xen:phrase user_has_at_least_x_trophy_points}:</label>
		<div class="criteriaQualifier" id="ucrit_trophy_points_Disabler">
			<xen:spinbox name="user_criteria[trophy_points][data][points]" value="{$userCriteria.trophy_points.points}" size="5" min="0" step="10" />
		</div>
	</li>
	
	<!-- slot: registered_days -->	
	<li><label>
		<input type="checkbox" name="user_criteria[registered_days][rule]" value="registered_days" class="Disabler" id="ucrit_registered_days" {xen:checked $userCriteria.registered_days} />
		{xen:phrase user_has_been_registered_for_at_least_x_days}:</label>
		<div class="criteriaQualifier" id="ucrit_registered_days_Disabler">
			<xen:spinbox name="user_criteria[registered_days][data][days]" value="{$userCriteria.registered_days.days}" size="5" min="0" step="7" />
		</div>
	</li>
	
	<!-- slot: inactive_days -->	
	<xen:if is="{$showInactiveCriteria}">
		<li><label>
			<input type="checkbox" name="user_criteria[inactive_days][rule]" value="inactive_days" class="Disabler" id="ucrit_inactive_days" {xen:checked $userCriteria.inactive_days} />
			{xen:phrase user_has_not_visited_for_at_least_x_days}:</label>
			<div class="criteriaQualifier" id="ucrit_inactive_days_Disabler">
				<xen:spinbox name="user_criteria[inactive_days][data][days]" value="{$userCriteria.inactive_days.days}" size="5" min="0" ste="7" />
			</div>
		</li>
	</xen:if>
	</xen:hook>
</ul>
</xen:controlunit>
</fieldset>
<fieldset>
<xen:controlunit label="{xen:phrase user_profile_and_options}:">
<ul>
	<xen:hook name="user_criteria_profile">
	<li><label>
		<input type="checkbox" name="user_criteria[gender][rule]" value="gender" class="Disabler" id="ucrit_gender" {xen:checked $userCriteria.gender} />
		{xen:phrase user_is_following_gender}:</label>
		<div class="criteriaQualifier" id="ucrit_gender_Disabler">
			<xen:select name="user_criteria[gender][data][gender]" value="{$userCriteria.gender.gender}" inputclass="autoSize">
				<xen:option value="">({xen:phrase unspecified})</xen:option>
				<xen:option value="male">{xen:phrase male}</xen:option>
				<xen:option value="female">{xen:phrase female}</xen:option>
			</xen:select> 
		</div>
	</li>
	
	<!-- slot: style -->	
	<li><label>
		<input type="checkbox" name="user_criteria[style][rule]" value="style" class="Disabler" id="ucrit_style" {xen:checked $userCriteria.style} />
		{xen:phrase user_is_browsing_with_following_style}:</label>
		<div class="criteriaQualifier" id="ucrit_style_Disabler">
			<xen:select name="user_criteria[style][data][style_id]" value="{$userCriteria.style.style_id}" inputclass="autoSize">
				<xen:foreach loop="$userCriteriaData.styles" value="$_criteriaStyle">
					<xen:option value="{$_criteriaStyle.style_id}">{$_criteriaStyle.title}</xen:option>
				</xen:foreach>
			</xen:select> 
		</div>
	</li>
	
	<!-- slot: language -->	
	<li><label>
		<input type="checkbox" name="user_criteria[language][rule]" value="language" class="Disabler" id="ucrit_language" {xen:checked $userCriteria.language} />
		{xen:phrase user_is_browsing_with_following_language}:</label>
		<div class="criteriaQualifier" id="ucrit_language_Disabler">
			<xen:select name="user_criteria[language][data][language_id]" value="{$userCriteria.language.language_id}" inputclass="autoSize">
				<xen:foreach loop="$userCriteriaData.languages" value="$_criteriaLanguage">
					<xen:option value="{$_criteriaLanguage.language_id}">{$_criteriaLanguage.title}</xen:option>
				</xen:foreach>
			</xen:select> 
		</div>
	</li>
	
	<!-- slot: no_avatar -->	
	<li><label>
		<input type="checkbox" name="user_criteria[no_avatar][rule]" value="no_avatar" {xen:checked $userCriteria.no_avatar} />
		{xen:phrase user_has_no_avatar}</label></li>
		
	</xen:hook>		
</ul>
</xen:controlunit>
</fieldset>

<fieldset>
<xen:controlunit label="{xen:phrase specific_users}:">
<ul>
	<xen:hook name="user_criteria_specific">
	<li><label>
		<input type="checkbox" name="user_criteria[username][rule]" value="username" class="Disabler" id="ucrit_username" {xen:checked $userCriteria.username} />
		{xen:phrase username_is}:</label>
		<div class="criteriaQualifier" id="ucrit_username_Disabler">
			<xen:textbox name="user_criteria[username][data][names]" value="{$userCriteria.username.names}" size="50" rows="1" inputclass="AutoComplete Elastic" />
			<p class="explain">{xen:phrase username_criteria_explain}</p>
		</div>
	</li>
	
	<!-- slot: username_search -->
	<li><label>
		<input type="checkbox" name="user_criteria[username_search][rule]" value="username_search" class="Disabler" id="ucrit_username_search" {xen:checked $userCriteria.username_search} />
		{xen:phrase username_contains}:</label>
		<div class="criteriaQualifier" id="ucrit_username_search_Disabler">
			<xen:textbox name="user_criteria[username_search][data][needles]" value="{$userCriteria.username_search.needles}" size="50" rows="1" inputclass="Elastic" />
			<p class="explain">{xen:phrase username_search_criteria_explain}</p>
		</div>
	</li>
	
	<!-- slot: email_search -->
	<li><label>
		<input type="checkbox" name="user_criteria[email_search][rule]" value="email_search" class="Disabler" id="ucrit_email_search" {xen:checked $userCriteria.email_search} />
		{xen:phrase email_address_contains}:</label>
		<div class="criteriaQualifier" id="ucrit_email_search_Disabler">
			<xen:textbox name="user_criteria[email_search][data][needles]" value="{$userCriteria.email_search.needles}" size="50" rows="1" inputclass="Elastic" />
			<p class="explain">{xen:phrase email_search_criteria_explain}</p>
		</div>
	</li>
	</xen:hook>
</ul>
</xen:controlunit>
</fieldset>

<xen:hook name="user_criteria_extra" />]]></template>
  <template title="helper_criteria_user_date"><![CDATA[<xen:require css="helper_criteria.css" />

<xen:controlunit label="">
<ul>
	<li><label>
		<input type="checkbox" name="user_criteria[birthday][rule]" value="birthday" {xen:checked $userCriteria.birthday} />
		{xen:phrase users_birthday}</label></li>
</ul>
</xen:controlunit>

<xen:if is="!{$noDateFields}">
<fieldset>
<xen:controlunit label="">
<ul>
	<li><label>
		<input type="checkbox" name="user_criteria[after][rule]" value="after" class="Disabler" id="pcrit_after" {xen:checked $userCriteria.after} />
		{xen:phrase criteria_date_time_is_after}:</label>
		<div class="criteriaQualifier" id="pcrit_after_Disabler">
			<input type="date" name="user_criteria[after][data][ymd]" value="{$userCriteria.after.ymd}" class="textCtrl autoSize" />
			<label>{xen:phrase criteria_time}:
			<xen:select name="user_criteria[after][data][hh]" value="{$userCriteria.after.hh}" inputclass="autoSize">
				<xen:options source="$userCriteriaData.hours" />
			</xen:select></label>:<xen:select name="user_criteria[after][data][mm]" value="{$userCriteria.after.mm}" inputclass="autoSize">
				<xen:options source="$userCriteriaData.minutes" />
			</xen:select>
			<p class="explain">{xen:phrase criteria_leave_date_empty}</p>
			<ul>
				<li><label><input type="radio" name="user_criteria[after][data][user_tz]" value="1" {xen:checked '{$userCriteria.after.user_tz}'} />
					{xen:phrase criteria_in_visitor_timezone}</label></li>
				<li><label><input type="radio" name="user_criteria[after][data][user_tz]" value="0" {xen:checked '!{$userCriteria.after.user_tz}'} class="Disabler" id="pcrit_after_tz" />
					{xen:phrase criteria_in_selected_timezone}:</label>
					<ul id="pcrit_after_tz_Disabler">
						<li>
							<xen:select name="user_criteria[after][data][timezone]" inputclass="autoSize"
								value="{xen:if {$userCriteria.after.timezone}, {$userCriteria.after.timezone}, {$visitor.timezone}}">
								<xen:options source="$userCriteriaData.timezones" />
							</xen:select>
						</li>
					</ul>
				</li>
			</ul>
		</div>
	</li>
</ul>
</xen:controlunit>
</fieldset>

<fieldset>
<xen:controlunit label="">
<ul>
	<li><label>
		<input type="checkbox" name="user_criteria[before][rule]" value="before" class="Disabler" id="pcrit_before" {xen:checked $userCriteria.before} />
		{xen:phrase criteria_date_time_is_before}:</label>
		<div class="criteriaQualifier" id="pcrit_before_Disabler">
			<input type="date" name="user_criteria[before][data][ymd]" value="{$userCriteria.before.ymd}" class="textCtrl autoSize" />
			<label>{xen:phrase criteria_time}:
			<xen:select name="user_criteria[before][data][hh]" value="{$userCriteria.before.hh}" inputclass="autoSize">
				<xen:options source="$userCriteriaData.hours" />
			</xen:select></label>:<xen:select name="user_criteria[before][data][mm]" value="{$userCriteria.before.mm}" inputclass="autoSize">
				<xen:options source="$userCriteriaData.minutes" />
			</xen:select>
			<p class="explain">{xen:phrase criteria_leave_date_empty}</p>
			<ul>
				<li><label><input type="radio" name="user_criteria[before][data][user_tz]" value="1" {xen:checked '{$userCriteria.before.user_tz}'} />
					{xen:phrase criteria_in_visitor_timezone}</label></li>
				<li><label><input type="radio" name="user_criteria[before][data][user_tz]" value="0" {xen:checked '!{$userCriteria.before.user_tz}'} class="Disabler" id="pcrit_before_tz" />
					{xen:phrase criteria_in_selected_timezone}:</label>
					<ul id="pcrit_before_tz_Disabler">
						<li>
							<xen:select name="user_criteria[before][data][timezone]" inputclass="autoSize"
								value="{xen:if {$userCriteria.before.timezone}, {$userCriteria.before.timezone}, {$visitor.timezone}}">
								<xen:options source="$userCriteriaData.timezones" />
							</xen:select>
						</li>
					</ul>
				</li>
			</ul>
		</div>
	</li>
</ul>
</xen:controlunit>
</fieldset>
</xen:if>]]></template>
  <template title="helper_criteria_user_field"><![CDATA[<xen:foreach loop="$userCriteriaData.userFieldGroups" key="$userFieldGroupId" value="$userFieldGroup" i="$i">
	<xen:if is="{$userFieldGroup.userFields}">
		<h3 class="sectionHeader">{$userFieldGroup.label}</h3>
		<xen:foreach loop="$userFieldGroup.userFields" key="$userFieldId" value="$userField">
			<dl class="ctrlUnit">
				<dt><label for="userField_{$userField.field_id}">{$userField.title}:</label></dt>
				<dd>
					<ul>
						<li><label>
							<input type="checkbox" name="user_criteria[{$userField.fieldName}][rule]" value="{$userField.fieldName}" class="Disabler" id="userField_{$userField.field_id}" {xen:checked {$userCriteria.{$userField.fieldName}}} />
							<xen:if is="!{$userField.choices}">
								{xen:phrase criteria_userfield_contains_text}:
							<xen:else />
								{xen:phrase criteria_userfield_choice_among}:
							</xen:if></label>
							<div id="userField_{$userField.field_id}_Disabler" class="criteriaQualifier">
								<xen:if is="!{$userField.choices}">
									<xen:textbox name="user_criteria[{$userField.fieldName}][data][text]" value="{$userCriteria.{$userField.fieldName}.text}" />
								<xen:elseif is="{$userField.choiceCount} > 6" />
									<xen:select name="user_criteria[{$userField.fieldName}][data][choices]" size="5" multiple="multiple">
										<xen:foreach loop="$userField.choices" key="$key" value="$value">
											<xen:option value="{$key}" label="{$value}"
												selected="is_array({$userCriteria.{$userField.fieldName}.choices}) AND in_array({$key}, {$userCriteria.{$userField.fieldName}.choices})" />
										</xen:foreach>
									</xen:select>
								<xen:else />
									<xen:checkbox listclass="checkboxColumns">
										<xen:foreach loop="$userField.choices" key="$key" value="$value">
											<xen:option value="{$key}" label="{$value}"
												name="user_criteria[{$userField.fieldName}][data][choices][]"
												selected="is_array({$userCriteria.{$userField.fieldName}.choices}) AND in_array({$key}, {$userCriteria.{$userField.fieldName}.choices})" />
										</xen:foreach>
									</xen:checkbox>
								</xen:if>
							</div>
						</li>
					</ul>
				</dd>
			</dl>
		</xen:foreach>
	</xen:if>
</xen:foreach>]]></template>
  <template title="helper_login_form"><![CDATA[<xen:if is="!{$visitor.user_id}">

<xen:form action="{xen:adminlink 'login/login'}" id="pageLogin">
	<h2 class="textHeading">{xen:phrase log_in}</h2>
	
	<xen:textboxunit label="{xen:phrase your_name_or_email_address}:" name="login" value="{$defaultLogin}" />
	<xen:passwordunit label="{xen:phrase password}:" name="password" />
	<xen:submitunit save="{xen:phrase log_in}" />
	
	<input type="hidden" name="cookie_check" value="1" />
	<input type="hidden" name="redirect" value="{xen:if $redirect, $redirect, $requestPaths.requestUri}" />
</xen:form>

</xen:if>]]></template>
  <template title="helper_node_delete_children"><![CDATA[<xen:if is="{$childNodes}">
	<xen:radiounit label="" name="move_child_nodes">
		<xen:option value="0" selected="true">{xen:phrase delete_this_nodes_children}</xen:option>
		<xen:option value="1" label="{xen:phrase attach_child_nodes_to_another_parent}:">
			<xen:select name="parent_node_id"><xen:options source="$nodeParentOptions" /></xen:select>
		</xen:option>
		<xen:explain>{xen:phrase you_may_move_any_child_nodes_in_order_to_avoid_deleting_them_too}</xen:explain>
	</xen:radiounit>
</xen:if>]]></template>
  <template title="helper_thread_search_criteria"><![CDATA[<xen:textboxunit label="{xen:phrase title}:" name="criteria[title]" value="{$criteria.title}" />

<xen:selectunit label="{xen:phrase prefix}:" name="criteria[prefix_id]" value="{xen:raw $criteria.prefix_id}" size="5" multiple="true">
	<xen:option value="0">({xen:phrase any})</xen:option>
	<xen:option value="-1">({xen:phrase none})</xen:option>
	<xen:options source="$prefixes" />
</xen:selectunit>

<xen:selectunit label="{xen:phrase forum}:" name="criteria[node_id]" value="{xen:raw $criteria.node_id}" size="5" multiple="true">
	<xen:option value="0">({xen:phrase any})</xen:option>
	<xen:foreach loop="$nodes" value="$node">
		<xen:option value="{$node.node_id}" optdisabled="{xen:if "{$node.node_type_id} != 'Forum'", 1}">{xen:string repeat, '&nbsp; ', $node.depth}{$node.title}</xen:option>
	</xen:foreach>
</xen:selectunit>

<xen:textboxunit label="{xen:phrase created_by}:" name="criteria[username]" value="{$criteria.username}" />

<xen:controlunit label="{xen:phrase created_between}:">
	<xen:textbox name="criteria[post_date_start]" value="{$criteria.post_date_start}" type="date" size="15" /> -
	<xen:textbox name="criteria[post_date_end]" value="{$criteria.post_date_end}" type="date" size="15" />
</xen:controlunit>

<xen:controlunit label="{xen:phrase last_post_between}:">
	<xen:textbox name="criteria[last_post_date_start]" value="{$criteria.last_post_date_start}" type="date" size="15" /> -
	<xen:textbox name="criteria[last_post_date_end]" value="{$criteria.last_post_date_end}" type="date" size="15" />
</xen:controlunit>

<xen:controlunit label="{xen:phrase reply_count_between}:" explain="{xen:phrase use_negative_one_specify_no_max}">
	<xen:spinbox name="criteria[reply_count_start]" value="{$criteria.reply_count_start}" size="5" min="0" /> -
	<xen:spinbox name="criteria[reply_count_end]" value="{$criteria.reply_count_end}" size="5" min="-1" />
</xen:controlunit>

<xen:controlunit label="{xen:phrase first_post_likes_between}:" explain="{xen:phrase use_negative_one_specify_no_max}">
	<xen:spinbox name="criteria[first_post_likes_start]" value="{$criteria.first_post_likes_start}" size="5" min="0" /> -
	<xen:spinbox name="criteria[first_post_likes_end]" value="{$criteria.first_post_likes_end}" size="5" min="-1" />
</xen:controlunit>

<xen:controlunit label="{xen:phrase view_count_between}:" explain="{xen:phrase use_negative_one_specify_no_max}">
	<xen:spinbox name="criteria[view_count_start]" value="{$criteria.view_count_start}" size="5" min="0" /> -
	<xen:spinbox name="criteria[view_count_end]" value="{$criteria.view_count_end}" size="5" min="-1" />
</xen:controlunit>

<xen:checkboxunit label="{xen:phrase state}:" name="criteria[discussion_state]">
	<xen:option value="visible" selected="{$criteria.discussion_state.visible}">{xen:phrase visible}</xen:option>
	<xen:option value="deleted" selected="{$criteria.discussion_state.deleted}">{xen:phrase deleted}</xen:option>
	<xen:option value="moderated" selected="{$criteria.discussion_state.moderated}">{xen:phrase moderated}</xen:option>
</xen:checkboxunit>

<xen:checkboxunit label="{xen:phrase locked}:" name="criteria[discussion_open]">
	<xen:option value="1" selected="{$criteria.discussion_open.1}">{xen:phrase unlocked}</xen:option>
	<xen:option value="0" selected="{$criteria.discussion_open.0}">{xen:phrase locked}</xen:option>
</xen:checkboxunit>

<xen:checkboxunit label="{xen:phrase sticky}:" name="criteria[sticky]">
	<xen:option value="0" selected="{$criteria.sticky.0}">{xen:phrase not_sticky}</xen:option>
	<xen:option value="1" selected="{$criteria.sticky.1}">{xen:phrase sticky}</xen:option>
</xen:checkboxunit>]]></template>
  <template title="helper_user_search_criteria"><![CDATA[<fieldset>
	<xen:textboxunit label="{xen:phrase user_name}:" name="criteria[username]" value="{$criteria.username}" type="search" results="10" />

	<xen:textboxunit label="{xen:phrase email}:" name="criteria[email]" value="{$criteria.email}" type="search" results="10" />

	<xen:checkboxunit label="{xen:phrase gender}:" name="criteria[gender]">
		<xen:option value="male" selected="{$criteria.gender.male}">{xen:phrase male}</xen:option>
		<xen:option value="female" selected="{$criteria.gender.female}">{xen:phrase female}</xen:option>
		<xen:option value="unspecified" selected="{$criteria.gender.unspecified}">({xen:phrase unspecified})</xen:option>
	</xen:checkboxunit>
</fieldset>

<fieldset>
	<xen:selectunit label="{xen:phrase primary_user_group}:" name="criteria[user_group_id]"  value="{$criteria.user_group_id}">
		<xen:option value="0">({xen:phrase any})</xen:option>
		<xen:options source="$userGroups" />
	</xen:selectunit>

	<xen:radiounit label="{xen:phrase secondary_user_groups}:" name="criteria[no_secondary_group_ids]" value="{$criteria.no_secondary_group_ids}" >
		<xen:option value="1">{xen:phrase member_of_no_secondary_groups}</xen:option>
		<xen:option value="0" label="{xen:phrase member_of_any_of_these_secondary_groups}:">
			<xen:checkbox name="criteria[secondary_group_ids]" value="{$criteria.secondary_group_ids}" listclass="checkboxColumns">
				<xen:options source="$userGroups" />
			</xen:checkbox>
		</xen:option>
	</xen:radiounit>

	<xen:checkboxunit label="{xen:phrase not_in_secondary_groups}:" name="criteria[not_secondary_group_ids]" value="{$criteria.not_secondary_group_ids}" listclass="checkboxColumns" >
		<xen:options source="$userGroups" />
	</xen:checkboxunit>
</fieldset>

<fieldset>
	<xen:controlunit label="{xen:phrase registered_between}:">
		<xen:textbox name="criteria[register_date_start]" value="{$criteria.register_date_start}" type="date" size="15" /> -
		<xen:textbox name="criteria[register_date_end]" value="{$criteria.register_date_end}" type="date" size="15" />
	</xen:controlunit>

	<xen:controlunit label="{xen:phrase last_visited_between}:" explain="{xen:phrase visits_in_last_hour_may_not_be_considered}">
		<xen:textbox name="criteria[last_activity_start]" value="{$criteria.last_activity_start}" type="date" size="15" /> -
		<xen:textbox name="criteria[last_activity_end]" value="{$criteria.last_activity_end}" type="date" size="15" />
	</xen:controlunit>

	<xen:controlunit label="{xen:phrase message_count_between}:" explain="{xen:phrase use_negative_one_specify_no_max}">
		<xen:spinbox name="criteria[message_count_start]" value="{$criteria.message_count_start}" size="5" min="0" /> -
		<xen:spinbox name="criteria[message_count_end]" value="{$criteria.message_count_end}" size="5" min="-1" />
	</xen:controlunit>

	<xen:controlunit label="{xen:phrase trophy_points_between}:" explain="{xen:phrase use_negative_one_specify_no_max}">
		<xen:spinbox name="criteria[trophy_points_start]" value="{$criteria.trophy_points_start}" size="5" min="0" /> -
		<xen:spinbox name="criteria[trophy_points_end]" value="{$criteria.trophy_points_end}" size="5" min="-1" />
	</xen:controlunit>
</fieldset>

<fieldset>
	<xen:checkboxunit label="{xen:phrase user_state}:" name="criteria[user_state]">
		<xen:option value="valid" selected="{$criteria.user_state.valid}">{xen:phrase valid}</xen:option>
		<xen:option value="email_confirm" selected="{$criteria.user_state.email_confirm}">{xen:phrase awaiting_email_confirmation}</xen:option>
		<xen:option value="email_confirm_edit" selected="{$criteria.user_state.email_confirm_edit}">{xen:phrase awaiting_email_confirmation_from_edit}</xen:option>
		<xen:option value="email_bounce" selected="{$criteria.user_state.email_bounce}">{xen:phrase email_invalid_bounced}</xen:option>
		<xen:option value="moderated" selected="{$criteria.user_state.moderated}">{xen:phrase awaiting_moderation}</xen:option>
	</xen:checkboxunit>

	<xen:checkboxunit label="{xen:phrase banned_state}:" name="criteria[is_banned]">
		<xen:option value="0" selected="{$criteria.is_banned.0}">{xen:phrase not_banned}</xen:option>
		<xen:option value="1" selected="{$criteria.is_banned.1}">{xen:phrase banned}</xen:option>
	</xen:checkboxunit>

	<xen:checkboxunit label="{xen:phrase discouragement_state}:" name="criteria[is_discouraged]">
		<xen:option value="0" selected="{$criteria.is_discouraged.0}">{xen:phrase not_discouraged}</xen:option>
		<xen:option value="1" selected="{$criteria.is_discouraged.1}">{xen:phrase discouraged}</xen:option>
	</xen:checkboxunit>

	<xen:checkboxunit label="{xen:phrase staff_state}:" name="criteria[is_staff]">
		<xen:option value="0" selected="{$criteria.is_staff.0}">{xen:phrase not_staff_member}</xen:option>
		<xen:option value="1" selected="{$criteria.is_staff.1}">{xen:phrase staff_member}</xen:option>
	</xen:checkboxunit>
</fieldset>

<xen:if is="{$customFields}">
	<fieldset>
	<xen:foreach loop="$customFields" value="$field">
		<xen:if is="{$field.isChoice}">
			<xen:checkboxunit label="{$field.title}:" name="criteria[custom][{$field.field_id}]" value="{$criteria.custom.{$field.field_id}}" class="checkboxColumns">
				<xen:foreach loop="{$field.fieldChoices}" key="$val" value="$choice">
					<xen:option value="{xen:if $field.isMultiChoice, 's:{xen:helper strlen, $val}:&quot;{$val}&quot;', $val}">{$choice}</xen:option>
				</xen:foreach>
			</xen:checkboxunit>
			<xen:if is="!{$field.isMultiChoice}">
				<input type="hidden" name="criteria[custom_exact][{$field.field_id}]" value="1" />
			</xen:if>
		<xen:else />
			<xen:textboxunit label="{$field.title}:" name="criteria[custom][{$field.field_id}]" value="{$criteria.custom.{$field.field_id}}" />
		</xen:if>
	</xen:foreach>
	</fieldset>
</xen:if>]]></template>
  <template title="help_page_delete"><![CDATA[<xen:title>{xen:phrase confirm_deletion_of_help_page}: {$site.site_title}</xen:title>
<xen:h1>{xen:phrase confirm_deletion_of_help_page}</xen:h1>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'help-pages/edit', $page}">{$page.title}</xen:breadcrumb>
</xen:navigation>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'help-pages/delete', $page}" class="deleteConfirmForm formOverlay">
	<p>{xen:phrase please_confirm_that_you_want_to_delete_following_help_page}:</p>
	<strong><a href="{xen:adminlink 'help-pages/edit', $page}">{$page.title}</a></strong>

	<xen:submitunit save="{xen:phrase delete_page}" />
	<input type="hidden" name="_xfConfirm" value="1" />
</xen:form>]]></template>
  <template title="help_page_edit"><![CDATA[<xen:title>{xen:if {$page.page_id}, '{xen:phrase edit_help_page}: {$page.title}', '{xen:phrase create_help_page}'}</xen:title>

<xen:if is="{$page.page_id}">
	<xen:navigation>
		<xen:breadcrumb href="{xen:adminlink help-pages}#{xen:helper listitemid, $page.page_id}">{$page.title}</xen:breadcrumb>
	</xen:navigation>
</xen:if>

<xen:form action="{xen:adminlink 'help-pages/save', $page}"
	class="AutoValidator"
	data-redirect="yes"
>
	
	<xen:textboxunit name="title" value="{$title}" label="{xen:phrase title}:" data-livetitletemplate="{xen:if {$page.page_id},
		'{xen:phrase edit_help_page}: <em>%s</em>',
		'{xen:phrase create_help_page}: <em>%s</em>'}"
	/>
	
	<xen:textboxunit name="description" value="{$description}" label="{xen:phrase description}:" />
	
	<xen:textboxunit name="new_page_name" value="{$page.page_name}" label="{xen:phrase url_portion}:">
		<xen:explain>{xen:phrase represents_portion_of_url_after_help_part_identify_page}</xen:explain>
	</xen:textboxunit>

	<xen:spinboxunit label="{xen:phrase display_order}:" name="display_order" value="{$page.display_order}" min="0" step="1" />

	<xen:textboxunit name="content" value="{$template.template}" label="{xen:phrase page_content}:" hint="{xen:phrase you_may_use_html}" code="true" rows="10" inputclass="Elastic OptOut">
		<xen:explain>{xen:phrase you_may_use_xenforo_template_syntax_here}</xen:explain>
	</xen:textboxunit>
				
	<xen:require css="code_event.css" />
	<xen:controlunit label="{xen:phrase php_callback}:">
		<xen:textbox placeholder="{xen:phrase class}" name="callback_class" value="{$page.callback_class}" size="25" maxlength="75" />
		::
		<xen:textbox placeholder="{xen:phrase method}" name="callback_method" value="{$page.callback_method}" size="25" maxlength="75" />
		<div class="eventDescription baseHtml">{xen:phrase page_callback_explanation_html}</div>
	</xen:controlunit>

	<xen:submitunit save="{xen:phrase save_page}">
		<xen:if is="{$page.page_id}">
			<input type="button" value="{xen:phrase delete_page}..." accesskey="d" class="button OverlayTrigger"
				data-href="{xen:adminlink help-pages/delete, $page}" />
		</xen:if>
	</xen:submitunit>

</xen:form>]]></template>
  <template title="help_page_list"><![CDATA[<xen:title>{xen:phrase help_pages}</xen:title>

<xen:topctrl>
	<a href="{xen:adminlink help-pages/add}" class="button">+ {xen:phrase create_help_page}</a>
</xen:topctrl>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<xen:form action="{xen:adminlink help-pages}" class="section AutoValidator">
	
	<xen:if is="{$pages}">
	
		<h2 class="subHeading">
			<xen:include template="filter_list_controls" />
			{xen:phrase help_pages}
		</h2>

		<ol class="FilterList">
		<xen:foreach loop="$pages" value="$page">
			<xen:listitem
				id="{$page.page_id}"
				label="{$page.title}"
				href="{xen:adminlink help-pages/edit, $page}"
				snippet="{$page.description}"
				delete="{xen:adminlink help-pages/delete, $page}"
			/>
		</xen:foreach>
		</ol>
	
		<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:count $pages}</span>', 'total={xen:count $pages}'}</p>
	
	<xen:else />
		<div class="noResults">{xen:phrase no_items_have_been_created_yet}</div>
	</xen:if>
	
</xen:form>]]></template>
  <template title="home"><![CDATA[<xen:if is="{$outdatedTemplates}">
	<p class="importantMessage">
		<a href="{xen:adminlink templates/outdated}">{xen:phrase there_templates_that_may_be_outdated_click_to_review}</a>
	</p>
</xen:if>

<xen:if is="{$serverErrorLogs}">
	<p class="importantMessage">
		<a href="{xen:adminlink logs/server-error}">{xen:phrase server_errors_have_been_logged}</a>
	</p>
</xen:if>

<xen:if is="{$manualDeferredTotal}">
	<p class="importantMessage">
		<a href="{xen:adminlink tools/run-deferred}">{xen:phrase manual_rebuild_processes_have_been_stopped_before_completion}</a>
	</p>
</xen:if>


<xen:require css="splash.css" />
	
<div class="splash">
	<div class="iconicContainer">
		<ul class="iconic">
		
		<xen:hook name="admin_icons_home">
		
		<xen:if is="{$canManageOptions}">
			<li><a href="{xen:adminlink 'options'}" class="options">
				<span class="icon"><span></span></span>
				<span class="linkText">{xen:phrase options}</span>
				</a></li>
		</xen:if>
		
		<!-- slot: pre_add_ons -->
		
		<xen:if is="{$canManageAddOns}">
			<li><a href="{xen:adminlink 'add-ons'}" class="add_ons">
				<span class="icon"><span></span></span>
				<span class="linkText">{xen:phrase add_ons}</span>
				</a></li>
		</xen:if>
		
		<!-- slot: pre_users -->
	
		<xen:if is="{$canManageUsers}">
			<li><a href="{xen:adminlink 'users/list'}" class="users_list list">
				<span class="icon"><span></span></span>
				<span class="linkText">{xen:phrase list_all_users}</span>
				</a></li>
		</xen:if>
		
		<!-- slot: pre_styles -->
				
		<xen:if is="{$canManageStyles}">
			<li><a href="{xen:adminlink 'styles'}" class="styles">
				<span class="icon"><span></span></span>
				<span class="linkText">{xen:phrase styles}</span>
				</a></li>
		</xen:if>
		
		<!-- slot: pre_languages -->
		
		<xen:if is="{$canManageLanguages}">
			<li><a href="{xen:adminlink 'languages'}" class="languages">
				<span class="icon"><span></span></span>
				<span class="linkText">{xen:phrase languages}</span>
				</a></li>
		</xen:if>
		
		<!-- slot: pre_smilies -->
		
		<xen:if is="{$canManageBbCode}">
			<li><a href="{xen:adminlink 'smilies'}" class="smilies">
				<span class="icon"><span></span></span>
				<span class="linkText">{xen:phrase smilies}</span>
				</a></li>
		</xen:if>
		
		<!-- slot: pre_nodes -->
			
		<xen:if is="{$canManageNodes}">
			<li><a href="{xen:adminlink 'nodes'}" class="nodes">
				<span class="icon"><span></span></span>
				<span class="linkText">{xen:phrase display_node_tree}</span>
				</a></li>
		</xen:if>
		
		</xen:hook>
		
		</ul>
	</div>
	
	<div class="sidebar">
		
		<xen:hook name="admin_sidebar_home">
		
		<xen:if is="{$canManageUsers}">
			<xen:form action="{xen:adminlink 'users/list'}" class="section">
				<xen:textbox name="criteria[username]" inputclass="quickSearchText AutoComplete AcSingle" placeholder="{xen:phrase user_name}..." type="search" results="5" />
				<input type="submit" class="button primary quickSearchButton" value="{xen:phrase find_user}" />
				<a href="{xen:adminlink 'users/search'}" class="quickSearchAdvanced">{xen:phrase advanced_search}...</a>
			</xen:form>
		</xen:if>
		
		<!-- slot: pre_member_stats -->
			
		<div class="section">
			<div class="secondaryContent">
				<h3 class="textHeading">{xen:phrase member_statistics}</h3>
				<div class="statsBlock">		
					<a href="{xen:adminlink users/list}"><span class="label">{xen:phrase total_members}:</span> <strong>{xen:number $users.total}</strong></a>	
					<a href="{xen:adminlink users/moderated}"><span class="label">{xen:phrase awaiting_approval}:</span> <strong>{xen:number $users.awaitingApproval}</strong></a>
					<a><span class="label">{xen:phrase total_visitors_online}:</span> <strong>{xen:number $users.online}</strong></a>
				</div>
			</div>
		</div>
		
		<!-- slot:  pre_forum_stats -->
		
		<div class="section">
			<div class="secondaryContent">
				<h3 class="textHeading">{xen:phrase forum_statistics}</h3>
				<div class="statsBlock">
					<a href="{xen:adminlink nodes}"><span class="label">{xen:phrase discussions}:</span> <strong>{xen:number $boardTotals.discussions}</strong></a>	
					<a href="{xen:adminlink nodes}"><span class="label">{xen:phrase messages}:</span> <strong>{xen:number $boardTotals.messages}</strong></a>
				</div>
			</div>
		</div>
		
		<!-- slot: pre_add_ons -->

		<xen:if is="{$canManageAddOns}">
			<xen:include template="sidebar_installed_addons" />
		</xen:if>
	
		</xen:hook>
		
	</div>
</div>]]></template>
  <template title="import.css"><![CDATA[.importRow
{
	padding: 5px 0;
	border-bottom: 1px solid {xen:property primaryLightest};
}

.importRow .stepButton
{
	width: 250px;
	margin-right: 10px;
}]]></template>
  <template title="import_choose"><![CDATA[<xen:title>{xen:phrase import_data}</xen:title>

<p class="importantMessage">{xen:phrase please_close_forum_and_backup_database_before_importing}</p>

<xen:form action="{xen:adminlink import/config}">
	<xen:selectunit label="{xen:phrase select_system_to_import_from}:" name="importer">
		<xen:option value="">&nbsp;</xen:option>
		<xen:options source="$importers" />
	</xen:selectunit>
	
	<xen:checkboxunit label="">
		<xen:option name="retain_keys" label="{xen:phrase retain_imported_ids}">
			<xen:hint>{xen:phrase retain_imported_ids_hint}</xen:hint>
		</xen:option>
	</xen:checkboxunit>
	
	<xen:if is="{$hasImportedData}">
	
		<h2 class="sectionHeader">{xen:phrase previously_imported_data_found}</h2>
	
		<xen:radiounit name="archive" label="{xen:phrase archive_import_log}" value="1">
			<xen:option value="0">{xen:phrase empty_the_import_log_without_archiving}</xen:option>
			<xen:option value="1">
				<xen:label>{xen:phrase archive_the_import_log}:</xen:label>
				<xen:textbox name="table" value="archived_import_log" />
			</xen:option>
			<xen:explain>{xen:phrase previously_imported_data_has_been_found_redirect_break}</xen:explain>
		</xen:radiounit>
	</xen:if>

	<xen:submitunit save="{xen:phrase configure_importer}..." />
</xen:form>

<!--{xen:phrase archive_import_log_explain}-->]]></template>
  <template title="import_complete"><![CDATA[<xen:title>{xen:phrase import_completed}</xen:title>

<div class="baseHtml">
	{xen:phrase this_import_is_now_complete_check_following}:
	<ol>
		<xen:foreach loop="$messages" value="$message">
			<li>{$message}</li>
		</xen:foreach>
		<li>{xen:phrase ensure_that_permissions_correct_for_imported_groups_nodes}</li>
		<li>{xen:phrase rebuild_search_index_sentence}</li>
	</ol>
</div>]]></template>
  <template title="import_complete_confirm"><![CDATA[<xen:title>{xen:phrase complete_import}</xen:title>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'import/import'}">{$importerName}</xen:breadcrumb>
</xen:navigation>

<xen:form action="{xen:adminlink import/complete}" class="formOverlay">

	<p>{xen:phrase are_you_sure_you_want_to_complete_this_import_cant_resume}</p>
	
	<xen:checkboxunit label="{xen:phrase archive_import_log}" value="0">
		<xen:option name="archive">
			<xen:label>{xen:phrase archive_the_import_log}:</xen:label>
			<xen:textbox name="table" value="archived_import_log" />
		</xen:option>
		<xen:explain>{xen:phrase archive_import_log_explain}</xen:explain>
	</xen:checkboxunit>

	<xen:submitunit save="{xen:phrase complete_import}" />
	<input type="hidden" name="_xfConfirm" value="1" />
	
</xen:form>]]></template>
  <template title="import_config_likes"><![CDATA[<xen:title>{xen:phrase configure_like_import}</xen:title>

<xen:form action="{xen:adminlink import/start-step}">
	
	<p>{xen:phrase import_likes_explain}</p>

	<xen:checkboxunit label="">
		<xen:option label="{xen:phrase calculate_names_during_like_import}" name="options[fetchLikeUsers]" selected="false" />
	</xen:checkboxunit>
	
	<xen:submitunit save="{xen:phrase continue}" />
	
	<input type="hidden" name="options[_dummy]" value="1" /> <!-- ensures there are always options -->
	<input type="hidden" name="step" value="{$step}" />
</xen:form>]]></template>
  <template title="import_config_users"><![CDATA[<xen:title>{xen:phrase configure_user_import}</xen:title>

<xen:form action="{xen:adminlink import/start-step}">
	<xen:checkboxunit label="{xen:phrase automatically_merge_users}:">
		<xen:option label="{xen:phrase when_email_addresses_same}" name="options[mergeEmail]" selected="true" />
		<xen:option label="{xen:phrase when_names_same}" name="options[mergeName]"  />
	</xen:checkboxunit>
	
	<xen:checkboxunit label="">
		<xen:option label="{xen:phrase search_for_gravatar_when_users_do_not_have_avatar}" name="options[gravatar]" />
	</xen:checkboxunit>
	
	<xen:submitunit save="{xen:phrase import_users}" />
	
	<input type="hidden" name="options[_dummy]" value="1" /> <!-- ensures there are always options -->
	<input type="hidden" name="step" value="{$step}" />
</xen:form>]]></template>
  <template title="import_failed_users"><![CDATA[<xen:title>{xen:phrase failed_user_imports}</xen:title>

<xen:form action="{xen:adminlink import/import}">
	{xen:phrase following_users_could_not_be_imported_due_to_errors}
	
	<xen:foreach loop="$users" key="$userId" value="$user">
		<fieldset>
			<xen:controlunit label="{xen:phrase user}:">
				<xen:html>{$user.username} <xen:if is="{$user.email}">({$user.email})</xen:if></xen:html>
				<xen:explain>{xen:phrase messages}: {xen:number $user.message_count}, {xen:phrase joined}: {xen:date $user.register_date}</xen:explain>
			</xen:controlunit>
			
			<xen:if is="{$user.failure} == 'username'">
				<xen:controlunit label="{xen:phrase error}:">
					<xen:html><ul><li>{xen:phrase invalid_username}:</li><li><xen:textbox name="resolve[{$userId}][username]" value="{$user.username}" /></li></ul></xen:html>
					<xen:explain>{xen:phrase commas_not_allowed_in_user_names}</xen:explain>
				</xen:controlunit>
			</xen:if>
		</fieldset>
	</xen:foreach>
	
	<xen:submitunit save="{xen:phrase import_users}" />
</xen:form>]]></template>
  <template title="import_ipboard_config"><![CDATA[<xen:title>{xen:phrase configure_importer}: {$name}</xen:title>

<xen:form action="{xen:adminlink import/config}">
	<xen:if is="{$config}">
		<fieldset>
			<xen:controlunit label="{xen:phrase mysql_server}:">{$config.db.host}</xen:controlunit>
			<xen:controlunit label="{xen:phrase mysql_port}:">{$config.db.port}</xen:controlunit>
			<xen:controlunit label="{xen:phrase mysql_user_name}:">{$config.db.username}</xen:controlunit>
			<xen:controlunit label="{xen:phrase mysql_password}:">{$config.db.password}</xen:controlunit>
			<xen:controlunit label="{xen:phrase mysql_database_name}:">{$config.db.dbname}</xen:controlunit>
			<xen:controlunit label="{xen:phrase table_prefix}:">{$config.db.prefix}</xen:controlunit>
			<xen:controlunit label="{xen:phrase force_character_set}:">{$config.db.charset}</xen:controlunit>
		</fieldset>
		
		<xen:controlunit label="{xen:phrase path_to_ipboard}:">{$config.ipboard_path}</xen:controlunit>
		
		<input type="hidden" name="config[db][host]" value="{$config.db.host}" />
		<input type="hidden" name="config[db][port]" value="{$config.db.port}" />
		<input type="hidden" name="config[db][username]" value="{$config.db.username}" />
		<input type="hidden" name="config[db][password]" value="{$config.db.password}" />
		<input type="hidden" name="config[db][dbname]" value="{$config.db.dbname}" />
		<input type="hidden" name="config[db][prefix]" value="{$config.db.prefix}" />
		<input type="hidden" name="config[db][charset]" value="{$config.db.charset}" />
		<input type="hidden" name="config[ipboard_path]" value="{$config.ipboard_path}" />
		<input type="hidden" name="config[retain_keys]" value="{$config.retain_keys}" />
	<xen:else />
		<fieldset>
			<xen:textboxunit label="{xen:phrase mysql_server}:" name="config[db][host]"
				value="{$input.sql_host}" placeholder="$INFO['sql_host']" />
			<xen:textboxunit label="{xen:phrase mysql_port}:" name="config[db][port]"
				value="{$input.sql_port}" />
			<xen:textboxunit label="{xen:phrase mysql_user_name}:" name="config[db][username]"
				value="{$input.sql_user}" placeholder="$INFO['sql_user']" />
			<xen:textboxunit label="{xen:phrase mysql_password}:" name="config[db][password]"
				value="{$input.sql_pass}" placeholder="$INFO['sql_pass']" autocomplete="off" />
			<xen:textboxunit label="{xen:phrase mysql_database_name}:" name="config[db][dbname]"
				value="{$input.sql_database}" placeholder="$INFO['sql_database']" />
			<xen:textboxunit label="{xen:phrase table_prefix}:" name="config[db][prefix]"
				value="{$input.sql_tbl_prefix}" placeholder="$INFO['sql_tbl_prefix']" />
			<xen:textboxunit label="{xen:phrase force_character_set}:" name="config[db][charset]"
				value="">
				<xen:explain>{xen:phrase force_data_read_specific_mysql_character_set}</xen:explain>
			</xen:textboxunit>
		</fieldset>
		
		<xen:textboxunit label="{xen:phrase path_to_ipboard}:" name="config[ipboard_path]"
			value="{$input.ipboard_path}" explain="{xen:phrase path_to_ipboard_explain}" />
			
		<input type="hidden" name="config[retain_keys]" value="{$retainKeys}" />
	</xen:if>
	
	<xen:submitunit save="{xen:phrase validate_configuration}" />
		
	<input type="hidden" name="importer" value="{$importer}" />
</xen:form>]]></template>
  <template title="import_ipboard_config_avatars"><![CDATA[<xen:title>{xen:phrase configure_custom_avatar_import}</xen:title>

<xen:form action="{xen:adminlink import/start-step}">
	<xen:checkboxunit label="">
		<xen:option label="{xen:phrase import_personal_photos_as_avatars}" name="options[importPhotos]"
			hint="{xen:phrase import_personal_photos_as_avatars_explain}" />
	</xen:checkboxunit>
	
	<xen:checkboxunit label="">
		<xen:option label="{xen:phrase fetch_and_store_remote_url_avatars}" name="options[fetchRemote]"
			hint="{xen:phrase fetch_and_store_remote_url_avatars_explain}" />
	</xen:checkboxunit>
	
	<xen:submitunit save="{xen:phrase import_custom_avatars}" />
	
	<input type="hidden" name="options[_dummy]" value="1" /> <!-- ensures there are always options -->
	<input type="hidden" name="step" value="{$step}" />
</xen:form>]]></template>
  <template title="import_ipboard_config_forumpermissions"><![CDATA[<xen:title>{xen:phrase configure_forum_permission_import}</xen:title>

<xen:form action="{xen:adminlink import/start-step}" class="section">

	<div class="baseHtml">{xen:phrase import_forum_permissions_explain, 'source=IP.Board', 'skipLink={xen:adminlink import/import}', 'permLink={xen:adminlink node-permissions}'}</div>
	
	<xen:require css="filter_list.css" />
	<xen:require js="js/xenforo/filter_list.js" />
	
	<h2 class="subHeading">
		<xen:include template="filter_list_controls" />
		{xen:phrase nodes}
	</h2>
	
	<ol class="FilterList">
		<xen:foreach loop="$nodes" value="$node">
			<xen:listitem
				id="{$node.node_id}"
				label="{$node.title}"
				snippet="{$node.node_type_id}"
				class="_depth{$node.depth}">
				<xen:html>
					<label class="secondaryContent">{xen:phrase viewable_by}:
						<xen:select name="options[{$node.node_id}]" value="{$node.permissionState}">
							<xen:option value="public">{xen:phrase all_visitors}</xen:option>
							<xen:option value="memberOnly">{xen:phrase members_only}</xen:option>
							<xen:option value="staffOnly">{xen:phrase staff_only}</xen:option>
						</xen:select>
					</label>
				</xen:html>
			</xen:listitem>
		</xen:foreach>
	</ol>
	
	<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:count $nodes}</span>', 'total={xen:count $nodes}'}</p>
		
	<xen:submitunit save="{xen:phrase import_forum_permissions}" />
		
	<input type="hidden" name="step" value="{$step}" />
</xen:form>]]></template>
  <template title="import_ipboard_config_polls"><![CDATA[<xen:title>{xen:phrase configure_poll_import}</xen:title>

<xen:form action="{xen:adminlink import/start-step}">
	<xen:radiounit label="{xen:phrase question_import_choice}:" name="options[whichQuestion]" value="first">
		<xen:option value="first">{xen:phrase import_the_first_question_found}</xen:option>
		<xen:option value="last">{xen:phrase import_the_last_question_found}</xen:option>
		<xen:explain>{xen:phrase question_import_choice_explain}</xen:explain>
	</xen:radiounit>
	
	<xen:submitunit save="{xen:phrase import_polls}" />
	
	<input type="hidden" name="step" value="{$step}" />
</xen:form>]]></template>
  <template title="import_ipboard_config_usergroups"><![CDATA[<xen:title>{xen:phrase configure_user_group_import}</xen:title>

<xen:form action="{xen:adminlink import/start-step}">

	<xen:controlunit label="">{xen:phrase the_following_values_can_be_found_in_your_ipb_config_file}</xen:controlunit>

	<xen:spinboxunit label="{xen:phrase validating_user_group_id}:" name="options[auth_group]"
		value="{$input.auth_group}" min="1" step="1" size="8">
		<xen:html><code class="muted">$INFO['auth_group']</code></xen:html>
	</xen:spinboxunit>
	
	<xen:spinboxunit label="{xen:phrase guest_user_group_id}:" name="options[guest_group]"
		value="{$input.guest_group}" min="1" step="1" size="8">
		<xen:html><code class="muted">$INFO['guest_group']</code></xen:html>
	</xen:spinboxunit>
	
	<xen:spinboxunit label="{xen:phrase member_user_group_id}:" name="options[member_group]"
		value="{$input.member_group}" min="1" step="1" size="8">
		<xen:html><code class="muted">$INFO['member_group']</code></xen:html>
	</xen:spinboxunit>
	
	<xen:spinboxunit label="{xen:phrase admin_user_group_id}:" name="options[admin_group]"
		value="{$input.admin_group}" min="1" step="1" size="8">
		<xen:html><code class="muted">$INFO['admin_group']</code></xen:html>
	</xen:spinboxunit>
	
	<xen:spinboxunit label="{xen:phrase banned_user_group_id}:" name="options[banned_group]"
		value="{$input.banned_group}" min="1" step="1" size="8">
		<xen:html><code class="muted">$INFO['banned_group']</code></xen:html>
	</xen:spinboxunit>
	
	<xen:submitunit save="{xen:phrase import_user_groups}" />
		
	<input type="hidden" name="step" value="{$step}" />
</xen:form>]]></template>
  <template title="import_merge_users"><![CDATA[<xen:title>{xen:phrase manually_merge_users}</xen:title>

<xen:form action="{xen:adminlink import/import}">
	{xen:phrase following_users_conflicted_with_existing_names_or_emails}
	
	<xen:foreach loop="$users" key="$userId" value="$user">
		<fieldset>
			<xen:controlunit label="{xen:phrase user}:">
				<xen:html>{$user.username} <xen:if is="{$user.email}">({$user.email})</xen:if></xen:html>
				<xen:explain>{xen:phrase messages}: {xen:number $user.message_count}, {xen:phrase joined}: {xen:date $user.register_date}</xen:explain>
			</xen:controlunit>
			
			<xen:radiounit label="" name="resolve[{$userId}][action]">
				<xen:option value="merge" selected="true">{xen:phrase merge_with_existing_user}</xen:option>
				<xen:option value="change" displayif="{$user.conflict} == 'email'">
					<xen:label>{xen:phrase change_conflicting_email_address}:</xen:label>
					<xen:textbox name="resolve[{$userId}][email]" value="{$user.email}" />
				</xen:option>
				<xen:option value="change" displayif="{$user.conflict} == 'name'">
					<xen:label>{xen:phrase change_conflicting_user_name}:</xen:label>
					<xen:textbox name="resolve[{$userId}][username]" value="{$user.username}" />
				</xen:option>
				<xen:option value="change" displayif="{$user.conflict} == 'both'">
					<xen:label>{xen:phrase change_conflicting_user_name_and_email_address}:</xen:label>
					<xen:disabled>
						<xen:textbox name="resolve[{$userId}][username]" value="{$user.username}" />
						<xen:textbox name="resolve[{$userId}][email]" value="{$user.email}" />
					</xen:disabled>
				</xen:option>
			</xen:radiounit>
		</fieldset>
	</xen:foreach>
	
	<xen:submitunit save="{xen:phrase merge_users}" />
</xen:form>]]></template>
  <template title="import_mybb_config"><![CDATA[<xen:title>{xen:phrase configure_importer}: {$name}</xen:title>

<xen:form action="{xen:adminlink import/config}">
	<xen:textboxunit label="{xen:phrase mysql_server}:" name="config[db][host]" value="localhost"
		placeholder="$config['database']['hostname']" />
	<xen:textboxunit label="{xen:phrase mysql_port}:" name="config[db][port]" value="3306"
		placeholder="$dbport" />
	<xen:textboxunit label="{xen:phrase mysql_user_name}:" name="config[db][username]"
		placeholder="$config['database']['username']" />
	<xen:textboxunit label="{xen:phrase mysql_password}:" name="config[db][password]"
		placeholder="$config['database']['password']" autocomplete="off" />
	<xen:textboxunit label="{xen:phrase mysql_database_name}:" name="config[db][dbname]"
		placeholder="$config['database']['database']" />
	<xen:textboxunit label="{xen:phrase table_prefix}:" name="config[db][prefix]" value="mybb_"
		placeholder="$config['database']['table_prefix']" />
	<xen:textboxunit label="{xen:phrase database_character_set}:" name="config[db][charset]" value="utf-8"
		placeholder="$config['database']['encoding']" />

	<xen:textboxunit label="{xen:phrase default_language_character_set}:" name="config[charset]" value="utf-8" />
	
	<fieldset>
		<xen:textboxunit label="{xen:phrase attachment_path}:" name="config[attachmentPath]" value="uploads" />
	</fieldset>
		
	<xen:submitunit save="{xen:phrase validate_configuration}" />
		
	<input type="hidden" name="config[retain_keys]" value="{$retainKeys}" />
	<input type="hidden" name="importer" value="{$importer}" />
</xen:form>]]></template>
  <template title="import_phpbb3_config"><![CDATA[<xen:title>{xen:phrase configure_importer}: {$name}</xen:title>

<xen:form action="{xen:adminlink import/config}">
	<xen:textboxunit label="{xen:phrase mysql_server}:" name="config[db][host]" value="localhost"
		placeholder="$dbhost" />
	<xen:textboxunit label="{xen:phrase mysql_port}:" name="config[db][port]" value="3306"
		placeholder="$dbport" />
	<xen:textboxunit label="{xen:phrase mysql_user_name}:" name="config[db][username]"
		placeholder="$dbuser" />
	<xen:textboxunit label="{xen:phrase mysql_password}:" name="config[db][password]"
		placeholder="$dbpasswd" autocomplete="off" />
	<xen:textboxunit label="{xen:phrase mysql_database_name}:" name="config[db][dbname]"
		placeholder="$dbname" />
	<xen:textboxunit label="{xen:phrase table_prefix}:" name="config[db][prefix]"
		placeholder="$table_prefix" />
	
	<fieldset>
		<xen:textboxunit label="{xen:phrase custom_avatar_path}:" name="config[avatarPath]" value="images/avatars/upload" />
		<xen:textboxunit label="{xen:phrase attachment_path}:" name="config[attachmentPath]" value="files" />
	</fieldset>
		
	<xen:submitunit save="{xen:phrase validate_configuration}" />
		
	<input type="hidden" name="config[retain_keys]" value="{$retainKeys}" />
	<input type="hidden" name="importer" value="{$importer}" />
</xen:form>]]></template>
  <template title="import_phpbb3_config_forumpermissions"><![CDATA[<xen:title>{xen:phrase configure_forum_permission_import}</xen:title>

<xen:form action="{xen:adminlink import/start-step}" class="section">

	<div class="baseHtml">{xen:phrase import_forum_permissions_explain, 'source=phpBB', 'skipLink={xen:adminlink import/import}', 'permLink={xen:adminlink node-permissions}'}</div>
	
	<xen:require css="filter_list.css" />
	<xen:require js="js/xenforo/filter_list.js" />
	
	<h2 class="subHeading">
		<xen:include template="filter_list_controls" />
		{xen:phrase nodes}
	</h2>
	
	<ol class="FilterList">
		<xen:foreach loop="$nodes" value="$node">
			<xen:listitem
				id="{$node.node_id}"
				label="{$node.title}"
				snippet="{$node.node_type_id}"
				class="_depth{$node.depth}">
				<xen:html>
					<label class="secondaryContent">{xen:phrase viewable_by}:
						<xen:select name="options[{$node.node_id}]" value="{$node.permissionState}">
							<xen:option value="public">{xen:phrase all_visitors}</xen:option>
							<xen:option value="memberOnly">{xen:phrase members_only}</xen:option>
							<xen:option value="staffOnly">{xen:phrase staff_only}</xen:option>
						</xen:select>
					</label>
				</xen:html>
			</xen:listitem>
		</xen:foreach>
	</ol>
	
	<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:count $nodes}</span>', 'total={xen:count $nodes}'}</p>
		
	<xen:submitunit save="{xen:phrase import_forum_permissions}" />
		
	<input type="hidden" name="step" value="{$step}" />
</xen:form>]]></template>
  <template title="import_restart"><![CDATA[<xen:title>{xen:phrase import_in_progress}</xen:title>

<xen:form action="{xen:adminlink import/import}">
	{xen:phrase import_is_currently_in_progress_if_returning_click}
	
	<xen:submitunit save="{xen:phrase continue_importing}" />
</xen:form>

<xen:form action="{xen:adminlink import}">
	{xen:phrase you_may_also_start_fresh_import_imported_data_still_exists}
	
	<xen:checkboxunit label="">
		<xen:option name="reset" label="{xen:phrase start_fresh_import}" />
	</xen:checkboxunit>
	
	<xen:submitunit save="{xen:phrase restart}" />
</xen:form>]]></template>
  <template title="import_smf_config"><![CDATA[<xen:title>{xen:phrase configure_importer}: {$name}</xen:title>

<xen:form action="{xen:adminlink import/config}">
	<xen:textboxunit label="{xen:phrase mysql_server}:" name="config[db][host]" value="localhost"
		placeholder="$db_server" />
	<xen:textboxunit label="{xen:phrase mysql_port}:" name="config[db][port]" value="3306"
		placeholder="$db_port" />
	<xen:textboxunit label="{xen:phrase mysql_user_name}:" name="config[db][username]"
		placeholder="$db_user" />
	<xen:textboxunit label="{xen:phrase mysql_password}:" name="config[db][password]"
		placeholder="$db_passwd" autocomplete="off" />
	<xen:textboxunit label="{xen:phrase mysql_database_name}:" name="config[db][dbname]"
		placeholder="$db_name" />
	<xen:textboxunit label="{xen:phrase table_prefix}:" name="config[db][prefix]"
		placeholder="$db_prefix" />
		
	<xen:submitunit save="{xen:phrase validate_configuration}" />
		
	<input type="hidden" name="config[retain_keys]" value="{$retainKeys}" />
	<input type="hidden" name="importer" value="{$importer}" />
</xen:form>]]></template>
  <template title="import_smf_config_attachments"><![CDATA[<xen:title>{xen:phrase import_smf_config_configure_attachment_directories}: {$name}</xen:title>

<xen:form action="{xen:adminlink import/config}">

	<xen:controlunit label="{xen:phrase import_smf_config_attachment_directories}:" explain="{xen:phrase import_smf_config_attachment_directories_explain}">
		<xen:foreach loop="$attachPaths" key="$folderId" value="$path">
			<li>
				<xen:textbox name="config[attachmentPaths][{$folderId}]" value="{$path}" />
			</li>
		</xen:foreach>
	</xen:controlunit>
	
	<xen:textboxunit label="{xen:phrase custom_avatar_directory}:" name="config[avatarPath]" placeholder="{xen:phrase import_smf_config_avatar_directory_if_different}" />
		
	<xen:submitunit save="{xen:phrase import_smf_config_validate_directories}" />
		
	<input type="hidden" name="config[db][host]" value="{$config.db.host}" />
	<input type="hidden" name="config[db][port]" value="{$config.db.port}" />
	<input type="hidden" name="config[db][username]" value="{$config.db.username}" />
	<input type="hidden" name="config[db][password]" value="{$config.db.password}" />
	<input type="hidden" name="config[db][dbname]" value="{$config.db.dbname}" />
	<input type="hidden" name="config[db][prefix]" value="{$config.db.prefix}" />
		
	<input type="hidden" name="config[retain_keys]" value="{$config.retain_keys}" />
	<input type="hidden" name="importer" value="{$importer}" />
</xen:form>]]></template>
  <template title="import_steps"><![CDATA[<xen:title>{xen:phrase import_data}: {$importerName}</xen:title>

<xen:require css="import.css" />

<form action="{xen:adminlink import/start-step}" method="post">
<ol>
<xen:foreach loop="$steps" key="$step" value="$info">
	<li class="importRow">
		<xen:if is="{$info.hasRun}">
			<input type="submit" name="step_{$step}" value="{$info.title}" class="button stepButton disabled" disabled="disabled" />
			
			{xen:phrase imported_x_items, 'count={xen:number $info.importTotal}'}
			<xen:if is="{$info.runTime}">
				(<xen:if is="{$info.runTime.hours}">{xen:phrase x_hours, 'count={xen:number $info.runTime.hours}'} </xen:if><xen:if is="{$info.runTime.minutes}">{xen:phrase x_minutes, 'count={xen:number $info.runTime.minutes}'} </xen:if>{xen:phrase x_seconds, 'time={xen:number $info.runTime.seconds, 2}'})
			</xen:if>
		<xen:elseif is="{$info.runnable}" />
			<input type="submit" name="step_{$step}" value="{$info.title}" class="button stepButton" />
		<xen:else />
			<input type="submit" name="step_{$step}" value="{$info.title}" class="button stepButton disabled" disabled="disabled" />
			
			{xen:phrase this_step_cannot_be_run_yet}
		</xen:if>
	</li>
</xen:foreach>
	
	<li class="importRow">
		<a href="{xen:adminlink import/complete}" class="button stepButton OverlayTrigger">{xen:phrase complete_import}...</a>
	</li>
</ol>
	
	<input type="hidden" name="_xfToken" value="{$visitor.csrf_token_page}" />
</form>]]></template>
  <template title="import_step_run"><![CDATA[<xen:title>{xen:if $message, "({$message}) "}Import Data: {$importerName}</xen:title>
<xen:h1>{xen:phrase import_data}: {$importerName}</xen:h1>

{$stepInfo.title}... {$message} <img src="{xen:property imagePath}/xenforo/widgets/ajaxload.info_000000_facebook.gif" alt="" id="loadingImage" style="visibility:hidden; width: 16px; height: 11px; border: none;" onerror="this.style.display='none'" />

<form action="{xen:adminlink import/import}" method="post" id="continueForm">
	<input type="submit" value="{xen:phrase continue}" class="button" />
	
	<input type="hidden" name="_xfToken" value="{$visitor.csrf_token_page}" />
</form>

<script>
$(function() {
	$('#loadingImage').css('visibility', 'visible');
	$('#continueForm .button').hide();
	$('#continueForm').submit();
});
</script>]]></template>
  <template title="import_vbulletin_config"><![CDATA[<xen:title>{xen:phrase configure_importer}: {$name}</xen:title>

<xen:form action="{xen:adminlink import/config}">
	<xen:if is="{$config}">
		<xen:controlunit label="{xen:phrase mysql_server}:">{$config.db.host}</xen:controlunit>
		<xen:controlunit label="{xen:phrase mysql_port}:">{$config.db.port}</xen:controlunit>
		<xen:controlunit label="{xen:phrase mysql_user_name}:">{$config.db.username}</xen:controlunit>
		<xen:controlunit label="{xen:phrase mysql_password}:">{$config.db.password}</xen:controlunit>
		<xen:controlunit label="{xen:phrase mysql_database_name}:">{$config.db.dbname}</xen:controlunit>
		<xen:controlunit label="{xen:phrase table_prefix}:">{$config.db.prefix}</xen:controlunit>
		<xen:controlunit label="{xen:phrase force_character_set}:">{$config.db.charset}</xen:controlunit>
		
		<input type="hidden" name="config[db][host]" value="{$config.db.host}" />
		<input type="hidden" name="config[db][port]" value="{$config.db.port}" />
		<input type="hidden" name="config[db][username]" value="{$config.db.username}" />
		<input type="hidden" name="config[db][password]" value="{$config.db.password}" />
		<input type="hidden" name="config[db][dbname]" value="{$config.db.dbname}" />
		<input type="hidden" name="config[db][prefix]" value="{$config.db.prefix}" />
		<input type="hidden" name="config[db][charset]" value="{$config.db.charset}" />
		
		<xen:if is="{$attachmentPath} OR {$avatarPath}">
			<div>{xen:phrase attachments_or_avatars_being_stored_in_file_system_confirm_path}</div>
		</xen:if>
		
		<xen:if is="{$attachmentPath}">
			<xen:textboxunit label="{xen:phrase attachments_directory}:" name="config[attachmentPath]" value="{$attachmentPath}" />
		</xen:if>
		<xen:if is="{$avatarPath}">
			<xen:textboxunit label="{xen:phrase custom_avatar_directory}:" name="config[avatarPath]" value="{$avatarPath}" />
		</xen:if>
		<input type="hidden" name="config[retain_keys]" value="{$config.retain_keys}" />
	<xen:else />
		<xen:textboxunit label="{xen:phrase mysql_server}:" name="config[db][host]"
			value="{$input.MasterServer.servername}" placeholder="$config['MasterServer']['servername']" />
		<xen:textboxunit label="{xen:phrase mysql_port}:" name="config[db][port]"
			value="{$input.MasterServer.port}" placeholder="$config['MasterServer']['port']" />
		<xen:textboxunit label="{xen:phrase mysql_user_name}:" name="config[db][username]"
			value="{$input.MasterServer.username}" placeholder="$config['MasterServer']['username']" />
		<xen:textboxunit label="{xen:phrase mysql_password}:" name="config[db][password]"
			value="{$input.MasterServer.password}" placeholder="$config['MasterServer']['password']" autocomplete="off" />
		<xen:textboxunit label="{xen:phrase mysql_database_name}:" name="config[db][dbname]"
			value="{$input.Database.dbname}" placeholder="$config['Database']['dbname']" />
		<xen:textboxunit label="{xen:phrase table_prefix}:" name="config[db][prefix]"
			value="{$input.Database.tableprefix}" placeholder="$config['Database']['tableprefix']" />
		<xen:textboxunit label="{xen:phrase force_character_set}:" name="config[db][charset]"
			value="{$input.Mysqli.charset}" placeholder="$config['Mysqli']['charset']">
			<xen:explain>{xen:phrase if_setting_character_set_in_vbulletin_via_config_enter_here}</xen:explain>
		</xen:textboxunit>
		<input type="hidden" name="config[retain_keys]" value="{$retainKeys}" />
	</xen:if>
	
	<xen:submitunit save="{xen:phrase validate_configuration}" />
		
	<input type="hidden" name="importer" value="{$importer}" />
</xen:form>]]></template>
  <template title="import_xenforo_config"><![CDATA[<xen:title>{xen:phrase configure_importer}: {$name}</xen:title>

<xen:form action="{xen:adminlink import/config}">
	<xen:if is="{$config}">
		<xen:controlunit label="{xen:phrase mysql_server}:">{$config.db.host}</xen:controlunit>
		<xen:controlunit label="{xen:phrase mysql_port}:">{$config.db.port}</xen:controlunit>
		<xen:controlunit label="{xen:phrase mysql_user_name}:">{$config.db.username}</xen:controlunit>
		<xen:controlunit label="{xen:phrase mysql_password}:">{$config.db.password}</xen:controlunit>
		<xen:controlunit label="{xen:phrase mysql_database_name}:">{$config.db.dbname}</xen:controlunit>
		<xen:controlunit label="{xen:phrase data_directory}:">{$config.dir.data}</xen:controlunit>
		<xen:controlunit label="{xen:phrase internal_data_directory}:">{$config.dir.internal_data}</xen:controlunit>
		
		<input type="hidden" name="config[db][host]" value="{$config.db.host}" />
		<input type="hidden" name="config[db][port]" value="{$config.db.port}" />
		<input type="hidden" name="config[db][username]" value="{$config.db.username}" />
		<input type="hidden" name="config[db][password]" value="{$config.db.password}" />
		<input type="hidden" name="config[db][dbname]" value="{$config.db.dbname}" />
		<input type="hidden" name="config[dir][data]" value="{$config.dir.data}" />
		<input type="hidden" name="config[dir][internal_data]" value="{$config.dir.internal_data}" />
		
		<input type="hidden" name="config[retain_keys]" value="{$config.retain_keys}" />
	<xen:else />
		<xen:textboxunit
			label="{xen:phrase mysql_server}:"
			name="config[db][host]"
			value="{$input.db.host}"
			placeholder="$config['db']['host']" />
		<xen:textboxunit
			label="{xen:phrase mysql_port}:"
			name="config[db][port]"
			value="{$input.db.port}"
			placeholder="$config['db']['port']" />
		<xen:textboxunit
			label="{xen:phrase mysql_user_name}:"
			name="config[db][username]"
			value="{$input.db.username}"
			placeholder="$config['db']['username']" />
		<xen:textboxunit
			label="{xen:phrase mysql_password}:"
			name="config[db][password]"
			value="{$input.db.password}"
			placeholder="$config['db']['password']" autocomplete="off" />
		<xen:textboxunit
			label="{xen:phrase mysql_database_name}:"
			name="config[db][dbname]"
			value="{$input.db.dbname}"
			placeholder="$config['db']['dbname']" />			
		<xen:textboxunit
			label="{xen:phrase data_directory}:"
			name="config[dir][data]"
			value="{$input.dir.data}"
			placeholder="/path/to/data" />
		<xen:textboxunit
			label="{xen:phrase internal_data_directory}:"
			name="config[dir][internal_data]"
			value="{$input.dir.internal_data}"
			placeholder="/path/to/internal_data">
			<xen:explain>{xen:phrase import_xenforo_config_data_dirs_explain}</xen:explain>
		</xen:textboxunit>
		
		<input type="hidden" name="config[retain_keys]" value="{$retainKeys}" />
	</xen:if>
	
	<xen:submitunit save="{xen:phrase validate_configuration}" />
		
	<input type="hidden" name="importer" value="{$importer}" />
</xen:form>]]></template>
  <template title="ip_users"><![CDATA[<xen:title>{xen:phrase users_logged_at_ip, 'ip={$ipPrintable}'}</xen:title>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'users/search'}">{xen:phrase search_for_users}</xen:breadcrumb>
</xen:navigation>

<xen:require css="user_ips.css" />

<div class="section ipUserList">
	<ol class="overlayScroll">
	<xen:foreach loop="$users" key="$userId" value="$user">
		<li class="primaryContent">
			<xen:avatar user="$user" size="s" img="true" />
			<xen:username user="$user" href="{xen:adminlink users/edit, $user}" class="NoOverlay" />
			<div class="userBlurb">{xen:helper userblurb, $user}</div>
			<xen:datetime time="$user.log_date" />
		</li>
	</xen:foreach>
	</ol>
	<div class="sectionFooter overlayOnly"><a class="button primary OverlayCloser">{xen:phrase close}</a></div>
</div>]]></template>
  <template title="language_delete"><![CDATA[<xen:title>{xen:phrase confirm_deletion_of_language}: {$language.title}</xen:title>
<xen:h1>{xen:phrase confirm_deletion_of_language}</xen:h1>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'languages/edit', $language}">{$language.title}</xen:breadcrumb>
</xen:navigation>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'languages/delete'}" class="deleteConfirmForm formOverlay">

	<p>{xen:phrase please_confirm_that_you_want_to_delete_following_language}:</p>
	<strong><a href="{xen:adminlink 'languages/edit', $language}">{$language.title}</a></strong>

	<input type="hidden" name="language_id" value="{$language.language_id}" />

	<xen:submitunit save="{xen:phrase delete_language}" />
	<input type="hidden" name="_xfConfirm" value="1" />
	
</xen:form>]]></template>
  <template title="language_edit"><![CDATA[<xen:title>{xen:if {$language.language_id}, '{xen:phrase edit_language}: {$language.title}', '{xen:phrase create_new_language}'}</xen:title>

<xen:if is="{$language.language_id}">
	<xen:navigation>
		<xen:breadcrumb href="{xen:adminlink languages}#{xen:helper listitemid, $language.language_id}">{$language.title}</xen:breadcrumb>
	</xen:navigation>
	
	<xen:topctrl>
		<a href="{xen:adminlink 'languages/phrases', $language}" class="button">{xen:phrase phrases}</a>
	</xen:topctrl>
</xen:if>

<xen:form action="{xen:adminlink 'languages/save', $language}" class="AutoValidator" data-redirect="yes">

	<fieldset>
		<xen:textboxunit name="title" value="{$language.title}" label="{xen:phrase title}:" data-livetitletemplate="{xen:if {$language.language_id},
			'{xen:phrase edit_language}: <em>%s</em>',
			'{xen:phrase create_new_language}: <em>%s</em>'}" />
		
		<xen:selectunit name="parent_id" value="{$language.parent_id}" label="{xen:phrase parent_language}:">
			<xen:option value="0">{xen:phrase no_parent}</xen:option>
			<xen:options source="$languageParents" />
		</xen:selectunit>
	</fieldset>

	<fieldset>
		<xen:selectunit name="language_code" value="{$language.language_code}" label="{xen:phrase locale}:">
			<xen:option value="">&nbsp;</xen:option>
			<xen:options source="$locales" />
		</xen:selectunit>
		
		<xen:radiounit name="text_direction" value="{$language.text_direction}" label="{xen:phrase text_direction}:">
			<xen:option value="LTR">{xen:phrase left_to_right}</xen:option>
			<xen:option value="RTL">{xen:phrase right_to_left}</xen:option>
		</xen:radiounit>
		
		<xen:textboxunit label="{xen:phrase decimal_point_character}:" name="decimal_point" value="{$language.decimal_point}" maxlength="1" size="15" />
		<xen:textboxunit label="{xen:phrase thousands_separator}:" name="thousands_separator" value="{$language.thousands_separator}" maxlength="1" size="15" />
	</fieldset>

	<fieldset>
		<xen:radiounit name="date_format" value="{$language.date_format}" label="{xen:phrase date_format}:" explain="{xen:phrase see_php_manual_date_format_information}">
			<xen:foreach loop="$dateFormats" key="$format" value="$date">
				<xen:option value="{$format}" hint="{$format}">{$date}</xen:option>
			</xen:foreach>
			<xen:option value="" selected="!{$dateFormats.{$language.date_format}}" label="{xen:phrase other}:">
				<xen:textbox name="date_format_other" value="{xen:if {$dateFormats.{$language.date_format}}, '', {$language.date_format}}" size="15" />
			</xen:option> 
		</xen:radiounit>
	</fieldset>

	<fieldset>
		<xen:radiounit name="time_format" value="{$language.time_format}" label="{xen:phrase time_format}:" explain="{xen:phrase see_php_manual_date_format_information}">
			<xen:foreach loop="$timeFormats" key="$format" value="$time">
				<xen:option value="{$format}" hint="{$format}">{$time}</xen:option>
			</xen:foreach>
			<xen:option value="" selected="!{$timeFormats.{$language.time_format}}" label="{xen:phrase other}:">
				<xen:textbox name="time_format_other" value="{xen:if {$timeFormats.{$language.time_format}}, '', {$language.time_format}}" size="15" />
			</xen:option> 
		</xen:radiounit>
	</fieldset>

	<xen:submitunit save="{xen:phrase save_language}">
		<xen:if is="{$language.language_id}">
			<input type="button" value="{xen:phrase delete_language}..." accesskey="d" class="button OverlayTrigger"\
				data-href="{xen:adminlink languages/delete, $language}" />
		</xen:if>
	</xen:submitunit>
</xen:form>]]></template>
  <template title="language_export"><![CDATA[<xen:title>{xen:phrase export_language}: {$language.title}</xen:title>

<xen:form action="{xen:adminlink languages/export, $language}">
	<xen:controlunit label="{xen:phrase language}:">{$language.title}</xen:controlunit>
	<xen:selectunit name="addon_id" label="{xen:phrase export_from_add_on}:">
		<xen:option value="">({xen:phrase all})</xen:option>
		<xen:options source="$addOnOptions" />
	</xen:selectunit>
	<xen:checkboxunit label="">
		<xen:option name="untranslated" label="{xen:phrase get_untranslated_phrases}">
			<xen:hint>{xen:phrase helpful_if_wish_to_translate_language_using_xml_file}</xen:hint>
		</xen:option>
	</xen:checkboxunit>
	<xen:submitunit save="{xen:phrase export_language}" saveclass="OverlayCloser" resetclass="OverlayCloser" />

	<input type="hidden" name="_xfConfirm" value="1" />
</xen:form>]]></template>
  <template title="language_import"><![CDATA[<xen:title>{xen:phrase import_language}</xen:title>

<xen:form action="{xen:adminlink languages/import}" upload="true">

	<xen:uploadunit label="{xen:phrase import_from_uploaded_xml_file}:" name="upload" />
	
	<xen:radiounit label="{xen:phrase import_as}:" name="target">

		<xen:option label="{xen:phrase child_of_language}:" value="new" selected="true">
			<xen:select name="parent_language_id" value="0">
				<xen:option value="0">({xen:phrase no_parent})</xen:option>
				<xen:foreach loop="$languages" value="$language">
					<xen:option value="{$language.language_id}" depth="{$language.depth}">{$language.title}</xen:option>
				</xen:foreach>
			</xen:select>
		</xen:option>
		
		<xen:option label="{xen:phrase overwrite_language}:" value="overwrite">
			<xen:select name="overwrite_language_id">
				<xen:foreach loop="$languages" value="$language">
					<xen:option value="{$language.language_id}" depth="{$language.depth}">{$language.title}</xen:option>
				</xen:foreach>
			</xen:select>
		</xen:option>

	</xen:radiounit>
	
	<xen:submitunit save="{xen:phrase import}" />

	<input type="hidden" name="_xfConfirm" value="1" />
</xen:form>]]></template>
  <template title="language_list"><![CDATA[<xen:title>{xen:phrase languages}</xen:title>

<xen:topctrl>
	<a href="{xen:adminlink 'languages/add'}" class="button">+ {xen:phrase create_new_language}</a>
	<a href="{xen:adminlink 'languages/import'}" class="button">{xen:phrase import_language}</a>
</xen:topctrl>

<xen:form action="{xen:adminlink options/save, '', '_languages=1'}" class="section AutoValidator">

	<xen:require css="filter_list.css" />
	<xen:require js="js/xenforo/filter_list.js" />

	<h2 class="subHeading">
		<xen:include template="filter_list_controls" />
		{xen:phrase languages}
	</h2>

	<ol class="FilterList">
		<xen:if is="{$masterLanguage}">
			<xen:listitem
				id="_master_language"
				label="{$masterLanguage.title}"
				delete="#">
				<xen:html>
					<span class="secondaryContent"><span style="visibility: hidden">{xen:phrase export}</span></span>
					<a href="{xen:adminlink 'languages/phrases', $masterLanguage}" class="secondaryContent">{xen:phrase phrases}</a>
				</xen:html>
			</xen:listitem>
		</xen:if>

		<xen:foreach loop="$languages" value="$language">
			<xen:listitem
				id="{$language.language_id}"
				href="{xen:adminlink 'languages/edit', $language}"
				label="{$language.title}"
				delete="{xen:adminlink 'languages/delete', $language}"
				class="_depth{$language.depth}">
				<xen:html>
					<a href="{xen:adminlink 'languages/export', $language}" class="secondaryContent OverlayTrigger">{xen:phrase export}</a>
					<a href="{xen:adminlink 'languages/phrases', $language}" class="secondaryContent">{xen:phrase phrases}</a>
					<label class="secondaryContent Tooltip" data-offsetx="3" title="{xen:phrase set_x_as_default_language, 'title={$language.title}'}">
						<input type="radio" name="options[defaultLanguageId]" class="SubmitOnChange"
							value="{$language.language_id}" {xen:checked '{$xenOptions.defaultLanguageId} == {$language.language_id}'} /></label>
				</xen:html>
			</xen:listitem>
		</xen:foreach>
	</ol>

	<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:number $totalLanguages}</span>', 'total={xen:number $totalLanguages}'}</p>

</xen:form>]]></template>
  <template title="link_forum_delete"><![CDATA[<xen:title>{xen:phrase confirm_deletion_of_link_forum}: {$link.title}</xen:title>
<xen:h1>{xen:phrase confirm_deletion_of_link_forum}</xen:h1>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'link-forums/edit', $link}">{$link.title}</xen:breadcrumb>
</xen:navigation>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'link-forums/delete'}" class="deleteConfirmForm formOverlay">

	<p>{xen:phrase please_confirm_that_you_want_to_delete_following_link_forum}:</p>
	<strong><a href="{xen:adminlink 'link-forums/edit', $link}">{$link.title}</a></strong>

	<xen:include template="helper_node_delete_children" />

	<input type="hidden" name="node_id" value="{$link.node_id}" />

	<xen:submitunit save="{xen:phrase delete_link_forum}" />
	<input type="hidden" name="_xfConfirm" value="1" />
	
</xen:form>]]></template>
  <template title="link_forum_edit"><![CDATA[<xen:title>{xen:if {$link.node_id}, '{xen:phrase edit_link_forum}: {$link.title}', '{xen:phrase create_new_link_forum}'}</xen:title>

<xen:if is="{$link.node_id}">
	<xen:navigation>
		<xen:breadcrumb href="{xen:adminlink nodes}#{xen:helper listitemid, $link.node_id}">{$link.title}</xen:breadcrumb>
	</xen:navigation>
	
	<xen:topctrl>
		<a href="{xen:adminlink 'nodes/add', '', 'parent_node_id={$link.node_id}'}" class="button">+ {xen:phrase add_child}</a>
		<a href="{xen:adminlink 'nodes/add', '', 'parent_node_id={$link.parent_node_id}'}" class="button">+ {xen:phrase add_sibling}</a>
	</xen:topctrl>
</xen:if>

<xen:form action="{xen:adminlink 'link-forums/save', $link}"
	class="AutoValidator"
	data-fieldvalidatorurl="{xen:adminlink 'link-forums/validate-field', $link}"
	data-redirect="yes">
	
	<xen:hook name="admin_link_forum_edit">

	<fieldset>	
		<!-- slot: before_title -->
		
		<xen:textboxunit name="title" value="{$link.title}" label="{xen:phrase title}:" data-livetitletemplate="{xen:if {$link.node_id},
			'{xen:phrase edit_link_forum}: <em>%s</em>',
			'{xen:phrase create_new_link_forum}: <em>%s</em>'}">
		</xen:textboxunit>
		
		<!-- slot: after_title -->

		<xen:textboxunit name="description" value="{$link.description}" label="{xen:phrase description}:" hint="{xen:phrase you_may_use_html}" rows="2" inputclass="Elastic" />
		
		<!-- slot: after_description -->
		
		<xen:textboxunit name="link_url" value="{$link.link_url}" label="{xen:phrase link_url}:">
			<xen:explain>{xen:phrase users_redirected_to_url_when_click_on_link_forum}</xen:explain>
		</xen:textboxunit>
		
		<!-- slot: after_link_url -->		
	</fieldset>
	
	<!-- slot: after_first_fieldset -->

	<fieldset>	
		<!-- slot: before_parent_node_id -->
		
		<xen:selectunit name="parent_node_id" value="{$link.parent_node_id}" label="{xen:phrase parent_node}:">
			<xen:options source="$nodeParentOptions" />
		</xen:selectunit>
		
		<!-- slot: after_parent_node_id -->
		
		<xen:textboxunit name="display_order" value="{$link.display_order}" label="{xen:phrase display_order}:">
			<xen:explain>{xen:phrase position_of_this_item_relative_to_other_nodes_with_same_parent}</xen:explain>
		</xen:textboxunit>
		
		<!-- slot: after_display_order -->
		
		<xen:checkboxunit label="">
			<xen:option name="display_in_list" label="{xen:phrase display_in_node_list}" selected="{$link.display_in_list}">
				<xen:hint>{xen:phrase if_unselected_users_will_not_see_this_node_in_list}</xen:hint>
			</xen:option>
		</xen:checkboxunit>
		
		<!-- slot: after_display_in_list -->
	</fieldset>
	
	</xen:hook>

	<input type="hidden" name="node_type_id" value="LinkForum" />

	<xen:submitunit save="{xen:phrase save_link_forum}">
		<xen:if is="{$link.node_id}">
			<input type="button" value="{xen:phrase delete_link_forum}..." accesskey="d" class="button OverlayTrigger"
				data-href="{xen:adminlink link-forums/delete-confirm, $link}" />
		</xen:if>
	</xen:submitunit>

</xen:form>]]></template>
  <template title="login_form"><![CDATA[<xen:title>{$xenOptions.boardTitle} - {xen:phrase admin_control_panel_login}</xen:title>

<xen:require js="js/xenforo/acp_login.js" />

<xen:form action="{xen:adminlink 'login/login'}" class="AcpLoginForm">
	
	<fieldset id="loginControls">
		<h1>{$xenOptions.boardTitle} - {xen:phrase admin_control_panel_login}</h1>
		<xen:if is="{$publicVisitor.user_id}"><span class="avatar"><img src="{xen:helper avatar, $publicVisitor, s}" alt="{xen:phrase your_avatar}" /></span></xen:if>
		<div class="controlWrapper">
			<label>{xen:phrase name_or_email}: <span><xen:textbox name="login" value="{$publicVisitor.username}" /></span></label>
			<label>{xen:phrase password}: <span><xen:password name="password" title="{xen:phrase password}" /></span></label>
			<label>&nbsp; <span><input type="submit" value="{xen:phrase log_in}" class="button primary" /></span></label>
			<div id="errorMessage"></div>
		</div>
	</fieldset>
		
	<input type="hidden" name="cookie_check" value="1" />
	<input type="hidden" name="redirect" value="{$requestPaths.requestUri}" />
	
	<xen:if is="{$repost}">
		<input type="hidden" name="repost" value="1" />
		<input type="hidden" name="postVars" value="{xen:escape {xen:helper json, $postVars}}" />
	</xen:if>

</xen:form>]]></template>
  <template title="LOGIN_PAGE"><![CDATA[<!DOCTYPE html>
<html id="XenForo" lang="{$visitorLanguage.language_code}" dir="{$visitorLanguage.text_direction}" class="Login">
<head>
	<meta charset="utf-8" />
	<meta name="robots" content="noindex" />
	<title><xen:if is="{$title}">{xen:raw $title} | {xen:phrase admin_cp} - {$xenOptions.boardTitle}<xen:else />{xen:phrase admin_cp} - {$xenOptions.boardTitle}</xen:if></title>

	<link rel="stylesheet" href="{xen:adminlink '_css', '', 'css=public:xenforo,public:form,admin,login_page', 'dir={$visitorLanguage.text_direction}', 'd={$_styleModifiedDate}'}" />
	<!--XenForo_Require:CSS-->

	<xen:include template="page_container_js" />
	<!--XenForo_Require:JS-->

</head>
<body>
	
	<a href="{$xenOptions.boardUrl}" title="{$xenOptions.boardTitle}"><img src="{xen:property imagePath}/xenforo/XenForo.png" id="loginLogo" alt="{xen:phrase xenforo_logo}" /></a>
	
	{xen:raw $contents}

</body>
</html>]]></template>
  <template title="login_page.css"><![CDATA[html
{
	background: {xen:property primaryMedium};
}

#loginLogo
{
	margin: 125px auto 0;
	width: 400px;
	display: block;
}

#loginControls
{
	width: 400px;
	margin: 20px auto;
	font-family: Eurostile, {xen:property body.font-family};	
}

#loginControls h1
{
	margin: 10px 0;
	color: {xen:property primaryLighterStill};
	font-weight: bold;
}

#loginControls .avatar
{
	float: left;
}

#loginControls .avatar img
{
	padding: 0;
	border: 2px solid {xen:property primaryLighter};
}

#loginControls .controlWrapper
{
	margin-left: 62px;
	overflow: hidden;
}

#loginControls label
{
	float: left;
	font-size: 11px;
	color: {xen:property primaryLighter};
	margin-top: 0px;
	margin-right: 4px;
	min-height: 46px;
}

	#loginControls label:last-of-type
	{
		margin-right: 0;
	}

#loginControls .textCtrl
{
	border: 2px solid {xen:property primaryLighter};
	color: {xen:property primaryDark};
	width: 120px;
}

#loginControls input
{
	margin-top: 2px;
	display: block;
	box-sizing: border-box;
}

#loginControls .button
{
	width: 85px;
}

#loginControls #errorMessage
{
	color: orange;
	clear: both;
	margin-top: 2px;
}]]></template>
  <template title="log_admin"><![CDATA[<xen:title>{xen:phrase admin_log}</xen:title>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<xen:form action="{xen:adminlink logs/admin}" method="get">
	<xen:controlunit label="{xen:phrase filter_by_user}:">
		<xen:select name="user_id" value="{$userId}" inputclass="autoSize">
			<xen:option value="0">{xen:phrase any}</xen:option>
			<xen:foreach loop="$logUsers" value="$user">
				<xen:option value="{$user.user_id}">{$user.username}</xen:option>
			</xen:foreach>
		</xen:select>
		<input type="submit" value="{xen:phrase filter}" class="button primary" />
	</xen:controlunit>
</xen:form>


<xen:if is="{$entries}">

	<div class="section">
	
		<h2 class="subHeading">
			{xen:phrase admin_log}
		</h2>
	
		<ol class="FilterList">
			<xen:foreach loop="$entries" value="$entry">
				<xen:listitem id="{$entry.error_id}"
					href="{xen:adminlink logs/admin, '', 'id={$entry.admin_log_id}'}"
					linkclass="OverlayTrigger"
				>
					<xen:label>{$entry.request_url}</xen:label>
					<xen:snippet><span class="dimmed">{$entry.username}{xen:if $entry.ipAddress, ' ({$entry.ipAddress})'}</span> - <xen:datetime time="{$entry.request_date}" /></xen:snippet>
				</xen:listitem>
			</xen:foreach>
		</ol>
	
		<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:count $entries}</span>', 'total={xen:number $total}'}</p>
	
	</div>
		
	<xen:adminpagenav page="{$page}" perpage="{$perPage}" total="{$total}" link="logs/admin" linkparams="{$pageParams}" />

<xen:else />
	<div class="noResults">{xen:phrase no_entries_have_been_logged}</div>
</xen:if>]]></template>
  <template title="log_admin_view"><![CDATA[<xen:title>{xen:phrase admin_log_entry}</xen:title>

<div class="section">
	<div class="overlayScroll">
		<table width="100%">
		<tr>
			<th class="subHeading">{xen:phrase admin_log_entry}</th>
		</tr>
		<tr>
			<td class="primaryContent">
				{$entry.request_url}
				<div class="muted">{xen:phrase generated_by}: {xen:if $entry.username, '<a href="{xen:adminlink users/edit, $entry}">{$entry.username}</a>', {xen:phrase unknown_account}}{xen:if $entry.ipAddress, ' ({$entry.ipAddress})'}, <xen:datetime time="{$entry.request_date}" /></div>
			</td>
		</tr>
		<tr>
			<td class="primaryContent"><pre>{$entry.trace_string}</pre></td>
		</tr>
		<tr>
			<th class="subHeading">{xen:phrase request_state}</th>
		</tr>
		<tr>
			<td class="primaryContent">{xen:helper dump, $entry.requestData}</td>
		</tr>
		</table>
	</div>
	<div class="sectionFooter overlayOnly"><a class="button primary OverlayCloser">{xen:phrase close}</a></div>
</div>]]></template>
  <template title="log_image_proxy"><![CDATA[<xen:title>{xen:phrase image_proxy_log}</xen:title>

<xen:require css="filter_list.css" />
<xen:require css="filter_list_images.css" />
<xen:require js="js/xenforo/filter_list.js" />

<xen:if is="{$images}">

	<div class="section">

		<xen:form action="{xen:adminlink logs/image-proxy}" method="get">
			<xen:textbox name="url" value="{$url}" placeholder="{xen:phrase url_contains}..." />
			<span>
				{xen:phrase ordered_by}:
				<xen:select name="order" value="{$sortOrder}">
					<xen:option value="last_request_date">{xen:phrase last_requested}</xen:option>
					<xen:option value="first_request_date">{xen:phrase first_requested}</xen:option>
					<xen:option value="views">{xen:phrase hits}</xen:option>
					<xen:option value="file_size">{xen:phrase size}</xen:option>
				</xen:select>
			</span>

			<input type="submit" value="{xen:phrase go}" class="button" />
		</xen:form>
	
		<h2 class="subHeading">
			{xen:phrase image_proxy_items}
		</h2>
	
		<ol class="FilterList secondRow">
			<xen:foreach loop="$images" value="$image">
				<xen:include template="log_image_proxy_item" />
			</xen:foreach>
		</ol>
	
		<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:count $images}</span>', 'total={xen:number $total}'}</p>
	
	</div>
		
	<xen:adminpagenav page="{$page}" perpage="{$perPage}" total="{$total}" link="logs/image-proxy" linkparams="{xen:array 'url={$url}', 'order={$sortOrder}'}" />

<xen:else />
	<div class="noResults">{xen:phrase no_results_found}</div>
</xen:if>]]></template>
  <template title="log_image_proxy_image"><![CDATA[<img src="{xen:adminlink logs/image-proxy-view, '', 'image_id={$image.image_id}'}" />]]></template>
  <template title="log_image_proxy_item"><![CDATA[<xen:if is="{$image.pruned}">
	
	<xen:listitem id="imageItem_{$image.image_id}"
		href="{$image.url}"
		target="_blank">
		<xen:label>
		
			<div class="imageContainer">
				<div id="recache_{$image.image_id}" class="recacheContainer">
					<input type="button" class="Loader button Tooltip" value="{xen:phrase show_image}"
						title="{xen:phrase click_to_recache_this_pruned_image}"
						data-method="replaceAll"
						data-target="#_imageItem_{$image.image_id}"
						data-href="{xen:adminlink logs/image-proxy-recache, '', 'url={$image.url}'}" /></div>
			</div>
	
			{$image.url}
							
			<span class="secondRow">
				<span class="faint">{xen:phrase hits}:</span> {xen:number $image.views}
				{xen:if $image.file_size, '- <span class="faint">{xen:phrase size}:</span> {xen:number $image.file_size, size}'}
				-
				<span class="faint">{xen:phrase first_requested}:</span> <xen:datetime time="{$image.first_request_date}" />
				-
				<span class="faint">{xen:phrase last_requested}:</span> <xen:datetime time="{$image.last_request_date}" />
			</span>
		</xen:label>
	</xen:listitem>

<xen:else />
	
	<xen:listitem id="imageItem_{$image.image_id}"
		href="{xen:adminlink logs/image-proxy-view-image, '', 'image_id={$image.image_id}'}"
		linkclass="OverlayTrigger">
		<xen:label>
		
			<div class="imageContainer">
					<img src="{xen:adminlink logs/image-proxy-view, '', 'image_id={$image.image_id}'}" />
			</div>
	
			{$image.url}
							
			<span class="secondRow">
				<span class="faint">{xen:phrase hits}:</span> {xen:number $image.views}
				{xen:if $image.file_size, '- <span class="faint">{xen:phrase size}:</span> {xen:number $image.file_size, size}'}
				-
				<span class="faint">{xen:phrase first_requested}:</span> <xen:datetime time="{$image.first_request_date}" />
				-
				<span class="faint">{xen:phrase last_requested}:</span> <xen:datetime time="{$image.last_request_date}" />
			</span>
		</xen:label>
	</xen:listitem>
	
</xen:if>]]></template>
  <template title="log_image_proxy_view_image"><![CDATA[

<div class="section">
	<a href="{$image.url}" target="_blank" style="display: block" class="primaryContent">
		<img src="{xen:adminlink logs/image-proxy-view, '', 'image_id={$image.image_id}'}" style="max-width:100%; max-height: 100%; display: block; margin: auto" />
	</a>
</div>]]></template>
  <template title="log_link_proxy"><![CDATA[<xen:title>{xen:phrase link_proxy_log}</xen:title>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<xen:if is="{$links}">

	<div class="section">
	
		<xen:form action="{xen:adminlink logs/link-proxy}" method="get">
			<xen:textbox name="url" value="{$url}" placeholder="{xen:phrase url_contains}..." />
			<span>
				{xen:phrase ordered_by}:
				<xen:select name="order" value="{$sortOrder}">
					<xen:option value="last_request_date">{xen:phrase last_requested}</xen:option>
					<xen:option value="first_request_date">{xen:phrase first_requested}</xen:option>
					<xen:option value="hits">{xen:phrase hits}</xen:option>
				</xen:select>
			</span>

			<input type="submit" value="{xen:phrase go}" class="button" />
		</xen:form>
	
		<h2 class="subHeading">
			{xen:phrase link_proxy_logs}
		</h2>
	
		<ol class="FilterList secondRow">
			<xen:foreach loop="$links" value="$link" i="$i">
				<xen:listitem id="link_{$i}" href="{$link.url}" target="_blank">
					<xen:label><div title="{$link.url}">{$link.url}</div>
						<span class="secondRow">
							<span class="faint">{xen:phrase hits}:</span> {xen:number $link.hits}
							-
							<span class="faint">{xen:phrase first_requested}:</span> <xen:datetime time="{$link.first_request_date}" />
							-
							<span class="faint">{xen:phrase last_requested}:</span> <xen:datetime time="{$link.last_request_date}" />
						</span>
					</xen:label>
				</xen:listitem>
			</xen:foreach>
		</ol>
	
		<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:count $links}</span>', 'total={xen:number $total}'}</p>
	
	</div>
	<xen:adminpagenav page="{$page}" perpage="{$perPage}" total="{$total}" link="logs/link-proxy" linkparams="{xen:array 'url={$url}', 'order={$sortOrder}'}" />
<xen:else />
	<div class="noResults">{xen:phrase no_results_found}</div>
</xen:if>]]></template>
  <template title="log_moderator"><![CDATA[<xen:title>{xen:phrase moderator_log}</xen:title>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<xen:form action="{xen:adminlink logs/moderator}" method="get">
	<xen:controlunit label="{xen:phrase filter_by_user}:">
		<xen:select name="user_id" value="{$userId}" inputclass="autoSize">
			<xen:option value="0">{xen:phrase any}</xen:option>
			<xen:foreach loop="$logUsers" value="$user">
				<xen:option value="{$user.user_id}">{$user.username}</xen:option>
			</xen:foreach>
		</xen:select>
		<input type="submit" value="{xen:phrase filter}" class="button primary" />
	</xen:controlunit>
</xen:form>


<xen:if is="{$entries}">

	<div class="section">
	
		<h2 class="subHeading">
			{xen:phrase moderator_log}
		</h2>
	
		<ol class="FilterList secondRow">
			<xen:foreach loop="$entries" value="$entry">
				<xen:listitem id="{$entry.moderator_log_id}"
					href="{xen:adminlink logs/moderator, '', 'id={$entry.moderator_log_id}'}"
					linkclass="OverlayTrigger">
					<xen:label>{$entry.username} - {xen:helper stripHtml, {xen:raw $entry.actionText, object}}
						<span class="secondRow">
							{xen:raw $entry.content_title, object}, <xen:datetime time="{$entry.log_date}" />{xen:if $entry.ipAddress, ', {$entry.ipAddress}'}
						</span>
					</xen:label>
				</xen:listitem>
			</xen:foreach>
		</ol>
	
		<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:count $entries}</span>', 'total={xen:number $total}'}</p>
	
	</div>
		
	<xen:adminpagenav page="{$page}" perpage="{$perPage}" total="{$total}" link="logs/moderator" linkparams="{$pageParams}" />

<xen:else />
	<div class="noResults">{xen:phrase no_entries_have_been_logged}</div>
</xen:if>]]></template>
  <template title="log_moderator_view"><![CDATA[<xen:title>{xen:phrase moderator_log_entry}</xen:title>

<div class="section">
	<div class="primaryContent">
		<form action="" class="xenForm">
			<dl class="ctrlUnit">
				<dt>{xen:phrase user}:</dt>
				<dd><a href="{xen:adminlink users/edit, $entry}">{$entry.username}</a><xen:if is="{$entry.ipAddress}">, {$entry.ipAddress}</xen:if></dd>
			</dl>
			
			<dl class="ctrlUnit">
				<dt>{xen:phrase date}:</dt>
				<dd><xen:datetime time="{$entry.log_date}" /></dd>
			</dl>
			
			<dl class="ctrlUnit">
				<dt>{xen:phrase action}:</dt>
				<dd>{xen:raw $entry.actionText, object}</dd>
			</dl>
			
			<dl class="ctrlUnit">
				<dt>{xen:phrase content}:</dt>
				<dd><a href="{$entry.content_url}">{$entry.content_title}</a>, {$entry.content_username}</dd>
			</dl>
		</form>
	</div>
	<div class="sectionFooter overlayOnly"><a class="button primary OverlayCloser">{xen:phrase close}</a></div>
</div>]]></template>
  <template title="log_server_error"><![CDATA[<xen:title>{xen:phrase server_error_logs}</xen:title>

<xen:if is="{$entries}"><xen:topctrl><a href="{xen:adminlink logs/server-error/clear}" class="button OverlayTrigger">{xen:phrase clear_server_error_log}</a></xen:topctrl></xen:if>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<xen:if is="{$entries}">

	<div class="section">
	
		<h2 class="subHeading">
			{xen:phrase server_error_logs}
		</h2>
	
		<ol class="FilterList secondRow">
			<xen:foreach loop="$entries" value="$entry">
				<xen:listitem id="{$entry.error_id}"
					href="{xen:adminlink logs/server-error, '', 'id={$entry.error_id}'}"
					linkclass="OverlayTrigger"
					delete="{xen:adminlink logs/server-error/delete, '', 'id={$entry.error_id}'}">
					<xen:label>{$entry.message}
						<span class="secondRow">
							<xen:datetime time="{$entry.exception_date}" class="faint" />
							-
							{$entry.filename}:{$entry.line}
						</span>
					</xen:label>
				</xen:listitem>
			</xen:foreach>
		</ol>
	
		<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:count $entries}</span>', 'total={xen:number $total}'}</p>
	
	</div>
		
	<xen:adminpagenav page="{$page}" perpage="{$perPage}" total="{$total}" link="logs/server-error" />

<xen:else />
	<div class="noResults">{xen:phrase no_errors_have_been_logged}</div>
</xen:if>]]></template>
  <template title="log_server_error_clear"><![CDATA[<xen:title>{xen:phrase clear_server_error_log}</xen:title>
<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'logs/server-error/clear'}" class="deleteConfirmForm formOverlay">

	<p>{xen:phrase sure_you_want_to_clear_server_error_log}</p>
	
	<xen:submitunit save="{xen:phrase clear_server_error_log}" />
	
	<input type="hidden" name="_xfConfirm" value="1" />
</xen:form>]]></template>
  <template title="log_server_error_delete"><![CDATA[<xen:title>{xen:phrase confirm_deletion_of_server_error_log_entry}</xen:title>
<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'logs/server-error/delete', '', 'id={$entry.error_id}'}" class="deleteConfirmForm formOverlay">

	<p>{xen:phrase sure_you_want_to_delete_this_server_error_log_entry}</p>

	<strong>{xen:helper wordTrim, $entry.message, 75} - {$entry.filename}:{$entry.line}</strong>
	
	<xen:submitunit save="{xen:phrase delete_log_entry}" />
	
	<input type="hidden" name="_xfConfirm" value="1" />
</xen:form>]]></template>
  <template title="log_server_error_view"><![CDATA[<xen:title>{xen:phrase server_error_log}</xen:title>

<div class="section">
	<div class="overlayScroll">
		<table width="100%">
		<tr>
			<th class="subHeading">{xen:phrase error_info}</th>
		</tr>
		<tr>
			<td class="primaryContent">
				<span class="dimmed">{$entry.exception_type}:</span> {$entry.message} - <span class="dimmed">{$entry.filename}:{$entry.line}</span>
				<div class="muted">{xen:phrase generated_by}: {xen:if $entry.username, '<a href="{xen:adminlink users/edit, $entry}">{$entry.username}</a>', {xen:phrase unknown_account}}, <xen:datetime time="{$entry.exception_date}" /></div>
			</td>
		</tr>
		<tr>
			<th class="subHeading">{xen:phrase stack_trace}</th>
		</tr>
		<tr>
			<td class="primaryContent"><pre>{$entry.trace_string}</pre></td>
		</tr>
		<tr>
			<th class="subHeading">{xen:phrase request_state}</th>
		</tr>
		<tr>
			<td class="primaryContent">{xen:helper dump, $entry.requestState}</td>
		</tr>
		</table>
	</div>
	<div class="sectionFooter overlayOnly">
		<a href="{xen:adminlink logs/server-error/delete, '', 'id={$entry.error_id}'}" class="button OverlayTrigger">{xen:phrase delete}...</a>
		<a class="button primary OverlayCloser">{xen:phrase close}</a>
	</div>
</div>]]></template>
  <template title="log_spam_trigger"><![CDATA[<xen:title>{xen:phrase spam_trigger_log}</xen:title>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<xen:if is="{$entries}">

	<div class="section">
	
		<h2 class="subHeading">
			{xen:phrase spam_trigger_log}
		</h2>
	
		<ol class="FilterList secondRow">
			<xen:foreach loop="$entries" value="$entry">
				<xen:set var="$entryDetailsHtml">
					<xen:foreach loop="$entry.detailsPrintable" value="$detail" i="$i"><xen:if is="{$i} > 1">, </xen:if>{xen:escape $detail, false}</xen:foreach>
				</xen:set>
				<xen:listitem id="{$entry.trigger_log_id}"
					href="{xen:adminlink logs/spam-trigger, '', 'id={$entry.trigger_log_id}'}"
					linkclass="OverlayTrigger">
					<xen:label>{xen:if $entry.username, $entry.username, {xen:phrase unknown_account}} -
							{xen:raw $entryDetailsHtml}
						<span class="secondRow">
							{xen:if "{$entry.result} == 'denied'", '{xen:phrase rejected},',
								{xen:if "{$entry.result} == 'moderated'", '{xen:phrase moderated},'}
							}
							<xen:datetime time="{$entry.log_date}" class="faint" />,
							{xen:phrase content}: {$entry.content_type}
						</span>
					</xen:label>
				</xen:listitem>
			</xen:foreach>
		</ol>
	
		<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:count $entries}</span>', 'total={xen:number $total}'}</p>
	
	</div>
		
	<xen:adminpagenav page="{$page}" perpage="{$perPage}" total="{$total}" link="logs/spam-trigger" />

<xen:else />
	<div class="noResults">{xen:phrase no_entries_have_been_logged}</div>
</xen:if>]]></template>
  <template title="log_spam_trigger_view"><![CDATA[<xen:title>{xen:phrase spam_trigger_log}</xen:title>

<div class="section">
	<div class="overlayScroll">
		<table width="100%">
		<tr>
			<td class="primaryContent">
				<span class="dimmed">{xen:phrase action}:</span>
				{xen:if "{$entry.result} == 'denied'", {xen:phrase rejected}, {xen:phrase moderated}}
				- 
				<xen:foreach loop="$entry.detailsPrintable" value="$detail" i="$i"><xen:if is="{$i} > 1">, </xen:if>{xen:escape $detail, false}</xen:foreach>
				<div class="muted">{xen:phrase generated_by}: {xen:if $entry.username, '<a href="{xen:adminlink users/edit, $entry}">{$entry.username}</a>', {xen:phrase unknown_account}}, <xen:datetime time="{$entry.log_date}" />, {xen:phrase content}: {$entry.content_type} <xen:if is="{$entry.content_id}">({$entry.content_id})</xen:if></div>
			</td>
		</tr>
		<tr>
			<th class="subHeading">{xen:phrase request_state}</th>
		</tr>
		<tr>
			<td class="primaryContent">{xen:helper dump, $entry.requestState}</td>
		</tr>
		</table>
	</div>
	<div class="sectionFooter overlayOnly">
		<a class="button primary OverlayCloser">{xen:phrase close}</a>
	</div>
</div>]]></template>
  <template title="moderator_add_choice"><![CDATA[<xen:title>{xen:phrase create_new_moderator}</xen:title>

<xen:form action="{xen:adminlink 'moderators/add'}">
	
	<xen:textboxunit label="{xen:phrase moderator_user_name}:" name="username" value="{$username}" type="search" results="5" placeholder="{xen:phrase user_name}..." inputclass="AutoComplete AcSingle" />
	<xen:radiounit label="{xen:phrase type_of_moderator}:" name="type" value="{$type}">
		<xen:option value="_super" selected="true">
			<xen:label>{xen:phrase super_moderator}</xen:label>
			<xen:hint>{xen:phrase super_moderator_can_moderate_entire_board}</xen:hint>
		</xen:option>
		<xen:options source="$typeChoices" />
			
		<xen:comment><xen:option value="node">
			<xen:label>{xen:phrase forum_moderator}:</xen:label>
			<xen:select name="type_id[node]" value="{$typeId.node}">
				<xen:option value="0">&nbsp;</xen:option>
				<xen:options source="$nodes" />
			</xen:select>
		</xen:option></xen:comment>
	</xen:radiounit>
	
	<xen:submitunit save="{xen:phrase add_moderator}..." />
		
</xen:form>]]></template>
  <template title="moderator_content_delete"><![CDATA[<xen:title>{xen:phrase confirm_deletion_of_moderator}: {$moderator.username}</xen:title>
<xen:h1>{xen:phrase confirm_deletion_of_moderator}</xen:h1>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'moderators/content/edit', $moderator}">{$moderator.username}</xen:breadcrumb>
</xen:navigation>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'moderators/content/delete', $moderator}" class="deleteConfirmForm formOverlay">

	<p>{xen:phrase please_confirm_that_you_want_to_delete_following_moderator}:</p>
	<strong><a href="{xen:adminlink 'moderators/content/edit', $moderator}">{$moderator.username}</a> ({$contentTitle})</strong>

	<xen:submitunit save="{xen:phrase delete_moderator}" />
	<input type="hidden" name="_xfConfirm" value="1" />
	
</xen:form>]]></template>
  <template title="moderator_edit"><![CDATA[<xen:title>{xen:phrase edit_moderator}: {$moderator.username}</xen:title>
<xen:h1>{xen:phrase edit_moderator}: <em>{$moderator.username}</em></xen:h1>

<xen:if is="{$moderator.user_id}">
	<xen:navigation>
		<xen:breadcrumb href="{xen:adminlink moderators}#{xen:helper listitemid, {xen:if {$moderator.moderator_id}, {$moderator.moderator_id}, 'supermod_{$moderator.user_id}'}}">{$moderator.username}</xen:breadcrumb>
	</xen:navigation>
</xen:if>

<xen:require css="permission.css" />

<xen:form action="{xen:adminlink 'moderators/save'}" class="AutoValidator" data-redirect="yes">
	
	<fieldset>		
		<xen:controlunit label="{xen:phrase type_of_moderator}:">
			<xen:if is="{$moderator.content_type}">
				{$contentTitle}
			<xen:else />
				{xen:phrase super_moderator}
			</xen:if>
		</xen:controlunit>
	</fieldset>
	
	<fieldset>
		<xen:checkboxunit label="">
			<xen:option name="is_staff" selected="{$isStaff}" label="{xen:phrase display_user_as_staff}" hint="{xen:phrase if_selected_this_user_will_be_listed_publicly_as_staff_member}" />
		</xen:checkboxunit>
		<xen:checkboxunit id="addUserGroups" label="{xen:phrase add_moderator_to_user_groups}:" name="extra_user_group_ids[]" listclass="checkboxColumns">
			<xen:hint><br /><label><input type="checkbox" class="CheckAll" data-target="#addUserGroups" /> {xen:phrase select_all}</label></xen:hint>
			<xen:options source="$userGroups" />
		</xen:checkboxunit>
	</fieldset>
	
	<div id="piGroups">
	
		<label class="secondaryContent"><input type="checkbox" class="CheckAll" data-target="#piGroups" /> {xen:phrase select_all}</label>
		
		<xen:foreach loop="$generalInterfaceGroups" value="{$generalInterfaceGroup}" i="$i">
			<fieldset id="gigFs{$i}">
				<xen:checkboxunit label="{$generalInterfaceGroup.title}:" name="general_moderator_permissions" listclass="checkboxColumns">
					<xen:hint><br /><label><input type="checkbox" class="CheckAll" data-target="#gigFs{$i}" /> {xen:phrase select_all}</label></xen:hint>
					<xen:options source="{$generalInterfaceGroup.permissions}" />
				</xen:checkboxunit>
			</fieldset>
		</xen:foreach>
		
		<xen:foreach loop="$interfaceGroups" value="{$interfaceGroup}" i="$i">
			<fieldset id="igFs{$i}">
				<xen:checkboxunit label="{$interfaceGroup.title}:" name="moderator_permissions" listclass="checkboxColumns">
					<xen:hint><br /><label><input type="checkbox" class="CheckAll" data-target="#igFs{$i}" /> {xen:phrase select_all}</label></xen:hint>
					<xen:options source="{$interfaceGroup.permissions}" />
				</xen:checkboxunit>
			</fieldset>
		</xen:foreach>
	
	</div>
	
	<xen:submitunit save="{xen:phrase save_moderator}">
		<xen:if is="{$allowDelete}">
			<xen:if is="{$moderator.content_id}">
				<input type="button" value="{xen:phrase delete_moderator}..." accesskey="d" class="button OverlayTrigger"
					data-href="{xen:adminlink 'moderators/content/delete', $moderator}" />
			<xen:else />
				<input type="button" value="{xen:phrase delete_moderator}..." accesskey="d" class="button OverlayTrigger"
					data-href="{xen:adminlink 'moderators/super/delete', $moderator}" />
			</xen:if>
		</xen:if>
	</xen:submitunit>
	
	<input type="hidden" name="user_id" value="{$user.user_id}" />
	<input type="hidden" name="is_super_moderator" value="{$moderator.is_super_moderator}" />
	<input type="hidden" name="content_type" value="{$moderator.content_type}" />
	<input type="hidden" name="content_id" value="{$moderator.content_id}" />
		
</xen:form>]]></template>
  <template title="moderator_list"><![CDATA[<xen:title>{xen:phrase moderators}</xen:title>

<xen:topctrl>
	<a href="{xen:adminlink 'moderators/add'}" class="button">+ {xen:phrase create_new_moderator}</a>
</xen:topctrl>

<xen:require js="js/xenforo/filter_list.js" />
<xen:require css="filter_list.css" />

<xen:if is="{$superModerators}">
	<xen:form action="{xen:adminlink moderators, '', 'super=1'}" class="section">

		<h2 class="subHeading">
			{xen:phrase super_moderators}
		</h2>

		<ol class="FilterList Scrollable">
			<xen:foreach loop="$superModerators" value="$superModerator">
				<xen:listitem
					id="supermod_{$superModerator.user_id}"
					label="{$superModerator.username}"
					href="{xen:adminlink 'moderators/super/edit', $superModerator}"
					delete="{xen:adminlink 'moderators/super/delete', $superModerator}">
					<xen:beforelabel>
						<img src="{xen:helper avatar, $superModerator, s}" alt="" class="listAvatar" />
					</xen:beforelabel>
					<xen:html>
						<a href="{xen:adminlink users/edit, $superModerator}" class="secondaryContent">{xen:phrase user_info}</a>
					</xen:html>
				</xen:listitem>
			</xen:foreach>
		</ol>

		<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:count $superModerators}</span>', 'total={xen:count $superModerators}'}</p>

	</xen:form>
</xen:if>

<xen:form action="{xen:adminlink moderators, '', 'content=1'}" class="section">
	<xen:if is="{$contentModerators}">

		<h2 class="subHeading">
			{xen:phrase content_moderators}
		</h2>

		<ol class="FilterList Scrollable">
			<xen:foreach loop="$contentModerators" value="$contentModerator">
				<li>
					<h3 class="textHeading"><a href="{xen:adminlink users/edit, $contentModerator}" class="concealed">{$contentModerator.username}</a></h3>
					<ol>
						<xen:foreach loop="$contentModerator.content" value="$content">
							<xen:listitem
								id="{$content.moderator_id}"
								label="{$content.title}"
								href="{xen:adminlink 'moderators/content/edit', $content}"
								delete="{xen:adminlink 'moderators/content/delete', $content}"
							/>
						</xen:foreach>
					</ol>
				</li>
			</xen:foreach>
		</ol>

		<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:number $totalContentModerators}</span>', 'total={xen:number $totalContentModerators}'}</p>

	</xen:if>
	<xen:if is="!{$superModerators} AND !{$contentModerators}">

		<div class="noResults">{xen:phrase there_currently_no_moderators_use_link_create}</div>

	</xen:if>
</xen:form>]]></template>
  <template title="moderator_super_delete"><![CDATA[<xen:title>{xen:phrase confirm_deletion_of_super_moderator}: {$moderator.username}</xen:title>
<xen:h1>{xen:phrase confirm_deletion_of_super_moderator}</xen:h1>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'moderators/super/edit', $moderator}">{$moderator.username}</xen:breadcrumb>
</xen:navigation>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'moderators/super/delete', $moderator}" class="deleteConfirmForm formOverlay">

	<p>{xen:phrase please_confirm_that_you_want_to_delete_following_super_moderator}:</p>
	<strong><a href="{xen:adminlink 'moderators/super/edit', $moderator}">{$moderator.username}</a></strong>
	<p>{xen:phrase if_user_is_content_moderator_as_well_moderation_privileges_removed}</p>

	<xen:submitunit save="{xen:phrase delete_super_moderator}" />
	<input type="hidden" name="_xfConfirm" value="1" />
	
</xen:form>]]></template>
  <template title="node_add"><![CDATA[<xen:title><xen:if is="{$parentNode}">{xen:phrase create_child_node_of_x, 'title={$parentNode.title}'}<xen:else />{xen:phrase create_node}</xen:if></xen:title>
<xen:h1><xen:if is="{$parentNode}">{xen:phrase create_child_node_of_x, 'title=<a href="{xen:adminlink nodes/edit, $parentNode}">{$parentNode.title}</a>'}<xen:else />{xen:phrase create_node}</xen:if></xen:h1>

<xen:form action="{xen:adminlink 'nodes/insert'}">

	<xen:radiounit name="node_type_id" label="{xen:phrase node_type}:" hint="{xen:phrase what_kind_of_node_do_you_want_to_add}">
		<xen:options source="$nodeTypeOptions" />
	</xen:radiounit>

	<input type="hidden" name="parent_node_id" value="{$parent_node_id}" />

	<xen:submitunit save="{xen:phrase proceed}..." />

</xen:form>]]></template>
  <template title="node_list"><![CDATA[<xen:title>{xen:phrase node_tree}</xen:title>

<xen:topctrl>
	<a href="{xen:adminlink 'nodes/add'}" class="button" accesskey="a">+ {xen:phrase create_new_node}</a>
</xen:topctrl>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<xen:form action="{xen:adminlink nodes}" class="section">
	<xen:if is="{$nodes}">

		<h2 class="subHeading">
			<xen:include template="filter_list_controls" />
			{xen:phrase nodes}
		</h2>
		
		<xen:set var="$nodeCount">{xen:count $nodes, false}</xen:set>

		<ol class="FilterList Scrollable">
			<xen:foreach loop="$nodes" value="$node">
				<xen:listitem
					id="{$node.node_id}"
					label="{$node.title}"
					snippet="{$node.node_type}"
					href="{xen:adminlink 'nodes/edit', $node}"
					class="_depth{$node.depth}"
					delete="{xen:adminlink 'nodes/delete', $node}">
					<xen:html>
						<xen:if is="{$nodeCount} < 500">
							<xen:popup title="{xen:phrase create_new_elipses}">
								<xen:link href="{xen:adminlink 'nodes/add', '', 'parent_node_id={$node.parent_node_id}'}">{xen:phrase sibling_node}</xen:link>
								<xen:link href="{xen:adminlink 'nodes/add', '', 'parent_node_id={$node.node_id}'}">{xen:phrase child_node}</xen:link>
							</xen:popup>
						</xen:if>
						<xen:if is="{$node.moderatorCount}">
							<xen:popup title="{xen:phrase moderators} ({xen:number $node.moderatorCount})" ctrlclass="fixedOptionBox">
								<xen:foreach loop="$node.moderators" value="$moderator">
									<xen:link href="{xen:adminlink 'moderators/content/edit', $moderator}">{$moderator.username}</xen:link>
								</xen:foreach>
								<xen:link href="{xen:adminlink 'moderators/add', '', 'type=node', 'type_id.node={$node.node_id}'}">{xen:phrase add_moderator}</xen:link>
							</xen:popup>
						<xen:else />
							<a href="{xen:adminlink 'moderators/add', '', 'type=node', 'type_id.node={$node.node_id}'}" class="secondaryContent fixedOptionBox">{xen:phrase add_moderator}</a>
						</xen:if>
						<a href="{xen:adminlink 'node-permissions', $node}" class="secondaryContent {xen:if {$nodesWithPerms.{$node.node_id}}, 'hasPermissions'}">{xen:phrase permissions}</a>
					</xen:html>
				</xen:listitem>
			</xen:foreach>
		</ol>

		<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:count $nodes}</span>', 'total={xen:count $nodes}'}</p>

	<xen:else />

		<div class="noResults">{xen:phrase there_no_nodes_defined}</div>

	</xen:if>
</xen:form>]]></template>
  <template title="notice_delete"><![CDATA[<xen:title>{xen:phrase confirm_deletion_of_notice}: {$notice.title}</xen:title>
<xen:h1>{xen:phrase confirm_deletion_of_notice}</xen:h1>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'notices/edit', $notice}">{$notice.title}</xen:breadcrumb>
</xen:navigation>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'notices/delete', $notice}" class="deleteConfirmForm">
	<p>{xen:phrase please_confirm_that_you_want_to_delete_following_notice}:</p>
	<strong><a href="{xen:adminlink 'notices/edit', $notice}">{$notice.title}</a></strong>

	<xen:submitunit save="{xen:phrase delete_notice}" />

	<input type="hidden" name="_xfConfirm" value="1" />
</xen:form>]]></template>
  <template title="notice_edit"><![CDATA[<xen:title>{xen:if '{$notice.notice_id}', '{xen:phrase edit_notice}: {$notice.title}', '{xen:phrase create_new_notice}'}</xen:title>

<xen:if is="{$notice.notice_id}">
	<xen:navigation>
		<xen:breadcrumb href="{xen:adminlink notices}#{xen:helper listitemid, $notice.notice_id}">{$notice.title}</xen:breadcrumb>
	</xen:navigation>
</xen:if>

<xen:form class="AutoValidator"
	action="{xen:adminlink 'notices/save', $notice}"
	data-redirect="on">

	<ul class="tabs Tabs" data-panes="#noticePanes > li">
		<li class="active"><a>{xen:phrase notice_options}</a></li>
		<li><a title="{xen:phrase display_notice_if_user}" class="Tooltip">{xen:phrase user_criteria}</a></li>
		<li><a title="{xen:phrase display_notice_if_date}" class="Tooltip">{xen:phrase date_criteria}</a></li>
		<li><a title="{xen:phrase display_notice_if_page}" class="Tooltip">{xen:phrase page_criteria}</a></li>
		<li><a title="{xen:phrase display_notice_if_user}" class="Tooltip">{xen:phrase custom_userfield_criteria}</a></li>
	</ul>
	
	<ul id="noticePanes">
		<li>
			<xen:textboxunit label="{xen:phrase title}:" name="title" value="{$notice.title}" data-livetitletemplate="{xen:if {$notice.notice_id},
				'{xen:phrase edit_notice}: <em>%s</em>',
				'{xen:phrase create_new_notice}: <em>%s</em>'}">
				<xen:explain>{xen:phrase notice_title_explain}</xen:explain>
			</xen:textboxunit>
				
			<xen:textboxunit label="{xen:phrase message}:" name="message" value="{$notice.message}" rows="2" inputclass="Elastic">
				<xen:hint>{xen:phrase you_may_use_html}</xen:hint>
				<xen:explain>{xen:phrase the_message_to_be_shown_when_the_display_criteria_are_met}</xen:explain>
			</xen:textboxunit>
			
			<fieldset>				
				<xen:checkboxunit label="{xen:phrase options}:">
					<xen:option name="wrap" selected="{$notice.wrap}" label="{xen:phrase add_notice_content_wrapper}"
						hint="{xen:phrase add_notice_content_wrapper_explain}" />
					<xen:option name="dismissible" selected="{$notice.dismissible}" label="{xen:phrase notice_may_be_dismissed}"
						hint="{xen:phrase users_may_hide_this_notice_when_they_have_read_it}" />
					<xen:option name="active" selected="{$notice.active}" label="{xen:phrase notice_is_active}"
						hint="{xen:phrase use_this_to_temporarily_disable_this_notice}" />
				</xen:checkboxunit>
				
				<xen:spinboxunit label="{xen:phrase display_order}:" name="display_order" value="{$notice.display_order}" min="0" step="10" />				
				</fieldset>
		</li>		
		<li><xen:include template="helper_criteria_user" /></li>
		<li><xen:include template="helper_criteria_user_date" /></li>
		<li><xen:include template="helper_criteria_page" /></li>
		<li><xen:include template="helper_criteria_user_field" /></li>
	</ul>
	
	<xen:submitunit save="{xen:phrase save_notice}">
		<xen:if is="{$notice.notice_id}"><a href="{xen:adminlink 'notices/delete', $notice}" class="button OverlayTrigger">{xen:phrase delete_notice}...</a></xen:if>
	</xen:submitunit>
	
	<xen:controlunit label="{xen:phrase note}:">{xen:phrase notice_shows_with_no_criteria}</xen:controlunit>
</xen:form>]]></template>
  <template title="notice_list"><![CDATA[<xen:title>{xen:phrase notices}</xen:title>

<xen:topctrl><a href="{xen:adminlink notices/add}" class="button">+ {xen:phrase create_new_notice}</a></xen:topctrl>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<xen:form action="{xen:adminlink notices/toggle}" class="section AutoValidator">

	<xen:if is="{$notices}">
		<h2 class="subHeading">
			<xen:include template="filter_list_controls" />
			{xen:phrase notices}
		</h2>

		<ol class="FilterList Scrollable">
			<xen:foreach loop="$notices" value="$notice">
				<xen:listitem id="{$notice.notice_id}"
					label="{$notice.title}"
					href="{xen:adminlink 'notices/edit', $notice}"
					delete="{xen:adminlink 'notices/delete', $notice}"
					toggle="{$notice.active}"
					toggletitle="{xen:phrase enable_disable_x, 'title={$notice.title}'}">
				</xen:listitem>
			</xen:foreach>
		</ol>

		<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:count $notices}</span>', 'total={xen:count $notices}'}</p>

	<xen:else />
		<div class="noResults">{xen:phrase no_notices_have_been_created_yet}</div>
	</xen:if>

</xen:form>

<xen:form action="{xen:adminlink 'options/save'}" class="AutoValidator OptIn">
	<h3 class="subHeading">{xen:phrase notices_system_options}</h3>

	<xen:foreach loop="$renderedOptions" value="$renderedOption">
		{xen:raw $renderedOption}
	</xen:foreach>

	<xen:submitunit save="{xen:phrase save}" />
</xen:form>]]></template>
  <template title="option_delete"><![CDATA[<xen:title>{xen:phrase confirm_deletion_of_option}: {$option.title}</xen:title>
<xen:h1>{xen:phrase confirm_deletion_of_option} </xen:h1>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'options/edit-option', $option}">{$option.title}</xen:breadcrumb>
</xen:navigation>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'options/delete-option'}" class="deleteConfirmForm formOverlay">

	<p>{xen:phrase please_confirm_that_you_want_to_delete_following_option}:</p>
	<strong><a href="{xen:adminlink 'options/edit-option', $option}">{$option.title}</a></strong>

	<input type="hidden" name="option_id" value="{$option.option_id}" />

	<xen:submitunit save="{xen:phrase delete_option}" />
	<input type="hidden" name="_xfConfirm" value="1" />
	<input type="hidden" name="redirect" value="{$redirect}" />
	
</xen:form>]]></template>
  <template title="option_display_order"><![CDATA[<xen:title>{xen:phrase display_order}: {$group.title}</xen:title>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink options/list, $group}">{$group.title}</xen:breadcrumb>
</xen:navigation>

<xen:form action="{xen:adminlink options/display-order, $group}">

	<xen:foreach loop="{$preparedOptions}" key="{$optionId}" value="{$option}">
		<xen:spinboxunit label="{$option.title}" name="option[{$optionId}]" value="{$option.display_order}" hint="{$optionId}" min="0" step="10" />
	</xen:foreach>
	
	<xen:submitunit save="{xen:phrase save_changes}">
		<input type="reset" class="button" value="{xen:phrase cancel}" />
	</xen:submitunit>
	
	<input type="hidden" name="_xfConfirm" value="1" />

</xen:form>]]></template>
  <template title="option_edit"><![CDATA[<xen:title>{xen:if '{$option.option_id}', '{xen:phrase edit_option}: {$option.option_id}', '{xen:phrase create_new_option}'}</xen:title>

<xen:form action="{xen:adminlink 'options/save-option'}" class="AutoValidator" data-redirect="yes">

	<xen:textboxunit label="{xen:phrase option_id}:" name="option_id" value="{$option.option_id}" hint="{xen:phrase a_z_0_9_and_underscore_only}" />
	
	<xen:include template="helper_addon_unit" />
	
	<fieldset>
		<xen:textboxunit label="{xen:phrase title}:" name="title" value="{$masterTitle}" data-livetitletemplate="{xen:if {$option.option_id},
			'{xen:phrase edit_option}: <em>%s</em>',
			'{xen:phrase create_new_option}: <em>%s</em>'}" />
			
		<xen:textboxunit label="{xen:phrase explanation}:" name="explain" value="{$masterExplain}" rows="2" hint="{xen:phrase you_may_use_html}" inputclass="Elastic" />
	</fieldset>

	<fieldset>
		<xen:selectunit label="{xen:phrase edit_format}:" name="edit_format" value="{$option.edit_format}">
			<xen:option value="textbox">{xen:phrase text_box}</xen:option>
			<xen:option value="spinbox">{xen:phrase spin_box}</xen:option>
			<xen:option value="onoff">{xen:phrase on_off_check_box}</xen:option>
			<xen:option value="onofftextbox">{xen:phrase on_off_check_box_with_text_box}</xen:option>
			<xen:option value="radio">{xen:phrase radio_buttons}</xen:option>
			<xen:option value="select">{xen:phrase select_menu}</xen:option>
			<xen:option value="checkbox">{xen:phrase check_boxes}</xen:option>
			<xen:option value="template">{xen:phrase named_template}</xen:option>
			<xen:option value="callback">{xen:phrase php_callback}</xen:option>
		</xen:selectunit>
	
		<xen:textboxunit label="{xen:phrase format_parameters}:" name="edit_format_params" value="{$option.edit_format_params}" rows="2" inputclass="Elastic" />
	</fieldset>
	
	<fieldset>
		<xen:selectunit label="{xen:phrase data_type}:" name="data_type" value="{$option.data_type}">
			<xen:option value="boolean">{xen:phrase boolean}</xen:option>
			<xen:option value="string">{xen:phrase string}</xen:option>
			<xen:option value="integer">{xen:phrase integer}</xen:option>
			<xen:option value="unsigned_integer">{xen:phrase unsigned_integer}</xen:option>
			<xen:option value="positive_integer">{xen:phrase positive_integer}</xen:option>
			<xen:option value="numeric">{xen:phrase numeric}</xen:option>
			<xen:option value="unsigned_numeric">{xen:phrase unsigned_numeric}</xen:option>
			<xen:option value="array">{xen:phrase array}</xen:option>
		</xen:selectunit>

		<xen:textboxunit label="{xen:phrase default_value}:" name="default_value" value="{$option.default_value}" rows="2" inputclass="Elastic" />
		
		<xen:textboxunit label="{xen:phrase array_sub_options}:" name="sub_options" value="{$option.sub_options}" rows="2" inputclass="Elastic" />
		
		<xen:controlunit label="{xen:phrase validation_callback}:">
			<xen:textbox placeholder="{xen:phrase class}" name="validation_class" value="{$option.validation_class}" size="25" />
			::
			<xen:textbox placeholder="{xen:phrase method}" name="validation_method" value="{$option.validation_method}" size="25" />
		</xen:controlunit>
	</fieldset>

	<fieldset>
		<xen:checkboxunit label="{xen:phrase display_in_groups}:">
			<xen:foreach loop="$groups" value="$group">
				<xen:option name="relations[{$group.group_id}][selected]" selected="{$relations.{$group.group_id}} !== null" label="{$group.title}" inputclass="Hider">
					<xen:spinbox name="relations[{$group.group_id}][display_order]" value="{$relations.{$group.group_id}}" />				
				</xen:option>
			</xen:foreach>
		</xen:checkboxunit>
	</fieldset>

	<xen:checkboxunit label="">
		<xen:option name="can_backup" selected="{$option.can_backup}">{xen:phrase include_this_option_in_backups}</xen:option>
	</xen:checkboxunit>		

	<input type="hidden" name="original_option_id" value="{$option.option_id}" />
	
	<xen:submitunit save="{xen:phrase save_option}">
		<xen:if is="{$option.option_id}">
			<input type="button" value="{xen:phrase delete_option}..." accesskey="d" class="button OverlayTrigger"
				data-href="{xen:adminlink 'options/delete-option', $option, 'redirect={$redirect}'}" />
		</xen:if>
	</xen:submitunit>
	
	<input type="hidden" name="redirect" value="{$redirect}" />
</xen:form>]]></template>
  <template title="option_group_delete"><![CDATA[<xen:title>{xen:phrase confirm_deletion_of_option_group}: {$group.title}</xen:title>
<xen:h1>{xen:phrase confirm_deletion_of_option_group}</xen:h1>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'options/edit-group', $group}">{$group.title}</xen:breadcrumb>
</xen:navigation>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'options/delete-group'}" class="deleteConfirmForm formOverlay">

	<p>{xen:phrase please_confirm_that_you_want_to_delete_following_option_group}:</p>
	<strong><a href="{xen:adminlink 'options/edit-option', $option}">{$group.title}</a></strong>

	<input type="hidden" name="group_id" value="{$group.group_id}" />

	<xen:submitunit save="{xen:phrase delete_option_group}" />
	<input type="hidden" name="_xfConfirm" value="1" />
	
</xen:form>]]></template>
  <template title="option_group_display_order"><![CDATA[<xen:title>{xen:phrase display_order}</xen:title>

<xen:form action="{xen:adminlink options/group-display-order}">

	<xen:foreach loop="{$groups}" key="{$groupId}" value="{$group}">
		<xen:spinboxunit label="{$group.title}" name="group[{$groupId}]" value="{$group.display_order}" hint="{$groupId}" min="0" step="10" />
	</xen:foreach>
	
	<xen:submitunit save="{xen:phrase save_changes}">
		<input type="reset" class="button" value="{xen:phrase cancel}" />
	</xen:submitunit>
	
	<input type="hidden" name="_xfConfirm" value="1" />

</xen:form>]]></template>
  <template title="option_group_edit"><![CDATA[<xen:title>{xen:if '{$group.group_id}', '{xen:phrase edit_option_group}: {$masterTitle}', '{xen:phrase create_new_option_group}'}</xen:title>

<xen:form action="{xen:adminlink 'options/save-group'}" class="AutoValidator" data-redirect="yes">
	<xen:textboxunit label="{xen:phrase group_id}:" name="group_id" value="{$group.group_id}" />
	
	<fieldset>
		<xen:textboxunit label="{xen:phrase title}:" name="title" value="{$masterTitle}" data-livetitletemplate="{xen:if {$group.group_id},
			'{xen:phrase edit_option_group}: <em>%s</em>',
			'{xen:phrase create_new_option_group}: <em>%s</em>'}" />
	
		<xen:textboxunit label="{xen:phrase description}:" hint="{xen:phrase you_may_use_html}" name="description" value="{$masterDescription}" rows="2" inputclass="Elastic" />
	</fieldset>
			
	<xen:textboxunit label="{xen:phrase display_order}:" name="display_order" value="{$group.display_order}" />
	<xen:checkboxunit label="">
		<xen:option name="debug_only" selected="{$group.debug_only}">{xen:phrase display_this_group_in_debug_mode_only}</xen:option>
	</xen:checkboxunit>
	
	<xen:include template="helper_addon_unit" />
	
	<input type="hidden" name="original_group_id" value="{$group.group_id}" />
		
	<xen:submitunit save="{xen:phrase save_option_group}">
		<xen:if is="{$group.group_id}">
			<input type="button" value="{xen:phrase delete_option_group}..." accesskey="d" class="button OverlayTrigger"
				data-href="{xen:adminlink 'options/delete-group', $group}" />
		</xen:if>
	</xen:submitunit>
</xen:form>]]></template>
  <template title="option_group_list"><![CDATA[<xen:title>{xen:phrase options}</xen:title>

<xen:if is="{$canEditOptionDefinitions}">
	<xen:topctrl>
		<!--<a href="{xen:adminlink 'options/add-option'}" class="button" accesskey="a">+ {xen:phrase add_option}</a>-->
		<a href="{xen:adminlink 'options/add-group'}" class="button" accesskey="g">+ {xen:phrase add_option_group}</a>
		<a href="{xen:adminlink 'options/group-display-order'}" class="button" >{xen:phrase display_order}</a>
	</xen:topctrl>
</xen:if>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<xen:form action="{xen:adminlink 'options'}" class="section">

	<h2 class="subHeading">
		<xen:include template="filter_list_controls" />
		{xen:phrase option_groups}
	</h2>

	<ol class="FilterList Scrollable">
		<xen:foreach loop="$groups" value="$group">
			<xen:listitem
				id="optionGroup-{$group.group_id}"
				label="{$group.title}"
				snippet="{xen:helper stripHtml, $group.description}"
				href="{xen:adminlink 'options/list', $group}"
				delete="{xen:if $canEditOptionDefinitions, {xen:adminlink 'options/delete-group', $group}}" />
		</xen:foreach>
	</ol>

	<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:count $groups}</span>', 'total={xen:count $groups}'}</p>

</xen:form>]]></template>
  <template title="option_list"><![CDATA[<xen:title>{xen:phrase options}: {$group.title}</xen:title>
<xen:h1>{$group.title}</xen:h1>

<xen:container var="$head.optionCss">
<style>
.hiddenOption   { display: inline-block; font-size: 9px; margin-right: 3px; color: {xen:property mutedTextColor}; }
.hiddenOption a { position: static; }
.optionList a.optionAnchor { position: absolute; top: -80px; } /* prevents anchors pointing going under the fixed header */
</style>
</xen:container>

<xen:if is="{$canEditGroup}">
	<xen:topctrl>
		<a href="{xen:adminlink 'options/add-option', '', "group_id={$group.group_id}"}" class="button">+ {xen:phrase add_option}</a>
		<a class="button" href="{xen:adminlink 'options/display-order', $group}">{xen:phrase display_order}</a>
		<a class="button" href="{xen:adminlink 'options/edit-group', $group}">{xen:phrase edit_group}</a>
	</xen:topctrl>
</xen:if>

<xen:form action="{xen:adminlink 'options/save', $group}">
	
	<div class="topChoosers">
		<div class="Popup">
			<span class="muted">{xen:phrase option_groups}:</span> <a rel="Menu">{$group.title}</a>
			<div class="Menu">
				<div class="primaryContent menuHeader"><h3>{xen:phrase option_groups}</h3></div>
				<ul class="secondaryContent blockLinksList">
				<xen:foreach loop="$groups" value="$_group">
					<li><a href="{xen:adminlink 'options/list', $_group}">{$_group.title}</a></li>
				</xen:foreach>
				</ul>
			</div>
		</div>
	</div>

	<xen:if hascontent="true"><div class="optionGroupDescription muted"><i><xen:contentcheck>{xen:raw $group.description}</xen:contentcheck></i></div></xen:if>

	<xen:foreach loop="$renderedOptions" value="$_group">
		<xen:if hascontent="true">
		<fieldset class="optionList">
			<xen:contentcheck>
			<xen:foreach loop="$_group" key="$optionId" value="$renderedOption">{xen:raw $renderedOption}</xen:foreach>
			</xen:contentcheck>
		</fieldset>
		</xen:if>
	</xen:foreach>

	<xen:submitunit save="{xen:phrase save_changes}">
		<input type="reset" class="button" value="{xen:phrase cancel}" accesskey="r" />
	</xen:submitunit>
</xen:form>]]></template>
  <template title="option_list_option_checkbox"><![CDATA[<xen:checkboxunit label="{$preparedOption.title}" name="{$fieldPrefix}[{$preparedOption.option_id}]" value="{$preparedOption.option_value}"
hint="{$preparedOption.hint}" class="{$extra.class}">
	<xen:options source="$formatParams" raw="true" />
	<xen:explain>{xen:raw $preparedOption.explain}</xen:explain>
	<xen:html>
		<input type="hidden" name="{$listedFieldName}" value="{$preparedOption.option_id}" />
		{xen:raw $editLink}
	</xen:html>
</xen:checkboxunit>]]></template>
  <template title="option_list_option_editlink"><![CDATA[<xen:if is="{$canEditOptionDefinition}">
	<a href="{xen:adminlink 'options/edit-option', $preparedOption}"
		class="optionEditLink inputSupplementary Tooltip"
		title="{$preparedOption.option_id} / {$preparedOption.display_order}"
		data-offsetx="5" data-offsety="-8" data-tipclass="flipped"><span class="editText">{xen:phrase edit}</span></a>
</xen:if>
<a class="optionAnchor" name="_{$preparedOption.option_id}"></a>]]></template>
  <template title="option_list_option_invalid"><![CDATA[<xen:controlunit label="{$preparedOption.title}">
	<div>{xen:phrase invalid_option_format}: {$preparedOption.formatType}</div>
	{xen:raw $editLink}
</xen:controlunit>]]></template>
  <template title="option_list_option_invalid_callback"><![CDATA[<xen:require css="option_list_option_invalid_callback.css" />

<xen:controlunit label="{$preparedOption.title}">
	<ul>
		<li class="callbackError">
			<h3>{xen:phrase error}</h3>
			{xen:phrase php_callback_x_is_not_valid, 'callback=<code>{$callbackClass}::{$callbackMethod}</code>'}
			{xen:phrase not_possible_display_option_until_edit_definition}
		</li>
		<li class="explain">{xen:raw $preparedOption.explain}</li>
	</ul>
	
	{xen:raw $editLink}
	
</xen:controlunit>]]></template>
  <template title="option_list_option_invalid_callback.css"><![CDATA[.callbackError,
.callbackError a
{
	color: red;
	font-size: 11px;
}

	.callbackError h3
	{
		font-size: 11pt;
		font-weight: bold;
	}
	
	.callbackError code
	{
		color: {xen:property contentText};
	}]]></template>
  <template title="option_list_option_onoff"><![CDATA[<xen:checkboxunit hint="{$preparedOption.hint}">
	<xen:label>{$_preparedOption.title}</xen:label>
	<xen:option name="{$fieldPrefix}[{$preparedOption.option_id}]" selected="{$preparedOption.option_value}">
		<xen:label>{$preparedOption.title}</xen:label>
		<xen:hint>{xen:raw $preparedOption.explain}</xen:hint>
	</xen:option>
	<xen:html>
		<input type="hidden" name="{$listedFieldName}" value="{$preparedOption.option_id}" />
		{xen:raw $editLink}
	</xen:html>
</xen:checkboxunit>]]></template>
  <template title="option_list_option_onoff_textbox"><![CDATA[<xen:checkboxunit label="">
	<xen:option label="{$preparedOption.title}" name="{$fieldPrefix}[{$preparedOption.option_id}][{$formatParams.onoff}]" selected="{$preparedOption.option_value.{$formatParams.onoff}}">
		<xen:disabled>
			<xen:if is="{$formatParams.type} == 'spinbox'">
				<xen:spinbox name="{$fieldPrefix}[{$preparedOption.option_id}][{$formatParams.value}]" value="{xen:if {$preparedOption.option_value.{$formatParams.onoff}}, {$preparedOption.option_value.{$formatParams.value}}, {$formatParams.default}}" size="{$formatParams.size}" min="{$formatParams.min}" max="{$formatParams.max}" step="{$formatParams.step}" />
			<xen:else />
				<xen:textbox name="{$fieldPrefix}[{$preparedOption.option_id}][{$formatParams.value}]" value="{xen:if {$preparedOption.option_value.{$formatParams.onoff}}, {$preparedOption.option_value.{$formatParams.value}}, {$formatParams.default}}" placeholder="{$formatParams.placeholder}" size="{$formatParams.size}" maxlength="{$formatParams.maxlength}" rows="{$formatParams.rows}" inputclass="Elastic" />
			</xen:if>
		</xen:disabled>
	</xen:option>
	<xen:explain>{xen:raw $preparedOption.explain}</xen:explain>
	<xen:html>
		<input type="hidden" name="{$listedFieldName}" value="{$preparedOption.option_id}" />
		{xen:raw $editLink}
	</xen:html>
</xen:checkboxunit>]]></template>
  <template title="option_list_option_radio"><![CDATA[<xen:radiounit label="{$preparedOption.title}" name="{$fieldPrefix}[{$preparedOption.option_id}]" value="{$preparedOption.option_value}" hint="{$preparedOption.hint}">
	<xen:options source="$formatParams" raw="true" />
	<xen:explain>{xen:raw $preparedOption.explain}</xen:explain>
	<xen:html>
		<input type="hidden" name="{$listedFieldName}" value="{$preparedOption.option_id}" />
		{xen:raw $editLink}
	</xen:html>
</xen:radiounit>]]></template>
  <template title="option_list_option_select"><![CDATA[<xen:selectunit label="{$preparedOption.title}" name="{$fieldPrefix}[{$preparedOption.option_id}]" value="{$preparedOption.option_value}"
hint="{$preparedOption.hint}" inputclass="{$preparedOption.inputClass}">
	<xen:options source="$formatParams" />
	<xen:explain>{xen:raw $preparedOption.explain}</xen:explain>
	<xen:html>
		<input type="hidden" name="{$listedFieldName}" value="{$preparedOption.option_id}" />
		{xen:raw $editLink}
	</xen:html>
</xen:selectunit>]]></template>
  <template title="option_list_option_spinbox"><![CDATA[<xen:spinboxunit label="{$preparedOption.title}" name="{$fieldPrefix}[{$preparedOption.option_id}]" value="{$preparedOption.option_value}"
hint="{$preparedOption.hint}" size="{$formatParams.size}" min="{$formatParams.min}" max="{$formatParams.max}" step="{$formatParams.step}">
	<xen:explain>{xen:raw $preparedOption.explain}</xen:explain>
	<xen:html>
		<input type="hidden" name="{$listedFieldName}" value="{$preparedOption.option_id}" />
		{xen:raw $editLink}
	</xen:html>
</xen:spinboxunit>]]></template>
  <template title="option_list_option_textbox"><![CDATA[<xen:textboxunit label="{$preparedOption.title}" name="{$fieldPrefix}[{$preparedOption.option_id}]" value="{$preparedOption.option_value}"
hint="{$formatParams.hint}" placeholder="{$formatParams.placeholder}" type="{$formatParams.type}" size="{$formatParams.size}" maxlength="{$formatParams.maxlength}" rows="{$formatParams.rows}" inputclass="Elastic">
	<xen:explain>{xen:raw $preparedOption.explain}</xen:explain>
	<xen:html>
		<xen:include template="option_list_option_editlink" />
		<input type="hidden" name="{$listedFieldName}" value="{$preparedOption.option_id}" />
		{xen:raw $editLink}
	</xen:html>
</xen:textboxunit>]]></template>
  <template title="option_list_option_uneditable"><![CDATA[<span class="hiddenOption">{xen:raw $editLink}</span>]]></template>
  <template title="option_template_addThis"><![CDATA[<xen:checkboxunit label="AddThis">
	<xen:option name="{$fieldPrefix}[{$preparedOption.option_id}][enabled]" label="{$preparedOption.title}" selected="{$preparedOption.option_value.enabled}">
		<xen:textbox name="{$fieldPrefix}[{$preparedOption.option_id}][pubId]" value="{$preparedOption.option_value.pubId}" />
	</xen:option>	
	
	<xen:explain>{xen:raw $preparedOption.explain}</xen:explain>
	<xen:html>
		<input type="hidden" name="{$listedFieldName}" value="{$preparedOption.option_id}" />
		{xen:raw $editLink}
	</xen:html>

</xen:checkboxunit>]]></template>
  <template title="option_template_adjustTitleCase"><![CDATA[<xen:checkboxunit label="">
	<xen:option name="meh" label="{$preparedOption.title}" value="1" selected="{$preparedOption.option_value}">
		<xen:radio name="{$fieldPrefix}[{$preparedOption.option_id}]" value="{$preparedOption.option_value}" inputclass="autoSize">
			<xen:option value="ucwords" hint="{xen:phrase my_thread_title_title_case}" selected="!{$preparedOption.option_value}">{xen:phrase title_case}</xen:option>
			<xen:option value="ucfirst" hint="{xen:phrase my_thread_title_sentence_case}">{xen:phrase sentence_case}</xen:option>
		</xen:radio>
	</xen:option>

	<xen:html>
		{xen:raw $editLink}
		<input type="hidden" name="{$listedFieldName}" value="{$preparedOption.option_id}" />
	</xen:html>
	
	<xen:explain>{xen:raw $preparedOption.explain}</xen:explain>
</xen:checkboxunit>
]]></template>
  <template title="option_template_attachmentMaxDimensions"><![CDATA[<xen:controlunit label="{$preparedOption.title}" hint="{$preparedOption.hint}">
	<xen:explain>{xen:raw $preparedOption.explain}</xen:explain>
	<xen:html>
		<xen:textbox name="{$fieldPrefix}[{$preparedOption.option_id}][width]" value="{$preparedOption.option_value.width}" placeholder="{xen:phrase width}" size="7" inputclass="number" />
		x
		<xen:textbox name="{$fieldPrefix}[{$preparedOption.option_id}][height]" value="{$preparedOption.option_value.height}" placeholder="{xen:phrase height}" size="7" inputclass="number" />
		
		<input type="hidden" name="{$listedFieldName}" value="{$preparedOption.option_id}" />
		{xen:raw $editLink}
	</xen:html>
</xen:controlunit>]]></template>
  <template title="option_template_autoEmbedMedia"><![CDATA[<xen:radiounit name="{$fieldPrefix}[{$preparedOption.option_id}][embedType]" label="{$preparedOption.title}" value="{$preparedOption.option_value.embedType}">
	<xen:option value="0" label="{xen:phrase do_not_auto_embed_media_links}" />
	<xen:option value="1" label="{xen:phrase auto_embed_media_links}" />
	<xen:option value="2" label="{xen:phrase auto_embed_media_and_add_link_in_this_bb_code}:">
		<xen:disabled>
			<xen:textbox name="{$fieldPrefix}[{$preparedOption.option_id}][linkBbCode]" value="{$preparedOption.option_value.linkBbCode}" inputclass="autoSize code" size="30" />
			<span class="explain">{xen:phrase include_url_token}</span>
		</xen:disabled>
	</xen:option>

	<xen:html>
		{xen:raw $editLink}
		<input type="hidden" name="{$listedFieldName}" value="{$preparedOption.option_id}" />
	</xen:html>
	
	<xen:explain>{xen:raw $preparedOption.explain}</xen:explain>
</xen:radiounit>
]]></template>
  <template title="option_template_captcha"><![CDATA[<xen:checkboxunit label="">
	<xen:option name="_whatever" label="{$preparedOption.title}" value="1" selected="{$preparedOption.option_value}">
		<xen:radio name="{$fieldPrefix}[{$preparedOption.option_id}]" value="{$preparedOption.option_value}">
			<xen:option value="ReCaptcha" selected="!{$preparedOption.option_value}">
				<xen:label>{xen:phrase use_recaptcha}</xen:label>
				<xen:hint>{xen:phrase use_recaptcha_explain}</xen:hint>
			</xen:option>
			<xen:option value="NoCaptcha" inputclass="Hider">
				<xen:label>{xen:phrase use_recaptcha_nocaptcha}</xen:label>
				<xen:hint><a href="http://www.google.com/recaptcha" target="_blank">http://www.google.com/recaptcha</a></xen:hint>
				<xen:disabled>
					<div>{xen:phrase site_key}:</div>
					<xen:textbox name="{$fieldPrefix}[extraCaptchaKeys][reCaptchaSiteKey]" value="{$xenOptions.extraCaptchaKeys.reCaptchaSiteKey}" />
				</xen:disabled>
				<xen:disabled>
					<div>{xen:phrase secret_key}:</div>
					<xen:textbox name="{$fieldPrefix}[extraCaptchaKeys][reCaptchaSecretKey]" value="{$xenOptions.extraCaptchaKeys.reCaptchaSecretKey}" />
				</xen:disabled>
			</xen:option>
			<xen:option value="Question">
				<xen:label>{xen:phrase use_question_captcha}</xen:label>
				<xen:hint><a href="{xen:adminlink captcha-questions}">{xen:phrase define_your_questions}</a></xen:hint>
			</xen:option>
			<xen:option value="TextCaptcha" inputclass="Hider">
				<xen:label>{xen:phrase use_textcaptcha}</xen:label>
				<xen:hint><a href="http://textcaptcha.com/" target="_blank">http://textcaptcha.com/</a></xen:hint>
				<xen:disabled>
					<div>{xen:phrase api_key}:</div>
					<xen:textbox name="{$fieldPrefix}[extraCaptchaKeys][textCaptchaApiKey]" value="{$xenOptions.extraCaptchaKeys.textCaptchaApiKey}" />
				</xen:disabled>
			</xen:option>
			<xen:option value="SolveMedia" inputclass="Hider">
				<xen:label>{xen:phrase use_solve_media}</xen:label>
				<xen:hint><a href="http://www.solvemedia.com/" target="_blank">http://www.solvemedia.com/</a></xen:hint>
				<xen:disabled>
					<div>{xen:phrase challenge_key}:</div>
					<xen:textbox name="{$fieldPrefix}[extraCaptchaKeys][solveMediaCKey]" value="{$xenOptions.extraCaptchaKeys.solveMediaCKey}" />
				</xen:disabled>
				<xen:disabled>
					<div>{xen:phrase verification_key}:</div>
					<xen:textbox name="{$fieldPrefix}[extraCaptchaKeys][solveMediaVKey]" value="{$xenOptions.extraCaptchaKeys.solveMediaVKey}" />
				</xen:disabled>
			</xen:option>
			<xen:option value="KeyCaptcha" inputclass="Hider">
				<xen:label>{xen:phrase use_keycaptcha}</xen:label>
				<xen:hint><a href="https://www.keycaptcha.com/" target="_blank">https://www.keycaptcha.com/</a></xen:hint>
				<xen:disabled>
					<div>{xen:phrase user_id}:</div>
					<xen:textbox name="{$fieldPrefix}[extraCaptchaKeys][keyCaptchaUserId]" value="{$xenOptions.extraCaptchaKeys.keyCaptchaUserId}" />
				</xen:disabled>
				<xen:disabled>
					<div>{xen:phrase private_key}:</div>
					<xen:textbox name="{$fieldPrefix}[extraCaptchaKeys][keyCaptchaPrivateKey]" value="{$xenOptions.extraCaptchaKeys.keyCaptchaPrivateKey}" />
				</xen:disabled>
			</xen:option>
			<xen:options source="$preparedOption.extraChoices" />
		</xen:radio>
	</xen:option>

	<xen:html>
		{xen:raw $editLink}
		<input type="hidden" name="{$listedFieldName}" value="{$preparedOption.option_id}" />
		<input type="hidden" name="{$listedFieldName}" value="extraCaptchaKeys" />
	</xen:html>
	
	<xen:explain>{xen:raw $preparedOption.explain}</xen:explain>
</xen:checkboxunit>]]></template>
  <template title="option_template_censorWords"><![CDATA[<xen:require js="js/xenforo/options_censor.js" />

<xen:controlunit label="{$preparedOption.title}" hint="{$preparedOption.hint}">
	<xen:explain>{xen:raw $preparedOption.explain}</xen:explain>
	<xen:html>
		<ul>
			<xen:foreach loop="$choices" key="$counter" value="$choice">
			<li>
				<xen:textbox name="{$fieldPrefix}[{$preparedOption.option_id}][{$counter}][word]" value="{$choice.word}" placeholder="{xen:phrase word_or_phrase}" size="20" />
				<xen:textbox name="{$fieldPrefix}[{$preparedOption.option_id}][{$counter}][replace]" value="{$choice.replace}" placeholder="{xen:phrase replacement_optional}" size="20" />
			</li>
			</xen:foreach>
		
			<li class="CensorWordOptionListener">
				<xen:textbox name="{$fieldPrefix}[{$preparedOption.option_id}][{$nextCounter}][word]" value="" placeholder="{xen:phrase word_or_phrase}" size="20" />
				<xen:textbox name="{$fieldPrefix}[{$preparedOption.option_id}][{$nextCounter}][replace]" value="" placeholder="{xen:phrase replacement_optional}" size="20" />
			</li>
		</ul>
		
		<input type="hidden" name="{$listedFieldName}" value="{$preparedOption.option_id}" />
		{xen:raw $editLink}
	</xen:html>
</xen:controlunit>]]></template>
  <template title="option_template_contactUrl"><![CDATA[<xen:radiounit label="{$preparedOption.title}" hint="{$preparedOption.hint}" name="{$fieldPrefix}[{$preparedOption.option_id}][type]">
	<xen:explain>{xen:raw $preparedOption.explain}</xen:explain>
	
	<xen:option label="{xen:phrase no_contact_url}" value="" selected="{$preparedOption.option_value.type} == ''" />
		
	<xen:option label="{xen:phrase default_url} ({xen:link 'canonical:misc/contact'})" value="default" selected="{$preparedOption.option_value.type} == 'default'" />
		
	<xen:option label="{xen:phrase custom_url}:" value="custom" selected="{$preparedOption.option_value.type} == 'custom'">
		<xen:textbox name="{$fieldPrefix}[{$preparedOption.option_id}][custom]" value="{$preparedOption.option_value.custom}" />
		<xen:disabled><label><input type="checkbox" name="{$fieldPrefix}[{$preparedOption.option_id}][overlay]" value="1" {xen:if {$preparedOption.option_value.overlay}, 'checked="checked"'} />
			{xen:phrase open_in_overlay}</label></xen:disabled>
	</xen:option>
	
	<xen:html>
		<input type="hidden" name="{$listedFieldName}" value="{$preparedOption.option_id}" />
		{xen:raw $editLink}
	</xen:html>
</xen:radiounit>]]></template>
  <template title="option_template_emailBounceHandler"><![CDATA[<xen:checkboxunit label="{$preparedOption.title}" name="{$fieldPrefix}[{$preparedOption.option_id}][{$preparedOption.option_id}]" value="{$preparedOption.option_value.{$preparedOption.option_id}}" hint="{$preparedOption.hint}">
	<xen:option name="{$fieldPrefix}[{$preparedOption.option_id}][enabled]" value="1" selected="{$preparedOption.option_value.enabled}" label="{xen:phrase enable_automated_bounced_email_handler}">
		<xen:disabled>
			<ul>
				<li>{xen:phrase connection_type}:
					<xen:radio name="{$fieldPrefix}[{$preparedOption.option_id}][type]" value="{xen:if {$preparedOption.option_value.type}, {$preparedOption.option_value.type}, 'pop3'}" listclass="indented">
						<xen:option value="pop3">POP3</xen:option>
						<xen:option value="imap">IMAP</xen:option>
					</xen:radio>
				</li>
				<li>{xen:phrase host}:
					<div class="indented">
						<xen:textbox name="{$fieldPrefix}[{$preparedOption.option_id}][host]" value="{$preparedOption.option_value.host}" placeholder="{xen:phrase host}" size="40" /> :
						<xen:textbox name="{$fieldPrefix}[{$preparedOption.option_id}][port]" value="{$preparedOption.option_value.port}" placeholder="{xen:phrase port}" size="5" />
					</div>
				</li>
				<li>{xen:phrase user_name_and_password}:
					<div class="indented">
						<xen:textbox name="{$fieldPrefix}[{$preparedOption.option_id}][username]" value="{$preparedOption.option_value.username}" placeholder="{xen:phrase user_name}" size="15" />
						<xen:textbox type="password" name="{$fieldPrefix}[{$preparedOption.option_id}][password]" value="{$preparedOption.option_value.password}" size="15" />
					</div>
				</li>
				<li>{xen:phrase encryption}:
					<xen:radio name="{$fieldPrefix}[{$preparedOption.option_id}][encryption]" value="{xen:if {$preparedOption.option_value.encryption}, {$preparedOption.option_value.encryption}, ''}" listclass="indented">
						<xen:option value="">{xen:phrase none}</xen:option>
						<xen:option value="tls">TLS</xen:option>
						<xen:option value="ssl">SSL</xen:option>
					</xen:radio>
				</li>
			</ul>
		</xen:disabled>
	</xen:option>
	<xen:explain>{xen:raw $preparedOption.explain}</xen:explain>
	<xen:html>
		<input type="hidden" name="{$listedFieldName}" value="{$preparedOption.option_id}" />
		{xen:raw $editLink}
	</xen:html>
</xen:checkboxunit>]]></template>
  <template title="option_template_emailSoftBounceThreshold"><![CDATA[<xen:controlunit label="{$preparedOption.title}">

	<ul>
		<li><div>{xen:phrase minimum_number_of_bounces}:</div>
			<xen:spinbox
				name="{$fieldPrefix}[{$preparedOption.option_id}][bounce_total]"
				value="{$preparedOption.option_value.bounce_total}"
				min="1" /></li>
		
		<li><div>{xen:phrase minimum_number_of_days_with_bounces}:</div>
			<xen:spinbox
				name="{$fieldPrefix}[{$preparedOption.option_id}][unique_days]"
				value="{$preparedOption.option_value.unique_days}"
				min="1" max="30" /></li>
		
		<li><div>{xen:phrase minimum_number_of_days_between_oldest_and_newest_bounce}:</div>
			<xen:spinbox
				name="{$fieldPrefix}[{$preparedOption.option_id}][days_between]"
				value="{$preparedOption.option_value.days_between}"
				min="0" max="30" /></li>
	</ul>
	
	<p class="explain">{xen:raw $preparedOption.explain}</p>
	
	<input type="hidden" name="{$listedFieldName}" value="{$preparedOption.option_id}" />
	{xen:raw $editLink}

</xen:controlunit>]]></template>
  <template title="option_template_emailTransport"><![CDATA[<xen:radiounit label="{$preparedOption.title}" name="{$fieldPrefix}[{$preparedOption.option_id}][{$preparedOption.option_id}]" value="{$preparedOption.option_value.{$preparedOption.option_id}}" hint="{$preparedOption.hint}">
	<xen:option value="sendmail" label="{xen:phrase default}">
		<xen:checkbox>
			<xen:option name="{$fieldPrefix}[{$preparedOption.option_id}][sendmailReturnPath]" selected="{$preparedOption.option_value.sendmailReturnPath}">{xen:phrase set_return_path_with_f_parameter}</xen:option>
		</xen:checkbox>
	</xen:option>
	<xen:option value="smtp" label="SMTP">
		<xen:disabled>
			<ul>
				<li>
					<xen:textbox name="{$fieldPrefix}[{$preparedOption.option_id}][smtpHost]" value="{$preparedOption.option_value.smtpHost}" placeholder="{xen:phrase host}" size="40" /> :
					<xen:textbox name="{$fieldPrefix}[{$preparedOption.option_id}][smtpPort]" value="{$preparedOption.option_value.smtpPort}" placeholder="{xen:phrase port}" size="5" />
				</li>
				<li>{xen:phrase authentication}:
					<xen:radio name="{$fieldPrefix}[{$preparedOption.option_id}][smtpAuth]" value="{xen:if {$preparedOption.option_value.smtpAuth}, {$preparedOption.option_value.smtpAuth}, 'none'}" listclass="indented">
						<xen:option value="none">{xen:phrase none}</xen:option>
						<xen:option value="login" label="{xen:phrase user_name_and_password}">
							<xen:disabled>
								<div class="indented">
								<xen:textbox name="{$fieldPrefix}[{$preparedOption.option_id}][smtpLoginUsername]" value="{$preparedOption.option_value.smtpLoginUsername}" placeholder="{xen:phrase user_name}" size="15" />
								<xen:textbox type="password" name="{$fieldPrefix}[{$preparedOption.option_id}][smtpLoginPassword]" value="{$preparedOption.option_value.smtpLoginPassword}" size="15" />
								</div>
							</xen:disabled>
						</xen:option>
					</xen:radio>
				</li>
				<li>{xen:phrase encryption}:
					<xen:radio name="{$fieldPrefix}[{$preparedOption.option_id}][smtpEncrypt]" value="{xen:if {$preparedOption.option_value.smtpEncrypt}, {$preparedOption.option_value.smtpEncrypt}, 'none'}" listclass="indented">
						<xen:option value="none">{xen:phrase none}</xen:option>
						<xen:option value="tls">TLS</xen:option>
						<xen:option value="ssl">SSL</xen:option>
					</xen:radio>
				</li>
			</ul>
		</xen:disabled>
	</xen:option>
	<xen:explain>{xen:raw $preparedOption.explain}</xen:explain>
	<xen:html>
		<input type="hidden" name="{$listedFieldName}" value="{$preparedOption.option_id}" />
		{xen:raw $editLink}
	</xen:html>
</xen:radiounit>]]></template>
  <template title="option_template_extraCaptchaKeys"><![CDATA[<xen:controlunit label="{$preparedOption.title}">
	{xen:raw $preparedOption.explain}
	{xen:raw $editLink}
</xen:controlunit>]]></template>
  <template title="option_template_facebookAdmins"><![CDATA[<xen:controlunit label="{$preparedOption.title}">

	<xen:html>
		<ul>
			<xen:foreach loop="{$preparedOption.option_value}" value="$admin">
				<xen:if is="{$admin} !== ''">
					<li class="fbAdmin"><xen:textbox name="{$fieldPrefix}[{$preparedOption.option_id}][]" value="{$admin}" placeholder="{xen:phrase facebook_user_id}" /></li>
				</xen:if>
			</xen:foreach>
			<li class="fbAdmin"><xen:textbox name="{$fieldPrefix}[{$preparedOption.option_id}][]" value="" placeholder="{xen:phrase facebook_user_id}" /></li>
		</ul>
		<div style="margin-bottom: 5px"><input type="button" value="{xen:phrase add_another_admin}" class="button smallButton FieldAdder" data-source="li.fbAdmin" /></div>
		<input type="hidden" name="{$listedFieldName}" value="{$preparedOption.option_id}" />
		{xen:raw $editLink}
	</xen:html>
	
	<xen:hint>{xen:phrase option_facebookAdmins_hint}</xen:hint>
	<xen:explain>{xen:raw $preparedOption.explain}</xen:explain>
	
</xen:controlunit>]]></template>
  <template title="option_template_imageLibrary"><![CDATA[<xen:radiounit label="{$preparedOption.title}"
	name="{$fieldPrefix}[{$preparedOption.option_id}][class]"
	value="{$preparedOption.option_value.class}"
	hint="{$preparedOption.hint}">
	<xen:option value="gd">{xen:phrase php_built_in_gd}</xen:option>
	<xen:option value="imPecl" unselectable="{$preparedOption.noImagick}">
		<xen:label>{xen:phrase imagemagick_pecl_extension}</xen:label>
		<xen:hint>{xen:phrase must_have_imagick_pecl_extension, 'link=http://pecl.php.net/package/imagick'}</xen:hint>
	</xen:option>
	<xen:explain>{xen:raw $preparedOption.explain}</xen:explain>
	<xen:html>		
		<input type="hidden" name="{$listedFieldName}" value="{$preparedOption.option_id}" />
		{xen:raw $editLink}
	</xen:html>
</xen:radiounit>]]></template>
  <template title="option_template_jumpMenuNodeTypes"><![CDATA[<xen:radiounit label="{$preparedOption.title}" name="{$fieldPrefix}[{$preparedOption.option_id}][_type]" hint="{$preparedOption.hint}">
	<xen:option value="_some" selected="{$preparedOption.option_value._type} == '_some'">
		<xen:label>{xen:phrase display_following_node_types}:</xen:label>
		<xen:checkbox name="{$fieldPrefix}[{$preparedOption.option_id}]" value="{$preparedOption.option_value}">
			<xen:options source="$formatParams" />
		</xen:checkbox>
	</xen:option>
	<xen:option value="_all" selected="{$preparedOption.option_value._type} == '_all'">{xen:phrase display_all_node_types}</xen:option>
	<xen:explain>{xen:raw $preparedOption.explain}</xen:explain>
	<xen:html>
		<input type="hidden" name="{$listedFieldName}" value="{$preparedOption.option_id}" />
		{xen:raw $editLink}
	</xen:html>
</xen:radiounit>]]></template>
  <template title="option_template_minMax"><![CDATA[<xen:controlunit label="{$preparedOption.title}"
hint="{$preparedOption.hint}">
	<xen:explain>{xen:raw $preparedOption.explain}</xen:explain>
	<xen:html>
		<xen:spinbox name="{$fieldPrefix}[{$preparedOption.option_id}][min]" value="{$preparedOption.option_value.min}" placeholder="{xen:phrase minimum}" inputclass="number" min="0" step="5" />
		-
		<xen:spinbox name="{$fieldPrefix}[{$preparedOption.option_id}][max]" value="{$preparedOption.option_value.max}" placeholder="{xen:phrase maximum}" inputclass="number" min="0" step="5" />
		
		<input type="hidden" name="{$listedFieldName}" value="{$preparedOption.option_id}" />
		{xen:raw $editLink}
	</xen:html>
</xen:controlunit>]]></template>
  <template title="option_template_preventDiscouragedRegistration"><![CDATA[<xen:checkboxunit hint="{$preparedOption.hint}">
	<xen:label>{$_preparedOption.title}</xen:label>
	<xen:option name="{$fieldPrefix}[{$preparedOption.option_id}]" selected="{$preparedOption.option_value}">
		<xen:label>{$preparedOption.title}</xen:label>
		<xen:hint>{xen:phrase option_preventDiscouragedRegistration_explain, 'link={xen:adminlink banning/discouraged-ips}'}</xen:hint>
	</xen:option>
	<xen:html>
		<input type="hidden" name="{$listedFieldName}" value="{$preparedOption.option_id}" />
		{xen:raw $editLink}
	</xen:html>
</xen:checkboxunit>]]></template>
  <template title="option_template_registrationCheckDnsBl"><![CDATA[<xen:checkboxunit hint="{$preparedOption.hint}">
	<xen:label></xen:label>
	<xen:option name="{$fieldPrefix}[{$preparedOption.option_id}][check]" selected="{$preparedOption.option_value.check}" label="{$preparedOption.title}" hint="{$preparedOption.explain}">
		<xen:disabled>
			<div>{xen:phrase project_honey_pot_key}</div>
			<xen:textbox name="{$fieldPrefix}[{$preparedOption.option_id}][projectHoneyPotKey]" value="{$preparedOption.option_value.projectHoneyPotKey}" inputclass="indented" />
			<p class="hint">{xen:phrase if_entered_project_honey_pot_http_blacklist_checked}</p>
		</xen:disabled>
		<xen:disabled>
			<div>{xen:phrase action}:</div>
			<xen:radio name="{$fieldPrefix}[{$preparedOption.option_id}][action]" value="{xen:if $preparedOption.option_value.action, $preparedOption.option_value.action, 'moderate'}" listclass="choiceList indented">
				<xen:option value="moderate">{xen:phrase require_registration_manually_approved_admin}</xen:option>
				<xen:option value="block">{xen:phrase block_this_registration}</xen:option>
			</xen:radio>
		</xen:disabled>
	</xen:option>
	<xen:html>
		<input type="hidden" name="{$listedFieldName}" value="{$preparedOption.option_id}" />
		{xen:raw $editLink}
	</xen:html>
</xen:checkboxunit>]]></template>
  <template title="option_template_registrationDefaults"><![CDATA[<xen:controlunit label="{$preparedOption.title}" explain="{xen:raw $preparedOption.explain}">
<xen:checkbox>
	<xen:option name="{$fieldPrefix}[{$preparedOption.option_id}][visible]" selected="{$value.visible}">{xen:phrase show_online_status}</xen:option>
	<xen:option name="{$fieldPrefix}[{$preparedOption.option_id}][activity_visible]" selected="{$value.activity_visible}">{xen:phrase show_current_activity}</xen:option>
	<xen:option name="{$fieldPrefix}[{$preparedOption.option_id}][content_show_signature]" selected="{$value.content_show_signature}">{xen:phrase show_signatures_with_messages}</xen:option>
	<xen:option name="{$fieldPrefix}[{$preparedOption.option_id}][show_dob_date]" selected="{$value.show_dob_date}">{xen:phrase show_day_and_month_of_birth}</xen:option>
	<xen:option name="{$fieldPrefix}[{$preparedOption.option_id}][show_dob_year]" selected="{$value.show_dob_year}">{xen:phrase show_year_of_birth}</xen:option>
	<xen:option name="{$fieldPrefix}[{$preparedOption.option_id}][receive_admin_email]" selected="{$value.receive_admin_email}">{xen:phrase receive_site_mailings}</xen:option>
	<xen:option name="{$fieldPrefix}[{$preparedOption.option_id}][email_on_conversation]" selected="{$value.email_on_conversation}">{xen:phrase receive_email_when_new_conversation_message_is_received}</xen:option>
</xen:checkbox>
<br />
<ul class="unitPairsJustified">
	<li>
		<span class="label">{xen:phrase watch_threads_when_creating_or_replying}:</span>
		<xen:select name="{$fieldPrefix}[{$preparedOption.option_id}][default_watch_state]" value="{$value.default_watch_state}" inputclass="value autoSize">
			<xen:option value="watch_no_email">{xen:phrase yes}</xen:option>
			<xen:option value="watch_email">{xen:phrase yes_with_email}</xen:option>
			<xen:option value="">{xen:phrase no}</xen:option>
		</xen:select>
	</li>
	<li>
		<span class="label">{xen:phrase view_this_users_profile_page_details}:</span>
		<xen:select name="{$fieldPrefix}[{$preparedOption.option_id}][allow_view_profile]" value="{$value.allow_view_profile}" inputclass="value autoSize">
			<xen:option value="everyone">{xen:phrase all_visitors}</xen:option>
			<xen:option value="members">{xen:phrase members_only}</xen:option>
			<xen:option value="followed">{xen:phrase followed_members_only}</xen:option>
			<xen:option value="none">{xen:phrase nobody}</xen:option>
		</xen:select>
	</li>
	<li>
		<span class="label">{xen:phrase post_messages_on_this_users_profile_page}:</span>
		<xen:select name="{$fieldPrefix}[{$preparedOption.option_id}][allow_post_profile]" value="{$value.allow_post_profile}" inputclass="value autoSize">
			<xen:option value="members">{xen:phrase members_only}</xen:option>
			<xen:option value="followed">{xen:phrase followed_members_only}</xen:option>
			<xen:option value="none">{xen:phrase nobody}</xen:option>
		</xen:select>
	</li>
	<li>
		<span class="label">{xen:phrase receive_this_users_news_feed}:</span>
		<xen:select name="{$fieldPrefix}[{$preparedOption.option_id}][allow_receive_news_feed]" value="{$value.allow_receive_news_feed}" inputclass="value autoSize">
			<xen:option value="everyone">{xen:phrase all_visitors}</xen:option>
			<xen:option value="members">{xen:phrase members_only}</xen:option>
			<xen:option value="followed">{xen:phrase followed_members_only}</xen:option>
			<xen:option value="none">{xen:phrase nobody}</xen:option>
		</xen:select>
	</li>
	<li>
		<span class="label">{xen:phrase initiate_conversations_with_this_user}:</span>
		<xen:select name="{$fieldPrefix}[{$preparedOption.option_id}][allow_send_personal_conversation]" value="{$value.allow_send_personal_conversation}" inputclass="value autoSize">
			<xen:option value="members">{xen:phrase members_only}</xen:option>
			<xen:option value="followed">{xen:phrase followed_members_only}</xen:option>
			<xen:option value="none">{xen:phrase nobody}</xen:option>
		</xen:select>
	</li>
	<li>
		<span class="label">{xen:phrase view_this_users_identities}:</span>
		<xen:select name="{$fieldPrefix}[{$preparedOption.option_id}][allow_view_identities]" value="{$value.allow_view_identities}" inputclass="value autoSize">
			<xen:option value="everyone">{xen:phrase all_visitors}</xen:option>
			<xen:option value="members">{xen:phrase members_only}</xen:option>
			<xen:option value="followed">{xen:phrase followed_members_only}</xen:option>
			<xen:option value="none">{xen:phrase nobody}</xen:option>
		</xen:select>
	</li>
</ul>

<input type="hidden" name="{$listedFieldName}" value="{$preparedOption.option_id}" />
{xen:raw $editLink}
</xen:controlunit>]]></template>
  <template title="option_template_registrationSetup"><![CDATA[<xen:checkboxunit label="{$preparedOption.title}" hint="{$preparedOption.hint}">
	<xen:explain>{xen:raw $preparedOption.explain}</xen:explain>
	
	<xen:option label="{xen:phrase enable_registration}" name="{$fieldPrefix}[{$preparedOption.option_id}][enabled]" selected="{$preparedOption.option_value.enabled}" />
	
	<xen:option label="{xen:phrase enable_email_confirmation}" name="{$fieldPrefix}[{$preparedOption.option_id}][emailConfirmation]" selected="{$preparedOption.option_value.emailConfirmation}">
		<xen:hint>{xen:phrase if_selected_users_click_link_email_before_registration_complete}</xen:hint>
	</xen:option>
	
	<xen:option label="{xen:phrase enable_manual_approval}" name="{$fieldPrefix}[{$preparedOption.option_id}][moderation]" selected="{$preparedOption.option_value.moderation}">
		<xen:hint>{xen:phrase if_selected_admin_manually_approve_users}</xen:hint>
	</xen:option>
	
	<xen:option label="{xen:phrase require_date_of_birth_and_minimum_age}:" name="{$fieldPrefix}[{$preparedOption.option_id}][requireDob]" selected="{$preparedOption.option_value.requireDob}">
		<xen:textbox name="{$fieldPrefix}[{$preparedOption.option_id}][minimumAge]" value="{$preparedOption.option_value.minimumAge}" placeholder="{xen:phrase minimum_age}" size="10" />
	</xen:option>
	
	<xen:option label="{xen:phrase require_location}" name="{$fieldPrefix}[{$preparedOption.option_id}][requireLocation]" selected="{$preparedOption.option_value.requireLocation}" />
	
	<xen:html>
		<input type="hidden" name="{$listedFieldName}" value="{$preparedOption.option_id}" />
		{xen:raw $editLink}
	</xen:html>
</xen:checkboxunit>]]></template>
  <template title="option_template_saveDrafts"><![CDATA[<xen:checkboxunit label="">
	<xen:option name="{$fieldPrefix}[{$preparedOption.option_id}][enabled]" selected="{$preparedOption.option_value.enabled}" label="{$preparedOption.title}" explain="{$preparedOption.explain}">
		<xen:disabled>
			<span style="display: inline-block; min-width: 220px">{xen:phrase store_drafts_for_x_hours}:</span> <xen:spinbox name="{$fieldPrefix}[{$preparedOption.option_id}][lifetime]" value="{xen:if $preparedOption.option_value.enabled, $preparedOption.option_value.lifetime, 24}" min="1" />
		</xen:disabled>
		<xen:disabled>
			<span style="display: inline-block; min-width: 220px">{xen:phrase save_drafts_every_x_seconds}:</span> <xen:spinbox name="{$fieldPrefix}[{$preparedOption.option_id}][saveFrequency]" value="{xen:if $preparedOption.option_value.enabled, $preparedOption.option_value.saveFrequency, 60}" min="1" />
		</xen:disabled>
	</xen:option>

	<xen:html>
		{xen:raw $editLink}
		<input type="hidden" name="{$listedFieldName}" value="{$preparedOption.option_id}" />
	</xen:html>
	
	<xen:explain>{xen:raw $preparedOption.explain}</xen:explain>
</xen:checkboxunit>]]></template>
  <template title="option_template_spamPhrases"><![CDATA[<xen:controlunit label="{$preparedOption.title}">
	<div>
		<xen:textbox name="{$fieldPrefix}[{$preparedOption.option_id}][phrases]" value="{$preparedOption.option_value.phrases}" rows="2" inputclass="Elastic" />
	</div>
	<p class="explain" style="margin-bottom: 6px">{$preparedOption.explain}</p>

	{xen:phrase action}:
	<xen:radio name="{$fieldPrefix}[{$preparedOption.option_id}][action]" value="{$preparedOption.option_value.action}">
		<xen:option value="moderate">{xen:phrase manually_approve}</xen:option>
		<xen:option value="reject">{xen:phrase reject}</xen:option>
	</xen:radio>
	
	<input type="hidden" name="{$listedFieldName}" value="{$preparedOption.option_id}" />
	{xen:raw $editLink}
</xen:controlunit>]]></template>
  <template title="option_template_spamThreadAction"><![CDATA[<xen:radiounit label="{$preparedOption.title}" name="{$fieldPrefix}[{$preparedOption.option_id}][action]" value="{$preparedOption.option_value.action}">
	
	<xen:option value="delete" label="{xen:phrase permanently_delete}" />

	<xen:option value="soft-delete" label="{xen:phrase remove_from_public_view}" />
	
	<xen:option value="move" label="{xen:phrase move_to_forum}:">
	
		<xen:select name="{$fieldPrefix}[{$preparedOption.option_id}][node_id]" value="{$preparedOption.option_value.node_id}" inputclass="autoSize">
			<xen:options source="$formatParams" />
		</xen:select>
	
	</xen:option>
	
	<xen:html>
		<input type="hidden" name="{$listedFieldName}" value="{$preparedOption.option_id}" />
		{xen:raw $editLink}
	</xen:html>
	
	<xen:explain>{xen:raw $preparedOption.explain}</xen:explain>
	
</xen:radiounit>]]></template>
  <template title="option_template_spamUserCriteria"><![CDATA[<xen:controlunit label="{$preparedOption.title}">

	<ul>
		<li><div><label for="spamuc_mc">{xen:phrase maximum_message_count}:</label></div>
			<xen:spinbox
				name="{$fieldPrefix}[{$preparedOption.option_id}][message_count]"
				value="{$preparedOption.option_value.message_count}"
				step="10"
				min="0"
				id="spamuc_mc" /></li>
		
		<li><div><label for="spamuc_rd">{xen:phrase maximum_days_since_registration}:</label></div>
			<xen:spinbox
				name="{$fieldPrefix}[{$preparedOption.option_id}][register_date]"
				value="{$preparedOption.option_value.register_date}"
				step="1"
				min="0"
				id="spamuc_rd" /></li>
		
		<li><div><label for="spamuc_tl">{xen:phrase maximum_likes_received}:</label></div>
			<xen:spinbox
				name="{$fieldPrefix}[{$preparedOption.option_id}][like_count]"
				value="{$preparedOption.option_value.like_count}"
				step="10"
				min="0"
				id="spamuc_tl" /></li>
	</ul>
	
	<p class="explain">{xen:raw $preparedOption.explain}</p>
	
	<input type="hidden" name="{$listedFieldName}" value="{$preparedOption.option_id}" />
	{xen:raw $editLink}

</xen:controlunit>]]></template>
  <template title="option_template_stopForumSpam"><![CDATA[<xen:checkboxunit label="{$preparedOption.title}:">
	<xen:option name="{$fieldPrefix}[{$preparedOption.option_id}][enabled]" label="{xen:phrase stopforumspam_enable_registration_check}" value="1"
		selected="{$preparedOption.option_value.enabled}">
		<xen:hint>{xen:phrase stopforumspam_enable_registration_check_explain}</xen:hint>
		<xen:checkbox>
		
			<xen:option name="_moderateThreshold" selected="{$preparedOption.option_value.moderateThreshold}">
				<xen:label>{xen:phrase stopforumspam_moderate_registration_threshold}:</xen:label>
				<xen:disabled>
					<xen:spinbox name="{$fieldPrefix}[{$preparedOption.option_id}][moderateThreshold]"
						min="1" max="3" step="1"
						value="{$preparedOption.option_value.moderateThreshold}" />
					<p class="explain">{xen:phrase stopforumspam_moderate_registration_threshold_explain}</p>
				</xen:disabled>
			</xen:option>
			<xen:option name="_denyThreshold" selected="{$preparedOption.option_value.denyThreshold}">
				<xen:label>{xen:phrase stopforumspam_reject_registration_threshold}:</xen:label>
				<xen:disabled>
					<xen:spinbox name="{$fieldPrefix}[{$preparedOption.option_id}][denyThreshold]"
						min="1" max="3" step="1"
						value="{$preparedOption.option_value.denyThreshold}" />
					<p class="explain">{xen:phrase stopforumspam_reject_registration_threshold_explain}</p>
				</xen:disabled>
			</xen:option>
			
			<xen:option name="_lastSeenCutOff" selected="{$preparedOption.option_value.lastSeenCutOff}">
				<xen:label>{xen:phrase stopforumspam_lastseencutoff_label}:</xen:label>
				<xen:disabled>
					<xen:spinbox name="{$fieldPrefix}[{$preparedOption.option_id}][lastSeenCutOff]"
						min="0" step="1"
						value="{$preparedOption.option_value.lastSeenCutOff}" />
					<p class="explain">{xen:phrase stopforumspam_lastseencutoff_explain}</p>
				</xen:disabled>
			</xen:option>
			
			<xen:option name="_frequencyCutOff" selected="{$preparedOption.option_value.frequencyCutOff}">
				<xen:label>{xen:phrase stopforumspam_frequencycutoff_label}:</xen:label>
				<xen:disabled>
					<xen:spinbox name="{$fieldPrefix}[{$preparedOption.option_id}][frequencyCutOff]"
						min="0" step="1"
						value="{$preparedOption.option_value.frequencyCutOff}" />
					<p class="explain">{xen:phrase stopforumspam_frequencycutoff_explain}</p>
				</xen:disabled>
			</xen:option>

		</xen:checkbox>
	</xen:option>
	<xen:option name="{$fieldPrefix}[{$preparedOption.option_id}][submitRejections]" value="1" selected="{$preparedOption.option_value.submitRejections}">
		<xen:label>{xen:phrase stopforumspam_submit_information}:</xen:label>
		<xen:disabled>
			<xen:textbox name="{$fieldPrefix}[{$preparedOption.option_id}][apiKey]"
				value="{$preparedOption.option_value.apiKey}" />
			<p class="explain">{xen:phrase stopforumspam_submit_information_explain}</p>
		</xen:disabled>
	</xen:option>

	<xen:html>
		{xen:raw $editLink}
		<input type="hidden" name="{$listedFieldName}" value="{$preparedOption.option_id}" />
	</xen:html>
	
	<xen:explain>{xen:raw $preparedOption.explain}</xen:explain>
</xen:checkboxunit>]]></template>
  <template title="option_template_tosUrl"><![CDATA[<xen:radiounit label="{$preparedOption.title}" hint="{$preparedOption.hint}" name="{$fieldPrefix}[{$preparedOption.option_id}][type]">
	<xen:explain>{xen:raw $preparedOption.explain}</xen:explain>
	
	<xen:option label="{xen:phrase no_terms_and_rules}" value="" selected="{$preparedOption.option_value.type} == ''" />
		
	<xen:option label="{xen:phrase default_url} ({xen:link 'canonical:help/terms'})" value="default" selected="{$preparedOption.option_value.type} == 'default'" />
		
	<xen:option label="{xen:phrase custom_url}:" value="custom" selected="{$preparedOption.option_value.type} == 'custom'">
		<xen:textbox name="{$fieldPrefix}[{$preparedOption.option_id}][custom]" value="{$preparedOption.option_value.custom}" />
	</xen:option>
	
	<xen:html>
		<input type="hidden" name="{$listedFieldName}" value="{$preparedOption.option_id}" />
		{xen:raw $editLink}
	</xen:html>
</xen:radiounit>]]></template>
  <template title="option_template_tweet"><![CDATA[<xen:checkboxunit label="" hint="{$preparedOption.hint}">
	<xen:option name="{$fieldPrefix}[{$preparedOption.option_id}][enabled]" selected="{$preparedOption.option_value.enabled}">
		<xen:label>{$preparedOption.title}</xen:label>
		<xen:textbox name="{$fieldPrefix}[{$preparedOption.option_id}][via]" value="{$preparedOption.option_value.via}" placeholder="{xen:phrase via_twitter_account}" />
		<xen:textbox name="{$fieldPrefix}[{$preparedOption.option_id}][related]" value="{$preparedOption.option_value.related}" placeholder="{xen:phrase related_twitter_account}" />
	</xen:option>
	<xen:explain>{xen:raw $preparedOption.explain}</xen:explain>
	<xen:html>
		<input type="hidden" name="{$listedFieldName}" value="{$preparedOption.option_id}" />
		{xen:raw $editLink}
	</xen:html>
</xen:checkboxunit>]]></template>
  <template title="option_template_userBanners"><![CDATA[<xen:checkboxunit label="{$preparedOption.title}">
	<xen:option name="{$fieldPrefix}[{$preparedOption.option_id}][showStaff]" selected="{$preparedOption.option_value.showStaff}">
		<xen:label>{xen:phrase show_staff_banner}</xen:label>
		<xen:hint>{xen:phrase if_enabled_staff_members_automatically_have_banner_added}</xen:hint>
	</xen:option>
	<xen:option name="{$fieldPrefix}[{$preparedOption.option_id}][displayMultiple]" selected="{$preparedOption.option_value.displayMultiple}">
		<xen:label>{xen:phrase allow_banner_stacking}</xen:label>
		<xen:hint>{xen:phrase if_enabled_all_banners_applicable_to_user_will_be_shown}</xen:hint>
	</xen:option>
	<xen:option name="{$fieldPrefix}[{$preparedOption.option_id}][showStaffAndOther]" selected="{$preparedOption.option_value.showStaffAndOther}">
		<xen:label>{xen:phrase show_staff_and_group_banner}</xen:label>
		<xen:hint>{xen:phrase if_banner_stacking_disabled_staff_only_have_staff_banner}</xen:hint>
	</xen:option>
	<xen:option name="{$fieldPrefix}[{$preparedOption.option_id}][hideUserTitle]" selected="{$preparedOption.option_value.hideUserTitle}">
		<xen:label>{xen:phrase hide_standard_user_title}</xen:label>
		<xen:hint>{xen:phrase if_enabled_user_title_hidden_when_banner_shown}</xen:hint>
	</xen:option>
	<xen:explain>{xen:raw $preparedOption.explain}</xen:explain>
	<xen:html>		
		<input type="hidden" name="{$listedFieldName}" value="{$preparedOption.option_id}" />
		{xen:raw $editLink}
	</xen:html>
</xen:checkboxunit>]]></template>
  <template title="option_template_usernameValidation"><![CDATA[<xen:controlunit label="{$preparedOption.title}" hint="{$preparedOption.hint}">
	<xen:explain>{xen:raw $preparedOption.explain}</xen:explain>
	<xen:html>
		<ul>
			<li><div><label for="nameval_dn">{xen:phrase disallowed_words_in_user_names}:</label></div>
				<xen:textbox
					name="{$fieldPrefix}[{$preparedOption.option_id}][disallowedNames]"
					value="{$preparedOption.option_value.disallowedNames}"
					rows="2" inputclass="Elastic"
					id="nameval_dn" />
				<p class="explain">{xen:phrase words_or_phrases_in_field_not_allowed_in_user_names}</p>
			</li>
			<li><div><label for="nameval_regex">{xen:phrase user_name_match_regular_expression}:</label></div>
				<xen:textbox
					name="{$fieldPrefix}[{$preparedOption.option_id}][matchRegex]"
					value="{$preparedOption.option_value.matchRegex}"
					id="nameval_regex" />
				<p class="explain">{xen:phrase requires_user_names_new_registrations_match_regex}</p>
				<xen:comment>TODO: would be nice to give an option to test/give examples</xen:comment>
			</li>
		</ul>
		
		<input type="hidden" name="{$listedFieldName}" value="{$preparedOption.option_id}" />
		{xen:raw $editLink}
	</xen:html>
</xen:controlunit>]]></template>
  <template title="PAGE_CONTAINER"><![CDATA[<!DOCTYPE html>
<html id="XenForo" lang="{$visitorLanguage.language_code}" dir="{$visitorLanguage.text_direction}" class="Admin {xen:if $hasAutoDeferred, RunDeferred}">
<head>
	<meta charset="utf-8" />
	<meta name="robots" content="noindex" />
	<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
	<title><xen:if is="{$title}">{xen:raw $title} | {xen:phrase admin_cp} - {$xenOptions.boardTitle}<xen:else />{xen:phrase admin_cp} - {$xenOptions.boardTitle}</xen:if></title>

	<noscript><style>.JsOnly { display: none !important; }</style></noscript>
	<link rel="stylesheet" href="{xen:adminlink '_css', '', 'css=public:xenforo,public:form,admin,header,footer', 'dir={$visitorLanguage.text_direction}', 'd={$_styleModifiedDate}'}" />
	<!--XenForo_Require:CSS-->

	<xen:include template="page_container_js" />
	<!--XenForo_Require:JS-->
	
	<xen:if is="{$head}"><xen:foreach loop="$head" value="$headElement">{xen:raw $headElement}</xen:foreach></xen:if>
</head>
<body data-controller="{$controllerName}::action{$controllerAction}; {$viewName}">

<xen:include template="header" />

<div id="body" class="pageWidth">

	<div id="contentContainer">
	
		<div id="content">
			<noscript><p class="importantMessage">{xen:phrase xenforo_admin_control_panel_requires_javascript}</p></noscript>

			<!--[if lt IE 8]>
				<p class="importantMessage">{xen:phrase you_are_using_out_of_date_browser_upgrade}</p>
			<![endif]-->

			<xen:if is="{$showUpgradePendingNotice}">
				<p class="importantMessage">
					{xen:phrase upgrade_is_pending_forum_only_accessible_in_debug} <br />
					<a href="install/">{xen:phrase complete_upgrade}</a>
				</p>
			</xen:if>

			<xen:include template="content_header" />
		
			{xen:raw $contents}
		</div>
	
		<xen:include template="footer" />
		
	</div>
	
	<xen:require js="js/xenforo/sidebar.js" />
	<ul id="sideNav" class="FixedSidebar">
		<xen:foreach loop="$sideNav" value="$sideLink">
			{xen:raw $sideLink}
		</xen:foreach>
	</ul>

</div>

</body>
</html>]]></template>
  <template title="page_container_js"><![CDATA[<script src="{$jQuerySource}"></script><xen:if is="{$xenOptions.uncompressedJs} == 1 OR {$xenOptions.uncompressedJs} == 3">	
<script src="js/jquery/jquery.xenforo.rollup.js?_v={$xenOptions.jsVersion}"></script></xen:if>
<script src="{xen:helper javaScriptUrl, 'js/xenforo/xenforo.js?_v={$xenOptions.jsVersion}'}"></script>
<script src="{xen:helper javaScriptUrl, 'js/xenforo/acp_quicksearch.js?_v={$xenOptions.jsVersion}'}"></script>

<script>

jQuery.extend(true, XenForo,
{
	serverTimeInfo: { now: {$serverTimeInfo.now}, today: {$serverTimeInfo.today}, todayDow: {$serverTimeInfo.todayDow} },
	_enableOverlays: "{xen:property enableOverlays}",
	_animationSpeedMultiplier: "{xen:property animationSpeedMultiplier}",
	_overlayConfig:
	{
		top: "{xen:property overlayTop}",
		speed: {xen:calc '{xen:property overlaySpeed} * {xen:property animationSpeedMultiplier}'},
		closeSpeed: {xen:calc '{xen:property overlayCloseSpeed} * {xen:property animationSpeedMultiplier}'},
		mask:
		{
			color: "{xen:property overlayMaskColor}",
			opacity: "{xen:property overlayMaskOpacity}",
			loadSpeed: {xen:calc '{xen:property overlaySpeed} * {xen:property animationSpeedMultiplier}'},
			closeSpeed: {xen:calc '{xen:property overlayCloseSpeed} * {xen:property animationSpeedMultiplier}'}
		}
	},
	_loadedScripts: {/*<!--XenForo_Required_Scripts-->*/},
	_cookieConfig: { path: "{xen:jsescape $xenOptions.cookieConfig.path}", domain: "{xen:jsescape $xenOptions.cookieConfig.domain}", prefix: "{xen:jsescape $xenOptions.cookieConfig.prefix}"},
	_csrfToken: "{$visitor.csrf_token_page}",
	_csrfRefreshUrl: "{xen:jsescape {xen:adminlink login/csrf-token-refresh}}",
	_jsversion: "{$xenOptions.jsVersion}",
	_manualDeferUrl: "{xen:jsescape {xen:adminlink tools/run-deferred}}"
});

jQuery.extend(XenForo.phrases,
{
	cancel: "{xen:jsescape {xen:phrase cancel}}",

	a_moment_ago:    "{xen:jsescape {xen:phrase a_moment_ago}}",
	one_minute_ago:  "{xen:jsescape {xen:phrase one_minute_ago}}",
	x_minutes_ago:   "{xen:jsescape {xen:phrase x_minutes_ago, 'minutes=%minutes%'}}",
	today_at_x:      "{xen:jsescape {xen:phrase today_at_x, 'time=%time%'}}",
	yesterday_at_x:  "{xen:jsescape {xen:phrase yesterday_at_x, 'time=%time%'}}",
	day_x_at_time_y: "{xen:jsescape {xen:phrase day_x_at_time_y, 'day=%day%', 'time=%time%'}}",

	day0: "{xen:jsescape {xen:phrase day_sunday}}",
	day1: "{xen:jsescape {xen:phrase day_monday}}",
	day2: "{xen:jsescape {xen:phrase day_tuesday}}",
	day3: "{xen:jsescape {xen:phrase day_wednesday}}",
	day4: "{xen:jsescape {xen:phrase day_thursday}}",
	day5: "{xen:jsescape {xen:phrase day_friday}}",
	day6: "{xen:jsescape {xen:phrase day_saturday}}",

	_months: "{xen:jsescape '{xen:phrase month_1},{xen:phrase month_2},{xen:phrase month_3},{xen:phrase month_4},{xen:phrase month_5},{xen:phrase month_6},{xen:phrase month_7},{xen:phrase month_8},{xen:phrase month_9},{xen:phrase month_10},{xen:phrase month_11},{xen:phrase month_12}'}",
	_daysShort: "{xen:jsescape '{xen:phrase day_sunday_short},{xen:phrase day_monday_short},{xen:phrase day_tuesday_short},{xen:phrase day_wednesday_short},{xen:phrase day_thursday_short},{xen:phrase day_friday_short},{xen:phrase day_saturday_short}'}",

	following_error_occurred: "{xen:jsescape {xen:phrase following_error_occurred}}",
        server_did_not_respond_in_time_try_again: "{xen:jsescape {xen:phrase server_did_not_respond_in_time_try_again}}",
	click_image_show_full_size_version: "{xen:jsescape {xen:phrase click_image_show_full_size_version}}",
	no_items_matched_your_filter: "{xen:jsescape {xen:phrase no_items_matched_your_filter}}",
	processing: "{xen:jsescape {xen:phrase processing}}",
	cancel: "{xen:jsescape {xen:phrase cancel}}",
	cancelling: "{xen:jsescape {xen:phrase cancelling}}"
});

</script>]]></template>
  <template title="PAGE_CONTAINER_SIMPLE"><![CDATA[<!DOCTYPE html>
<html id="XenForo" lang="{$visitorLanguage.language_code}" dir="{$visitorLanguage.text_direction}" class="Admin {xen:if $hasAutoDeferred, RunDeferred}">
<head>
	<meta charset="utf-8" />
	<meta name="robots" content="noindex" />
	<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
	<title><xen:if is="{$title}">{xen:raw $title} | {xen:phrase admin_cp} - {$xenOptions.boardTitle}<xen:else />{xen:phrase admin_cp} - {$xenOptions.boardTitle}</xen:if></title>

	<noscript><style>.JsOnly { display: none !important; }</style></noscript>
	<link rel="stylesheet" href="{xen:adminlink '_css', '', 'css=public:xenforo,public:form,admin', 'dir={$visitorLanguage.text_direction}', 'd={$_styleModifiedDate}'}" />
	<!--XenForo_Require:CSS-->

	<xen:include template="page_container_js" />
	<!--XenForo_Require:JS-->

</head>
<body class="simple">
<div id="content">

	<div class="titleBar">
		<xen:if is="{$topctrl}"><div class="topCtrl">{xen:raw $topctrl}</div></xen:if>
		<h1><xen:if is="{$h1}">{xen:raw $h1}<xen:elseif is="{$title}" />{xen:raw $title}<xen:else />{xen:phrase admin_control_panel} - {$xenOptions.boardTitle}</xen:if></h1>
	</div>
	
	{xen:raw $contents}

</div>
</body>
</html>]]></template>
  <template title="page_delete"><![CDATA[<xen:title>{xen:phrase confirm_deletion_of_page}: {$page.title}</xen:title>
<xen:h1>{xen:phrase confirm_deletion_of_page}</xen:h1>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'pages/edit', $page}">{$page.title}</xen:breadcrumb>
</xen:navigation>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'pages/delete', $page}" class="deleteConfirmForm formOverlay">

	<p>{xen:phrase please_confirm_that_you_want_to_delete_following_page}:</p>
	<strong><a href="{xen:adminlink 'pages/edit', $page}">{$page.title}</a></strong>

	<xen:include template="helper_node_delete_children" />

	<xen:submitunit save="{xen:phrase delete_page}" />
	<input type="hidden" name="_xfConfirm" value="1" />
	
</xen:form>]]></template>
  <template title="page_edit"><![CDATA[<xen:title>{xen:if {$page.node_id}, '{xen:phrase edit_page}: {$page.title}', '{xen:phrase create_new_page}'}</xen:title>

<xen:if is="{$page.node_id}">
	<xen:navigation>
		<xen:breadcrumb href="{xen:adminlink nodes}#{xen:helper listitemid, $page.node_id}">{$page.title}</xen:breadcrumb>
	</xen:navigation>
	
	<xen:topctrl>
		<a href="{xen:adminlink 'nodes/add', '', 'parent_node_id={$page.node_id}'}" class="button">+ {xen:phrase add_child}</a>
		<a href="{xen:adminlink 'nodes/add', '', 'parent_node_id={$page.parent_node_id}'}" class="button">+ {xen:phrase add_sibling}</a>
	</xen:topctrl>
</xen:if>

<xen:form action="{xen:adminlink 'pages/save', $page}"
	class="AutoValidator"
	data-fieldvalidatorurl="{xen:adminlink 'pages/validate-field', $page}"
	data-redirect="yes">

	<ul class="tabs Tabs" data-panes="#pagePanes > li">
		<xen:hook name="admin_page_edit_tabs">
		<li class="active"><a>{xen:phrase basic_information}</a></li>
		<!-- slot: after_basic_information -->
		<li><a>{xen:phrase page_options}</a></li>
		<!-- slot: after_page_options -->
		<li><a>{xen:phrase php_callback}</a></li>
		</xen:hook>
	</ul>

	<ul id="pagePanes">
		<xen:hook name="admin_page_edit_panes">
		<li>
			<xen:hook name="admin_page_edit_basic_information">
			
			<xen:textboxunit name="node_name" value="{$page.node_name}" label="{xen:phrase url_portion}:" />
			
			<!-- slot: after_node_name -->
			
			<xen:textboxunit name="title" value="{$page.title}" label="{xen:phrase title}:" data-livetitletemplate="{xen:if {$page.node_id},
				'{xen:phrase edit_page}: <em>%s</em>',
				'{xen:phrase create_new_page}: <em>%s</em>'}">
			</xen:textboxunit>
			
			<!-- slot: after_title -->
	
			<xen:textboxunit name="description" value="{$page.description}" label="{xen:phrase description}:" hint="{xen:phrase you_may_use_html}" explain="{xen:phrase node_description_explain}" rows="2" inputclass="Elastic">
			</xen:textboxunit>
			
			<!-- slot: after_description -->
		
			<fieldset>
				<!-- slot: before_parent_node_id -->
				
				<xen:selectunit name="parent_node_id" value="{$page.parent_node_id}" label="{xen:phrase parent_node}:">
					<xen:options source="$nodeParentOptions" />
				</xen:selectunit>
				
				<!-- slot: after_parent_node_id -->
				
				<xen:textboxunit name="display_order" value="{$page.display_order}" label="{xen:phrase display_order}:">
					<xen:explain>{xen:phrase position_of_this_item_relative_to_other_nodes_with_same_parent}</xen:explain>
				</xen:textboxunit>
				
				<!-- slot: after_display_order -->
				
				<xen:checkboxunit label="">
					<xen:option name="display_in_list" label="{xen:phrase display_in_node_list}" selected="{$page.display_in_list}">
						<xen:hint>{xen:phrase if_unselected_users_will_not_see_this_node_in_list}</xen:hint>
					</xen:option>
				</xen:checkboxunit>
				
				<!-- slot: after_display_in_list -->
			</fieldset>
			
			<!-- slot: before_style_override -->
			
			<xen:checkboxunit label="{xen:phrase style}:">
				<xen:option name="style_override" label="{xen:phrase override_user_style_choice}" selected="{$page.style_id}">
					<xen:disabled>
						<xen:select name="style_id" value="{$page.style_id}">
							<xen:options source="$styleOptions" />
						</xen:select>
					</xen:disabled>
				</xen:option>
				<xen:explain>{xen:phrase if_specified_all_visitors_view_using_selected_style}</xen:explain>
			</xen:checkboxunit>
			
			</xen:hook>
		</li>
		<li>
			<xen:hook name="admin_page_edit_page_options">
			
			<xen:textboxunit name="template" value="{$template.template}" label="{xen:phrase template_html}:" rows="2" inputclass="Elastic OptOut" />
			
			<!-- slot: after_template_html -->
			
			<fieldset>
				<!-- slot: before_options -->
				
				<xen:checkboxunit label="{xen:phrase optional_components}:" class="surplusLabel">
					<xen:option name="log_visits" label="{xen:phrase log_and_count_visits_to_this_page}" selected="{$page.log_visits}" />
					
					<xen:option name="list_siblings" label="{xen:phrase list_sibling_nodes}" selected="{$page.list_siblings}" />
					
					<xen:option name="list_children" label="{xen:phrase list_child_nodes}" selected="{$page.list_children}" />
				</xen:checkboxunit>
				
				<!-- slot: after_options -->
			</fieldset>
			
			</xen:hook>
	
			<xen:hook name="admin_page_edit_extra" />
		</li>
		<!-- slot: after_page_options -->
		<li>
			<xen:hook name="admin_page_edit_php_callback">
			
			<xen:require css="code_event.css" />
			<xen:controlunit label="{xen:phrase php_callback}:">
				<xen:textbox placeholder="{xen:phrase class}" name="callback_class" value="{$page.callback_class}" size="25" maxlength="75" />
				::
				<xen:textbox placeholder="{xen:phrase method}" name="callback_method" value="{$page.callback_method}" size="25" maxlength="75" />
				<div class="eventDescription baseHtml">{xen:phrase page_callback_explanation_html}</div>
			</xen:controlunit>
			
			</xen:hook>
		</li>
		</xen:hook>
	</ul>

	<input type="hidden" name="template_id" value="{$template.template_id}" />
	<input type="hidden" name="node_type_id" value="Page" />

	<xen:submitunit save="{xen:phrase save_page}">
		<xen:if is="{$page.node_id}">
			<input type="button" value="{xen:phrase delete_page}..." accesskey="d" class="button OverlayTrigger"
				data-href="{xen:adminlink pages/delete-confirm, $page}" />
		</xen:if>
	</xen:submitunit>

</xen:form>]]></template>
  <template title="page_nav"><![CDATA[<xen:if is="{$pageTotal} > 1">
<div class="PageNav{xen:if '{$maxDigits} > 4', ' pn{$maxDigits}'}"
	data-page="{$currentPage}"
	data-range="{$range}"
	data-start="{$startPage}"
	data-end="{$endPage}"
	data-last="{$pageTotal}"
	data-sentinel="{$pageNumberSentinel}"
	data-baseurl="{xen:adminlink $linkType, $linkData, '_params={$linkParams}', 'page={$pageNumberSentinel}'}">
	
	<span class="pageNavHeader">{xen:phrase page_x_of_y, 'current={$currentPage}', 'total={$pageTotal}'}</span>
	
	<nav>
		<xen:if is="{$prevPage}">
			<a href="{xen:adminlink $linkType, $linkData, '_params={$linkParams}', 'page={xen:if "{$prevPage} > 1", $prevPage}'}" class="text" rel="prev">&lt; {xen:phrase prev}</a>
		</xen:if>
		
		<a href="{xen:adminlink $linkType, $linkData, '_params={$linkParams}'}" class="{xen:if '1 == {$currentPage}', 'currentPage '}" rel="start">1</a>
		
		<xen:if is="{$pageTotal} > {$scrollThreshold}">
			<a class="PageNavPrev">&larr;</a> <span class="scrollable"><span class="items">
		</xen:if>
		
		<xen:foreach loop="{$pages}" value="{$pageNumber}">
			<a href="{xen:adminlink $linkType, $linkData, '_params={$linkParams}', 'page={$pageNumber}'}" class="{xen:if '{$pageNumber} == {$currentPage}', 'currentPage '}{xen:if '{$pageNumber} > 999', 'gt999 '}">{$pageNumber}</a>
		</xen:foreach>
		
		<xen:if is="{$pageTotal} > {$scrollThreshold}">
			</span></span> <a class="PageNavNext">&rarr;</a>
		</xen:if>
		
		<a href="{xen:adminlink $linkType, $linkData, '_params={$linkParams}', 'page={$pageTotal}'}" class="{xen:if '{$pageTotal} == {$currentPage}', 'currentPage '}{xen:if '{$pageTotal} > 999', 'gt999 '}">{$pageTotal}</a>
		
		<xen:if is="{$nextPage}">
			<a href="{xen:adminlink $linkType, $linkData, '_params={$linkParams}', 'page={$nextPage}'}" class="text" rel="next">{xen:phrase next} &gt;</a>
		</xen:if>
	</nav>	
	
	<xen:if is="{$unreadLinkHtml}">
		<a href="{xen:raw $unreadLinkHtml}" class="text distinct">{xen:phrase go_to_first_unread}</a>
	</xen:if>
</div>
<xen:elseif is="{$unreadLinkHtml}" />
<div class="PageNav"><a href="{xen:raw $unreadLinkHtml}" class="text">{xen:phrase go_to_first_unread}</a></div>
</xen:if>]]></template>
  <template title="permission.css"><![CDATA[.FilterList .hasPermissions
{
	background: {xen:property primaryLighterStill} url("{xen:property imagePath}/xenforo/gradients/category-23px-light.png") repeat-x top;
}

	.FilterList .hasPermissions em
	{
		font-weight: bold;
	}

.permissionChoice
{
	height: 16px;
	margin-top: 4px;
	padding-left: 20px;
	display: inline-block;
	cursor: pointer;
	min-width: 45px;
}

.permissionChoice:hover
{
	text-decoration: underline;
}

.permissionChoice_allow, .permissionChoice_content_allow
{
	color: #080;
	background: url({xen:property imagePath}/xenforo/permissions/allow.png) no-repeat;
}

.permissionChoice_unset
{
	color: #888;
	background: url({xen:property imagePath}/xenforo/permissions/unset.png) no-repeat;
}

.permissionChoice_deny
{
	color: #A00;
	background: url({xen:property imagePath}/xenforo/permissions/deny.png) no-repeat;
}

.permissionChoice_reset
{
	color: #D82;
	background: url({xen:property imagePath}/xenforo/permissions/revoke.png) no-repeat;
}

.PermissionChoices .permissionTooltip
{
	line-height: 1.24;
	padding: 5px 10px;
	height: auto;
	max-width: 300px;
	z-index: 1;
}

/* table of radio permissions */
table.permissions
{
	width: 100%;
}

table.permissions .groupHeading th
{
	padding-top: 20px;
	padding-bottom: 2px;
	border-bottom: 1px solid {xen:property primaryLighterStill};
}

table.permissions th.groupTitle
{
	font-weight: bold;
	width: {xen:property ctrlUnitLabelWidth};
}
	
table.permissions th.option
{	
	font-size: 9px;
	text-align: center;
	width: 68px;
}

	table.permissions th.option a
	{
		display: block;
		cursor: pointer;
	}

table.permissions .permission th
{
	text-align: right;
	font-size: 12px;
	padding-right: {xen:property ctrlUnitLabel.padding-right};
}

table.permissions td.description
{
	font-size: 11px;
	color: {xen:property mutedTextColor};
}

table.permissions .permission .integer
{
	height: 36px;
	font-size: 11px;
}

	table.permissions .permission .integer label
	{
		margin-right: 5px;
	}

table.permissions .option label
{
	display: block;
	height: 32px;
	line-height: 32px;
	text-align: center;
	padding: 0;
}

table.permissions .option.selected label
{
	background-color: rgba(28,147,28, 0.5);
}

table.permissions td
{
	vertical-align: middle;
}

table.permissions .permission td.description
{
	padding: 0 5px;
}

table.permissions .unset label { background: #AAA url('{xen:property imagePath}/xenforo/gradients/category-23px-light.png') repeat-x top; }
table.permissions .allow label,
table.permissions .content_allow label { background: #44BB44 url('{xen:property imagePath}/xenforo/gradients/category-23px-light.png') repeat-x top; }
table.permissions .reset label { background: #EA5 url('{xen:property imagePath}/xenforo/gradients/category-23px-light.png') repeat-x top; }
table.permissions .deny label { background: #C11 url('{xen:property imagePath}/xenforo/gradients/category-23px-light.png') repeat-x top; }

label.subHeading,
label.secondaryContent
{
	display: block;
	padding-left: {xen:property ctrlUnitLabelWidth};
}

table.permissions.quickCheckAll .groupHeading th
{
	padding: 5px 0;
}

	table.permissions.quickCheckAll .groupHeading th.groupTitle
	{
		text-align: right;
	}

		table.permissions.quickCheckAll .groupHeading th.groupTitle span
		{
			font-weight: normal;
			padding-right: {xen:property ctrlUnitLabel.padding-right};
		}

	table.permissions.quickCheckAll .groupHeading th.option
	{
		padding: 0;
	}

table.permissions.quickCheckAll .groupHeading th.option label
{
	height: auto;
	line-height: normal;
	border-radius: 5px;
	display: block;
	padding: 5px 0;
	cursor: pointer;
}

table.permissions.quickCheckAll th.help
{
	font-size: 11px;
	text-align: right;
	padding-right: 5px;
}

#PermissionNeverTooltip
{
	z-index: 100000;
	display: none;
	width: 300px;
}

label.secondaryContent + fieldset
{
	border-top: none;
	margin-top: 0;
}]]></template>
  <template title="permission_analyze"><![CDATA[<xen:title>{xen:phrase analyze_permissions}</xen:title>
<xen:description>{xen:phrase analyze_permissions_description}</xen:description>

<xen:require css="permission_analyze.css" />

<xen:if is="{$showResults}">
	<div class="pairsColumns analysisResults section">
		<xen:foreach loop="$interfaceGroups" value="$interfaceGroup">
		<xen:if is="{$results.{$interfaceGroup.interface_group_id}}">
			<xen:if is="{$interfaceGroup.title}"><h3 class="textHeading">{$interfaceGroup.title}</h3></xen:if>
			<xen:foreach loop="$results.{$interfaceGroup.interface_group_id}" value="$result">
			<div class="ToggleTriggerAnchor">
				<dl>
					<dt>{$result.title}:</dt>
					<dd>
						{$result.final}
						<a href="javascript:" class="JsOnly ToggleTrigger" data-target=".details" style="font-size: 11px">({xen:phrase details})</a>
					</dd>
				</dl>
				<div class="details">
					<table class="dataTable">
						<tr class="dataRow">
							<th colspan="2"><xen:if is="{$result.interfaceTitle}">{$result.interfaceTitle} - </xen:if>{$result.title}</th>
						</tr>
						<tr class="dataRow">
							<td colspan="2" class="important" style="text-align: center">{xen:phrase global_permission_values}</th>
						</tr>
						<xen:if is="{$result.global.system}">
							<tr class="dataRow">
								<td>{xen:phrase global_value}:</td>
								<td>{$result.global.system}</td>
							</tr>
						</xen:if>
						<xen:foreach loop="$userGroups" key="$userGroupId" value="$userGroup">
							<xen:if is="{$result.global.groups.{$userGroupId}}">
								<tr class="dataRow">
									<td>{$userGroup.title}:</td>
									<td>{$result.global.groups.{$userGroupId}}</td>
								</tr>
							</xen:if>
						</xen:foreach>
						<xen:if is="{$result.global.user}">
							<tr class="dataRow">
								<td>{xen:phrase user_value}:</td>
								<td>{$result.global.user}</td>
							</tr>
						</xen:if>
						<xen:if is="{$type} == 'global'">
							<tr class="dataRow important">
								<td class="secondary">{xen:phrase final_value_global}:</td>
								<td class="secondary">{$result.global.final}</td>
							</tr>
						</xen:if>

						<xen:if is="{$type} != 'global' AND {$result.content}">
							<tr class="dataRow">
								<td colspan="2" class="important" style="text-align: center">
									{xen:phrase content_permission_values}
								</th>
							</tr>
							<xen:foreach loop="{$result.content}" key="$resultContentId" value="$content">
								<xen:if is="{$content.content}">
									<tr class="dataRow">
										<td>{$content.title} - {xen:phrase content_wide}</td>
										<td>{$content.content}</td>
									</tr>
								</xen:if>
								<xen:foreach loop="$userGroups" key="$userGroupId" value="$userGroup">
									<xen:if is="{$content.groups.{$userGroupId}}">
										<tr class="dataRow">
											<td>{$content.title} - {$userGroup.title}:</td>
											<td>{$content.groups.{$userGroupId}}</td>
										</tr>
									</xen:if>
								</xen:foreach>
								<xen:if is="{$content.user}">
									<tr class="dataRow">
										<td>{$content.title} - {xen:phrase user_value}:</td>
										<td>{$content.user}</td>
									</tr>
								</xen:if>
								<xen:if is="{$resultContentId} == {$contentId}">
									<tr class="dataRow important">
										<td class="secondary">{xen:phrase final_value_content}:</td>
										<td class="secondary">{$content.final}</td>
									</tr>
								</xen:if>
							</xen:foreach>
						</xen:if>
					</table>
				</div>
			</div>
			</xen:foreach>
		</xen:if>
		</xen:foreach>
	</div>
</xen:if>

<ul class="tabs noLinks Tabs" data-panes="#analyzePermissionPanes > li">
	<li class="{xen:if '{$type} == "global"', active}">{xen:phrase global_permissions}</li>
	<li class="{xen:if '{$type} == "node"', active}">{xen:phrase node_permissions}</li>
</ul>

<ul id="analyzePermissionPanes">
	<li>
		<xen:form action="{xen:adminlink permissions/analyze}">
			<xen:textboxunit label="{xen:phrase user_name}:" name="username" value="{$username}" inputclass="AutoComplete AcSingle" />

			<xen:submitunit save="{xen:phrase analyze}" />
			<input type="hidden" name="_xfConfirm" value="1" />
			<input type="hidden" name="type" value="global" />
		</xen:form>
	</li>
	<li>
		<xen:form action="{xen:adminlink permissions/analyze}">
			<xen:textboxunit label="{xen:phrase user_name}:" name="username" value="{$username}" inputclass="AutoComplete AcSingle" />

			<xen:selectunit label="{xen:phrase node}:" name="content_id" value="{xen:if '{$type} == "node"', $contentId, 0}">
				<xen:option value="0">&nbsp;</xen:option>
				<xen:options source="$nodeOptions" />
			</xen:selectunit>

			<xen:submitunit save="{xen:phrase analyze}" />
			<input type="hidden" name="_xfConfirm" value="1" />
			<input type="hidden" name="type" value="node" />
		</xen:form>
	</li>
</ul>]]></template>
  <template title="permission_analyze.css"><![CDATA[.analysisResults .textHeading
{
	margin-bottom: 0;
}

.analysisResults dl
{
	padding: 2px 0;
	border-bottom: 1px solid {xen:property primaryLighterStill};
	margin: 2px 0;
}

.analysisResults .details
{
	display: none;
	margin: 0 auto;
	max-width: 700px;
}

.analysisResults td:first-child
{
	width: 50%;
}]]></template>
  <template title="permission_check_all"><![CDATA[<table class="permissions quickCheckAll">
	<tr class="groupHeading">
		<th class="groupTitle secondaryContent"><span>{xen:phrase quick_check_all}</span></th>
		<xen:foreach loop="$permissionChoices" key="$key" value="$value">
			<xen:set var="$_extraCssSelector" value="{xen:if '{$key} == "unset"', ', {xen:if $target, $target, '#piGroups'} .integer input:radio[value=0]'}" />
			<th class="option {$key}"><label class="CheckAll" data-target="{xen:if $target, $target, '#piGroups'} input:radio[value={$key}]{$_extraCssSelector}">{$value}</label></th>
		</xen:foreach>
		<th class="help secondaryContent">
			<a href="http://nullrefer.com/?http://xenforo.com/help/permissions/" target="_blank">{xen:phrase permissions_help}</a>
		</th>
	</tr>
</table>
<script>
(function($) {
	$('.quickCheckAll .unset .CheckAll').click(function() {
		var $container = $('{xen:if $target, {xen:jsescape $target}, '#piGroups'}');
		$container.find('.integer input[type=text]').val(0);
		if (!$container.find('.integer .resetChoice').length)
		{
			$container.find('.integer input:radio[value=1]').prop('checked', true)
				.closest('form').first().trigger('XFRecalculate');
		}
	});
})(jQuery);
</script>]]></template>
  <template title="permission_definition"><![CDATA[<xen:title>{xen:phrase permission_definitions}</xen:title>

<xen:topctrl>
	<a href="{xen:adminlink 'permissions/permission-group/add'}" class="button">+ {xen:phrase new_permission_group}</a>
	<a href="{xen:adminlink 'permissions/permission/add'}" class="button">+ {xen:phrase new_permission}</a>
	<a href="{xen:adminlink 'permissions/interface-group/add'}" class="button">+ {xen:phrase new_interface_group}</a>
</xen:topctrl>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<xen:form action="{xen:adminlink 'permissions'}" class="section">

	<h2 class="subHeading">
		<xen:include template="filter_list_controls" />
		{xen:phrase permission_definitions}
	</h2>

	<ul class="FilterList Scrollable">
		<xen:foreach loop="$interfaceGroups" key="$interfaceGroupId" value="$interfaceGroup">
			<li>
				<h3 class="textHeading" id="{xen:helper listitemid, 'igroup_{$interfaceGroupId}'}">{$interfaceGroup.title}
					<a href="{xen:adminlink 'permissions/interface-group/edit', $interfaceGroup}" class="edit controls OverlayTrigger" title="{xen:phrase edit}..."><span>{xen:phrase edit}</span></a>
				</h3>
				<xen:if is="{$permissionsGrouped.{$interfaceGroup.interface_group_id}}">
					<ol>
					<xen:foreach loop="$permissionsGrouped.{$interfaceGroup.interface_group_id}" value="$permission">
						<xen:listitem
							id="{$permission.permission_group_id}_{$permission.permission_id}"
							href="{xen:adminlink 'permissions/permission/edit', $permission}"
							label="{$permission.title}"
							snippet="{xen:if '{$permission.addon_id} != "XenForo" AND {$permission.addon_id} != ""', '{$permission.addon_id} / '}{$permission.permission_group_id} - {$permission.permission_id}"
							delete="{xen:adminlink 'permissions/permission/delete', $permission}" />
					</xen:foreach>
					</ol>
				</xen:if>
			</li>
		</xen:foreach>
		
		<xen:if is="{$permissionsUngrouped}">
			<li>
				<h3 class="textHeading">{xen:phrase ungrouped_permissions}</h3>
				<ol>
				<xen:foreach loop="$permissionsUngrouped" value="$permission">
					<xen:listitem
						id="{$permission.permission_group_id}_{$permission.permission_id}"
						href="{xen:adminlink 'permissions/permission/edit', $permission}"
						label="{$permission.title}"
						snippet="{xen:if '{$permission.addon_id} != "XenForo" AND {$permission.addon_id} != ""', '{$permission.addon_id} / '}{$permission.permission_id}"
						delete="{xen:adminlink 'permissions/permission/delete', $permission}" />
				</xen:foreach>
				</ol>
			</li>
		</xen:if>
	</ul>

	<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:number $totalPermissions}</span>', 'total={xen:number $totalPermissions}'}</p>

</xen:form>

<xen:form action="{xen:adminlink 'permissions'}" class="section">

	<h2 class="subHeading">{xen:phrase permission_groups}</h2>

	<ul class="FilterList Scrollable">
		<xen:foreach loop="$permissionGroups" value="$permissionGroup">
			<xen:listitem
				id="group_{$permissionGroup.permission_group_id}"
				href="{xen:adminlink 'permissions/permission-group/edit', $permissionGroup}"
				label="{$permissionGroup.title}"
				delete="{xen:adminlink 'permissions/permission-group/delete', $permissionGroup}" />
		</xen:foreach>
	</ul>

	<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count={xen:count $permissionGroups}', 'total={xen:count $permissionGroups}'}</p>

</xen:form>]]></template>
  <template title="permission_interface_group_delete"><![CDATA[<xen:title>{xen:phrase confirm_deletion_of_permission_interface_group}: {$interfaceGroup.interface_group_id}</xen:title>
<xen:h1>{xen:phrase confirm_deletion_of_permission_interface_group}</xen:h1>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'permissions/definitions'}">{xen:phrase permission_definitions}</xen:breadcrumb>
	<xen:breadcrumb href="{xen:adminlink 'permissions/interface-group/edit', $interfaceGroup}">{$interfaceGroup.interface_group_id}</xen:breadcrumb>
</xen:navigation>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'permissions/interface-group/delete'}" class="deleteConfirmForm">
	<p>{xen:phrase please_confirm_want_to_delete_following_permission_interface_group}:</p>
	<strong><a href="{xen:adminlink 'permissions/interface-group/edit', $interfaceGroup}">{$interfaceGroup.interface_group_id}</a></strong>

	<input type="hidden" name="interface_group_id" value="{$interfaceGroup.interface_group_id}" />
	<input type="hidden" name="_xfConfirm" value="1" />

	<xen:submitunit save="{xen:phrase delete_permission_interface_group}" />
</xen:form>]]></template>
  <template title="permission_interface_group_edit"><![CDATA[<xen:title>{xen:if '{$interfaceGroup.interface_group_id}', '{xen:phrase edit_permission_interface_group}: {$masterTitle}', '{xen:phrase create_new_permission_interface_group}'}</xen:title>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'permissions/definitions'}">{xen:phrase permission_definitions}</xen:breadcrumb>
</xen:navigation>

<xen:form action="{xen:adminlink 'permissions/interface-group/save'}" class="AutoValidator" data-redirect="yes">
	<xen:textboxunit label="{xen:phrase interface_group_id}:" name="interface_group_id" value="{$interfaceGroup.interface_group_id}" />
	<xen:textboxunit label="{xen:phrase title}:" name="title" value="{$masterTitle}" data-livetitletemplate="{xen:if {$interfaceGroup.interface_group_id},
		'{xen:phrase edit_permission_interface_group}: <em>%s</em>',
		'{xen:phrase create_new_permission_interface_group}: <em>%s</em>'}" />
	<xen:include template="helper_addon_unit" />
	
	<xen:textboxunit label="{xen:phrase display_order}:" name="display_order" value="{$interfaceGroup.display_order}" />
	
	<input type="hidden" name="original_interface_group_id" value="{$interfaceGroup.interface_group_id}" />
	
	<xen:submitunit save="{xen:phrase save_permission_interface_group}">
		<xen:if is="{$interfaceGroup.interface_group_id}">
			<a href="{xen:adminlink 'permissions/interface-group/delete', $interfaceGroup}" class="button OverlayTrigger">{xen:phrase delete_permission_interface_group}...</a>
		</xen:if>
	</xen:submitunit>
</xen:form>]]></template>
  <template title="permission_list_group"><![CDATA[<table class="permissions" id="pg_{$interfaceGroup.interface_group_id}">
	<tr class="groupHeading">
		<th class="groupTitle">{$interfaceGroup.title}</th>
		<xen:foreach loop="$permissionChoices" key="$value" value="$label">
			<th class="option"><a class="CheckAll Tooltip"
				data-offsetx="10" data-offsety="-4"
				data-target="#pg_{$interfaceGroup.interface_group_id} input:radio[value='{$value}']"
				title="{xen:phrase check_all_x, 'option={$label}'}">{$label}</a></th>
		</xen:foreach>
		<th>&nbsp;</th>
	</tr>
<xen:foreach loop="$interfaceGroup.permissions" value="$permission">
	<xen:include template="permission_list_permission" />
</xen:foreach>
</table>]]></template>
  <template title="permission_list_node_group"><![CDATA[<!--{$permissionGroupId}-->
<xen:foreach loop="$permissionGroup" value="$interfaceGroup">
	<xen:include template="permission_list_group" />
</xen:foreach>]]></template>
  <template title="permission_list_permission"><![CDATA[<tr class="permission">
	<th>{$permission.title}:</th>
	<xen:if is="{$permission.permission_type} == 'integer'">
		<td colspan="{xen:calc '{xen:count $permissionChoices} + 1'}" class="integer">
			<xen:if is="{$permissionChoices.reset}">
				<label><input class="resetChoice" type="radio" name="permissions[{$permission.permission_group_id}][{$permission.permission_id}]" value="0"  {xen:checked '{$permission.value_int} == 0'}  /> {$permissionChoices.unset}</label>
			</xen:if>
			<label><input type="radio" name="permissions[{$permission.permission_group_id}][{$permission.permission_id}]" value="-1" {xen:checked '{$permission.value_int} == -1'} /> {xen:phrase unlimited}</label>
			<input type="radio" name="permissions[{$permission.permission_group_id}][{$permission.permission_id}]" value="1"  {xen:checked '{$permission.value_int} > 0 OR (!{$permissionChoices.reset} AND {$permission.value_int} == 0)'}
				class="Disabler" id="ctrl_{$permission.permission_group_id}_{$permission.permission_id}" />
				<span id="ctrl_{$permission.permission_group_id}_{$permission.permission_id}_Disabler">
					<xen:spinbox name="permissions[{$permission.permission_group_id}][{$permission.permission_id}]" value="{xen:if '{$permission.value_int} > 0', $permission.value_int, 0}" size="5" min="0" inputclass="autoSize" />
				</span>
			</td>
	<xen:else />
		<xen:foreach loop="$permissionChoices" key="$value" value="$label">
			<td class="option {$value}"><label>
				<input type="radio" name="permissions[{$permission.permission_group_id}][{$permission.permission_id}]" value="{$value}" {xen:checked '{$permission.value} == {$value}'} />
				</label></td>
		</xen:foreach>
	
		<td class="description">{xen:if $permission.description, {$permission.description}, '&nbsp;'}</td>
	</xen:if>
</tr>]]></template>
  <template title="permission_node"><![CDATA[<xen:title>{xen:phrase node_permissions}: {$node.title}</xen:title>

<xen:require css="permission.css" />

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink nodes}#{xen:helper listitemid, $node.node_id}">{xen:phrase permissions}</xen:breadcrumb>
</xen:navigation>

<xen:topctrl>
	<form action="{xen:adminlink node-permissions/user/add, $node}" method="post">
		<input type="search" name="username" class="textCtrl AutoComplete AcSingle" size="20" results="10" placeholder="{xen:phrase user_name}" />
		<input type="submit" value="{xen:phrase set_permissions}" class="button" />
		<input type="hidden" name="_xfToken" value="{$visitor.csrf_token_page}" />
	</form>
</xen:topctrl>

<xen:require js="js/xenforo/filter_list.js" />
<xen:require css="filter_list.css" />

<xen:form action="{xen:adminlink node-permissions/node-wide-revoke, $node}">
	<xen:checkboxunit label="" class="fullWidth">
		<xen:option name="revoke" selected="{$revoked}">
			<xen:label>{xen:phrase private_node}</xen:label>
			<xen:hint>{xen:phrase if_selected_users_only_view_node_if_granted_permissions}</xen:hint>
		</xen:option>
	</xen:checkboxunit>

	<xen:submitunit class="fullWidth" save="{xen:phrase update}" />
</xen:form>

<form action="{xen:adminlink node-permissions, $node}#user-groups" name="user-groups" class="section">
	<h2 class="subHeading">{xen:phrase user_groups}</h2>
	
	<ol class="FilterList Scrollable">
		<xen:foreach loop="$userGroups" value="$userGroup">
			<xen:listitem
				id="user_group_{$userGroup.user_group_id}"
				label="{$userGroup.title}"
				href="{xen:adminlink 'node-permissions/user-group', $node, 'user_group_id={$userGroup.user_group_id}'}"
				labelclass="{xen:if {$groupsWithPerms.{$userGroup.user_group_id}}, 'hasPermissions'}">
				<xen:html>
					<a href="{xen:adminlink user-groups/edit, $userGroup}" class="secondaryContent">{xen:phrase group_info}</a>
				</xen:html>
			</xen:listitem>
		</xen:foreach>
	</ol>
</form>

<xen:if is="{$users}">
	<form action="{xen:adminlink node-permissions, $node}#users" name="users" class="section">
		<h2 class="subHeading">{xen:phrase users}</h2>
	
		<ol class="FilterList Scrollable">
			<xen:foreach loop="$users" value="$user">
				<xen:listitem
					id="user_{$user.user_id}"
					label="{$user.username}"
					href="{xen:adminlink 'node-permissions/user', $node, 'user_id={$user.user_id}'}"
					class="hasPermissions">
					<xen:beforelabel>
						<img src="{xen:helper avatar, $user, s}" alt="" class="listAvatar" />
					</xen:beforelabel>
					<xen:html>
						<a href="{xen:adminlink users/edit, $user}" class="secondaryContent">{xen:phrase user_info}</a>
					</xen:html>
				</xen:listitem>
			</xen:foreach>
		</ol>
	</form>
</xen:if>]]></template>
  <template title="permission_node_list"><![CDATA[<xen:title>{xen:phrase node_permissions}</xen:title>

<xen:require css="permission.css" />
<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<xen:form action="{xen:adminlink node-permissions}" class="section">
	<xen:if is="{$nodes}">

		<h2 class="subHeading">
			<xen:include template="filter_list_controls" />
			{xen:phrase node_permissions}
		</h2>

		<ol class="FilterList">
			<xen:foreach loop="$nodes" value="$node">
				<xen:listitem
					id="{$node.node_id}"
					label="{$node.title}"
					snippet="{$node.node_type}"
					href="{xen:adminlink 'node-permissions', $node}"
					class="_depth{$node.depth}"
					labelclass="{xen:if {$nodesWithPerms.{$node.node_id}}, 'hasPermissions'}" />
			</xen:foreach>
		</ol>

		<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:count $nodes}</span>', 'total={xen:count $nodes}'}</p>

	<xen:else />

		<div class="noResults">{xen:phrase there_no_nodes_defined}</div>

	</xen:if>
</xen:form>]]></template>
  <template title="permission_node_user"><![CDATA[<xen:title>{xen:phrase node_permissions}: {$node.title} - {$user.username}</xen:title>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'node-permissions', $node}">{xen:phrase permissions}: {$node.title}</xen:breadcrumb>
	<xen:breadcrumb href="{xen:adminlink 'node-permissions', $node}#{xen:helper listitemid, 'user_{$user.user_id}'}">{$user.username}</xen:breadcrumb>
</xen:navigation>

<xen:require js="js/xenforo/permission.js" />
<xen:require css="permission.css" />

<xen:form action="{xen:adminlink 'node-permissions/user/save', $node}" class="PermissionChoices">

	<xen:include template="permission_tooltip">
		<xen:set var="$contentPermission">1</xen:set>
	</xen:include>
	
	<fieldset id="piGroups">
		
		<xen:include template="permission_check_all">
			<xen:set var="$target"></xen:set>
		</xen:include>
	
		<xen:include template="permission_node_view_node_row" />
	
		<xen:foreach loop="$permissions" key="$permissionGroupId" value="$permissionGroup">
			<xen:include template="permission_list_node_group" />
		</xen:foreach>
		
	</fieldset>
	
	<input type="hidden" name="user_id" value="{$user.user_id}" />

	<xen:submitunit save="{xen:phrase update_permissions}" />

</xen:form>]]></template>
  <template title="permission_node_user_group"><![CDATA[<xen:title>{xen:phrase node_permissions}: {$node.title} - {$userGroup.title}</xen:title>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink node-permissions, $node}">{xen:phrase permissions}: {$node.title}</xen:breadcrumb>
	<xen:breadcrumb href="{xen:adminlink node-permissions, $node}#{xen:helper listitemid, 'user_group_{$userGroup.user_group_id}'}">{$userGroup.title}</xen:breadcrumb>
</xen:navigation>

<xen:require js="js/xenforo/permission.js" />
<xen:require css="permission.css" />

<xen:form action="{xen:adminlink 'node-permissions/user-group/save', $node}" class="PermissionChoices">
	
	<xen:include template="permission_tooltip">
		<xen:set var="$contentPermission">1</xen:set>
	</xen:include>

	<fieldset id="piGroups">
		
		<xen:include template="permission_check_all">
			<xen:set var="$target">#piGroups</xen:set>
		</xen:include>

		<xen:include template="permission_node_view_node_row" />
	
		<xen:foreach loop="$permissions" key="$permissionGroupId" value="$permissionGroup">
			<xen:include template="permission_list_node_group" />
		</xen:foreach>
	
	</fieldset>
	
	<input type="hidden" name="user_group_id" value="{$userGroup.user_group_id}" />

	<xen:submitunit save="{xen:phrase update_permissions}" />
</xen:form>]]></template>
  <template title="permission_node_view_node_row"><![CDATA[<table class="permissions">
	<tr class="groupHeading">
		<th class="groupTitle">&nbsp;</th>
		<xen:foreach loop="$permissionChoices" key="$value" value="$label">
			<th class="option">{$label}</th>
		</xen:foreach>
		<th>&nbsp;</th>
	</tr>
	<xen:include template="permission_list_permission">
		<xen:map from="$viewNodePermission" to="$permission" />
	</xen:include>
</table>]]></template>
  <template title="permission_permission_delete"><![CDATA[<xen:title>{xen:phrase confirm_deletion_of_permission}: {$permission.permission_id} - {$permission.permission_group_id}</xen:title>
<xen:h1>{xen:phrase confirm_deletion_of_permission}</xen:h1>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'permissions/definitions'}">{xen:phrase permission_definitions}</xen:breadcrumb>
	<xen:breadcrumb href="{xen:adminlink 'permissions/permission/edit', $permission}">{$permission.permission_id} - {$permission.permission_group_id}</xen:breadcrumb>
</xen:navigation>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'permissions/permission/delete'}" class="deleteConfirmForm">
	<p>{xen:phrase please_confirm_that_you_want_to_delete_following_permission}:</p>
	<strong><a href="{xen:adminlink 'permissions/permission/edit', $permission}">{$permission.permission_id} - {$permission.permission_group_id}</a></strong>

	<input type="hidden" name="permission_id" value="{$permission.permission_id}" />
	<input type="hidden" name="permission_group_id" value="{$permission.permission_group_id}" />
	<input type="hidden" name="_xfConfirm" value="1" />

	<xen:submitunit save="{xen:phrase delete_permission}" />
</xen:form>]]></template>
  <template title="permission_permission_edit"><![CDATA[<xen:title>{xen:if '{$permission.permission_id}', '{xen:phrase edit_permission}: {$masterTitle}', '{xen:phrase create_new_permission}'}</xen:title>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'permissions/definitions'}">{xen:phrase permission_definitions}</xen:breadcrumb>
</xen:navigation>

<xen:form action="{xen:adminlink 'permissions/permission/save'}" class="AutoValidator" data-redirect="yes">
	<fieldset>
		<xen:textboxunit label="{xen:phrase permission_id}:" name="permission_id" value="{$permission.permission_id}" />
		<xen:textboxunit label="{xen:phrase title}:" name="title" value="{$masterTitle}" data-livetitletemplate="{xen:if {$permission.permission_id},
			'{xen:phrase edit_permission}: <em>%s</em>',
			'{xen:phrase create_new_permission}: <em>%s</em>'}" />
		
		<xen:selectunit label="{xen:phrase permission_group}:" name="permission_group_id" value="{$permission.permission_group_id}">
			<xen:option value=""></xen:option>
			<xen:options source="$permissionGroups" />
		</xen:selectunit>
		
		<xen:textboxunit label="{xen:phrase depends_on_permission_id}:" hint="{xen:phrase must_be_in_same_permission_group}" name="depend_permission_id" value="{$permission.depend_permission_id}" />
	</fieldset>
	
	<xen:radiounit label="{xen:phrase permission_type}:" name="permission_type" value="{$permission.permission_type}">
		<xen:option value="flag">{xen:phrase flag}</xen:option>
		<xen:option value="integer">{xen:phrase integer}</xen:option>
	</xen:radiounit>
		
	<fieldset>
		<xen:selectunit label="{xen:phrase interface_group}:" name="interface_group_id" value="{$permission.interface_group_id}">
			<xen:option value=""></xen:option>
			<xen:options source="$interfaceGroups" />
		</xen:selectunit>
		
		<xen:textboxunit label="{xen:phrase display_order}:" name="display_order" value="{$permission.display_order}" />
	</fieldset>
		
	<xen:include template="helper_addon_unit" />
	
	<input type="hidden" name="original_permission_id" value="{$permission.permission_id}" />
	<input type="hidden" name="original_permission_group_id" value="{$permission.permission_group_id}" />
	
	<xen:submitunit save="{xen:phrase save_permission}">
		<xen:if is="{$permission.permission_id}"><a href="{xen:adminlink 'permissions/permission/delete', $permission}" class="button OverlayTrigger">{xen:phrase delete_permission}...</a></xen:if>
	</xen:submitunit>
</xen:form>]]></template>
  <template title="permission_permission_group_delete"><![CDATA[<xen:title>{xen:phrase confirm_deletion_of_permission_group}: {$permissionGroup.permission_group_id}</xen:title>
<xen:h1>{xen:phrase confirm_deletion_of_permission_group}</xen:h1>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'permissions/definitions'}">{xen:phrase permission_definitions}</xen:breadcrumb>
	<xen:breadcrumb href="{xen:adminlink 'permissions/permission-group/edit', $permissionGroup}">{$permissionGroup.permission_group_id}</xen:breadcrumb>
</xen:navigation>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'permissions/permission-group/delete'}" class="deleteConfirmForm">
	<p>{xen:phrase please_confirm_that_you_want_to_delete_following_permission_group}:</p>
	<strong><a href="{xen:adminlink 'permissions/permission-group/edit', $permissionGroup}">{$permissionGroup.permission_group_id}</a></strong>
	<p>{xen:phrase all_permissions_within_this_group_will_be_deleted_as_well}</p>

	<input type="hidden" name="permission_group_id" value="{$permissionGroup.permission_group_id}" />
	<input type="hidden" name="_xfConfirm" value="1" />

	<xen:submitunit save="{xen:phrase delete_permission_group}" />
</xen:form>]]></template>
  <template title="permission_permission_group_edit"><![CDATA[<xen:title>{xen:if '{$permissionGroup.permission_group_id}', '{xen:phrase edit_permission_group}: {$masterTitle}', '{xen:phrase create_new_permission_group}'}</xen:title>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'permissions/definitions'}">{xen:phrase permission_definitions}</xen:breadcrumb>
</xen:navigation>

<xen:form action="{xen:adminlink 'permissions/permission-group/save'}" class="AutoValidator" data-redirect="yes">
	<xen:textboxunit label="{xen:phrase permission_group_id}:" name="permission_group_id" value="{$permissionGroup.permission_group_id}" />
	<xen:textboxunit label="{xen:phrase title}:" name="title" value="{$masterTitle}" data-livetitletemplate="{xen:if {$permissionGroup.permission_group_id},
		'{xen:phrase edit_permission_group}: <em>%s</em>',
		'{xen:phrase create_new_permission_group}: <em>%s</em>'}" />
	<xen:include template="helper_addon_unit" />
	
	<input type="hidden" name="original_permission_group_id" value="{$permissionGroup.permission_group_id}" />
	
	<xen:submitunit save="{xen:phrase save_permission_group}">
		<xen:if is="{$permissionGroup.permission_group_id}">
			<a href="{xen:adminlink 'permissions/permission-group/delete', $permissionGroup}" class="button OverlayTrigger">{xen:phrase delete_permission_group}...</a>
		</xen:if>
	</xen:submitunit>
</xen:form>]]></template>
  <template title="permission_systemwide"><![CDATA[<xen:title>System-Wide Permissions</xen:title>

<xen:require js="js/xenforo/permission.js" />
<xen:require css="permission.css" />

<xen:form action="{xen:adminlink 'system-permissions/save'}" class="PermissionChoices">

	<xen:include template="permission_tooltip" />

	<xen:foreach loop="$permissions" value="$interfaceGroup">
		<xen:include template="permission_list_group" />
	</xen:foreach>

	<xen:submitunit save="Update Permissions" />
</xen:form>]]></template>
  <template title="permission_test"><![CDATA[<xen:title>{xen:phrase test_permissions}</xen:title>

<xen:form action="{xen:adminlink permissions/test}" target="_blank">
	<p class="dimmed">{xen:string nl2br, {xen:phrase permission_tester_desc}}</p>
	
	<xen:textboxunit label="{xen:phrase test_permissions_of_user}:" name="username" inputclass="AutoComplete AcSingle" />
	
	<xen:submitunit save="{xen:phrase test_permissions}" />
</xen:form>]]></template>
  <template title="permission_tooltip"><![CDATA[<div style="display: none">
	<xen:if is="{$contentPermission}">
		<span class="PermissionTooltipOption" data-permissionstate="unset">{xen:phrase permission_inherit_desc}</span>
	<xen:else />
		<span class="PermissionTooltipOption" data-permissionstate="unset">{xen:phrase permission_default_desc}</span>
	</xen:if>
	<span class="PermissionTooltipOption" data-permissionstate="allow content_allow">{xen:phrase permission_allow_desc}</span>
	<span class="PermissionTooltipOption" data-permissionstate="reset">{xen:phrase permission_revoke_desc}</span>
	<span class="PermissionTooltipOption" data-permissionstate="deny">{xen:phrase permission_deny_desc}</span>
	
	<div id="PermissionNeverTooltip" class="xenTooltip">
		<xen:if is="{$contentPermission}">
			{xen:string nl2br, {xen:phrase set_permission_never_node_desc}}
		<xen:else />
			{xen:string nl2br, {xen:phrase set_permission_never_global_desc}}
		</xen:if>
	</div>
</div>]]></template>
  <template title="permission_user_edit"><![CDATA[<xen:title>{xen:phrase user_permissions}: {$user.username}</xen:title>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink user-permissions}#{xen:helper listitemid, $user.user_id}">{$user.username}</xen:breadcrumb>
</xen:navigation>

<xen:require js="js/xenforo/permission.js" />
<xen:require css="permission.css" />

<xen:form action="{xen:adminlink 'user-permissions/save', $user}" class="PermissionChoices">

	<xen:include template="permission_tooltip" />
	
	<fieldset id="piGroups">
		
		<xen:include template="permission_check_all">
			<xen:set var="$target">#piGroups</xen:set>
		</xen:include>
	
		<xen:foreach loop="$permissions" value="$interfaceGroup">
			<xen:include template="permission_list_group" />
		</xen:foreach>
	
	</fieldset>

	<xen:submitunit save="{xen:phrase update_permissions}" />

</xen:form>]]></template>
  <template title="permission_user_group_edit"><![CDATA[<xen:title>{xen:phrase user_group_permissions}: {$userGroup.title}</xen:title>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink user-group-permissions}#{xen:helper listitemid, $userGroup.user_group_id}">{$userGroup.title}</xen:breadcrumb>
</xen:navigation>

<xen:require js="js/xenforo/permission.js" />
<xen:require css="permission.css" />

<xen:form action="{xen:adminlink 'user-group-permissions/save', $userGroup}" class="PermissionChoices">

	<fieldset id="piGroups">
	
		<xen:include template="permission_tooltip" />
			
		<xen:include template="permission_check_all">
			<xen:set var="$target">#piGroups</xen:set>
		</xen:include>
	
		<xen:foreach loop="$permissions" value="$interfaceGroup">
			<xen:include template="permission_list_group" />
		</xen:foreach>
		
		
	</fieldset>

	<xen:submitunit save="{xen:phrase update_permissions}" />
</xen:form>]]></template>
  <template title="permission_user_group_list"><![CDATA[<xen:title>{xen:phrase user_group_permissions}</xen:title>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<xen:form action="{xen:adminlink user-groups}" class="section">

	<h2 class="subHeading">
		<xen:include template="filter_list_controls" />
		{xen:phrase user_groups}
	</h2>

	<ol class="FilterList Scrollable">
		<xen:foreach loop="$userGroups" value="$userGroup">
			<xen:listitem
				id="{$userGroup.user_group_id}"
				label="{$userGroup.title}"
				href="{xen:adminlink 'user-group-permissions', $userGroup}">
				<xen:html>
					<a href="{xen:adminlink user-groups/edit, $userGroup}" class="secondaryContent">{xen:phrase group_info}</a>
				</xen:html>
			</xen:listitem>
		</xen:foreach>
	</ol>

	<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:count $userGroups}</span>', 'total={xen:count $userGroups}'}</p>

</xen:form>]]></template>
  <template title="permission_user_list"><![CDATA[<xen:title>{xen:phrase user_permissions}</xen:title>

<xen:topctrl>
	<form action="{xen:adminlink user-permissions/add}" method="post">
		<input type="search" name="username" class="textCtrl AutoComplete AcSingle" results="10" size="20" placeholder="{xen:phrase user_name}..." />
		<input type="submit" value="{xen:phrase set_permissions}" class="button" />
		<input type="hidden" name="_xfToken" value="{$visitor.csrf_token_page}" />
	</form>
</xen:topctrl>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<xen:form action="{xen:adminlink user-permissions}" class="section">
	<xen:if is="{$users}">

		<h2 class="subHeading">
			<xen:include template="filter_list_controls" />
			{xen:phrase users_with_custom_permissions}
		</h2>

		<ol class="FilterList Scrollable">
			<xen:foreach loop="$users" value="$user">
				<xen:listitem
					id="{$user.user_id}"
					label="{$user.username}"
					href="{xen:adminlink 'user-permissions', $user}">
					<xen:beforelabel>
						<img src="{xen:helper avatar, $user, s}" alt="" class="listAvatar" />
					</xen:beforelabel>
					<xen:html>
						<a href="{xen:adminlink users/edit, $user}" class="secondaryContent">{xen:phrase user_info}</a>
					</xen:html>
				</xen:listitem>
			</xen:foreach>
		</ol>

		<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:count $users}</span>', 'total={xen:count $users}'}</p>

	<xen:else />

		<div class="noResults">{xen:phrase no_users_have_custom_permissions}</div>

	</xen:if>
</xen:form>]]></template>
  <template title="phrase_delete"><![CDATA[<xen:title>{xen:if $phrase.language_id, {xen:phrase confirm_reversion_of_phrase}, {xen:phrase confirm_deletion_of_phrase}}: {$phrase.title}</xen:title>
<xen:h1>{xen:if $phrase.language_id, {xen:phrase confirm_reversion_of_phrase}, {xen:phrase confirm_deletion_of_phrase}}</xen:h1>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'phrases/edit', $phrase}">{$phrase.title}</xen:breadcrumb>
</xen:navigation>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'phrases/delete'}" class="deleteConfirmForm formOverlay">

	<p><xen:if is="{$phrase.language_id}">{xen:phrase please_confirm_that_you_want_to_revert_following_phrase, 'language={$language.title}'}:
		<xen:else />{xen:phrase please_confirm_that_you_want_to_delete_following_phrase}:
		</xen:if></p>
	<strong><a href="{xen:adminlink 'phrases/edit', $phrase}">{$phrase.title}</a></strong>

	<input type="hidden" name="phrase_id" value="{$phrase.phrase_id}" />

	<xen:submitunit save="{xen:if $phrase.language_id, {xen:phrase revert_phrase}, {xen:phrase delete_phrase}}" />
	<input type="hidden" name="_xfConfirm" value="1" />
	
</xen:form>]]></template>
  <template title="phrase_edit"><![CDATA[<xen:title>{xen:if {$phrase.title}, '{xen:phrase edit_phrase}: {$phrase.title}', '{xen:phrase create_new_phrase}'}</xen:title>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'languages/phrases', $language}#{xen:helper listitemid, $listItemId}">{$language.title}</xen:breadcrumb>
</xen:navigation>

<xen:form action="{xen:adminlink 'phrases/save'}" class="AutoValidator" data-redirect="yes">
	<xen:controlunit label="{xen:phrase language}:">{$language.title}</xen:controlunit>

	<xen:textboxunit name="title" value="{$phrase.title}" label="{xen:phrase title}:" hint="{xen:phrase must_be_unique}" data-livetitletemplate="{xen:if {$phrase.title},
		'{xen:phrase edit_phrase}: <em>%s</em>',
		'{xen:phrase create_new_phrase}: <em>%s</em>'}" />
		
	<xen:if is="{$masterValue}">
		<xen:controlunit label="{xen:phrase master_value}:">{xen:string nl2br, $masterValue}</xen:controlunit>
	</xen:if>

	<xen:textboxunit name="phrase_text" value="{$phrase.phrase_text}" label="{xen:phrase phrase_text}:" rows="2" inputclass="Elastic" />
	
	<xen:include template="helper_addon_unit" />

	<xen:if is="{$showGlobalCacheOption}">
		<xen:checkboxunit label="">
			<xen:option name="global_cache" selected="{$phrase.global_cache}">{xen:phrase cache_this_phrase_globally}</xen:option>
		</xen:checkboxunit>
	</xen:if>
		
	<input type="hidden" name="phrase_id" value="{$phrase.phrase_id}" />
	<input type="hidden" name="language_id" value="{$phrase.language_id}" />

	<xen:submitunit save="{xen:phrase save_phrase}">
		<input type="submit" name="reload" value="{xen:phrase save_and_reload}" accesskey="e" class="button" id="save_reload_button" />
		<xen:if is="{$phrase.phrase_id}">
			<input type="button" value="{xen:if $phrase.language_id, {xen:phrase revert_phrase}, {xen:phrase delete_phrase}}..."
				accesskey="d" class="button OverlayTrigger"
				data-href="{xen:adminlink 'phrases/delete', $phrase, 'language_id={$language.language_id}'}" />
		</xen:if>
	</xen:submitunit>
</xen:form>]]></template>
  <template title="phrase_list"><![CDATA[<xen:title>{$language.title}: {xen:phrase phrases}</xen:title>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink languages}#{xen:helper listitemid, $language.language_id}">{$language.title}</xen:breadcrumb>
</xen:navigation>

<xen:topctrl>
	<a href="{xen:adminlink 'phrases/add', '', 'language_id={$language.language_id}'}" class="button" accesskey="a">+ {xen:phrase create_new_phrase}</a>
</xen:topctrl>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<div class="topChoosers">
	<div class="Popup">
		<span class="muted">{xen:phrase language}:</span> <a rel="Menu">{$language.title}</a>
		<div class="Menu">
			<div class="primaryContent menuHeader"><h3>{xen:phrase languages}</h3></div>
			<ul class="secondaryContent blockLinksList">
				<xen:if is="{$masterLanguage}">
					<li><a href="{xen:adminlink 'languages/phrases', $masterLanguage}"><span class="_depth0">{$masterLanguage.title}</span></a></li>
				</xen:if>
				<xen:foreach loop="$languages" key="$_languageId" value="$_language">
					<li><a href="{xen:adminlink 'languages/phrases', $_language}"><span class="_depth{$_language.depth}">{$_language.title}</span></a></li>
				</xen:foreach>
			</ul>
		</div>
	</div>
</div>

<xen:form action="{xen:adminlink languages/phrases, $language}" class="section">

	<h2 class="subHeading">
		<xen:include template="filter_list_controls" />
		{xen:phrase phrases}
	</h2>

	<ol class="FilterList Scrollable" data-ajaxfilter="true">
		<xen:include template="phrase_list_items" />
	</ol>

	<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:count $phrases}</span>', 'total={xen:number $totalPhrases}'}</p>

</xen:form>

{xen:adminpagenav $perPage, $totalPhrases, $page, languages/phrases, $language}]]></template>
  <template title="phrase_list_items"><![CDATA[<xen:foreach loop="$phrases" value="$phrase">				
	<xen:listitem
		id="{$phrase.phrase_id}"
		class="item_{$phrase.phrase_state}"
		href="{xen:adminlink 'phrases/edit', $phrase, 'language_id={$language.language_id}'}"
		snippet="{$phrase.addonTitle}"
		delete="{xen:if $phrase.canDelete, {xen:adminlink 'phrases/delete', $phrase, 'language_id={$language.language_id}'}}"
		deletehint="{xen:if $language.language_id, {xen:phrase revert_phrase}, {xen:phrase delete_phrase}}...">
		<xen:label>{$phrase.title}</xen:label>
	</xen:listitem>
</xen:foreach>
<xen:if is="{$filterMore}">
	<li class="listNote">{xen:phrase more_records_matching_filter_more_specific}</li>
</xen:if>]]></template>
  <template title="phrase_outdated"><![CDATA[<xen:title>{xen:phrase outdated_phrases}</xen:title>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<xen:form action="{xen:adminlink 'phrases/outdated'}" class="section">

	<h2 class="subHeading">
		<xen:include template="filter_list_controls" />
		{xen:phrase outdated_phrases}
	</h2>

	<ul class="FilterList Scrollable">
		<xen:foreach loop="$languages" value="$language">
		<xen:if is="{$phrasesGrouped.{$language.language_id}}">
			<li>
				<h3 class="textHeading">{$language.title}</h3>
				<ol>
				<xen:foreach loop="{$phrasesGrouped.{$language.language_id}}" value="$phrase">
					<xen:listitem
						id="{$phrase.phrase_id}"
						href="{xen:adminlink phrases/edit, $phrase}"
						label="{$phrase.title}"
						snippet="{xen:phrase custom_version}: {$phrase.version_string}, {xen:phrase master_version}: {$phrase.master_version_string}" />
				</xen:foreach>
				</ol>
			</li>
		</xen:if>
		</xen:foreach>
	</ul>

	<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:number $totalPhrases}</span>', 'total={xen:number $totalPhrases}'}</p>

</xen:form>]]></template>
  <template title="phrase_search"><![CDATA[<xen:title>{xen:phrase search_phrases}</xen:title>

<xen:form action="{xen:adminlink phrases/search}" method="get">
	
	<xen:selectunit label="{xen:phrase language}:" name="language_id" value="{$languageId}">
		<xen:option value="{$masterLanguage.language_id}" displayif="{$masterLanguage}">{$masterLanguage.title}</xen:option>
		<xen:foreach loop="$languages" value="$language">
			<xen:option value="{$language.language_id}" depth="{$language.depth}">{$language.title}</xen:option>
		</xen:foreach>
	</xen:selectunit>
	
	<xen:textboxunit label="{xen:phrase title_contains}:" name="title" type="search" results="5" />
	
	<fieldset>
		<xen:textboxunit label="{xen:phrase text_contains}:" name="phrase_text" inputclass="Elastic" rows="2">
			<xen:html>
				<xen:checkbox>
					<xen:option name="phrase_case_sensitive">{xen:phrase case_sensitive}</xen:option>
				</xen:checkbox>
			</xen:html>
		</xen:textboxunit>
	</fieldset>
	
	<fieldset>
		<xen:checkboxunit label="{xen:phrase phrase_status}:" name="phrase_state[]">
			<xen:option value="default" selected="true">{xen:phrase untranslated}</xen:option>
			<xen:option value="inherited" selected="true">{xen:phrase translated_in_parent_language}</xen:option>
			<xen:option value="custom" selected="true">{xen:phrase translated_in_this_language}</xen:option>
		</xen:checkboxunit>
	</fieldset>
	
	<xen:submitunit save="{xen:phrase search_phrases}" />

	<input type="hidden" name="search" value="1" />
</xen:form>]]></template>
  <template title="phrase_search_results"><![CDATA[<xen:title>{xen:phrase phrase_search_results}: {$language.title}</xen:title>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<xen:form action="{xen:adminlink phrases/search}" class="section">

	<h2 class="subHeading">
		<xen:include template="filter_list_controls" />
		{xen:phrase phrases}
	</h2>

	<ol class="FilterList Scrollable">
	<xen:foreach loop="$phrases" value="$phrase">
		<li class="listItem primaryContent item_{$phrase.phrase_state}" id="listItem_{$phrase.phrase_id}">
			<xen:if is="{$phrase.canDelete}">
				<a href="{xen:adminlink 'phrases/delete', $phrase, 'language_id={$language.language_id}'}" target="_blank" class="delete secondaryContent" title="{xen:if $language.language_id, {xen:phrase revert_phrase}, {xen:phrase delete_phrase}}..."><span>{xen:if $language.language_id, {xen:phrase revert_phrase}, {xen:phrase delete_phrase}}...</span></a>
			</xen:if>
			<h4><a href="{xen:adminlink 'phrases/edit', $phrase, 'language_id={$language.language_id}'}" target="_blank">
				<em>{$phrase.title}</em> <dfn>{$phrase.addonTitle}</dfn>
			</a></h4>
		</li>
	</xen:foreach>
	</ol>

	<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:count $phrases}</span>', 'total={xen:count $phrases}'}</p>

</xen:form>]]></template>
  <template title="quicksearch_admin_navigation"><![CDATA[<xen:if hascontent="true">
	<tr>
		<th class="primaryContent">{xen:phrase admin_navigation}</th>
		<td class="secondaryContent">
			<ul class="blockLinksList">
				<xen:contentcheck>
					<xen:foreach loop="$results" value="$entry">
						<li><a href="{xen:adminlink '{$entry.link}'}">{$entry.title}</a></li>
					</xen:foreach>
				</xen:contentcheck>
			</ul>
		</td>
	</tr>
</xen:if>]]></template>
  <template title="quicksearch_admin_templates"><![CDATA[<xen:if hascontent="true">
	<tr>
		<th class="primaryContent">{xen:phrase admin_templates}</th>
		<td class="secondaryContent">
			<ul class="blockLinksList">
				<xen:contentcheck>
					<xen:foreach loop="$results" value="$template">
						<li><a href="{xen:adminlink admin-templates/edit, $template}">{$template.title}</a></li>
					</xen:foreach>
				</xen:contentcheck>
			</ul>
		</td>
	</tr>
</xen:if>]]></template>
  <template title="quicksearch_bb_code_media_site"><![CDATA[<xen:if hascontent="true">
	<tr>
		<th class="primaryContent">{xen:phrase bb_code_media_sites}</th>
		<td class="secondaryContent">
			<ul class="blockLinksList">
				<xen:contentcheck>
					<xen:foreach loop="$results" value="$site">
						<li><a href="{xen:adminlink bb-code-media-sites/edit, $site}">{$site.site_title} <dfn>{$site.site_url}</dfn></a></li>
					</xen:foreach>
				</xen:contentcheck>
			</ul>
		</td>
	</tr>
</xen:if>]]></template>
  <template title="quicksearch_feeds"><![CDATA[<xen:if hascontent="true">
	<tr>
		<th class="primaryContent">{xen:phrase registered_feeds}</th>
		<td class="secondaryContent">
			<ul class="blockLinksList">
				<xen:contentcheck>
					<xen:foreach loop="$results" value="$feed">
						<li><a href="{xen:adminlink feeds/edit, $feed}">{$feed.title} <dfn>{$feed.url}</dfn></a></li>
					</xen:foreach>
				</xen:contentcheck>
			</ul>
		</td>
	</tr>
</xen:if>]]></template>
  <template title="quicksearch_languages"><![CDATA[<xen:if hascontent="true">
	<tr>
		<th class="primaryContent">{xen:phrase languages}</th>
		<td class="secondaryContent">
			<ul class="blockLinksList">
				<xen:contentcheck>
					<xen:foreach loop="$results" value="$language">
						<li><a href="{xen:adminlink languages/edit, $language}">{$language.title}</a></li>
					</xen:foreach>
				</xen:contentcheck>
			</ul>
		</td>
	</tr>
</xen:if>]]></template>
  <template title="quicksearch_nodes"><![CDATA[<xen:if hascontent="true">
	<tr>
		<th class="primaryContent">{xen:phrase nodes}</th>
		<td class="secondaryContent">
			<ul class="blockLinksList">
				<xen:contentcheck>
					<xen:foreach loop="$results" value="$node">
						<li><a href="{xen:adminlink nodes/edit, $node}">{$node.title}</a></li>
					</xen:foreach>
				</xen:contentcheck>
			</ul>
		</td>
	</tr>
</xen:if>]]></template>
  <template title="quicksearch_notices"><![CDATA[<xen:if hascontent="true">
	<tr>
		<th class="primaryContent">{xen:phrase notices}</th>
		<td class="secondaryContent">
			<ul class="blockLinksList">
				<xen:contentcheck>
					<xen:foreach loop="$results" value="$notice">
						<li><a href="{xen:adminlink notices/edit, $notice}">{$notice.title}</a></li>
					</xen:foreach>
				</xen:contentcheck>
			</ul>
		</td>
	</tr>
</xen:if>]]></template>
  <template title="quicksearch_options"><![CDATA[<xen:if hascontent="true">
	<tr>
		<th class="primaryContent">{xen:phrase options}</th>
		<td class="secondaryContent">
			<ul class="blockLinksList">
				<xen:contentcheck>
					<xen:foreach loop="$results" value="$option">
						<li><a href="{xen:adminlink options/view-option, $option}" title="{$option.option_id}">{$option.title}
							<dfn>{$option.option_id}</dfn></a></li>
					</xen:foreach>
				</xen:contentcheck>
			</ul>
		</td>
	</tr>
</xen:if>]]></template>
  <template title="quicksearch_phrases"><![CDATA[<xen:if hascontent="true">
	<tr>
		<th class="primaryContent">{xen:phrase phrases}</th>
		<td class="secondaryContent">
			<ul class="blockLinksList">
				<xen:contentcheck>
					<xen:foreach loop="$results" value="$phrase">
						<li><a href="{xen:adminlink phrases/edit, $phrase, 'language_id={$languageId}'}"}">{$phrase.title}</a></div>
					</xen:foreach>
				</xen:contentcheck>
			</ul>
		</td>
	</tr>
</xen:if>]]></template>
  <template title="quicksearch_promotions"><![CDATA[<xen:if hascontent="true">
	<tr>
		<th class="primaryContent">{xen:phrase user_group_promotions}</th>
		<td class="secondaryContent">
			<ul class="blockLinksList">
				<xen:contentcheck>
					<xen:foreach loop="$results" value="$promotion">
						<li><a href="{xen:adminlink user-group-promotions/edit, $promotion}">{$promotion.title}</a></li>
					</xen:foreach>
				</xen:contentcheck>
			</ul>
		</td>
	</tr>
</xen:if>]]></template>
  <template title="quicksearch_results"><![CDATA[<xen:title>{xen:phrase search_results}</xen:title>

<table id="acpQuickSearch">
<xen:if hascontent="true">
	<xen:contentcheck>
		<xen:foreach loop="$output" value="$template">{xen:raw $template}</xen:foreach>
	</xen:contentcheck>
<xen:else />
	<tr>
		<th class="primaryContent"></th>
		<td class="secondaryContent noResults"><b>{xen:phrase no_results_found}</b></td>
	</tr>
	<tr>
		<th class="primaryContent"></th>
		<td class="secondaryContent">
			<ul class="blockLinksList">
				<li><a href="{xen:adminlink options/view-option, {xen:array 'option_id=adminSearchExclusions'}}">{xen:phrase search_preferences}...</a></li>
			</ul>
		</td>
	</tr>
</xen:if>
</table>]]></template>
  <template title="quicksearch_smilies"><![CDATA[<xen:if hascontent="true">
	<tr>
		<th class="primaryContent">{xen:phrase smilies}</th>
		<td class="secondaryContent">
			<ul class="blockLinksList">
				<xen:contentcheck>
					<xen:foreach loop="$results" value="$smilie">
						<li>
							<xen:if is="{$smilie.sprite_mode}">
								<img src="styles/default/xenforo/clear.png" alt="{$smilie.smilieText}" class="icon" style="
									width: {$smilie.sprite_params.w}px;
									height: {$smilie.sprite_params.h}px;
									background: url('{$smilie.image_url}') no-repeat {$smilie.sprite_params.x}px {$smilie.sprite_params.y}px;" />
							<xen:else />
								<img src="{$smilie.image_url}" alt="{$smilie.smilieText}" class="icon" />
							</xen:if>
							<a href="{xen:adminlink smilies/edit, $smilie}">{$smilie.title} <dfn>{$smilie.smilieText}</dfn></a></li>
					</xen:foreach>
				</xen:contentcheck>
			</ul>
		</td>
	</tr>
</xen:if>]]></template>
  <template title="quicksearch_styles"><![CDATA[<xen:if hascontent="true">
	<tr>
		<th class="primaryContent">{xen:phrase styles}</th>
		<td class="secondaryContent">
			<ul class="blockLinksList">
				<xen:contentcheck>
					<xen:foreach loop="$results" value="$style">
						<li><a href="{xen:adminlink styles/edit, $style}">{$style.title}</a></li>
					</xen:foreach>
				</xen:contentcheck>
			</ul>
		</td>
	</tr>
</xen:if>]]></template>
  <template title="quicksearch_style_properties"><![CDATA[<xen:if hascontent="true">
	<tr>
		<th class="primaryContent">{xen:phrase style_properties}</th>
		<td class="secondaryContent">
			<ul class="blockLinksList">
				<xen:contentcheck>
					<xen:foreach loop="$results" value="$styleProperty">
						<li><a href="{xen:adminlink styles/style-properties, $styleProperty.style, 'group={$styleProperty.group_name}'}#_{$styleProperty.property_name}">{$styleProperty.title}
							<dfn>@{$styleProperty.property_name}</dfn></a></div>
					</xen:foreach>
				</xen:contentcheck>
			</ul>
		</td>
	</tr>
</xen:if>]]></template>
  <template title="quicksearch_templates"><![CDATA[<xen:if hascontent="true">
	<tr>
		<th class="primaryContent">{xen:phrase templates}</th>
		<td class="secondaryContent">
			<ul class="blockLinksList">
				<xen:contentcheck>
					<xen:foreach loop="$results" value="$template">
						<li><a href="{xen:adminlink templates/edit, $template, 'style_id={$styleId}'}">{$template.title}</a></div>
					</xen:foreach>
				</xen:contentcheck>
			</ul>
		</td>
	</tr>
</xen:if>]]></template>
  <template title="quicksearch_users"><![CDATA[<xen:if hascontent="true">
	<tr>
		<th class="primaryContent">{xen:phrase users}</th>
		<td class="secondaryContent">
			<ul class="blockLinksList">
				<xen:contentcheck>
					<xen:foreach loop="$results" value="$user">
						<li><a href="{xen:adminlink users/edit, $user}">{$user.username} <dfn>{$user.email}</dfn></a></li>
					</xen:foreach>
				</xen:contentcheck>
			</ul>
		</td>
	</tr>
</xen:if>]]></template>
  <template title="quicksearch_user_fields"><![CDATA[<xen:if hascontent="true">
	<tr>
		<th class="primaryContent">{xen:phrase custom_user_fields}</th>
		<td class="secondaryContent">
			<ul class="blockLinksList">
				<xen:contentcheck>
					<xen:foreach loop="$results" value="$userField">
						<li><a href="{xen:adminlink user-fields/edit, $userField}">{$userField.title}
							<dfn>{$userField.field_id}</dfn></a></li>
					</xen:foreach>
				</xen:contentcheck>
			</ul>
		</td>
	</tr>
</xen:if>]]></template>
  <template title="quicksearch_user_groups"><![CDATA[<xen:if hascontent="true">
	<tr>
		<th class="primaryContent">{xen:phrase user_groups}</th>
		<td class="secondaryContent">
			<ul class="blockLinksList">
				<xen:contentcheck>
					<xen:foreach loop="$results" value="$userGroup">
						<li><a href="{xen:adminlink user-groups/edit, $userGroup}">{$userGroup.title}</a></div>
					</xen:foreach>
				</xen:contentcheck>
			</ul>
		</td>
	</tr>
</xen:if>]]></template>
  <template title="quicksearch_user_upgrades"><![CDATA[<xen:if hascontent="true">
	<tr>
		<th class="primaryContent">{xen:phrase user_upgrades}</th>
		<td class="secondaryContent">
			<ul class="blockLinksList">
				<xen:contentcheck>
					<xen:foreach loop="$results" value="$upgrade">
						<li><a href="{xen:adminlink user-upgrades/edit, $upgrade}">{$upgrade.title}</a></li>
					</xen:foreach>
				</xen:contentcheck>
			</ul>
		</td>
	</tr>
</xen:if>]]></template>
  <template title="quicksearch_warnings"><![CDATA[<xen:if hascontent="true">
	<tr>
		<th class="primaryContent">{xen:phrase warnings}</th>
		<td class="secondaryContent">
			<ul class="blockLinksList">
				<xen:contentcheck>
					<xen:foreach loop="$results" value="$warning">
						<li><a href="{xen:adminlink warnings/edit, $warning}">{$warning.title}</a></li>
					</xen:foreach>
				</xen:contentcheck>
			</ul>
		</td>
	</tr>
</xen:if>]]></template>
  <template title="route_filter_delete"><![CDATA[<xen:title>{xen:phrase confirm_deletion_of_route_filter}</xen:title>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'route-filters/edit', $routeFilter}">{xen:phrase route_filter}</xen:breadcrumb>
</xen:navigation>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'route-filters/delete', $routeFilter}" class="deleteConfirmForm">
	<p>{xen:phrase please_confirm_that_you_want_to_delete_following_route_filter}:</p>
	<strong><a href="{xen:adminlink 'route-filters/edit', $routeFilter}">{$routeFilter.find_route}</a></strong>

	<xen:submitunit save="{xen:phrase delete_route_filter}" />

	<input type="hidden" name="_xfConfirm" value="1" />
</xen:form>]]></template>
  <template title="route_filter_edit"><![CDATA[<xen:title>{xen:if {$routeFilter.route_filter_id}, '{xen:phrase edit_route_filter}', '{xen:phrase create_route_filter}'}</xen:title>

<xen:if is="{$routeFilter.route_filter_id}">
	<xen:navigation>
		<xen:breadcrumb href="{xen:adminlink route-filters}#{xen:helper listitemid, $routeFilter.route_filter_id}">{xen:phrase route_filter}</xen:breadcrumb>
	</xen:navigation>
</xen:if>

<xen:form action="{xen:adminlink 'route-filters/save', $routeFilter}" class="AutoValidator" data-redirect="yes">

	<xen:textboxunit label="{xen:phrase find_route}:" name="find_route" value="{$routeFilter.find_route}" maxlength="255">
		<xen:explain>{xen:phrase you_should_only_enter_route_part_of_url_here_example, 'fullUrl={$fullThreadLink}', 'route={$routeValue}'}</xen:explain>
	</xen:textboxunit>

	<xen:textboxunit label="{xen:phrase replace_with}:" name="replace_route" value="{$routeFilter.replace_route}" maxlength="255">
		<xen:explain>{xen:phrase route_filter_find_replace_fields_support_wildcards}</xen:explain>
	</xen:textboxunit>

	<xen:checkboxunit label="">
		<xen:option name="url_to_route_only" name="url_to_route_only" value="1" selected="{$routeFilter.url_to_route_only}" label="{xen:phrase incoming_url_conversion_only}" hint="{xen:phrase if_selected_this_filter_will_only_be_used_to_change_incoming_urls}" />
		<xen:option name="enabled" name="enabled" value="1" selected="{$routeFilter.enabled}" label="{xen:phrase enabled}" />
	</xen:checkboxunit>	
	
	<xen:submitunit save="{xen:phrase save_route_filter}">
		<xen:if is="{$routeFilter.route_filter_id}">
			<input type="button" value="{xen:phrase delete_route_filter}..." accesskey="d" class="button OverlayTrigger"
				data-href="{xen:adminlink 'route-filters/delete', $routeFilter}" /></xen:if>
	</xen:submitunit>
</xen:form>]]></template>
  <template title="route_filter_list"><![CDATA[<xen:title>{xen:phrase route_filters}</xen:title>
<xen:description>{xen:phrase route_filters_allow_you_to_change_standard_urls}</xen:description>

<xen:topctrl>
	<a href="{xen:adminlink route-filters/add}" class="button">+ {xen:phrase create_route_filter}</a>
</xen:topctrl>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<xen:form action="{xen:adminlink route-filters/toggle}" class="section AutoValidator">
	
	<xen:if is="{$routeFilters}">
	
		<h2 class="subHeading">
			<xen:include template="filter_list_controls" />
			{xen:phrase route_filters}
		</h2>

		<ol class="FilterList">
		<xen:foreach loop="$routeFilters" value="$routeFilter">
			<xen:listitem
				id="{$routeFilter.route_filter_id}"
				label="{$routeFilter.find_route}"
				href="{xen:adminlink route-filters/edit, $routeFilter}"
				snippet="{$routeFilter.replace_route}"
				delete="{xen:adminlink route-filters/delete, $routeFilter}"
				toggle="{$routeFilter.enabled}"
				toggletitle="{xen:phrase enable_disable_route_filter}"
			/>
		</xen:foreach>
		</ol>
	
		<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:count $routeFilters}</span>', 'total={xen:count $routeFilters}'}</p>
	
	<xen:else />
		<div class="noResults">{xen:phrase no_route_filters_have_been_defined_yet}</div>
	</xen:if>
	
</xen:form>]]></template>
  <template title="route_prefix_delete"><![CDATA[<xen:title>{xen:phrase confirm_deletion_of_route_prefix}: {$prefix.original_prefix}</xen:title>
<xen:h1>{xen:phrase confirm_deletion_of_route_prefix}</xen:h1>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'route-prefixes/edit', $prefix}">{$prefix.original_prefix}</xen:breadcrumb>
</xen:navigation>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'route-prefixes/delete', $prefix}" class="deleteConfirmForm formOverlay">

	<p>{xen:phrase please_confirm_that_you_want_to_delete_following_route_prefix}:</p>
	<strong><a href="{xen:adminlink 'route-prefixes/edit', $prefix}">{$prefix.original_prefix}</a></strong>

	<xen:submitunit save="{xen:phrase delete_route_prefix}" />
	<input type="hidden" name="_xfConfirm" value="1" />
	
</xen:form>]]></template>
  <template title="route_prefix_edit"><![CDATA[<xen:title>{xen:if '{$prefix.original_prefix}', '{xen:phrase edit_route_prefix}: {$prefix.original_prefix}', '{xen:phrase create_new_route_prefix}'}</xen:title>

<xen:if is="{$prefix.original_prefix}">
	<xen:navigation>
		<xen:breadcrumb href="{xen:adminlink route-prefixes}#{xen:helper listitemid, '{$prefix.route_type}_{$prefix.original_prefix}'}">{$prefix.original_prefix}</xen:breadcrumb>
	</xen:navigation>
</xen:if>

<xen:form action="{xen:adminlink 'route-prefixes/save'}" class="AutoValidator" data-redirect="yes">
	<xen:textboxunit label="{xen:phrase route_prefix}:" name="original_prefix" value="{$prefix.original_prefix}" data-livetitletemplate="{xen:if {$prefix.original_prefix},
		'{xen:phrase edit_route_prefix}: <em>%s</em>',
		'{xen:phrase create_new_route_prefix}: <em>%s</em>'}" />
	
	<xen:radiounit label="{xen:phrase route_type}:" name="route_type" value="{$prefix.route_type}">
		<xen:option value="admin">{xen:phrase admin_control_panel}</xen:option>
		<xen:option value="public">{xen:phrase public}</xen:option>
	</xen:radiounit>
	
	<xen:textboxunit label="{xen:phrase route_class}:" name="route_class" value="{$prefix.route_class}" />
	
	<xen:radiounit label="{xen:phrase use_class_to_build_link}:" name="build_link" value="{$prefix.build_link}">
		<xen:option value="all">{xen:phrase always}</xen:option>
		<xen:option value="data_only">{xen:phrase only_when_data_is_provided}</xen:option>
		<xen:option value="none">{xen:phrase never}</xen:option>
	</xen:radiounit>
	
	<xen:include template="helper_addon_unit" />
		
	<input type="hidden" name="original_original_prefix" value="{$prefix.original_prefix}" />
	<input type="hidden" name="original_route_type" value="{$prefix.route_type}" />

	<xen:submitunit save="{xen:phrase save_prefix}">
		<xen:if is="{$prefix.original_prefix}">
			<input type="button" value="{xen:phrase delete_prefix}..." accesskey="d" class="button OverlayTrigger"
				data-href="{xen:adminlink 'route-prefixes/delete', $prefix}" />
		</xen:if>
	</xen:submitunit>

</xen:form>]]></template>
  <template title="route_prefix_list"><![CDATA[<xen:title>{xen:phrase route_prefixes}</xen:title>

<xen:topctrl><a href="{xen:adminlink 'route-prefixes/add'}" class="button">{xen:phrase create_new_route_prefix}</a></xen:topctrl>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<xen:form action="{xen:adminlink 'route-prefixes'}" class="section">

	<h2 class="subHeading">
		<xen:include template="filter_list_controls" />
		{xen:phrase route_prefixes}
	</h2>

	<ul class="FilterList">
		<li>
			<h3 class="textHeading">{xen:phrase public_route_prefixes} <span class="count">({xen:count $publicPrefixes})</span></h3>
			<ol class="Scrollable">
				<xen:foreach loop="$publicPrefixes" value="$prefix">
					<xen:listitem
						id="public_{$prefix.original_prefix}"
						label="{$prefix.original_prefix}"
						href="{xen:adminlink 'route-prefixes/edit', $prefix}"
						snippet="{$prefix.route_class}"
						delete="{xen:adminlink 'route-prefixes/delete', $prefix}">
					</xen:listitem>
				</xen:foreach>
			</ol>
		</li>
		<li>
			<h3 class="textHeading">{xen:phrase admin_control_panel_route_prefixes} <span class="count">({xen:count $adminPrefixes})</span></h3>
			<ol class="Scrollable">
				<xen:foreach loop="$adminPrefixes" value="$prefix">
					<xen:listitem
						id="admin_{$prefix.original_prefix}"
						href="{xen:adminlink 'route-prefixes/edit', $prefix}"
						label="{$prefix.original_prefix}"
						snippet="{$prefix.route_class}"
						delete="{xen:adminlink 'route-prefixes/delete', $prefix}" />
				</xen:foreach>
			</ol>
		</li>
	</ul>

	<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:number $totalPrefixes}</span>', 'total={xen:number $totalPrefixes}'}</p>

</xen:form>]]></template>
  <template title="sidebar_installed_addons"><![CDATA[<xen:form action="{xen:adminlink add-ons/toggle}" class="section AutoValidator">
	<h3 class="textHeading">{xen:phrase installed_add_ons}</h3>
	<xen:if hascontent="true">
		<table>
			<col />
			<col style="width: 100%" />
			<col />
			<xen:contentcheck>
				<xen:foreach loop="$addOns" key="$addOnId" value="$addOn">
				<tr>
					<td class="secondaryContent">
						<input type="hidden" name="exists[{$addOnId}]" value="1" />
						<input type="checkbox" name="id[{$addOnId}]" value="1" {xen:checked {$addOn.active}}
							class="SubmitOnChange Tooltip" title="{xen:phrase enable_disable_x, 'title={$addOn.title}'}" data-offsetx="-8" data-offsety="-8" />
					</td>
					<td><a href="{xen:adminlink add-ons/upgrade, $addOn}"
						class="primaryContent OverlayTrigger Tooltip"
						title="{xen:phrase add_on_id_version_id, 'addon_id={$addOn.addon_id}', 'version_id={$addOn.version_id}'}">{$addOn.title}</a></td>
					<td class="secondaryContent" style="white-space: nowrap">{$addOn.version_string}</td>
				</tr>
				</xen:foreach>
			</xen:contentcheck>
		</table>
	<xen:else />
		<p class="secondaryContent noContentMessage">{xen:phrase no_add_ons_have_been_installed_yet}</p>
	</xen:if>
	<div class="sectionFooter">
		<a href="{xen:adminlink add-ons/install}">{xen:phrase install_add_on}</a>
		&nbsp;
		<a href="{xen:adminlink add-ons}">{xen:phrase manage_add_ons}</a>
	</div>
</xen:form>]]></template>
  <template title="sidenav_entry"><![CDATA[<li class="{xen:if $children, sideNavSection, sideNavLink}"><a{xen:if {$link.link}, ' href="{xen:adminlink $link.link}"'}>{$link.title}</a>
<xen:if is="{$children}">
	<ul>
		<xen:foreach loop="$children" value="$childLink">{xen:raw $childLink}</xen:foreach>
	</ul>
</xen:if>
</li>]]></template>
  <template title="sitemap_log"><![CDATA[<xen:title>{xen:phrase sitemap_log}</xen:title>

<xen:if is="{$logs}">
	<xen:topctrl>
		<a href="sitemap.php" class="button">{xen:phrase download_sitemap}</a>
	</xen:topctrl>

	<table class="dataTable" width="100%" style="table-layout: fixed">
	<tr class="dataRow">
		<th width="32%">{xen:phrase start_date}</th>
		<th width="32%">{xen:phrase completion_date}</th>
		<th width="12%">{xen:phrase total_files}</th>
		<th width="12%">{xen:phrase total_urls}</th>
		<th width="12%">{xen:phrase compressed}</th>
	</tr>
	<xen:foreach loop="$logs" value="$log">
	<tr class="dataRow {xen:if $log.is_active, important}">
		<td>{xen:datetime $log.sitemap_id, absolute}</td>
		<td><xen:if is="{$log.complete_date}">{xen:datetime $log.complete_date, absolute}<xen:else />{xen:phrase n_a}</xen:if></td>
		<td>{xen:number $log.file_count}</td>
		<td>{xen:number $log.entry_count}</td>
		<td><xen:if is="{$log.is_compressed}">{xen:phrase yes}<xen:else />{xen:phrase no}</xen:if></td>
	</tr>
	</xen:foreach>
	<tr>
		<td colspan="5" class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count={xen:count $logs}', 'total={xen:count $logs}'}</td>
	</tr>
	</table>
<xen:else />
	<div class="noResults">{xen:phrase no_entries_have_been_logged}</div>
</xen:if>]]></template>
  <template title="smilie_category_delete"><![CDATA[<xen:title>{xen:phrase confirm_deletion_of_smilie_category}: {$smilieCategory.title}</xen:title>
<xen:h1>{xen:phrase confirm_deletion_of_smilie_category}</xen:h1>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'smilie-categories/edit', $smilieCategory}">{$smilieCategory.title}</xen:breadcrumb>
</xen:navigation>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'smilie-categories/delete', $smilieCategory}" class="deleteConfirmForm">
	<p>{xen:phrase please_confirm_that_you_want_to_delete_following_smilie_category}:</p>
	<strong><a href="{xen:adminlink 'smilie-categories/edit', $smilieCategory}">{$smilieCategory.title}</a></strong>
	<p>{xen:phrase confirm_delete_smilie_category_footnote}</p>

	<xen:submitunit save="{xen:phrase delete_smilie_category}" />

	<input type="hidden" name="_xfConfirm" value="1" />
</xen:form>]]></template>
  <template title="smilie_category_edit"><![CDATA[<xen:title>{xen:if '{$smilieCategory.smilie_category_id}', '{xen:phrase edit_smilie_category}: {$smilieCategory.title}', '{xen:phrase create_new_smilie_category}'}</xen:title>

<xen:if is="{$smilieCategory.smilie_category_id}">
	<xen:navigation>
		<xen:breadcrumb href="{xen:adminlink smilies}#{xen:helper listitemid, $smilie.smilie_category_id}">{$smilieCategory.title}</xen:breadcrumb>
	</xen:navigation>
</xen:if>

<xen:form class="AutoValidator"
	action="{xen:adminlink 'smilie-categories/save', $smilieCategory}"
	data-redirect="on">
	
	<xen:textboxunit label="{xen:phrase title}:" name="title" value="{$smilieCategory.title}" data-optinout="OptOut" data-livetitletemplate="{xen:if {$smilieCategory.smilie_category_id},
		'{xen:phrase edit_smilie_category}: <em>%s</em>',
		'{xen:phrase create_new_smilie_category}: <em>%s</em>'}" />
	
	<xen:spinboxunit label="{xen:phrase display_order}:" name="display_order" value="{$smilieCategory.display_order}" min="0" step="10" />
	
	<xen:submitunit save="{xen:phrase save_smilie_category}">
		<xen:if is="{$smilieCategory.smilie_category_id}"><a href="{xen:adminlink 'smilie-categories/delete', $smilieCategory}" class="button OverlayTrigger">{xen:phrase delete_smilie_category}...</a></xen:if>
	</xen:submitunit>
</xen:form>]]></template>
  <template title="smilie_category_list"><![CDATA[<xen:title>{xen:phrase smilie_categories}</xen:title>

<xen:topctrl>
	<a href="{xen:adminlink smilie-categories/add}" class="button">+ {xen:phrase create_new_smilie_category}</a>
</xen:topctrl>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<div class="section AutoValidator">

	<h2 class="subHeading">
		{xen:phrase smilie_categories}
	</h2>
	
	<ul class="FilterList">
		<xen:foreach loop="$smilieCategories" key="$smilieCategoryId" value="$smilieCategory">
			<xen:listitem id="{$smilieCategoryId}"
				label="{$smilieCategory.title}"
				href="{xen:adminlink 'smilie-categories/edit', $smilieCategory}"
				delete="{xen:adminlink 'smilie-categories/delete', $smilieCategory}">
			</xen:listitem>			
		</xen:foreach>
	</ul>

	<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:number $totalSmilieCategories}</span>', 'total={xen:number $totalSmilieCategories}'}</p>
		
</div>]]></template>
  <template title="smilie_delete"><![CDATA[<xen:title>{xen:phrase confirm_deletion_of_smilie}: {$smilie.title}</xen:title>
<xen:h1>{xen:phrase confirm_deletion_of_smilie}</xen:h1>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'smilies/edit', $smilie}">{$smilie.title}</xen:breadcrumb>
</xen:navigation>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'smilies/delete', $smilie}" class="deleteConfirmForm">
	<p>{xen:phrase please_confirm_that_you_want_to_delete_following_smilie}:</p>
	<strong><a href="{xen:adminlink 'smilies/edit', $smilie}">{$smilie.title}</a></strong>

	<xen:submitunit save="{xen:phrase delete_smilie}" />

	<input type="hidden" name="_xfConfirm" value="1" />
</xen:form>]]></template>
  <template title="smilie_edit"><![CDATA[<xen:title>{xen:if '{$smilie.smilie_id}', '{xen:phrase edit_smilie}: {$smilie.title}', '{xen:phrase create_new_smilie}'}</xen:title>

<xen:if is="{$smilie.smilie_id}">
	<xen:navigation>
		<xen:breadcrumb href="{xen:adminlink smilies}#{xen:helper listitemid, $smilie.smilie_id}">{$smilie.title}</xen:breadcrumb>
	</xen:navigation>
</xen:if>

<xen:require js="js/xenforo/smiley_editor.js" />
<xen:require css="smilie_edit.css" />

<xen:topctrl><div id="SmileyEditorOutput"><div class="secondaryContent">
	<xen:if is="{$smilie.smilie_id}">
		<xen:if is="{$smilie.sprite_mode}">
			<img src="styles/default/xenforo/clear.png" alt="" style="
				width: {$smilie.sprite_params.w}px;
				height: {$smilie.sprite_params.h}px;
				background: url('{$smilie.image_url}') no-repeat {$smilie.sprite_params.x}px {$smilie.sprite_params.y}px" />
		<xen:else />
			<img src="{$smilie.image_url}" alt="" />
		</xen:if>
	<xen:else />
		<img src="styles/default/xenforo/clear.png" style="width: 18px; height: 18px" alt="" />
	</xen:if>
</div></div></xen:topctrl>

<xen:form class="AutoValidator SmileyEditor"
	action="{xen:adminlink 'smilies/save', $smilie}"
	data-fieldvalidatorurl="{xen:adminlink 'smilies/validate-field.json', $smilie}"
	data-redirect="on"
	data-smiley-output="#SmileyEditorOutput img">
	
	<xen:textboxunit label="{xen:phrase title}:" name="title" value="{$smilie.title}" data-livetitletemplate="{xen:if {$smilie.smilie_id},
		'{xen:phrase edit_smilie}: <em>%s</em>',
		'{xen:phrase create_new_smilie}: <em>%s</em>'}" />
	<xen:textboxunit label="{xen:phrase text_to_replace}:" name="smilie_text" value="{$smilie.smilie_text}" rows="2" inputclass="Elastic">
		<xen:explain>{xen:phrase enter_multiple_values_to_replace_on_separate_lines}</xen:explain>
	</xen:textboxunit>
	<xen:textboxunit label="{xen:phrase image_replacement_url}:" name="image_url" value="{$smilie.image_url}" />
	
	<fieldset>
		<xen:selectunit label="{xen:phrase smilie_category}:" name="smilie_category_id" value="{$smilie.smilie_category_id}">
			<xen:option value="0" label="({xen:phrase none})" />
			<xen:options source="$smilieCategories" />
		</xen:selectunit>
		
		<xen:spinboxunit label="{xen:phrase display_order}:" name="display_order" value="{$smilie.display_order}" min="0" step="10" />
		
		<xen:checkboxunit label="">
			<xen:option name="display_in_editor" label="{xen:phrase show_this_smilie_in_the_text_editor}" hint="{xen:phrase hidden_smilies_hint}" selected="{$smilie.display_in_editor}" />
		</xen:checkboxunit>
	</fieldset>
    
	<fieldset>
		<xen:checkboxunit label="{xen:phrase sprite_mode}:">
			<xen:option name="sprite_mode" label="{xen:phrase enable_sprite_mode_with_following_parameters}" selected="{$smilie.sprite_mode}" />
		</xen:checkboxunit>
		
		<xen:controlunit label="{xen:phrase sprite_dimensions}:">
			<xen:spinbox name="sprite_params[w]" value="{$smilie.sprite_params.w}" min="1" title="{xen:phrase width}" inputclass="Tooltip OptOut" />
			<xen:spinbox name="sprite_params[h]" value="{$smilie.sprite_params.h}" min="1" title="{xen:phrase height}" inputclass="Tooltip OptOut" />
			px
		</xen:controlunit>
		
		<xen:controlunit label="{xen:phrase sprite_position}:">
			<xen:spinbox name="sprite_params[x]" value="{$smilie.sprite_params.x}" title="{xen:phrase background_position_x}" inputclass="Tooltip OptOut" />
			<xen:spinbox name="sprite_params[y]" value="{$smilie.sprite_params.y}" title="{xen:phrase background_position_y}" inputclass="Tooltip OptOut" />
			px
		</xen:controlunit>
	</fieldset>
	
	<xen:submitunit save="{xen:phrase save_smilie}">
		<xen:if is="{$smilie.smilie_id}"><a href="{xen:adminlink 'smilies/delete', $smilie}" class="button OverlayTrigger">{xen:phrase delete_smilie}...</a></xen:if>
	</xen:submitunit>
</xen:form>]]></template>
  <template title="smilie_edit.css"><![CDATA[#SmileyEditorOutput
{
	height: 30px;
	max-width: 100px;
	overflow: hidden;
}
	
	#SmileyEditorOutput div
	{
		border: 1px solid {xen:property primaryLighterStill};
		border-radius: 2px;
		padding: 0;
	}
	
		#SmileyEditorOutput div img
		{
			margin: 1px;
			display: block;
		}
		
/* smilie import stuff */

.importSmilieCheck
{
	display: block;
	margin-top: 5px;
}

.importSmilieBlock
{
	position: relative;
}

.importSmiliePreview
{
	position: absolute;
	display: block;
	top: 25px;
	border: 1px solid {xen:property primaryLighterStill};
	border-radius: 5px;
	background-color: {xen:property primaryLightest};
	padding: 5px;
	font-size: 0;
}

	.importSmiliePreview img
	{
		max-width: 60px;
		max-height: 100px;
	}

.importSmilieAdvanced
{
	display: none;
}

.importSmilieMoreOptions
{
	font-size: 11px;
}]]></template>
  <template title="smilie_import"><![CDATA[<xen:title>{xen:phrase import_smilies}</xen:title>

<xen:form action="{xen:adminlink smilies/import-form}" upload="true">

	<xen:radiounit label="" name="mode" value="upload">
		<xen:option label="{xen:phrase import_from_uploaded_xml_file}" value="upload">
			<xen:upload name="upload" />
				<xen:hint>{xen:phrase smilie_pre_import_explain}</xen:hint>
		</xen:option>
		<xen:option label="{xen:phrase import_from_directory_on_server}" value="directory">
			<xen:textbox name="directory" placeholder="styles/default/xenforo/smilies..." />
			<xen:hint>{xen:phrase smilie_pre_import_directory_explain}</xen:hint>
		</xen:option>
	</xen:radiounit>
	
	<xen:submitunit save="{xen:phrase import_smilies}" />

	<input type="hidden" name="_xfConfirm" value="1" />
	
</xen:form>]]></template>
  <template title="smilie_import_form"><![CDATA[<xen:title>{xen:phrase import_smilies}</xen:title>

<xen:require css="smilie_edit.css" />
<xen:require js="js/xenforo/smiley_editor.js" />

<xen:form class="AutoValidator"
	action="{xen:adminlink smilies/import}"
	data-fieldvalidatorurl="{xen:adminlink 'smilies/validate-import-field.json'}"
	data-redirect="on"
	id="SmilieImportForm">
		
	<xen:foreach loop="$smilies" key="$i" value="$smilie">
	
		<fieldset class="importSmilieBlock">
		
			<label class="importSmilieCheck"><input type="checkbox" class="Disabler notHider" id="smilie{$i}" name="import[]" value="{$i}" checked="checked" /> {xen:phrase import_this_smilie}</label>
			
			<div class="importSmiliePreview">
				<xen:if is="{$smilie.sprite_mode}">
					<img src="styles/default/xenforo/clear.png" alt="" style="
						width: {$smilie.sprite_params.w}px;
						height: {$smilie.sprite_params.h}px;
						background: url('{$smilie.image_url}') no-repeat {$smilie.sprite_params.x}px {$smilie.sprite_params.y}px" />
				<xen:else />
					<img src="{$smilie.image_url}" alt="" />
				</xen:if>
			</div>
		
			<div id="smilie{$i}_Disabler">
				<xen:textboxunit name="smilies[{$i}][title]" value="{$smilie.title}"
					label="{xen:phrase title}"
					data-validatorname="title__{$i}" />
					
				<xen:textboxunit name="smilies[{$i}][smilie_text]" value="{$smilie.smilie_text}"
					label="{xen:phrase text_to_replace}:"
					rows="2" inputclass="Elastic"
					data-validatorname="smilie_text__{$i}" />
				
				<xen:if is="{$uploadMode}">
					<xen:controlunit label="">
						<xen:html><label class="importSmilieMoreOptions"><input type="checkbox" class="Hider" data-target="#smilie{$i}advanced" /> {xen:phrase more_options}...</label></xen:html>
					</xen:controlunit>
				</xen:if>
				
				<div class="{xen:if {$uploadMode}, importSmilieAdvanced}" id="smilie{$i}advanced">
					
					<xen:textboxunit name="smilies[{$i}][image_url]" value="{$smilie.image_url}"
						label="{xen:phrase image_replacement_url}:"
						data-validatorname="image_url__{$i}" />
			
					<xen:selectunit name="smilies[{$i}][smilie_category_id]" value="{$smilie.smilie_category_id}"
						label="{xen:phrase smilie_category}:"
						data-validatorname="smilie_category_id__{$i}">
						<xen:option value="0" label="({xen:phrase none})" />
						<xen:optgroup label="{xen:phrase new}">
							<xen:options source="$newSmilieCategoryOptions" />
						</xen:optgroup>
						<xen:optgroup label="{xen:phrase existing}">
							<xen:options source="$smilieCategoryOptions" />
						</xen:optgroup>
					</xen:selectunit>
					
					<xen:spinboxunit name="smilies[{$i}][display_order]" value="{$smilie.display_order}:"
						label="{xen:phrase display_order}"
						min="0" step="10"
						data-validatorname="display_order__{$i}" />
						
					<xen:checkboxunit label="">
						<xen:option name="smilies[{$i}][display_in_editor]" selected="{$smilie.display_in_editor}"
							label="{xen:phrase show_this_smilie_in_the_text_editor}" />
					</xen:checkboxunit>
					
					<xen:if is="{$uploadMode}">
						<xen:checkboxunit label="{xen:phrase sprite_mode}:">
							<xen:option name="smilies[{$i}][sprite_mode]" selected="{$smilie.sprite_mode}"
								 label="{xen:phrase enable_sprite_mode_with_following_parameters}" />
						</xen:checkboxunit>
						
						<xen:controlunit label="{xen:phrase sprite_dimensions}:">
							<xen:spinbox name="smilies[{$i}][sprite_params][w]" value="{$smilie.sprite_params.w}" min="1" title="{xen:phrase width}" inputclass="Tooltip OptOut" />
							<xen:spinbox name="smilies[{$i}][sprite_params][h]" value="{$smilie.sprite_params.h}" min="1" title="{xen:phrase height}" inputclass="Tooltip OptOut" />
							px
						</xen:controlunit>
						
						<xen:controlunit label="{xen:phrase sprite_position}:">
							<xen:spinbox name="smilies[{$i}][sprite_params][x]" value="{$smilie.sprite_params.x}" title="{xen:phrase background_position_x}" inputclass="Tooltip OptOut" />
							<xen:spinbox name="smilies[{$i}][sprite_params][y]" value="{$smilie.sprite_params.y}" title="{xen:phrase background_position_y}" inputclass="Tooltip OptOut" />
							px
						</xen:controlunit>
					</xen:if>
				
				</div>
			</div>
		
		</fieldset>
	
	</xen:foreach>

	<xen:if is="{$newSmilieCategories}">
		<xen:foreach loop="$newSmilieCategories" key="$smilieCategoryId" value="$smilieCategory">
			<input type="hidden" name="smilieCategories[{$smilieCategoryId}][title]" value="{$smilieCategory.title}" />
			<input type="hidden" name="smilieCategories[{$smilieCategoryId}][display_order]" value="{$smilieCategory.display_order}" />
		</xen:foreach>
	</xen:if>
	
	<xen:submitunit save="{xen:phrase import_smilies}" />

	<input type="hidden" name="_xfConfirm" value="1" />
	
</xen:form>]]></template>
  <template title="smilie_list"><![CDATA[<xen:title>{xen:phrase smilies}</xen:title>

<xen:topctrl>
	<a href="{xen:adminlink smilies/add}" class="button">+ {xen:phrase add_new_smilie}</a>
	<a href="{xen:adminlink smilie-categories/add}" class="button">+ {xen:phrase create_new_smilie_category}</a>
	<a href="{xen:adminlink smilies/import}" class="button">{xen:phrase import_smilies}</a>
	<a href="javascript:" class="button JsOnly" id="ExportSmilies">{xen:phrase export_smilies}</a>
</xen:topctrl>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />
<xen:require js="js/sortable/jquery.sortable.min.js" />

<script type="text/javascript">
<!--
$(function()
{
	$('#ExportSmilies').click(function(e)
	{
		$('label.selectListItem, #ExportForm, #ExportHint').toggle();
		
		$('.listItem .toggler, .listItem .delete, .togglerAll').toggle();
		
		return false;
	});
	
	$('#ExportForm').submit(function(e)
	{
		var $exportForm = $('#ExportForm');
		
		$exportForm.find('input:hidden.temp').remove();
		
		$('#SmilieForm').find('.selectListItem > input:checkbox').each(function()
		{
			if (this.checked && this.name == 'smilieId[]')
			{
				$exportForm.append('<input type="hidden" class="temp" name="smilieId[]" value="' + this.value + '" />');
			}
		});
		
		return true;
	});
});
//-->
</script>

<style type="text/css">
<!--
.FilterList .selectListItem,
#ExportHint,
#ExportForm
{
	display: none;
}
-->
</style>

<xen:form action="{xen:adminlink smilies/toggle}" class="section AutoValidator" id="SmilieForm">

	<h2 class="subHeading">
		{xen:phrase smilies}
	</h2>
	
	<ul class="FilterList" data-sort-url="{xen:adminlink smilies/display-order}">
		<xen:if is="{$smilieCategories} && {$totalSmilies}">
			<xen:foreach loop="$smilieCategories" key="$smilieCategoryId" value="$smilieCategory">
				<li>
					<h3 class="textHeading" style="text-align: right" id="_c{$smilieCategoryId}">
						<span style="float: left">
							<xen:if is="{$smilieCategory.smilies}">
								<label class="selectListItem Tooltip" title="{xen:phrase toggle_smilies_in_this_category_for_export}"><input type="checkbox" class="CheckAll"
									data-target="#SmilieCat{$smilieCategoryId}"
									data-filter=".selectListItem input:checkbox" /></label>
							</xen:if>
						
							<xen:if is="{$smilieCategoryId}">
								<a href="{xen:adminlink smilie-categories/edit, $smilieCategory}" title="{xen:phrase edit_category}">{$smilieCategory.title}</a>
							<xen:else />
								{xen:phrase uncategorized_smilies}
							</xen:if>
						</span>
						<span style="font-weight: normal">
							<xen:if is="{$smilieCategoryId}">
								<a href="{xen:adminlink smilie-categories/edit, $smilieCategory}" title="{xen:phrase edit_category}">{xen:phrase edit}</a>
								|
								<a href="{xen:adminlink smilie-categories/delete, $smilieCategory}" title="{xen:phrase delete}" class="OverlayTrigger">{xen:phrase delete}</a>
								|
							</xen:if>
							<a href="{xen:adminlink smilies/add, '', 'smilie_category_id={$smilieCategoryId}'}">{xen:phrase add_new_smilie}</a>
							<xen:if is="{$smilieCategory.smilies}">
								<span class="togglerAll"><label class="toggler Tooltip"
									data-tipclass="flipped"
									data-offsetx="-2"
									data-offsety="-6"
									title="{xen:phrase toggle_visibility_of_all_smilies_in_category}"><input type="checkbox" class="CheckAll"
									data-target="#SmilieCat{$smilieCategoryId}"
									data-filter=".Toggler" /></label><span class="delete"></span></span>
							</xen:if>
						</span>
					</h3>
					<ol id="SmilieCat{$smilieCategoryId}" class="Sortable SmilieCategory"
						data-connect-with="ol.Sortable"
						data-parent-id="{$smilieCategoryId}">
						
						<xen:if is="{$smilieCategory.smilies}">
							<xen:foreach loop="$smilieCategory.smilies" key="$smilieId" value="$smilie">
								<xen:set var="$smilieTextHtml">
									<xen:foreach loop="$smilie.smilieTextArray" key="$_smilieText" value="$_null">
										<span class="smilieText">{$_smilieText}</span>
									</xen:foreach>
								</xen:set>
								<xen:set var="$smilieImage">
									<xen:if is="{$smilie.sprite_mode}">
										<img src="styles/default/xenforo/clear.png" alt="{$smilie.title}" style="
											width: {$smilie.sprite_params.w}px;
											height: {$smilie.sprite_params.h}px;
											background: url('{$smilie.image_url}') no-repeat {$smilie.sprite_params.x}px {$smilie.sprite_params.y}px;" />
									<xen:else />
										<img src="{$smilie.image_url}" alt="{$smilie.title}" />
									</xen:if>
								</xen:set>
								<xen:listitem
									id="{$smilie.smilie_id}"
									href="{xen:adminlink smilies/edit, $smilie}"
									delete="{xen:adminlink smilies/delete, $smilie}"
									toggle="{$smilie.display_in_editor}"
									toggletitle="{xen:phrase show_this_smilie_in_the_text_editor}"
									selectable="true"
									selectname="smilieId[]"
									selected="true"
									class="SmilieItem"
									data-item-id="{$smilie.smilie_id}">
									<xen:label>
										<span style="display: inline-block; min-width: 25px; margin-right: 5px">{xen:raw $smilieImage}</span
										><span style="display: inline-block; min-width: 200px; margin-right: 5px;">{$smilie.title}</span
										></xen:label>
									<xen:snippet>{xen:raw $smilieTextHtml}</xen:snippet>
								</xen:listitem>
							</xen:foreach>
						</xen:if>
						<li class="noResults Unsortable" style="{xen:if $smilieCategory.smilies, 'display: none'}"><div class="noResults"><i>{xen:phrase no_smilies_have_been_added_to_this_category_yet}</i></div></li>
					</ol>
			</xen:foreach>
		</xen:if>
	</ul>

	<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:number $totalSmilies}</span>', 'total={xen:number $totalSmilies}'}</p>
		
</xen:form>

<xen:form class="section" id="ExportForm" action="{xen:adminlink smilies/export}">
	<input type="submit" class="button" value="{xen:phrase export_selected_smilies}" />
</xen:form>]]></template>
  <template title="spam_cleaner_log_list"><![CDATA[<xen:title>{xen:phrase spam_cleaner_log}</xen:title>

<xen:if is="{$logs}">
	<table class="dataTable">
	<tr class="dataRow">
		<th>{xen:phrase user}</th>
		<th>{xen:phrase applied_by}</th>
		<th>{xen:phrase application_date}</th>
		<th>{xen:phrase restored}</th>
		<th>&nbsp;</th>
	</tr>
	<xen:foreach loop="$logs" value="$log">
		<tr class="dataRow">
			<td><a href="{xen:adminlink users/edit, $log}">{$log.username}</a></td>
			<td><a href="{xen:link members, {xen:array 'user_id={$log.applying_user_id}', 'username={$log.applying_username}'}}" class="username">{$log.applying_username}</a></td>
			<td><xen:datetime time="$log.application_date" /></td>
			<td><xen:if is="{$log.restored_date}"><xen:datetime time="$log.restored_date" /><xen:else />&nbsp;</xen:if></td>
			<td class="dataOptions"><a href="{xen:adminlink spam-cleaner/restore, $log}" class="secondaryContent OverlayTrigger">{xen:phrase restore}</a></td>
		</tr>
	</xen:foreach>
	<tr>
		<td colspan="5" class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count={xen:count $logs}', 'total={xen:count $logs}'}</td>
	</tr>
	</table>
	
	{xen:adminpagenav {$logsPerPage}, {$totalLogs}, {$page}, {$linkAction}}
<xen:else />
	{xen:phrase there_no_records_of_spam_cleaner_having_been_run}
</xen:if>]]></template>
  <template title="spam_cleaner_restore_confirm"><![CDATA[<xen:title>{xen:phrase confirm_restoration_of_suspected_spam_from_x, 'name={$log.username}'}</xen:title>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'spam-cleaner/restore', $log}" class="deleteConfirmForm formOverlay">

	<p>{xen:phrase please_confirm_restore_data_user_status_of_user}:</p>
	<strong>{$log.username}</strong>
	<p>{xen:phrase spam_cleaner_was_run_by_x, 'name={$log.applying_username}'}, <xen:datetime time="$log.application_date" />.</p>

	<xen:submitunit save="{xen:phrase restore_data_and_user_status}" />
	<input type="hidden" name="_xfConfirm" value="1" />
	
</xen:form>]]></template>
  <template title="splash.css"><![CDATA[.splash
{
	overflow: hidden; zoom: 1;
}

<xen:set var="$iconSidebarWidth" value="300px" />

	.splash .iconicContainer
	{
		float: left;
		width: 100%;
		margin-right: -{$iconSidebarWidth};
		width: 100%;
	}

	.splash .iconic
	{
		margin-right: {$iconSidebarWidth};
	}
	
	.iconic li
	{
		float: left;
		width: 140px;
		height: 162px; /* 120 + 2 + 28 + 10 + 2*/
		text-align: center;
	}
	
	.iconic a
	{
		display: block;
		padding-bottom: 10px;
	}
	
		.splash .iconic a:hover
		{
			text-decoration: none;
		}
	
	.iconic a .icon
	{
		display: block;
		width: 120px;
		height: 120px;
		border: 1px solid {xen:property primaryDarker};
		border-radius: 5px;
		
		background-color: {xen:property primaryDark};
		background-repeat: no-repeat;
		background-position: center center;
		
		margin: 0 9px 2px;
	}
	
		.splash .iconic a:hover .icon
		{
			background-color: {xen:property primaryLightish};
		}
	
	.iconic .linkText
	{
		display: block;
		height: 28px;
		font-size: 11px;
		font-weight: bold;
	}
	
	/*
	.iconic .list .icon { background-image: url('{xen:property imagePath}/xenforo/acp-icons/list.png'); }
	.iconic .search .icon { background-image: url('{xen:property imagePath}/xenforo/acp-icons/search.png'); }
	.iconic .add .icon { background-image: url('{xen:property imagePath}/xenforo/acp-icons/add.png'); }
	.iconic .moderated .icon { background-image: url('{xen:property imagePath}/xenforo/acp-icons/moderated.png'); }
	.iconic .permissions .icon { background-image: url('{xen:property imagePath}/xenforo/acp-icons/permissions.png'); }
	*/
	
.splash .sidebar
{
	float: right;
	width: {$iconSidebarWidth};
	box-sizing: border-box;
	border-left: 1px solid {xen:property primaryLighterStill};
	padding-left: 10px;
}

.splash .sidebar .textHeading
{
	font-size: 12pt;
	color: {xen:property primaryLight};
	padding: 0px;
	margin-bottom: 5px;
}
	
.splash .sidebar .section,
.splash .sidebar .sectionMain
{
	margin-top: 0px;
}

	.splash .sidebar input.quickSearchText
	{
		width: 175px;
	}
	
	.splash .sidebar input.quickSearchButton
	{
		width: 100px;
	}
	
	.splash .sidebar a.quickSearchAdvanced
	{
		margin-left: 5px;
		margin-top: 0px;
		display: block;
		font-size: 11px;
	}

.splash .sidebar .xenForm
{
	width: auto;
}

.splash .sidebar table
{
	width: 100%;
}

	.splash .sidebar table .primaryContent,
	.splash .sidebar table .secondaryContent,
	.splash .sidebar td a.primaryContent
	{
		padding: 5px 10px;
		font-size: 11px;
	}
	
		.splash .sidebar td
		{
			{xen:property primaryContent.border}
		}
	
		.splash .sidebar td a.primaryContent
		{
			display: block;
			border: none;
		}
		
		.splash .sidebar td a.primaryContent:hover
		{
			text-decoration: none;
			background-color: {xen:property secondaryLightest};
		}
	
	.splash .sidebar table .total
	{
		text-align: right;
	}
	
	.splash .sidebar table + .sectionFooter
	{
		text-align: right;
	}
	
	.splash .sidebar .noContentMessage
	{
		font-size: 11px;
		color: {xen:property mutedTextColor};
	}

.splash .sidebar .statsBlock a
{
	display: block;
	overflow: hidden; zoom: 1;
	padding: 4px 8px;
	margin: 0 -8px;
	font-size: 11px;
}

	.splash .sidebar .statsBlock a:hover
	{
		background-color: {xen:property primaryLighterStill};
		text-decoration: none;
		border-radius: 5px;
	}	
	

.splash .statsBlock a .label
{
	color: {xen:property mutedTextColor};
	float: left;
}

.splash .statsBlock a strong
{
	color: {xen:property contentText};
	float: right;
}


.splash .icon span
{
	display: block;
	width: 120px;
	height: 120px;
	background: transparent none no-repeat center center;
}

/* Setup */

.splash .options
	.icon span { background-image: url('{xen:property imagePath}/xenforo/acp-icons/options.png'); }
.splash .add_ons
	.icon span { background-image: url('{xen:property imagePath}/xenforo/acp-icons/add_ons.png'); }
.splash .smilies
	.icon span { background-image: url('{xen:property imagePath}/xenforo/acp-icons/smilies.png'); }

/* Applications */

.splash .nodes
	.icon span { background-image: url('{xen:property imagePath}/xenforo/acp-icons/nodes.png'); }
.splash .nodes_add
	.icon span { background-image: url('{xen:property imagePath}/xenforo/acp-icons/nodes_add.png'); }
.splash .node_permissions
	.icon span { background-image: url('{xen:property imagePath}/xenforo/acp-icons/node_permissions.png'); }

.splash .feeder
	.icon span { background-image: url('{xen:property imagePath}/xenforo/acp-icons/feeder.png'); }

.splash .spam_cleaner
	.icon span { background-image: url('{xen:property imagePath}/xenforo/acp-icons/spam_cleaner.png'); }

/* Users */

.splash .users_list
	.icon span { background-image: url('{xen:property imagePath}/xenforo/acp-icons/users_list.png'); }
.splash .users_moderated
	.icon span { background-image: url('{xen:property imagePath}/xenforo/acp-icons/users_moderated.png'); }
.splash .banning_users
	.icon span { background-image: url('{xen:property imagePath}/xenforo/acp-icons/banning_users.png'); }

.splash .user_groups
	.icon span { background-image: url('{xen:property imagePath}/xenforo/acp-icons/user_groups.png'); }
.splash .user_group_permissions
	.icon span { background-image: url('{xen:property imagePath}/xenforo/acp-icons/user_group_permissions.png'); }

.splash .trophies
	.icon span { background-image: url('{xen:property imagePath}/xenforo/acp-icons/trophies.png'); }
.splash .user_title_ladder
	.icon span { background-image: url('{xen:property imagePath}/xenforo/acp-icons/trophy_user_titles.png'); }
.splash .user_upgrades
	.icon span { background-image: url('{xen:property imagePath}/xenforo/acp-icons/user_upgrades.png'); }

/* Appearance */

.splash .styles
	.icon span { background-image: url('{xen:property imagePath}/xenforo/acp-icons/styles.png'); }
.splash .styles_templates
	.icon span { background-image: url('{xen:property imagePath}/xenforo/acp-icons/styles_templates.png'); }
.splash .style_properties
	.icon span { background-image: url('{xen:property imagePath}/xenforo/acp-icons/style_properties.png'); }
.splash .palette
	.icon span { background-image: url('{xen:property imagePath}/xenforo/acp-icons/palette.png'); }

.splash .languages
	.icon span { background-image: url('{xen:property imagePath}/xenforo/acp-icons/languages.png'); }
.splash .phrases
	.icon span { background-image: url('{xen:property imagePath}/xenforo/acp-icons/phrases.png'); }

/* Tools */

.splash .cron
	.icon span { background-image: url('{xen:property imagePath}/xenforo/acp-icons/cron.png'); }
.splash .tools_rebuild
	.icon span { background-image: url('{xen:property imagePath}/xenforo/acp-icons/tools_rebuild.png'); }
.splash .import
	.icon span { background-image: url('{xen:property imagePath}/xenforo/acp-icons/import.png'); }
.splash .qacaptcha
	.icon span { background-image: url('{xen:property imagePath}/xenforo/acp-icons/qacaptcha.png'); }
.splash .server_error_log
	.icon span { background-image: url('{xen:property imagePath}/xenforo/acp-icons/server_error_log.png'); }
.splash .facebook_test
	.icon span { background-image: url('{xen:property imagePath}/xenforo/acp-icons/facebook_test.png'); }

/* Development */

.splash .add_ons_add
	.icon span { background-image: url('{xen:property imagePath}/xenforo/acp-icons/add_ons_add.png'); }
.splash .code_events
	.icon span { background-image: url('{xen:property imagePath}/xenforo/acp-icons/code_events.png'); }
.splash .code_event_listeners
	.icon span { background-image: url('{xen:property imagePath}/xenforo/acp-icons/code_event_listeners.png'); }

.splash .admin_templates
	.icon span { background-image: url('{xen:property imagePath}/xenforo/acp-icons/admin_templates.png'); }
.splash .admin_style_properties
	.icon span { background-image: url('{xen:property imagePath}/xenforo/acp-icons/admin_style_properties.png'); }
.splash .admin_navigation
	.icon span { background-image: url('{xen:property imagePath}/xenforo/acp-icons/admin_navigation.png'); }

.splash .route_prefixes
	.icon span { background-image: url('{xen:property imagePath}/xenforo/acp-icons/route_prefixes.png'); }
.splash .email_templates
	.icon span { background-image: url('{xen:property imagePath}/xenforo/acp-icons/email_templates.png'); }]]></template>
  <template title="stats_base"><![CDATA[<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink stats}">{xen:phrase statistics}</xen:breadcrumb>
</xen:navigation>

<style>.legend:hover > table, .legend:hover > div { opacity: 0 !important }</style>

<div id="Placeholder" style="width: 720px; height: 350px"></div>
<div id="StatsTooltip" class="xenTooltip flipped">
	<span class="text"></span>
	<span class="arrow"><span></span></span>
</div>

<xen:form action="{$statsUrl}">

	<script>
	$(function()
	{
		$('#DatePresets').change(function(e)
		{
			var $ctrl = $(this),
				value = $ctrl.val(),
				$form = $ctrl.closest('form');
				
			if (value == -1)
			{
				return;
			}
			
			$form.find($ctrl.data('start') || 'input[name=start]').val(value);
			$form.find($ctrl.data('end') || 'input[name=end]').val('');
			$form.submit();
		});
	});
	</script>

	<xen:controlunit label="{xen:phrase show_daily_statistics_from}:">
		<xen:html>
			<xen:textbox name="start" value="{xen:date $start, 'Y-m-d'}" type="date" size="10" placeholder="{xen:phrase start_date}" />
			-
			<xen:textbox name="end" value="{xen:if $endDisplay, {xen:date $endDisplay, 'Y-m-d'}}" type="date" size="10" placeholder="{xen:phrase end_date}" />
			
			<xen:select name="date_preset" value="-1" id="DatePresets" title="{xen:phrase show_statistics_from}" inputclass="autoSize Tooltip">
				<xen:option value="-1">{xen:phrase date_presets}:</xen:option>
				<xen:optgroup label="">
					<xen:foreach loop="{$datePresets}" key="$offset" value="$phrase">
						<xen:option value="{$offset}">{$phrase}</xen:option>
					</xen:foreach>
					<xen:option value="1995-01-01">{xen:phrase all_time}</xen:option>
				</xen:optgroup>
			</xen:select>
		</xen:html>
	</xen:controlunit>

	<xen:controlunit label="{xen:phrase display_statistics_for}:" class="multiple checkboxColumns">
		<xen:foreach loop="{$statsTypeOptions}" key="$contentType" value="$contentTypeOptions">
			<xen:checkbox><xen:options source="{$contentTypeOptions}" /></xen:checkbox>
		</xen:foreach>
	</xen:controlunit>
	
	<xen:submitunit save="{xen:phrase show}" />

</xen:form>

<xen:require js="js/flot/jquery.flot.min.js" />
<!--[if lte IE 8]><script src="js/flot/excanvas.min.js"></script><![endif]-->
<script>

jQuery(function()
{
	var data =
	[
	<xen:foreach loop="$plots" key="$contentType" value="$plot" i="$i">
		{
			label: "{xen:jsescape {$statsTypePhrases.{$contentType}}}",
			contentType: "{xen:jsescape $contentType}",
			data: {xen:helper json, $plot}
		},
	</xen:foreach>
		{}
	],
	options =
	{
		series:
		{
			points: { show: true },
			lines: { show: true }
		},
		grid:
		{
			show: true,
			hoverable: true,
			borderWidth: 1,
			color: '{xen:property primaryMedium}',
			backgroundColor: '{xen:property primaryLightest}'
		},
		colors: [ '{xen:property primaryMedium}', '{xen:property secondaryMedium}', '{xen:property primaryLight}', '{xen:property secondaryLight}' ],
		xaxis: {
		<xen:if is="{$groupingConfig.xAxisTime}">
			mode: 'time'
		<xen:else />
			tickFormatter: function(n)
			{
	 			for (var t in dateMap)
	 			{
	 				if (dateMap[t][n])
	 				{
	 					return dateMap[t][n];
	 				}
	 				else if (dateMap[t][n / 1000])
	 				{
	 					return dateMap[t][n / 1000];
	 				}
	 			}
					
				return '';
			}
		</xen:if>
		}
	},
	$placeholder = $('#Placeholder'),
	$tooltip = $('#StatsTooltip').appendTo('body').css('position', 'absolute'),
	prevDataIndex = null,
	dateMap = {xen:helper json, $dateMap};
	
	$.plot($placeholder, data, options);
	
	$placeholder.bind('plothover', function(e, pos, item)
	{
		if (item !== null)
		{
			if (item.dataIndex != prevDataIndex)
			{
				var browserWidth = $('html').width(),
					dateString = dateMap[item.series.contentType][item.datapoint[0]]
						|| dateMap[item.series.contentType][item.datapoint[0] / 1000]  
						|| new Date(item.datapoint[0]).toDateString();
									
				prevDataIndex = item.dataIndex;
				
				$tooltip.hide().find('span.text').html(dateString + ', ' + item.series.label + ': ' + new String(item.datapoint[1]).bold());
								
				$tooltip.css(
				{
					<xen:if is="{$pageIsRtl}">
					left: item.pageX - 14,
					<xen:else />
					right: browserWidth - item.pageX - 14,
					</xen:if>
					top: item.pageY - 38
				})
				.fadeIn(XenForo.speed.fast);
			}
		}
		else
		{
			$('#StatsTooltip').hide();
			prevDataIndex = null;
		}
	});
});

</script>]]></template>
  <template title="stats_daily"><![CDATA[<xen:title>{xen:phrase daily_statistics}: {xen:date $start, absolute} - {xen:date $end, absolute}</xen:title>

<xen:include template="stats_base">
	<xen:set var="$statsFormUrl" value="{xen:adminlink stats/daily}" />
</xen:include>]]></template>
  <template title="stats_daily_form"><![CDATA[<xen:form action="{xen:adminlink stats/daily}">

	<script>
	$(function()
	{
		$('#DatePresets').change(function(e)
		{
			var $ctrl = $(this),
				value = $ctrl.val(),
				$form = $ctrl.closest('form');
				
			if (value == -1)
			{
				return;
			}
			
			$form.find($ctrl.data('start') || 'input[name=start]').val(value);
			$form.find($ctrl.data('end') || 'input[name=end]').val('');
			$form.submit();
		});
	});
	</script>

	<xen:controlunit label="{xen:phrase show_daily_statistics_from}:">
		<xen:html>
			<xen:textbox name="start" value="{xen:date $start, 'Y-m-d'}" type="date" size="10" placeholder="{xen:phrase start_date}" />
			-
			<xen:textbox name="end" value="{xen:if $endDisplay, {xen:date $endDisplay, 'Y-m-d'}}" type="date" size="10" placeholder="{xen:phrase end_date}" />
			
			<xen:select name="date_preset" value="-1" id="DatePresets" title="{xen:phrase show_statistics_from}" inputclass="autoSize Tooltip">
				<xen:option value="-1">{xen:phrase date_presets}:</xen:option>
				<xen:optgroup label="">
					<xen:foreach loop="{$datePresets}" key="$offset" value="$phrase">
						<xen:option value="{$offset}">{$phrase}</xen:option>
					</xen:foreach>
					<xen:option value="1995-01-01">{xen:phrase all_time}</xen:option>
				</xen:optgroup>
			</xen:select>
		</xen:html>
	</xen:controlunit>

	<xen:controlunit label="{xen:phrase display_statistics_for}:" class="multiple checkboxColumns">
		<xen:foreach loop="{$statsTypeOptions}" key="$contentType" value="$contentTypeOptions">
			<xen:checkbox><xen:options source="{$contentTypeOptions}" /></xen:checkbox>
		</xen:foreach>
	</xen:controlunit>
	
	<xen:submitunit save="{xen:phrase show}" />

</xen:form>]]></template>
  <template title="stats_index"><![CDATA[<xen:title>{xen:phrase statistics}</xen:title>

<xen:include template="stats_daily_form" />]]></template>
  <template title="stats_monthly"><![CDATA[<xen:title>{xen:phrase monthly_statistics}: {xen:date $start, absolute} - {xen:date $end, absolute}</xen:title>

<xen:include template="stats_base">
	<xen:set var="$statsFormUrl" value="{xen:adminlink stats/monthly}" />
</xen:include>]]></template>
  <template title="stats_weekly"><![CDATA[<xen:title>{xen:phrase weekly_statistics}: {xen:date $start, absolute} - {xen:date $end, absolute}</xen:title>

<xen:include template="stats_base">
	<xen:set var="$statsFormUrl" value="{xen:adminlink stats/weekly}" />
</xen:include>]]></template>
  <template title="style_customized_components"><![CDATA[<xen:title>{xen:phrase customized_style_components}</xen:title>
<xen:h1>{xen:phrase customized_style_components}: <em>{$style.title}</em></xen:h1>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink styles, $style}#_{$style.style_id}">{$style.title}</xen:breadcrumb>
</xen:navigation>

<div class="topChoosers">
	<div class="Popup">
		<span class="muted">{xen:phrase style}:</span> <a rel="Menu">{$style.title}</a>
		<div class="Menu">
			<div class="primaryContent menuHeader"><h3>{xen:phrase styles}</h3></div>
			<ul class="secondaryContent blockLinksList">
				<xen:foreach loop="$styles" value="$styleOption">
					<li><a href="{xen:adminlink 'styles/customized-components', $styleOption}"><span class="_depth{$styleOption.depth}">{$styleOption.title}</span></a></li>
				</xen:foreach>
			</ul>
		</div>
	</div>
</div>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<xen:form action="{xen:adminlink styles/mass-revert, $style}">

	<h2 class="subHeading">
		<xen:include template="filter_list_controls" />
		{xen:phrase customized_style_components}
	</h2>
	
	<div class="section">
	
		<ol class="FilterList Scrollable" id="CustomItems">
			<xen:if is="{$templates}">
				<li>
					<h3 class="textHeading"><a href="{xen:adminlink styles/templates, $style}" class="concealed">{xen:phrase templates}</a>
						<label class="Tooltip checkAllColumn" title="{xen:phrase select_all_items_in_this_group}"><input type="checkbox" class="CheckAll" data-target="#CustomTemplates" /></label></h3>
					<ol id="CustomTemplates">
						<xen:foreach loop="$templates" value="$template">
							<xen:listitem
								id="template{$template.template_id}"
								label="{$template.title}"
								snippet="{xen:if $template.version_string, {xen:phrase customized_in_version, 'version={$template.version_string}'}}"
								href="{xen:adminlink templates/edit, $template}"
								delete="{xen:adminlink templates/delete, $template}"
								deletehint="{xen:phrase revert_customizations_to_this_template}...">
								<xen:html><label class="secondaryContent"><input type="checkbox" name="templates[]" value="{$template.template_id}" /></label></xen:html>
							</xen:listitem>
						</xen:foreach>
					</ol>
				</li>
			</xen:if>
			<xen:if is="{$properties}">
				<li>
					<h3 class="textHeading"><a href="{xen:adminlink styles/style-properties, $style}" class="concealed">{xen:phrase style_properties}</a>
						<label class="Tooltip checkAllColumn" title="{xen:phrase select_all_items_in_this_group}"><input type="checkbox" class="CheckAll" data-target="#CustomProperties" /></label></h3>
					<ol id="CustomProperties">
						<xen:foreach loop="$properties" value="$property">
							<xen:listitem
								id="property{$property.property_id}"
								label="{$property.title}"
								snippet="{$property.description}"
								href="{xen:adminlink styles/style-properties, $style, 'group={$property.group_name}'}#_{$property.property_name}"
								delete="{xen:adminlink style-properties/delete, $property}"
								deletehint="{xen:phrase revert_this_property_to_its_default_value}...">
								<xen:html><label class="secondaryContent"><input type="checkbox" name="properties[]" value="{$property.property_id}" /></label></xen:html>
							</xen:listitem>
						</xen:foreach>
					</ol>
				</li>
			</xen:if>
		</ol>

		<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:number $itemCount}</span>', 'total={xen:number $itemCount}'}</p>
	
	</div>
	
	<div class="footerControls">
		<div class="scrollSide">
			<label class="footerControl"><input type="checkbox" class="CheckAll" data-target="#CustomItems" /> {xen:phrase select_all}</label>
			<input type="submit" value="{xen:phrase revert_selected_items}" class="button OverlayTrigger footerControl" />
		</div>
	</div>

</xen:form>]]></template>
  <template title="style_delete"><![CDATA[<xen:title>{xen:phrase confirm_deletion_of_style}: {$style.title}</xen:title>
<xen:h1>{xen:phrase confirm_deletion_of_style}</xen:h1>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'styles/edit', $style}">{$style.title}</xen:breadcrumb>
</xen:navigation>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'styles/delete'}" class="deleteConfirmForm formOverlay">

	<p>{xen:phrase please_confirm_that_you_want_to_delete_following_style}:</p>
	<strong><a href="{xen:adminlink 'styles/edit', $style}">{$style.title}</a></strong>

	<input type="hidden" name="style_id" value="{$style.style_id}" />

	<xen:submitunit save="{xen:phrase delete_style}" />
	<input type="hidden" name="_xfConfirm" value="1" />
	
</xen:form>]]></template>
  <template title="style_edit"><![CDATA[<xen:title>{xen:if {$style.style_id}, '{xen:phrase edit_style}: {$style.title}', '{xen:phrase create_new_style}'}</xen:title>

<xen:if is="{$style.style_id}">
	<xen:navigation>
		<xen:breadcrumb href="{xen:adminlink styles}#{xen:helper listitemid, $style.style_id}">{$style.title}</xen:breadcrumb>
	</xen:navigation>
	
	<xen:topctrl>
		<a href="{xen:adminlink styles/templates, $style}" class="button">{xen:phrase templates}</a>
		<a href="{xen:adminlink styles/style-properties, $style}" class="button">{xen:phrase style_properties}</a>
		<a href="{xen:adminlink styles/customized-components, $style}" class="button">{xen:phrase customized_style_components}</a>
	</xen:topctrl>
</xen:if>

<xen:form action="{xen:adminlink 'styles/save'}" class="AutoValidator" data-redirect="yes">
	<xen:selectunit name="parent_id" value="{$style.parent_id}" label="{xen:phrase parent_style}:">
		<xen:option value="0">({xen:phrase no_parent})</xen:option>
		<xen:options source="$styleParents" />
	</xen:selectunit>
	
	<xen:textboxunit name="title" value="{$style.title}" label="{xen:phrase title}:" data-livetitletemplate="{xen:if {$style.style_id},
		'{xen:phrase edit_style}: <em>%s</em>',
		'{xen:phrase create_new_style}: <em>%s</em>'}" />
		
	<xen:textboxunit name="description" value="{$style.description}" label="{xen:phrase description}:" maxlength="100" />
	
	<xen:checkboxunit label="{xen:phrase options}:">
		<xen:option name="user_selectable" selected="{$style.user_selectable}" label="{xen:phrase allow_user_selection}" />
	</xen:checkboxunit>

	<input type="hidden" name="style_id" value="{$style.style_id}" />

	<xen:submitunit save="{xen:phrase save_style}">
		<xen:if is="{$style.style_id}">
			<input type="button" value="{xen:phrase delete_style}..." accesskey="d" class="button OverlayTrigger" data-href="{xen:adminlink styles/delete, $style}" />
		</xen:if>
	</xen:submitunit>
</xen:form>]]></template>
  <template title="style_export"><![CDATA[<xen:title>{xen:phrase export_style}: {$style.title}</xen:title>

<xen:form action="{xen:adminlink styles/export, $style}">
	<xen:controlunit label="{xen:phrase style}:">{$style.title}</xen:controlunit>
	<xen:selectunit name="addon_id" label="{xen:phrase export_from_add_on}:">
		<xen:option value="">({xen:phrase all})</xen:option>
		<xen:options source="$addOnOptions" />
	</xen:selectunit>
	<xen:checkboxunit label="">
		<xen:option name="independent" label="{xen:phrase export_as_independent_style}">
			<xen:hint>{xen:phrase if_selected_customizations_in_parent_styles_will_be_included}</xen:hint>
		</xen:option>
	</xen:checkboxunit>
	<xen:submitunit save="{xen:phrase export_style}" saveclass="OverlayCloser" resetclass="OverlayCloser" />

	<input type="hidden" name="_xfConfirm" value="1" />
</xen:form>]]></template>
  <template title="style_import"><![CDATA[<xen:title>{xen:phrase import_style}</xen:title>

<xen:form action="{xen:adminlink styles/import}" upload="true">

	<xen:uploadunit label="{xen:phrase import_from_uploaded_xml_file}:" name="upload" />
	
	<xen:radiounit label="{xen:phrase import_as}:" name="target">

		<xen:option label="{xen:phrase child_of_style}:" value="new" selected="true">
			<xen:select name="parent_style_id" value="0">
				<xen:option value="0">({xen:phrase no_parent_style})</xen:option>
				<xen:foreach loop="$styles" value="$style">
					<xen:option value="{$style.style_id}" depth="{$style.depth}">{$style.title}</xen:option>
				</xen:foreach>
			</xen:select>
		</xen:option>
		
		<xen:option label="{xen:phrase overwrite_style}:" value="overwrite">
			<xen:select name="overwrite_style_id">
				<xen:foreach loop="$styles" value="$style">
					<xen:option value="{$style.style_id}" depth="{$style.depth}">{$style.title}</xen:option>
				</xen:foreach>
			</xen:select>
		</xen:option>

	</xen:radiounit>
	
	<xen:submitunit save="{xen:phrase import}" />

	<input type="hidden" name="_xfConfirm" value="1" />
</xen:form>]]></template>
  <template title="style_list"><![CDATA[<xen:title>{xen:phrase styles}</xen:title>

<xen:topctrl>
	<a href="{xen:adminlink styles/add}" class="button">+ {xen:phrase create_new_style}</a>
	<a href="{xen:adminlink styles/import}" class="button">{xen:phrase import_style}</a>
</xen:topctrl>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<xen:form action="{xen:adminlink styles/toggle}" class="section AutoValidator">

	<h2 class="subHeading">
		<xen:include template="filter_list_controls" />
		{xen:phrase styles}
	</h2>

	<ol class="FilterList Scrollable">
		<xen:if is="{$masterStyle}">
			<xen:listitem
				id="0"
				label="{$masterStyle.title}"
				delete="#">
				<xen:html>
					<span class="secondaryContent"><span style="visibility: hidden">{xen:phrase export}</span></span>
					<a href="{xen:adminlink 'styles/style-properties', $masterStyle}" class="secondaryContent">{xen:phrase style_properties}</a>
					<a href="{xen:adminlink 'styles/templates', $masterStyle}" class="secondaryContent">{xen:phrase templates}</a>
				</xen:html>
			</xen:listitem>
		</xen:if>

		<xen:foreach loop="$styles" value="$style">
			<xen:listitem
				id="{$style.style_id}"
				label="{$style.title}"
				href="{xen:adminlink 'styles/edit', $style}"
				delete="{xen:adminlink 'styles/delete', $style}"
				class="_depth{$style.depth}"
				toggle="{$style.user_selectable}"
				toggletitle="{xen:phrase allow_user_selection}">
				<xen:html>
					<a href="{xen:adminlink 'styles/export', $style}" class="secondaryContent OverlayTrigger">{xen:phrase export}</a>
					<a href="{xen:adminlink 'styles/style-properties', $style}" class="secondaryContent">{xen:phrase style_properties}</a>
					<a href="{xen:adminlink 'styles/templates', $style}" class="secondaryContent">{xen:phrase templates}</a>
					<label class="secondaryContent Tooltip" data-offsetx="3" title="{xen:phrase set_x_as_default_style, 'title={$style.title}'}">
						<input type="radio" name="defaultStyleId" class="SubmitOnChange"
							value="{$style.style_id}" {xen:checked '{$xenOptions.defaultStyleId} == {$style.style_id}'} /></label>
				</xen:html>
			</xen:listitem>
		</xen:foreach>
	</ol>

	<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:number $totalStyles}</span>', 'total={xen:number $totalStyles}'}</p>

</xen:form>]]></template>
  <template title="style_mass_revert"><![CDATA[<xen:title>{xen:phrase revert_customized_style_components}</xen:title>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink styles/customized-components, $style}">{xen:phrase customized_style_components}</xen:breadcrumb>
</xen:navigation>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink styles/mass-revert, $style}" class="deleteConfirmForm formOverlay">

	<p>{xen:phrase please_confirm_reversion_of_customized_components_from_style,
		'numTemplates={xen:count $templates}',
		'numProperties={xen:count $properties}',
		'style={$style.title}'}</p>		
		
	<strong><a href="{xen:adminlink styles/style-properties, $style, 'group={$property.group_name}'}#_{$property.property_name}">{$property.title}</a></strong>

	<xen:submitunit save="{xen:phrase revert_customized_style_components}" />
	
	<xen:foreach loop="$templates" value="$templateId"><input type="hidden" name="templates[]" value="{$templateId}" /></xen:foreach>
	<xen:foreach loop="$properties" value="$propertyId"><input type="hidden" name="properties[]" value="{$propertyId}" /></xen:foreach>
	
	<input type="hidden" name="_xfConfirm" value="1" />
</xen:form>]]></template>
  <template title="style_property.css"><![CDATA[#propertiesContainer
{
	position: relative;
}

#propertyTabs
{
	width: 175px;
	position: absolute;
	left: 0;
	top: 24px;
	
	border: 1px solid {xen:property primaryLighter};
	border-right: none;
	border-top-left-radius: 5px;
	border-bottom-left-radius: 5px;
}

#propertyTabs .DescriptionTip
{
	display: none;
}

.DescriptionTip
{
	max-width: 165px;
	_width: 165px;
	
	background: {xen:property tooltip.background-color};
}

	.DescriptionTip .arrow
	{
		top: 6px;
		bottom: auto;
		right: -6px;
		left: auto;
		
		border: 6px solid transparent;
		border-left-color: {xen:property tooltip.background-color};
		border-right: none;
		
		_display: none;
	}
	
	.DescriptionTip .name
	{
		font-weight: bold;
		font-size: 12px;
		word-wrap: break-word;
		display: block;
		margin-bottom: 10px;
	}

#propertyTabs a
{
	display: block;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	word-wrap: normal;
	font-size: 11px;
	padding: 5px;
	width: 165px;
	border-bottom: 1px solid {xen:property primaryLighterStill};
	background: {xen:property primaryLightest} url("{xen:property imagePath}/xenforo/gradients/category-23px-light.png") repeat-x top;
	cursor: pointer;
}

#propertyTabs li:first-child a
{
	border-top-left-radius: 4px;
}

#propertyTabs li:last-child a
{
	border-bottom: none;
	border-bottom-left-radius: 4px;
}

#propertyTabs a.active
{
	background: {xen:property contentBackground};
	font-weight: bold;
}

#propertyTabs a:hover,
#propertyTabs a:active
{
	background-color: {xen:property primaryLighterStill};
	text-decoration: none;
}

#propertyTabs a.active
{
	padding-right: 6px;
}

#propertyPanes
{
	margin-left: 176px;
}

#scalars
{
}

#scalars fieldset
{
	margin: 0 5px;
	border-bottom: 1px solid {xen:property primaryLighterStill};
}

#scalars fieldset:last-child
{
	border-bottom: none;
}

#scalars fieldset legend
{
	/*width: 210px;
	text-align: right;*/
	font-size: 10px;
	color: {xen:property mutedTextColor};
	padding-top: 2px;
}

.styleProperty
{
	border: 1px solid {xen:property primaryLighter};
	border-radius: 5px;
	min-height: 465px;
}

.styleProperty .propertyHeader
{
	overflow: hidden; zoom: 1;
	margin-top: 0;
	border-top-left-radius: 4px;
	border-top-right-radius: 4px;
	border-top: none;
}

.styleProperty h3
{
	font-weight: bold;
}

.styleProperty h3 .propertyName
{
	color: {xen:property dimmedTextColor};
	font-weight: normal;
}

.styleProperty .propertyHeaderExtra
{
	float: right;
}

.styleProperty .propertyEditorFields
{
	padding: 0 10px;
}

.styleProperty td,
.styleProperty th
{
	padding: 0px 2px;
	font-size: 11px;
}

.styleProperty th
{
	text-align: left;
	padding-left: 5px;
	font-size: 10px;
}

.styleProperty th.primaryLabel
{
	font-size: 13px;
	font-weight: bold;
	text-align: left;
}

.styleProperty td.rowLabel
{
	text-align: right;
	min-width: 40px;
}

#propertyScalars .ctrlUnit
{
	overflow: hidden; zoom: 1;
	margin: 10px auto;
	position: relative;
}

#propertyScalars .ctrlUnit dt
{
	{xen:property ctrlUnitLabel}
	width: 210px;
	float: left;
}

#propertyScalars .ctrlUnit dt dfn
{
	{xen:property ctrlUnitLabelHint}
	font-weight: normal;
}

#propertyScalars .ctrlUnit dd
{
	margin-left: {xen:calc '210 + {xen:property ctrlUnitLabel.padding-right}'}px;
	margin-right: {xen:property ctrlUnitEdgeSpacer};
}

#propertyScalars .ctrlUnit dd .textCtrl
{
	width: 200px;
}

#propertyScalars .ctrlUnit dd .colorPickerPlaceholder
{
	width: {xen:calc '200 - 17'}px;
}

#propertyScalars .ctrlUnit dd .explain,
#propertyScalars .ctrlUnit dd li .hint
{
	{xen:property ctrlUnitCtrlExplain}
	margin-right: 0;
}

/** DISABLERS **/

#propertyScalars .ctrlUnit dd li > ul
{
	margin-left: {xen:property formCtrlIndent};
}

	#propertyScalars .ctrlUnit dd li > ul .textCtrl
	{
		width: 150px;
	}

#propertyScalars .ctrlUnit dd li .hint
{
	margin-left: {xen:property formCtrlIndent};
}

.textCtrl.fontFamily
{
	width: 250px;
	direction: ltr;
}

.textCtrl.backgroundImage
{
	width: 180px;
	direction: ltr;
}

.textCtrl.backgroundPosition
{
	width: 80px;
	direction: ltr;
}

.layoutPropertyTable
{
	float: left;
	margin-left: 20px;
}

.layoutPropertyTable:first-child
{
	margin-left: 0;
}

.layoutPropertyTable td
{
	height: 29px;
}

.propertyEditorFields .textHeading,
.propertyEditorFields .textHeading th
{
	margin-bottom: 5px;
	margin-top: 0;
	font-size: 11px;
	padding-bottom: 2px;
}

.propertyEditorFields .textHeading.minorHeading
{
	font-size: 10px;
	font-weight: normal;
	vertical-align: bottom;
}

.propertyEditorFields thead + tbody tr:first-child td
{
	padding-top: 5px;
}

.propertyComponentGroup
{
	overflow: hidden; zoom: 1;
	margin-top: 10px;
}

.propertyDimensions
{
	width: 125px;
	float: left;
}

.propertyDimensions dl
{
	overflow: hidden; zoom: 1;
}

.propertyDimensions dt
{
	width: 60px;
	padding-top: 3px;
	float: left;
}

.propertyExtra
{
	float: left;
}

.propertyExtra .textCtrl
{
	width: 375px;
}

.propertyExtra .explain
{
	color: {xen:property mutedTextColor};
	font-size: 10px;
}

.unitInput
{
	width: 40px;
	text-align: right;
	direction: ltr;
}

.propertySubmit
{
	margin-top: 10px;
	text-align: right;
}

.toggleButtonList li
{
	display: inline;
}

.toggleButtonSplitter
{
	text-indent: -9999em;
	width: 0;
	margin: 0 3px;
	border-left: 1px solid {xen:property primaryLighter};
	display: inline-block;
	zoom: 1;
}

.ToggleButton { font-family: Georgia, "Times New Roman", Times, serif; }

.toggleButtonList .bold { font-weight: bold; }
.toggleButtonList .italic { font-style: italic; }
.toggleButtonList .small-caps { font-variant: small-caps; }
/*.toggleButtonList .underline { text-decoration: underline; }
.toggleButtonList .overline { text-decoration: overline; }
.toggleButtonList .line-through { text-decoration: line-through; }
.toggleButtonList .none { color: {xen:property mutedTextColor}; font-size: 10px; font-family: {xen:property body.font-family}; }*/

.TextDecoration
{
	font-size: 11px;
	overflow: hidden; zoom: 1;
	margin-top: 2px;
	margin-left: 5px;
}

	.TextDecoration dt,
	.TextDecoration dd
	{
		float: left;
	}
	
	.TextDecoration .rowLabel
	{
		display: none;
		padding: 3px 0;
	}
	
	.TextDecoration dd
	{
		/*{xen:property textCtrl.border}
		{xen:property textCtrl.background}*/
		
		padding: 3px 0;
		margin-right: 10px;
		overflow: hidden; zoom: 1;
	}
	
		.TextDecoration dd label
		{
			float: left;
			margin-right: 5px;
		}

.propertyDescription
{
	font-size: 11px;
	padding: 5px;
	border: 1px solid {xen:property primaryLighter};
	border-radius: 5px;
	margin: 10px 0;
}]]></template>
  <template title="style_property_color_reference"><![CDATA[<xen:title>{xen:phrase color_palette}</xen:title>

<xen:require css="template_edit.css" />

<ul class="blackOut palette blockLinksList">
<xen:foreach loop="$colorsGrouped" value="$colors">
	<xen:foreach loop="$colors" value="$color">
		<li title="@{$color.property_name}: {$color.property_value}">
			<a style="background-color: {$color.property_value}"></a>
			<span>@{$color.property_name}</span>
		</li>
	</xen:foreach>
</xen:foreach>
</ul>]]></template>
  <template title="style_property_definition_delete"><![CDATA[<xen:title>{xen:phrase confirm_deletion_of_style_property_definition}: {$definition.property_name}</xen:title>
<xen:h1>{xen:phrase confirm_deletion_of_style_property_definition}</xen:h1>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'style-property-defs/delete', $definition}" class="deleteConfirmForm formOverlay">

	<p>{xen:phrase please_confirm_that_you_want_to_delete_following_style_property}:</p>
	<strong><a href="{xen:adminlink 'style-property-defs/edit', $definition}">{$definition.property_name}</b></a></strong>

	<xen:submitunit save="{xen:phrase delete_style_property_definition}" />
	<input type="hidden" name="_xfConfirm" value="1" />
	
</xen:form>]]></template>
  <template title="style_property_definition_edit"><![CDATA[<xen:title>{xen:if '{$definition.property_definition_id}', '{xen:phrase edit_style_property_definition}: {$definition.masterTitle}', '{xen:phrase define_new_style_property}'}</xen:title>

<xen:form action="{xen:adminlink 'style-property-defs/save', $definition}" class="AutoValidator" data-redirect="true">
	<xen:controlunit label="{xen:phrase style}:">
		{$style.title}
		<xen:if is="{$style.style_id} > 0"><div class="alertText">{xen:phrase note_you_not_editing_master_style}<br />{xen:phrase this_style_property_will_exist_solely_within_this_style_and_its_children}</div></xen:if>
	</xen:controlunit>
	<input type="hidden" name="definition_style_id" value="{$definition.definition_style_id}" />
	
	<fieldset>
		<xen:textboxunit label="{xen:phrase property_name}:" name="property_name" value="{$definition.property_name}">
			<xen:explain>{xen:phrase this_is_how_you_will_refer_to_property_in_template}</xen:explain>
		</xen:textboxunit>
		
		<xen:include template="helper_addon_unit" />
	</fieldset>
	
	<fieldset>
		<xen:textboxunit label="{xen:phrase title}:" name="title" value="{$definition.masterTitle}" data-livetitletemplate="{xen:if {$definition.property_definition_id},
			'{xen:phrase edit_style_property_definition}: <em>%s</em>',
			'{xen:phrase define_new_style_property}: <em>%s</em>'}">
			<xen:explain>{xen:phrase this_will_be_shown_to_users}</xen:explain>
		</xen:textboxunit>
		
		<xen:textboxunit label="{xen:phrase description}:" name="description" value="{$definition.masterDescription}"
			explain="{xen:phrase describes_purpose_and_use_of_this_style_property}"
			rows="2" inputclass="Elastic" />
	</fieldset>

	<fieldset>
		<xen:radiounit label="{xen:phrase property_type}:" name="property_type" value="{$definition.property_type}">
			<xen:option value="css">
				<xen:label>{xen:phrase css_with_components}:</xen:label>
				<xen:disabled>
					<xen:checkbox name="css_components" listclass="checkboxColumns">
						<xen:option value="text" selected="{$definition.cssComponents.text}">{xen:phrase text}</xen:option>
						<xen:option value="background" selected="{$definition.cssComponents.background}">{xen:phrase background}</xen:option>
						<xen:option value="border" selected="{$definition.cssComponents.border}">{xen:phrase border}</xen:option>
						<xen:option value="layout" selected="{$definition.cssComponents.layout}">{xen:phrase layout}</xen:option>
						<xen:option value="extra" selected="{$definition.cssComponents.extra}">{xen:phrase extra}</xen:option>
					</xen:checkbox>
				</xen:disabled>
			</xen:option>
			<xen:option value="scalar">
				<xen:label>{xen:phrase scalar_with_default_value}:</xen:label>
				<xen:textbox name="property_value_scalar" value="{xen:if "{$definition.property_type} == 'scalar'", {$definition.property_value}, ''}"
					rows="2" inputclass="Elastic _autoSize" />
				<xen:disabled>
					<xen:radio name="scalar_type" value="{$definition.scalar_type}" listclass="checkboxColumns">
						<xen:option value="">{xen:phrase string}</xen:option>
						<xen:option value="longstring">{xen:phrase multi_line_string}</xen:option>
						<xen:option value="color">{xen:phrase color}</xen:option>
						<xen:option value="number">{xen:phrase number_with_or_without_units}</xen:option>
						<xen:option value="boolean">{xen:phrase on_off_check_box}</xen:option>			
						<xen:option value="template">{xen:phrase named_template}</xen:option>			
					</xen:radio>
					
					<label for="ctrl_scalar_parameters" style="display: block; margin-bottom: 2px; margin-top: 10px;">{xen:phrase parameters}:</label>
					<xen:textbox name="scalar_parameters" value="{$definition.scalar_parameters}" rows="2" inputclass="Elastic" />
					<p class="explain">{xen:phrase provide_parameters_and_arguments_for_selected_scalar_type}</p>
				</xen:disabled>
			</xen:option>
		</xen:radiounit>
	</fieldset>
	
	<fieldset>
		<xen:selectunit label="{xen:phrase property_group}:" name="group_name" value="{$definition.group_name}">
			<xen:option value="">&nbsp;</xen:option>
			<xen:options source="$groupOptions" />
		</xen:selectunit>
		
		<xen:textboxunit label="{xen:phrase sub_group}:" name="sub_group" value="{$definition.sub_group}">
			<xen:explain>{xen:phrase free_form_text_allows_loose_grouping_of_adjacent_scalar_properties}</xen:explain>
		</xen:textboxunit>
		
		<xen:spinboxunit label="{xen:phrase display_order}:" name="display_order" value="{$definition.display_order}" min="0" step="10" />
	</fieldset>
		
	<xen:submitunit save="{xen:phrase save_property_definition}">
		<xen:if is="{$definition.property_definition_id}">
			<input type="button" value="{xen:phrase delete_property_definition}..." accesskey="d" class="button OverlayTrigger"
				data-href="{xen:adminlink 'style-property-defs/delete', $definition}" />
		</xen:if>
	</xen:submitunit>
</xen:form>]]></template>
  <template title="style_property_delete"><![CDATA[<xen:title>{xen:phrase confirm_reversion_of_style_property}: {$property.title}</xen:title>
<xen:h1>{xen:phrase confirm_reversion_of_style_property}</xen:h1>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink styles/style-properties, $style, 'group={$property.group_name}'}#_{$property.property_name}">{$property.title}</xen:breadcrumb>
</xen:navigation>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink style-properties/delete, $property}" class="deleteConfirmForm formOverlay">

	<p>{xen:phrase please_confirm_revert_style_property_from_style, 'style={$style.title}'}:</p>		
		
	<strong><a href="{xen:adminlink styles/style-properties, $style, 'group={$property.group_name}'}#_{$property.property_name}">{$property.title}</a></strong>

	<xen:submitunit save="{xen:phrase revert_style_property}" />
	
	<input type="hidden" name="_xfConfirm" value="1" />
</xen:form>]]></template>
  <template title="style_property_display_order"><![CDATA[<xen:title>{xen:phrase display_order}</xen:title>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink styles, $style}">{$style.title}</xen:breadcrumb>
	<xen:breadcrumb href="{xen:adminlink styles/style-properties, $style}">{xen:phrase style_property_groups}</xen:breadcrumb>
	<xen:breadcrumb href="{xen:adminlink styles/style-properties, '', 'group={$group}'}">{$group}</xen:breadcrumb>
</xen:navigation>

<xen:form action="{xen:adminlink style-property-defs/display-order, '', 'group={$group}'}">

	<xen:if hascontent="true">
		<h3 class="textHeading">{xen:phrase settings}</h3>
		<xen:contentcheck>
			<xen:foreach loop="{$scalars}" key="{$propertyName}" value="{$property}">
				<xen:spinboxunit label="{$property.title}" name="property[{$propertyName}]" value="{$property.display_order}" hint="{$propertyName}" min="0" step="10" />
			</xen:foreach>
		</xen:contentcheck>
	</xen:if>
	
	<xen:if hascontent="true">
		<h3 class="textHeading">{xen:phrase style_properties}</h3>
		<xen:contentcheck>
			<xen:foreach loop="{$properties}" key="{$propertyName}" value="{$property}">
				<xen:spinboxunit label="{$property.title}" name="property[{$propertyName}]" value="{$property.display_order}" hint="{$propertyName}" min="0" step="10" />
			</xen:foreach>
		</xen:contentcheck>
	</xen:if>
	
	<xen:submitunit save="{xen:phrase save_changes}">
		<input type="reset" class="button" value="{xen:phrase reset}" />
	</xen:submitunit>
	
	<input type="hidden" name="_xfConfirm" value="1" />

</xen:form>]]></template>
  <template title="style_property_group_delete"><![CDATA[<xen:title>{xen:phrase confirm_deletion_of_style_property_group}: {$group.group_name}</xen:title>
<xen:h1>{xen:phrase confirm_deletion_of_style_property_group}</xen:h1>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'style-property-groups/delete', $group}" class="deleteConfirmForm formOverlay">

	<p>{xen:phrase please_confirm_that_you_want_to_delete_following_style_property_group}:</p>
	<strong><a href="{xen:adminlink 'style-property-groups/edit', $group}">{$group.title} ({$group.group_name})</a></strong>

	<xen:submitunit save="{xen:phrase delete_style_property_group}" />
	<input type="hidden" name="_xfConfirm" value="1" />
	
</xen:form>]]></template>
  <template title="style_property_group_edit"><![CDATA[<xen:title>{xen:if '{$group.property_group_id}', '{xen:phrase edit_style_property_group}: {$group.masterTitle}', '{xen:phrase create_new_style_property_group}'}</xen:title>

<xen:form action="{xen:adminlink 'style-property-groups/save', $group}" class="AutoValidator" data-redirect="yes">
	<xen:controlunit label="{xen:phrase style}:">{$style.title}</xen:controlunit>
	<input type="hidden" name="group_style_id" value="{$group.group_style_id}" />
	
	<xen:textboxunit label="{xen:phrase group_name}:" name="group_name" value="{$group.group_name}">
		<xen:explain>{xen:phrase this_is_unique_identifier_for_this_group}</xen:explain>
	</xen:textboxunit>
	<xen:textboxunit label="{xen:phrase title}:" name="title" value="{$group.masterTitle}" data-livetitletemplate="{xen:if {$group.property_group_id},
		'{xen:phrase edit_style_property_group}: <em>%s</em>',
		'{xen:phrase create_new_style_property_group}: <em>%s</em>'}">
		<xen:explain>{xen:phrase this_will_be_shown_to_users}</xen:explain>
	</xen:textboxunit>
	<xen:textboxunit label="{xen:phrase description}:" name="description" value="{$group.masterDescription}" />
	<xen:textboxunit label="{xen:phrase display_order}:" name="display_order" value="{$group.display_order}" />
		
	<xen:include template="helper_addon_unit" />
		
	<xen:submitunit save="{xen:phrase save_property_group}">
		<xen:if is="{$group.property_group_id}">
			<input type="button" value="{xen:phrase delete_property_group}..." accesskey="d" class="button OverlayTrigger"
				data-href="{xen:adminlink 'style-property-groups/delete', $group}" />
		</xen:if>
	</xen:submitunit>
</xen:form>]]></template>
  <template title="style_property_group_list"><![CDATA[<xen:title>{$style.title}: {xen:phrase style_properties}</xen:title>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink styles}#{xen:helper listitemid, $style.style_id}">{$style.title}</xen:breadcrumb>
</xen:navigation>

<xen:if is="{$canEditDefinition}">
	<xen:topctrl><a href="{xen:adminlink 'style-property-groups/add', '', 'style_id={$style.style_id}'}" class="button">+ {xen:phrase create_new_group}</a></xen:topctrl>
</xen:if>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<div class="topChoosers">
	<div class="Popup">
		<span class="muted">{xen:phrase style}:</span> <a rel="Menu">{$style.title}</a>
		<div class="Menu">
			<div class="primaryContent menuHeader"><h3>{xen:phrase styles}</h3></div>
			<ul class="secondaryContent blockLinksList">
				<xen:if is="{$masterStyle}">
					<li><a href="{xen:adminlink 'styles/style-properties', $masterStyle}">{$masterStyle.title}</a></li>
				</xen:if>
				<xen:foreach loop="$styles" value="$styleOption">
					<li><a href="{xen:adminlink 'styles/style-properties', $styleOption}"><span class="_depth{$styleOption.depth}">{$styleOption.title}</span></a></li>
				</xen:foreach>
			</ul>
		</div>
	</div>
</div>

<form action="{xen:adminlink styles/style-properties, $style}" class="section">

	<h2 class="subHeading">
		<xen:include template="filter_list_controls" />
		{xen:phrase style_property_groups}
	</h2>

	<ol class="FilterList">
		<xen:foreach loop="$groups" value="$group">
			<xen:listitem
				id="{$group.group_name}"
				label="{$group.title}"
				href="{xen:adminlink styles/style-properties, $style, 'group={$group.group_name}'}"
				snippet="{$group.description}"
				delete="{xen:if $group.canEdit, {xen:adminlink 'style-property-groups/delete', $group}}">
				<xen:html>
					<xen:if is="{$canEditDefinition}">
						<a href="{xen:adminlink style-property-groups/edit, $group}" class="secondaryContent OverlayTrigger editGroup" title="{$group.group_name}, {$group.display_order}">{xen:phrase edit_group}</a>
					</xen:if>
				</xen:html>
			</xen:listitem>
		</xen:foreach>
	</ol>

	<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:count $groups}</span>', 'total={xen:count $groups}'}</p>

</form>]]></template>
  <template title="style_property_list"><![CDATA[<xen:title>{xen:phrase style_properties}: {$group.title}</xen:title>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink styles, $style}#{xen:helper listitemid, $style.style_id}">{$style.title}</xen:breadcrumb>
	<xen:breadcrumb href="{xen:adminlink styles/style-properties, $style}#{xen:helper listitemid, $group.group_name}">{xen:phrase style_property_groups}</xen:breadcrumb>
</xen:navigation>

<xen:require css="style_property.css" />

<xen:if is="{$canEditDefinition}">
	<xen:topctrl>
		<xen:if is="{$group.canEdit}">
			<a href="{xen:adminlink 'style-property-groups/edit', $group}" class="button OverlayTrigger">{xen:phrase edit_group}</a>
			<xen:if is="{$style.style_id} == 0"><a href="{xen:adminlink 'style-property-defs/display-order', '', 'group={$group.group_name}'}" class="button">{xen:phrase display_order}</a></xen:if>
		</xen:if>
		<a href="{xen:adminlink 'style-property-defs/add', '', 'style_id={$style.style_id}', 'group_name={$group.group_name}'}" class="button">+ {xen:phrase create_new_property}</a>
	</xen:topctrl>
</xen:if>

<div class="topChoosers">

	<div class="Popup">
		<span class="muted">{xen:phrase style}:</span> <a rel="Menu">{$style.title}</a>
		<div class="Menu">
			<div class="primaryContent menuHeader"><h3>{xen:phrase styles}</h3></div>
			<ul class="secondaryContent blockLinksList">
				<xen:if is="{$masterStyle}">
					<li><a href="{xen:adminlink 'styles/style-properties', $masterStyle, 'group={$group.group_name}'}">{$masterStyle.title}</a></li>
				</xen:if>
				<xen:foreach loop="$styles" value="$styleOption">
					<li><a href="{xen:adminlink 'styles/style-properties', $styleOption, 'group={$group.group_name}'}"><span class="_depth{$styleOption.depth}">{$styleOption.title}</span></a></li>
				</xen:foreach>
			</ul>
		</div>
	</div>
	
	<div class="Popup">
		<span class="muted">{xen:phrase property_group}:</span> <a rel="Menu">{$group.title}</a>
		<div class="Menu">
			<div class="primaryContent menuHeader"><h3>{xen:phrase property_groups}</h3></div>
			<ul class="secondaryContent blockLinksList">
				<xen:foreach loop="$groups" value="$groupOption">
					<li><a href="{xen:adminlink 'styles/style-properties', $style, 'group={$groupOption.group_name}'}">{$groupOption.title}</a></li>
				</xen:foreach>
			</ul>
		</div>
	</div>

</div>

<form action="{xen:adminlink 'styles/style-properties/save', $style}" method="post" id="PropertyForm" class="MultiSubmitFix">

	<xen:if is="{$group.group_name} == 'color'">
		<xen:include template="style_property_list_color_palette" />
	<xen:else />
		<xen:include template="style_property_list_js" />
		<xen:include template="style_property_list_contents" />
	</xen:if>

	<div class="propertySubmit">
		<input type="submit" value="{xen:phrase update_style_properties}" class="button primary" />
		<input type="reset" value="{xen:phrase undo_changes}" class="button" />
	</div>
		
	<input type="hidden" name="group" value="{$group.group_name}" />
	<input type="hidden" name="_xfToken" value="{$visitor.csrf_token_page}" />
	<input type="hidden" name="tab_index" value="0" />
	<input type="hidden" name="tab_id" value="(none)" />
</form>

<xen:include template="color_picker" />]]></template>
  <template title="style_property_list_color_palette"><![CDATA[<xen:require css="style_property_list_color_palette.css" />

<div class="styleProperty" id="colorPalette">

	<fieldset class="colorPalette">
		<div class="pickers"><!-- space for cool stuff here! --></div>
		<div class="colorAdjust">
			<input type="text" name="hue" min="0" max="360" step="1" value="180" class="HueShift OptOut" data-target="#colorPalette" title="{xen:phrase adjust_color_hues_for_entire_palette}" />
			<input type="button" class="button ColorInvert" value="{xen:phrase invert}" data-target="#colorPalette" title="{xen:phrase invert_colors_for_entire_palette}" />
			<xen:if is="{$group.customized}"><label class="revertAll">{xen:phrase revert_all} <input type="checkbox" class="CheckAll" data-target="#colorPalette" /></label></xen:if>
		</div>
	</fieldset>
	
	<xen:foreach loop="$scalars" key="$scalarGroupId" value="$scalarGroup" i="$i">
		<fieldset class="colorPalette" id="cp{$i}">
			<ul class="pickers">
				<xen:foreach loop="$scalarGroup.properties" value="$property">
					<li>
						<xen:textbox name="properties[{$property.property_definition_id}]" value="{$property.propertyValueScalar}"
							inputclass="ColorPicker DisablePalette" id="ctrl_{$property.property_definition_id}" />
						<label for="ctrl_{$property.property_definition_id}" class="propertyTitle">{$property.title}</label>
						<div class="meta">
							<span class="muted ltr">@{$property.property_name}</span>
							<xen:include template="style_property_unit_extra" />
						</div>
					</li>
				</xen:foreach>
			</ul>
			<div class="colorAdjust">
				<input type="text" name="hue" min="0" max="360" step="1" value="180" class="HueShift OptOut" data-target="#cp{$i}" title="{xen:phrase adjust_color_hues_for_this_group}" />
				<input type="button" class="button ColorInvert" value="{xen:phrase invert}" data-target="#cp{$i}" title="{xen:phrase invert_colors_in_this_group}" />
				<xen:if is="{$scalarGroup.customized}"><label class="revertAll">{xen:phrase revert_all} <input type="checkbox" class="CheckAll" data-target="#cp{$i}" /></label></xen:if>
			</div>
		</fieldset>
	</xen:foreach>

</div>]]></template>
  <template title="style_property_list_color_palette.css"><![CDATA[.slider
{
	background: transparent url('{xen:property imagePath}/xenforo/widgets/spectrum.png') repeat-x;
	height: 4px;
	position: relative;
	cursor: pointer;
	border: 1px solid silver;
	width: 140px;
	margin-top: 10px;
	margin-bottom: 10px;
	border-radius: 2px;
}

.progress
{
	height: 9px;
	background-color: blue;
	display: none;
	opacity: 0.6;
}

.handle
{
	{xen:property button}
	
	border-color: {xen:property primaryLight};
	height: 16px;
	width: 22px;
	top: -7px;
	position: absolute;
	cursor: move;
	display: block;
	margin-top: 1px;
}

.range
{
	float: left;
	width: 50px;
	font-size: 10px;
	display: none;
}

/* -------------------------- */

.colorPalette
{
	margin: 0 5px;
	padding: 5px;
	border-top: 1px solid {xen:property primaryLighterStill};
}

.colorPalette .colorAdjust
{
	margin-left: 550px;
	position: relative;
}

	.colorPalette .colorAdjust .revertAll
	{
		position: absolute;
		bottom: 0px;
		right: 0px;
		
		line-height: 23px;
		font-size: 11px;
	}

.colorPalette .pickers
{
	float: left;
	width: 550px;
}

.colorPalette li
{
	float: left;
	margin-top: 5px;
	margin-right: 10px;
	position: relative;
}

	.colorPalette li label.propertyTitle
	{
		display: none;
		font-size: 11px;
	}
	
	.colorPalette li .meta
	{
		font-size: 11px;
	}
	
		.colorPalette .optionEditLink
		{
			line-height: inherit;
			position: inherit;
		}
	
		.colorPalette li .meta .edit
		{
			line-height: inherit;
			position: absolute;
			bottom: 0px;
			right: 0px;
		}
	
		.colorPalette li .meta .reset
		{
			position: absolute;
			top: -3px;
			right: -3px;
			font-size: 10px;
			color: white;
			text-shadow: 0 0 2px black;
		}
	
	.colorPalette li .muted
	{
	}

	.colorPalette .colorPickerPlaceholder
	{
		background-image: none;
		padding-right: 2px;
		width: 120px;
	}
	
		.colorPalette .colorPickerPlaceholder span
		{
			height: 40px;
		}]]></template>
  <template title="style_property_list_contents"><![CDATA[<div id="propertiesContainer">
	
	<div id="propertyPanes">
		<xen:if is="{$scalars}">
			<fieldset class="styleProperty" id="propertyScalars">
				<h3 class="propertyHeader subHeading">{xen:phrase settings}</h3>
				<div id="scalars">
				
					<xen:foreach loop="$scalars" key="$scalarGroupId" value="$scalarGroup">
						<fieldset>
							<xen:foreach loop="$scalarGroup.properties" value="$property">
								<xen:if is="{$property.scalar_type} == 'template'">								
									{xen:raw $property.template}
								<xen:else />
									<xen:controlunit
										label="{xen:if '{$property.scalar_type} != "boolean"', {$property.title}}"
										hint="{xen:if '{$property.scalar_type} != "boolean" AND {$debugMode}', {$property.property_name}}">
								
										<xen:if is="{$property.scalar_type} == 'color'">
											<xen:include template="style_property_unit_color" />
										<xen:elseif is="{$property.scalar_type} == 'number'" />
											<xen:include template="style_property_unit_number" />
										<xen:elseif is="{$property.scalar_type} == 'boolean'" />
											<xen:include template="style_property_unit_boolean" />
										<xen:elseif is="{$property.scalar_type} == 'longstring'" />
											<xen:include template="style_property_unit_longstring" />
										<xen:else />
											<xen:include template="style_property_unit_string" />
										</xen:if>
										
										<xen:include template="style_property_unit_extra"><xen:set var="$reset">{xen:phrase reset}</xen:set></xen:include>
										
										<xen:if is="{$property.description}"><p class="explain">{$property.description}</p></xen:if>
										
									</xen:controlunit>
								</xen:if>
							</xen:foreach>						
						</fieldset>
					</xen:foreach>
						
				</div>
			</fieldset>
		</xen:if>
		<xen:foreach loop="$properties" value="$property">
			<fieldset class="propertyCss"><xen:include template="style_property_unit_css" /></fieldset>
		</xen:foreach>
	</div>
	
	<ul id="propertyTabs" class="Tabs" data-panes="#propertyPanes > fieldset">
		<xen:if is="{$scalars}"><li><a>{xen:phrase settings}</a></li></xen:if>
		<xen:foreach loop="$properties" value="$property">
			<li class="PropertyTab" id="_{$property.property_name}">
				<a href="{xen:adminlink styles/style-properties, $style, 'property={$property.property_name}'}" class="noOutline">{$property.title}</a>
				<xen:if hascontent="true">
					<div class="DescriptionTip">
						<xen:contentcheck><span class="name">@{$property.property_name}</span> {xen:string nl2br, $property.description}</xen:contentcheck>
					</div>
				</xen:if>
			</li>
		</xen:foreach>
	</ul>
</div>]]></template>
  <template title="style_property_unit_animationSpeedMultiplier"><![CDATA[<input type="hidden" name="checkboxes[]" value="{$property.property_definition_id}" />
<xen:checkboxunit label="">	
	<xen:option name="_null_" selected="{$property.propertyValueScalar}"
		label="{$property.title}"
		title="{xen:if $debugMode, $property.property_name}">
		<xen:spinbox name="properties[{$property.property_definition_id}]" value="{$property.propertyValueScalar}"
			min="0" step="0.25" />
	</xen:option>
	<xen:explain>{$property.description}</xen:explain>
	<xen:html><xen:include template="style_property_unit_extra"><xen:set var="$reset">{xen:phrase reset}</xen:set></xen:include></xen:html>
</xen:checkboxunit>]]></template>
  <template title="style_property_unit_boolean"><![CDATA[<input type="hidden" name="checkboxes[]" value="{$property.property_definition_id}" />
<xen:checkbox>	
	<xen:option name="properties[{$property.property_definition_id}]" selected="{$property.propertyValueScalar}"
		label="{$property.title}"
		title="{xen:if $debugMode, $property.property_name}" />	
</xen:checkbox>]]></template>
  <template title="style_property_unit_color"><![CDATA[<xen:require css="color_picker.css" />

<xen:textbox name="properties[{$property.property_definition_id}]" value="{$property.propertyValueScalar}" inputclass="ColorPicker DisablePalette" />]]></template>
  <template title="style_property_unit_css"><![CDATA[<xen:require css="style_property.css" />
<xen:require js="js/xenforo/style_property_editor.js" />

<div class="styleProperty StylePropertyEditor">
	<div class="propertyHeader subHeading">
		<xen:if is="{$property.canReset}"><label class="propertyHeaderExtra"><input type="checkbox" name="reset[{$property.property_definition_id}]" value="1" /> {xen:phrase reset}</label></xen:if>
		<xen:if is="{$property.canEditDefinition}"><a href="{xen:adminlink 'style-property-defs/edit', $property}" class="propertyHeaderExtra">{xen:phrase edit_definition}</a></xen:if>
		<h3>{$property.title} <xen:if is="{$debugMode}"><span class="propertyName">({$property.property_name})</span></xen:if></h3>
	</div>

	<div class="propertyEditorFields">

	<xen:if is="{$property.cssComponents.text}">
		<div class="propertyComponentGroup">
			<h4 class="textHeading">{xen:phrase text}</h4>
			<table>
			<tr>
				<th>{xen:phrase color}</th>
				<th>{xen:phrase size}</th>
				<th>{xen:phrase font_family}</th>
				<th>&nbsp;</th>
			</tr>
			<tr>
				<td><xen:textbox id="{$property.property_definition_id}-color"
						name="properties[{$property.property_definition_id}][color]"
						value="{$property.propertyValueCss.color}"
						inputclass="ColorPicker" /></td>
				<td><xen:textbox id="{$property.property_definition_id}-font-size"
						name="properties[{$property.property_definition_id}][font-size]"
						value="{$property.propertyValueCss.font-size}"
						inputclass="unitInput" /></td>
				<td><xen:textbox id="{$property.property_definition_id}-font-family"
						name="properties[{$property.property_definition_id}][font-family]"
						value="{$property.propertyValueCss.font-family}"
						size="15"
						inputclass="fontFamily" /></td>
				<td><xen:checkbox listclass="toggleButtonList">
					<xen:option name="properties[{$property.property_definition_id}][font-weight]"
						selected="{$property.propertyValueCss.font-weight}"
						value="bold"
						label="{xen:phrase bold}"
						title="B"
						class="ToggleButton bold" />
					<xen:option name="properties[{$property.property_definition_id}][font-style]"
						selected="{$property.propertyValueCss.font-style}"
						value="italic"
						label="{xen:phrase italic}"
						title="I"
						class="ToggleButton italic" />
					<xen:option name="properties[{$property.property_definition_id}][font-variant]"
						selected="{$property.propertyValueCss.font-variant}"
						value="small-caps"
						label="{xen:phrase small_caps}"
						title="Aa"
						class="ToggleButton small-caps" />
				</xen:checkbox></td>
			</tr>
			</table>

			<dl class="TextDecoration">
				<dt class="rowLabel"><!--Decoration:--></dt>
				<dd>
					<label class="underline"><input type="checkbox" value="underline"
						name="properties[{$property.property_definition_id}][text-decoration][underline]"
						{xen:checked $property.propertyValueCss.text-decoration.underline} />
						{xen:phrase underline}</label>

					<label class="overline"><input type="checkbox" value="overline"
						name="properties[{$property.property_definition_id}][text-decoration][overline]"
						{xen:checked $property.propertyValueCss.text-decoration.overline} />
						{xen:phrase overline}</label>

					<label class="line-through"><input type="checkbox" value="line-through"
						name="properties[{$property.property_definition_id}][text-decoration][line-through]"
						{xen:checked $property.propertyValueCss.text-decoration.line-through} />
						{xen:phrase line_through}</label>
				</dd>
				<dd>
					<label class="none"><input type="checkbox" value="none"
						name="properties[{$property.property_definition_id}][text-decoration][none]"
						{xen:checked $property.propertyValueCss.text-decoration.none} />
						{xen:phrase no_text_decoration}</label>
				</dd>
			</dl>
		</div>
	</xen:if>

	<xen:if is="{$property.cssComponents.background}">
		<div class="propertyComponentGroup">
			<h4 class="textHeading">{xen:phrase background}</h4>
			<table>
			<tr>
				<th>{xen:phrase color}</th>
				<th>{xen:phrase image}</th>
				<th>{xen:phrase repeat}</th>
				<th>{xen:phrase position}</th>
			</tr>
			<tr>
				<td><xen:textbox id="{$property.property_definition_id}-background-color"
					name="properties[{$property.property_definition_id}][background-color]"
					value="{$property.propertyValueCss.background-color}"
					inputclass="ColorPicker" /></td>
				<td><xen:textbox id="{$property.property_definition_id}-background-image"
					name="properties[{$property.property_definition_id}][background-image]"
					value="{$property.propertyValueCss.background-image}"
					size="15"
					inputclass="backgroundImage" /></td>
				<td><xen:select name="properties[{$property.property_definition_id}][background-repeat]"
					value="{$property.propertyValueCss.background-repeat}" inputclass="autoSize">
					<xen:option value="">&nbsp;</xen:option>
					<xen:option value="repeat">{xen:phrase repeat}</xen:option>
					<xen:option value="repeat-x">{xen:phrase repeat_x}</xen:option>
					<xen:option value="repeat-y">{xen:phrase repeat_y}</xen:option>
					<xen:option value="no-repeat">{xen:phrase no_repeat}</xen:option>
				</xen:select></td>
				<td><xen:textbox id="{$property.property_definition_id}-background-position"
					name="properties[{$property.property_definition_id}][background-position]"
					value="{$property.propertyValueCss.background-position}"
					size="5"
					inputclass="backgroundPosition" />
				</td>
			</tr>
			</table>
		</div>
	</xen:if>

	<xen:if is="{$property.cssComponents.layout} OR {$property.cssComponents.border}">
		<div class="propertyComponentGroup"><xen:if is="{$property.cssComponents.border}">

				<table class="layoutPropertyTable">
					<thead>
						<tr>
							<th class="textHeading">{xen:phrase border}</th>
							<th class="textHeading minorHeading">{xen:phrase color}</th>
							<th class="textHeading minorHeading">{xen:phrase style}</th>
							<th class="textHeading minorHeading">{xen:phrase width}</th>
							<th class="textHeading minorHeading">{xen:phrase radius}</th>
						</tr>
					</thead>
					<tbody>
						<tr>
							<td class="rowLabel">{xen:phrase all}:</td>
							<td>
								<xen:textbox name="properties[{$property.property_definition_id}][border-color]"
									value="{$property.propertyValueCss.border-color}" inputclass="ColorPicker" />
							</td>
							<td>
								<xen:select name="properties[{$property.property_definition_id}][border-style]"
									value="{$property.propertyValueCss.border-style}" inputclass="autoSize">
									<xen:option value=""></xen:option>
									<xen:option value="none">{xen:phrase none}</xen:option>
									<xen:option value="solid">{xen:phrase solid}</xen:option>
									<xen:option value="dashed">{xen:phrase dashed}</xen:option>
									<xen:option value="dotted">{xen:phrase dotted}</xen:option>
									<xen:option value="double">{xen:phrase double}</xen:option>
									<xen:option value="groove">{xen:phrase groove}</xen:option>
									<xen:option value="inset">{xen:phrase inset}</xen:option>
									<xen:option value="outset">{xen:phrase outset}</xen:option>
									<xen:option value="ridge">{xen:phrase ridge}</xen:option>
									<xen:option value="hidden">{xen:phrase hidden}</xen:option>
								</xen:select>
							</td>
							<td>
								<xen:textbox name="properties[{$property.property_definition_id}][border-width]"
									value="{$property.propertyValueCss.border-width}" inputclass="unitInput" />
							</td>
							<td>
								<xen:textbox name="properties[{$property.property_definition_id}][border-radius]"
									value="{$property.propertyValueCss.border-radius}" inputclass="unitInput" />
							</td>
						</tr>

						<tr>
							<td class="rowLabel">{xen:phrase top}:</td>
							<td>
								<xen:textbox name="properties[{$property.property_definition_id}][border-top-color]"
									value="{$property.propertyValueCss.border-top-color}" inputclass="ColorPicker" />
							</td>
							<td>
								<xen:select name="properties[{$property.property_definition_id}][border-top-style]"
									value="{$property.propertyValueCss.border-top-style}" inputclass="autoSize">
									<xen:option value=""></xen:option>
									<xen:option value="none">{xen:phrase none}</xen:option>
									<xen:option value="solid">{xen:phrase solid}</xen:option>
									<xen:option value="dashed">{xen:phrase dashed}</xen:option>
									<xen:option value="dotted">{xen:phrase dotted}</xen:option>
									<xen:option value="double">{xen:phrase double}</xen:option>
									<xen:option value="groove">{xen:phrase groove}</xen:option>
									<xen:option value="inset">{xen:phrase inset}</xen:option>
									<xen:option value="outset">{xen:phrase outset}</xen:option>
									<xen:option value="ridge">{xen:phrase ridge}</xen:option>
									<xen:option value="hidden">{xen:phrase hidden}</xen:option>
								</xen:select>
							</td>
							<td>
								<xen:textbox name="properties[{$property.property_definition_id}][border-top-width]"
									value="{$property.propertyValueCss.border-top-width}" inputclass="unitInput" />
							</td>
							<td>
								<xen:textbox name="properties[{$property.property_definition_id}][border-top-left-radius]"
									value="{$property.propertyValueCss.border-top-left-radius}" inputclass="unitInput" />
							</td>
						</tr>

						<tr>
							<td class="rowLabel">{xen:phrase right}:</td>
							<td>
								<xen:textbox name="properties[{$property.property_definition_id}][border-right-color]"
									value="{$property.propertyValueCss.border-right-color}" inputclass="ColorPicker" />
							</td>
							<td>
								<xen:select name="properties[{$property.property_definition_id}][border-right-style]"
									value="{$property.propertyValueCss.border-right-style}" inputclass="autoSize">
									<xen:option value=""></xen:option>
									<xen:option value="none">{xen:phrase none}</xen:option>
									<xen:option value="solid">{xen:phrase solid}</xen:option>
									<xen:option value="dashed">{xen:phrase dashed}</xen:option>
									<xen:option value="dotted">{xen:phrase dotted}</xen:option>
									<xen:option value="double">{xen:phrase double}</xen:option>
									<xen:option value="groove">{xen:phrase groove}</xen:option>
									<xen:option value="inset">{xen:phrase inset}</xen:option>
									<xen:option value="outset">{xen:phrase outset}</xen:option>
									<xen:option value="ridge">{xen:phrase ridge}</xen:option>
									<xen:option value="hidden">{xen:phrase hidden}</xen:option>
								</xen:select>
							</td>
							<td>
								<xen:textbox name="properties[{$property.property_definition_id}][border-right-width]"
									value="{$property.propertyValueCss.border-right-width}" inputclass="unitInput" />
							</td>
							<td>
								<xen:textbox name="properties[{$property.property_definition_id}][border-top-right-radius]"
									value="{$property.propertyValueCss.border-top-right-radius}" inputclass="unitInput" />
							</td>
						</tr>

						<tr>
							<td class="rowLabel">{xen:phrase bottom}:</td>
							<td>
								<xen:textbox name="properties[{$property.property_definition_id}][border-bottom-color]"
									value="{$property.propertyValueCss.border-bottom-color}" inputclass="ColorPicker" />
							</td>
							<td>
								<xen:select name="properties[{$property.property_definition_id}][border-bottom-style]"
									value="{$property.propertyValueCss.border-bottom-style}" inputclass="autoSize">
									<xen:option value=""></xen:option>
									<xen:option value="none">{xen:phrase none}</xen:option>
									<xen:option value="solid">{xen:phrase solid}</xen:option>
									<xen:option value="dashed">{xen:phrase dashed}</xen:option>
									<xen:option value="dotted">{xen:phrase dotted}</xen:option>
									<xen:option value="double">{xen:phrase double}</xen:option>
									<xen:option value="groove">{xen:phrase groove}</xen:option>
									<xen:option value="inset">{xen:phrase inset}</xen:option>
									<xen:option value="outset">{xen:phrase outset}</xen:option>
									<xen:option value="ridge">{xen:phrase ridge}</xen:option>
									<xen:option value="hidden">{xen:phrase hidden}</xen:option>
								</xen:select>
							</td>
							<td>
								<xen:textbox name="properties[{$property.property_definition_id}][border-bottom-width]"
									value="{$property.propertyValueCss.border-bottom-width}" inputclass="unitInput" />
							</td>
							<td>
								<xen:textbox name="properties[{$property.property_definition_id}][border-bottom-right-radius]"
									value="{$property.propertyValueCss.border-bottom-right-radius}" inputclass="unitInput" />
							</td>
						</tr>

						<tr>
							<td class="rowLabel">{xen:phrase left}:</td>
							<td>
								<xen:textbox name="properties[{$property.property_definition_id}][border-left-color]"
									value="{$property.propertyValueCss.border-left-color}" inputclass="ColorPicker" />
							</td>
							<td>
								<xen:select name="properties[{$property.property_definition_id}][border-left-style]"
									value="{$property.propertyValueCss.border-left-style}" inputclass="autoSize">
									<xen:option value=""></xen:option>
									<xen:option value="none">{xen:phrase none}</xen:option>
									<xen:option value="solid">{xen:phrase solid}</xen:option>
									<xen:option value="dashed">{xen:phrase dashed}</xen:option>
									<xen:option value="dotted">{xen:phrase dotted}</xen:option>
									<xen:option value="double">{xen:phrase double}</xen:option>
									<xen:option value="groove">{xen:phrase groove}</xen:option>
									<xen:option value="inset">{xen:phrase inset}</xen:option>
									<xen:option value="outset">{xen:phrase outset}</xen:option>
									<xen:option value="ridge">{xen:phrase ridge}</xen:option>
									<xen:option value="hidden">{xen:phrase hidden}</xen:option>
								</xen:select>
							</td>
							<td>
								<xen:textbox name="properties[{$property.property_definition_id}][border-left-width]"
									value="{$property.propertyValueCss.border-left-width}" inputclass="unitInput" />
							</td>
							<td>
								<xen:textbox name="properties[{$property.property_definition_id}][border-bottom-left-radius]"
									value="{$property.propertyValueCss.border-bottom-left-radius}" inputclass="unitInput" />
							</td>
						</tr>
					</tbody>
				</table>
			</xen:if>
			<xen:if is="{$property.cssComponents.layout}">

				<table class="layoutPropertyTable">
					<thead>
						<tr>
							<th class="textHeading" colspan="2">{xen:phrase margin}</th>
						</tr>
					</thead>
					<tbody>
						<tr>
							<td class="rowLabel">{xen:phrase all}:</td>
							<td><xen:textbox name="properties[{$property.property_definition_id}][margin-all]"
								value="{$property.propertyValueCss.margin-all}" inputclass="unitInput" /></td>
						</tr>
						<tr>
							<td class="rowLabel">{xen:phrase top}:</td>
							<td><xen:textbox name="properties[{$property.property_definition_id}][margin-top]"
								value="{$property.propertyValueCss.margin-top}" inputclass="unitInput" /></td>
						</tr>
						<tr>
							<td class="rowLabel">{xen:phrase right}:</td>
							<td><xen:textbox name="properties[{$property.property_definition_id}][margin-right]"
								value="{$property.propertyValueCss.margin-right}" inputclass="unitInput" /></td>
						</tr>
						<tr>
							<td class="rowLabel">{xen:phrase bottom}:</td>
							<td><xen:textbox name="properties[{$property.property_definition_id}][margin-bottom]"
								value="{$property.propertyValueCss.margin-bottom}" inputclass="unitInput" /></td>
						</tr>
						<tr>
							<td class="rowLabel">{xen:phrase left}:</td>
							<td><xen:textbox name="properties[{$property.property_definition_id}][margin-left]"
								value="{$property.propertyValueCss.margin-left}" inputclass="unitInput" /></td>
						</tr>
					</tbody>
				</table>

				<table class="layoutPropertyTable">
					<thead>
						<tr class="headingRow">
							<th class="textHeading" colspan="2">{xen:phrase padding}</th>
						</tr>
					</thead>
					<tbody>
						<tr>
							<td class="rowLabel">{xen:phrase all}:</td>
							<td><xen:textbox name="properties[{$property.property_definition_id}][padding-all]"
								value="{$property.propertyValueCss.padding-all}" inputclass="unitInput" /></td>
						</tr>
						<tr>
							<td class="rowLabel">{xen:phrase top}:</td>
							<td><xen:textbox name="properties[{$property.property_definition_id}][padding-top]"
								value="{$property.propertyValueCss.padding-top}" inputclass="unitInput" /></td>
						</tr>
						<tr>
							<td class="rowLabel">{xen:phrase right}:</td>
							<td><xen:textbox name="properties[{$property.property_definition_id}][padding-right]"
								value="{$property.propertyValueCss.padding-right}" inputclass="unitInput" /></td>
						</tr>
						<tr>
							<td class="rowLabel">{xen:phrase bottom}:</td>
							<td><xen:textbox name="properties[{$property.property_definition_id}][padding-bottom]"
								value="{$property.propertyValueCss.padding-bottom}" inputclass="unitInput" /></td>
						</tr>
						<tr>
							<td class="rowLabel">{xen:phrase left}:</td>
							<td><xen:textbox name="properties[{$property.property_definition_id}][padding-left]"
								value="{$property.propertyValueCss.padding-left}" inputclass="unitInput" /></td>
						</tr>
					</tbody>
				</table>

			</xen:if>
		</div>
	</xen:if>

	<xen:if hascontent="true">
		<div class="propertyComponentGroup">
			<h4 class="textHeading">{xen:phrase miscellaneous}</h4>
			<xen:contentcheck>
				<xen:if is="{$property.cssComponents.layout}">
					<div class="propertyDimensions">
						<table>
						<tr>
							<td class="rowLabel">{xen:phrase width}:</td>
							<td><xen:textbox name="properties[{$property.property_definition_id}][width]"
								value="{$property.propertyValueCss.width}" inputclass="unitInput" /></td>
						</tr>
						<tr>
							<td class="rowLabel">{xen:phrase height}:</td>
							<td><xen:textbox name="properties[{$property.property_definition_id}][height]"
								value="{$property.propertyValueCss.height}" inputclass="unitInput"/></td>
						</tr>
						</table>
					</div>
				</xen:if>

				<xen:if is="{$property.cssComponents.extra}">
					<div class="propertyExtra">
						<xen:textbox name="properties[{$property.property_definition_id}][extra]"
							value="{$property.propertyValueCss.extra}" rows="2" inputclass="Elastic code" />
						<p class="explain">{xen:phrase use_this_box_to_enter_any_additional_css_to_include}</p>
					</div>
				</xen:if>
			</xen:contentcheck>
		</div>
	</xen:if>

	<xen:if hascontent="true">
		<div class="propertyDescription secondaryContent">
			<xen:contentcheck>{xen:string nl2br, $property.description}</xen:contentcheck>
		</div>
	</xen:if>

	</div>
</div>]]></template>
  <template title="style_property_unit_extra"><![CDATA[<input type="hidden" name="set[{$property.property_name}]" value="1" />

<xen:if hascontent="true">
	<div class="optionEditLink">
	<xen:contentcheck>
		<xen:if is="{$property.canReset}">
			<label class="reset"><input type="checkbox" name="reset[{$property.property_definition_id}]" value="1" title="{xen:phrase revert_this_property_to_its_default_value}" /> <span class="resetText">{$reset}</span></label>
		</xen:if>
		
		<xen:if is="{$property.canEditDefinition}">
			<a href="{xen:adminlink 'style-property-defs/edit', $property}"
				title="{$property.property_name}, {xen:phrase order} ({$property.sub_group}): {$property.display_order}" class="edit"><span class="editText">{xen:phrase edit}</span></a>
		</xen:if>
	</xen:contentcheck>
	</div>
</xen:if>]]></template>
  <template title="style_property_unit_fbColorScheme"><![CDATA[<input type="hidden" name="checkboxes[]" value="{$property.property_definition_id}" />
<xen:radiounit name="properties[{$property.property_definition_id}]" value="{$property.propertyValueScalar}" label="{$property.title}">	
	<xen:option value="light" label="{xen:phrase facebook_colorscheme_light}" />
	<xen:option value="dark" label="{xen:phrase facebook_colorscheme_dark}" />
	<xen:explain>{$property.description}</xen:explain>
	<xen:html><xen:include template="style_property_unit_extra"><xen:set var="$reset">{xen:phrase reset}</xen:set></xen:include></xen:html>
</xen:radiounit>]]></template>
  <template title="style_property_unit_longstring"><![CDATA[<xen:textbox name="properties[{$property.property_definition_id}]" value="{$property.propertyValueScalar}"
	title="{xen:if $debugMode, $property.property_name}" inputclass="Elastic" rows="2" />]]></template>
  <template title="style_property_unit_number"><![CDATA[<xen:textbox name="properties[{$property.property_definition_id}]" value="{$property.propertyValueScalar}"
	title="{xen:if $debugMode, $property.property_name}" inputclass="number" />]]></template>
  <template title="style_property_unit_string"><![CDATA[<xen:textbox name="properties[{$property.property_definition_id}]" value="{$property.propertyValueScalar}"
	title="{xen:if $debugMode, $property.property_name}" />]]></template>
  <template title="template_auto_merge"><![CDATA[<xen:title>{xen:phrase automatically_merge_template_changes}</xen:title>

<xen:form action="{xen:adminlink templates/auto-merge}" id="MergeForm">
	<p>{xen:phrase merging_templates}</p>

	<input type="hidden" name="_xfConfirm" value="1" />
	<xen:foreach loop="$success" value="$id">
		<input type="hidden" name="success[]" value="{$id}" />
	</xen:foreach>
	<xen:foreach loop="$skip" value="$id">
		<input type="hidden" name="skip[]" value="{$id}" />
	</xen:foreach>
</xen:form>

<script>$(function() { 
	setTimeout(function() {
		$('#MergeForm').submit();
	}, 1000);
})</script>]]></template>
  <template title="template_auto_merge_confirm"><![CDATA[<xen:title>{xen:phrase automatically_merge_template_changes}</xen:title>

<xen:form action="{xen:adminlink templates/auto-merge}" class="formOverlay">
	<div class="baseHtml">
		<p>{xen:phrase this_feature_attempt_automatically_merge_custom_template_changes}</p>

		<p>{xen:phrase if_conflict_discovered_while_merging_no_automatic_merging}</p>
	</div>
	
	<xen:submitunit save="{xen:phrase start_merge}" />

	<input type="hidden" name="_xfConfirm" value="1" />
</xen:form>]]></template>
  <template title="template_compare"><![CDATA[<xen:title>{xen:phrase custom_changes} - {$template.title}</xen:title>

<xen:require css="diff.css" />

<div class="section">
	<div class="overlayScroll primaryContent ltr">
		<ul class="diffList code">
		<xen:foreach loop="$diffs" value="$diff">
			<xen:set var="$diffHtml" value="{xen:helper implode, '<br />', {$diff.1}}" />
			<li class="diffLine diff_{$diff.0}">{xen:if "trim({$diffHtml}) !== ''", {xen:raw $diffHtml}, '&nbsp;'}</li>
		</xen:foreach>
		</ul>
	</div>
</div>]]></template>
  <template title="template_delete"><![CDATA[<xen:title>{xen:if $style.style_id, {xen:phrase confirm_reversion_of_template}, {xen:phrase confirm_deletion_of_template}}: {$template.title}</xen:title>
<xen:h1>{xen:if $style.style_id, {xen:phrase confirm_reversion_of_template}, {xen:phrase confirm_deletion_of_template}}</xen:h1>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'templates/edit', $template}">{$template.title}</xen:breadcrumb>
</xen:navigation>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink templates/delete, $template}" class="deleteConfirmForm formOverlay">

	<p><xen:if is="{$style.style_id}">{xen:phrase please_confirm_that_you_want_to_revert_the_following_template, 'style={$style.title}'}:
		<xen:else />{xen:phrase please_confirm_that_you_want_to_delete_following_template}:
		</xen:if></p>		
		
	<strong><a href="{xen:adminlink 'templates/edit', $template}">{$template.title}</a></strong>

	<xen:submitunit save="{xen:if $style.style_id, {xen:phrase revert_template}, {xen:phrase delete_template}}" />
	
	<input type="hidden" name="_xfConfirm" value="1" />
</xen:form>]]></template>
  <template title="template_edit"><![CDATA[<xen:title>{xen:if {$template.title}, '{xen:phrase edit_template}: {$template.title}', '{xen:phrase create_new_template}'}</xen:title>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink styles, $style}#{xen:helper listitemid, $style.style_id}">{$style.title}</xen:breadcrumb>
	<xen:breadcrumb href="{xen:adminlink styles/templates, $style}#{xen:helper listitemid, $template.title}">{xen:phrase templates}</xen:breadcrumb>
</xen:navigation>

<xen:topctrl>
	<div class="Popup" id="ColorPopup">
		<a rel="Menu" class="textCtrl Tooltip colorMenuControl NoPopupGadget" data-tipclass="flipped" data-offsetx="3" title="{xen:phrase color_palette}">{xen:phrase color_palette}</a>
		<div class="Menu" id="ColorMenu"
			data-contentsrc="{xen:adminlink 'style-properties/color-reference', '', 'style_id={$template.style_id}'}"
			data-contentdest="#ColorPlaceHolder"
			data-insertfn="replaceAll"
		>
			<div class="blackOut" id="ColorPlaceHolder"><img src="{xen:property imagePath}/xenforo/widgets/ajaxload.info_FFFFFF_facebook.gif" alt="{xen:phrase loading}..." /></div>
		</div>
	</div>
</xen:topctrl>

<xen:set var="$styleChooser">
	<div class="topChoosers">
		<div class="Popup">
			<span class="muted">{xen:phrase style}:</span> <a rel="Menu">{$style.title}</a>
			<div class="Menu">
				<div class="primaryContent menuHeader"><h3>{xen:phrase styles}</h3></div>
				<ul class="secondaryContent blockLinksList">
					<xen:if is="{$masterStyle}">
						<li><a href="{xen:adminlink 'styles/templates', $masterStyle}#{xen:helper listitemid, $template.title}"><span class="_depth0">{$masterStyle.title}</span></a></li>
					</xen:if>
					<xen:foreach loop="$styles" value="$styleOption">
						<li><a href="{xen:adminlink 'styles/templates', $styleOption}#{xen:helper listitemid, $template.title}"><span class="_depth{$styleOption.depth}">{$styleOption.title}</span></a></li>
					</xen:foreach>
				</ul>
			</div>
		</div>
	</div>
</xen:set>

<xen:require css="template_edit.css" />
<xen:require js="js/xenforo/template_edit.js" />

<xen:if is="{$isOutdated}">
	<p class="importantMessage">{xen:phrase this_template_is_outdated_merge_recommended, 'link={xen:adminlink templates/outdated}'}</p>
</xen:if>

<xen:form action="{xen:adminlink 'templates/save'}" id="templateEditor"
	data-loadurl="{xen:adminlink 'templates/load-multiple'}"
	data-saveurl="{xen:adminlink 'templates/save-multiple'}"
	data-progressurl="{xen:property imagePath}/xenforo/widgets/ajaxload.info_000000_facebook.gif"
	data-untitled="untitled template">

	<xen:textboxunit name="title" value="{$template.title}" class="fullWidth" id="templateTitle" data-livetitletemplate="{xen:if {$template.title},
		'{xen:phrase edit_template}: <em>%s</em>',
		'{xen:phrase create_new_template}: <em>%s</em>'}">
		<xen:label>{xen:raw $styleChooser} {xen:phrase template_name}:</xen:label>
		<xen:hint>{xen:phrase must_be_unique}</xen:hint>
		<xen:html>
			<xen:if hascontent="true">
				<ul class="templateModificationActions">
				<xen:contentcheck>
					<xen:if is="{$style.style_id}">
						<li class="disableCheck"><label><input type="checkbox" name="disable_modifications" value="1" {xen:checked $template.disable_modifications} /> {xen:phrase prevent_template_modifications_from_being_automatically_applied, 'link={xen:adminlink template-modifications}'}</label></li>
					</xen:if>
					<xen:if is="{$modifications}">
						<li class="viewModifications"><a href="{xen:adminlink templates/view-modifications, $template, 'title={$template.title}', 'style_id={$style.style_id}'}" class="OverlayTrigger" data-cacheoverlay="no">{xen:phrase view_template_modifications}</a></li>
					</xen:if>
				</xen:contentcheck>
				</ul>
			</xen:if>
		</xen:html>
	</xen:textboxunit>

	<ul class="tabs" id="editorTabs">
		<li class="active" id="templateTab"><a><span class="tabText"><xen:if is="{$template.title}">{$template.title}<xen:else /><i>{xen:phrase untitled_template}</i></xen:if></span></a></li>
	</ul>

	<xen:textboxunit name="template" value="{$template.template}" label="{xen:phrase template}:" rows="20" code="true" class="fullWidth surplusLabel" id="templateTextarea">
		<xen:explain>{xen:phrase you_may_use_xenforo_template_syntax_here}</xen:explain>
	</xen:textboxunit>
	
	<div class="PrimaryTemplateOnly">
		<xen:if is="{$template.template_id} AND ({$template.style_id} OR {$hasHistory})">
			<xen:controlunit label="" class="fullWidth templateLinkList ToggleTriggerAnchor">
				<xen:if is="{$template.style_id}">
					<a href="{xen:adminlink templates/compare, $template}" class="OverlayTrigger" data-cacheoverlay="no">{xen:phrase view_custom_changes}</a>
				</xen:if>
				<xen:if is="{$hasHistory}">
					<a href="{xen:adminlink templates/history, $template}" class="ToggleTrigger" data-cache="no">{xen:phrase view_history}</a>
				</xen:if>
			</xen:controlunit>
		</xen:if>

		<xen:include template="helper_addon_unit" />
	</div>

	<input type="hidden" name="style_id" value="{$template.style_id}" id="styleId" />
	<input type="hidden" name="template_id" value="{$template.template_id}" id="templateId" />
	<input type="hidden" name="title_original" value="{$template.title}" id="templateTitleOriginal" />

	<xen:submitunit>
		<input type="submit" name="reload" value="Save Changes" accesskey="s" class="button primary" id="saveReloadButton" data-ajaxvalue="{xen:phrase save_all_changes}" />
		<input type="submit" name="saveexit" value="{xen:phrase save_and_exit}" accesskey="e" class="button" id="saveExitButton" />
		<input type="button" name="delete" value="{xen:if $style.style_id, {xen:phrase revert_template}, {xen:phrase delete_template}}..."
			accesskey="d" class="button OverlayTrigger"
			data-href="{xen:adminlink templates/delete, $template}"
			id="TemplateDeleteButton" {xen:if '!{$template.template_id}', 'style="display: none"'}
		/>
	</xen:submitunit>

</xen:form>]]></template>
  <template title="template_edit.css"><![CDATA[/* template editor */

#templateEditor .topChoosers
{
	float: right;
	margin: 0;
}

#templateEditor #editorTabs + .ctrlUnit
{
	border-top: none;
}

#templateEditor #progressImage
{
	float: right;
	padding-right: 25px;
}

#templateEditor .templateModificationActions
{
	font-size: 11px;
	overflow: hidden; *zoom: 1;
}

	#templateEditor .templateModificationActions .disableCheck
	{
		float: left;
	}

	#templateEditor .templateModificationActions .viewModifications
	{
		float: right;
		margin-right: 30px;
	}

#templateEditor input.hiddenDelete
{
	display: none;
}

#editorTabs #templateTab .tabText
{
	font-weight: bold;
}

#editorTabs a
{
	background-repeat: repeat-x;
	background-position: top;
	padding-left: 2px;
	padding-right: 2px;
}

#editorTabs > .master
{
}

#editorTabs > li:first-child
{
	margin-right: 5px;
}

#editorTabs .changeIndicator
{
	visibility: hidden;
	color: red;
	font-weight: bold;
}


#editorTabs .custom
{
	border-color: red;
	border-bottom-color: {xen:property ctrlUnit.border-top-color};
	background-image: url({xen:property imagePath}/xenforo/gradients/tab-18px-custom.png);
}

#editorTabs .custom.active
{
	background-image: none;
}

#editorTabs .inherited
{
	border-color: orange;
	border-bottom-color: {xen:property ctrlUnit.border-top-color};
	background-image: url({xen:property imagePath}/xenforo/gradients/tab-18px-inherited.png);
}

#editorTabs .inherited.active
{
	background-image: none;
}

#editorTabs + .fullWidth
{
	clear: both;
}

#ColorPopup .colorMenuControl
{
	background: transparent url('{xen:property imagePath}/xenforo/color-picker/palette.png') no-repeat center center;
	width: 21px;
	height: 17px;
	padding: 2px;
	display: block;
	overflow: hidden;
	white-space: nowrap;
	text-indent: 9999em;
}

#ColorPlaceHolder img
{
	padding: 15px 0;
}

#ColorMenu .blackOut
{
	padding: 20px 10px;
	background-color: black;
	color: rgb(192, 192, 192);
	text-align: center;
}

	#ColorMenu .blackOut.palette
	{
		width: 600px;
	}

	#ColorMenu li
	{
		float: left;
		width: 130px;
		padding: 5px 12px 2px;
		margin-right: -5px;
		text-align: left;
	}
	
		#ColorMenu li a
		{
			height: 20px;
			border: 1px solid rgb(128, 128, 128);
		}
		
		#ColorMenu li span
		{
			display: block;
			margin: 1px 5px 0px;
		}

.templateLinkList
{
	text-align: center;
}

	.templateLinkList dt
	{
		display: none;
	}
	
	.templateLinkList a
	{
		margin: 0 10px;
	}]]></template>
  <template title="template_history"><![CDATA[<xen:title>{xen:phrase template_history}</xen:title>

<form method="post" action="{xen:adminlink templates/history, $template}" class="section">
	<table class="dataTable diffVersions">
	<tr class="dataRow">
		<th class="old">{xen:phrase old}</th>
		<th class="new">{xen:phrase new}</th>
		<th class="date">{xen:phrase edit_date}</th>
		<th>&nbsp;</th>
	</tr>
	<tr class="dataRow">
		<td class="old">&nbsp;</td>
		<td class="new"><input type="radio" name="new" value="0" {xen:checked '{$newId} == 0'} /></td>
		<td class="date dateCurrent">{xen:phrase current_version}</td>
		<td class="dataOptions"></td>
	</tr>
	<xen:foreach loop="$list" value="$history">
		<tr class="dataRow">
			<td class="old"><input type="radio" name="old" value="{$history.template_history_id}" {xen:checked '{$oldId} == {$history.template_history_id}'} /></td>
			<td class="new"><input type="radio" name="new" value="{$history.template_history_id}" {xen:checked '{$newId} == {$history.template_history_id}'} /></td>
			<td class="date"><xen:datetime time="{$history.edit_date}" /></td>
			<td class="dataOptions"><a href="{xen:adminlink templates/history, $template, 'view={$history.template_history_id}'}" class="secondaryContent OverlayTrigger">{xen:phrase view_pre_edit_version}</a></td>
		</tr>
	</xen:foreach>
	</table>
	<div class="sectionFooter"><input type="submit" value="{xen:phrase compare_versions}" class="button primary OverlayTrigger" /></div>
	
	<input type="hidden" name="_xfToken" value="{$visitor.csrf_token_page}" />
</form>]]></template>
  <template title="template_history_compare"><![CDATA[<xen:title>{xen:phrase version_comparison}</xen:title>

<xen:require css="diff.css" />

<div class="section">
	<div class="overlayScroll primaryContent ltr">
		<ul class="diffList code">
		<xen:foreach loop="$diffs" value="$diff">
			<xen:set var="$diffHtml" value="{xen:helper implode, '<br />', {$diff.1}}" />
			<li class="diffLine diff_{$diff.0}">{xen:if "trim({$diffHtml}) !== ''", {xen:raw $diffHtml}, '&nbsp;'}</li>
		</xen:foreach>
		</ul>
	</div>
</div>]]></template>
  <template title="template_history_view"><![CDATA[<xen:title>{xen:phrase template_history}</xen:title>

<div class="section historyText">
	<div class="primaryContent overlayScroll ltr">
		<pre dir="ltr">{$history.template}</pre>
	</div>
</div>]]></template>
  <template title="template_list"><![CDATA[<xen:title>{$style.title}: {xen:phrase templates}</xen:title>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink styles}#{xen:helper listitemid, $style.style_id}">{$style.title}</xen:breadcrumb>
</xen:navigation>

<xen:topctrl>
	<a href="{xen:adminlink 'templates/add', '', 'style_id={$style.style_id}'}" class="button" accesskey="a">+ {xen:phrase create_new_template}</a>
</xen:topctrl>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<div class="topChoosers">
	<div class="Popup">
		<span class="muted">{xen:phrase style}:</span> <a rel="Menu">{$style.title}</a>
		<div class="Menu">
			<div class="primaryContent menuHeader"><h3>{xen:phrase styles}</h3></div>
			<ul class="secondaryContent blockLinksList">
				<xen:if is="{$masterStyle}">
					<li><a href="{xen:adminlink 'styles/templates', $masterStyle}"><span class="_depth0">{$masterStyle.title}</span></a></li>
				</xen:if>
				<xen:foreach loop="$styles" value="$styleOption">
					<li><a href="{xen:adminlink 'styles/templates', $styleOption}"><span class="_depth{$styleOption.depth}">{$styleOption.title}</span></a></li>
				</xen:foreach>
			</ul>
		</div>
	</div>
</div>

<xen:form action="{xen:adminlink 'templates'}" class="section">

	<h2 class="subHeading">
		<xen:include template="filter_list_controls" />
		{xen:phrase templates}
	</h2>

	<ol class="FilterList Scrollable">
		<xen:foreach loop="$templates" value="$template">
			<xen:listitem
				id="{$template.title}"
				class="item_{$template.template_state}"
				href="{xen:adminlink 'templates/edit', $template, 'style_id={$style.style_id}'}"
				label="{$template.title}"
				delete="{xen:if $template.canDelete, {xen:adminlink templates/delete, $template}, ''}"
				deletehint="{xen:if '{$template.template_state} == "custom"', '{xen:phrase revert_customizations_to_this_template}'}"
				snippet="{$template.addonTitle}" />
		</xen:foreach>
	</ol>

	<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:count $templates}</span>', 'total={xen:count $templates}'}</p>

</xen:form>]]></template>
  <template title="template_merge_outdated"><![CDATA[<xen:title>{xen:phrase merge_template_changes} - {$template.title}</xen:title>

<xen:require css="diff.css" />

<xen:form action="{xen:adminlink templates/merge-outdated, $template}" id="MergeForm">
	<ol class="diffList code contained wrapped editable" dir="ltr">
	<xen:foreach loop="$diffs" value="$diff">
		<xen:set var="$diffHtml" value="{xen:helper implode, '<br />', {$diff.1}}" />
		<xen:if is="{$diff.0} == 'c'">
			<li class="conflict">
				<xen:set var="$parentHtml" value="{xen:helper implode, '<br />', {$diff.3}}" />
				<div class="diffLine parent">{xen:if "trim({$parentHtml}) !== ''", '<span>{xen:raw $parentHtml}</span><input type="hidden" name="" value="{xen:helper implode, '
', $diff.3}" />', '<i>{xen:phrase deleted}</i>'}</div>
				<div class="resolve">
					<input type="button" class="button ResolveButton" data-target=".parent" value="&uarr; {xen:phrase resolve_using_parent_version} " />
					<input type="button" class="button ResolveButton" data-target=".parent, .custom" value="{xen:phrase resolve_using_both}" />
					<input type="button" class="button ResolveButton" data-target=".custom" value="{xen:phrase resolve_using_custom_version} &darr;" />
					<input type="hidden" name="merged[]" class="MergedInput" value="{xen:helper implode, '
', $diff.3}" />
				</div>
				<div class="diffLine custom">{xen:if "trim({$diffHtml}) !== ''", '<span>{xen:raw $diffHtml}</span><input type="hidden" name="" value="{xen:helper implode, '
', $diff.1}" />', '<i>{xen:phrase deleted}</i>'}</div>
			</li>
		<xen:else />
			<li class="diffLine diff_{$diff.0}">{xen:if "trim({$diffHtml}) !== ''", '<span>{xen:raw $diffHtml}</span><input type="hidden" name="merged[]" value="{xen:helper implode, '
', $diff.1}" />', '<i>{xen:phrase deleted}</i>'}</li>
		</xen:if>
	</xen:foreach>
	</ol>

	<xen:submitunit save="{xen:phrase merge_changes}">
		<p class="explain">{xen:phrase you_may_click_on_update_to_edit_it}</p>
	</xen:submitunit>

	<input type="hidden" name="_xfConfirm" value="1" />
</xen:form>

<script>
$(function()
{
	var $form = $('#MergeForm');
	var $buttons = $form.find('.ResolveButton');
	if ($buttons.length)
	{
		$form.find('input:submit').addClass('disabled').prop('disabled', true);
		$buttons.click(function()
		{
			var $this = $(this);
			var $container = $this.closest('.conflict');
			var $hidden = $container.find('.MergedInput');
			var $target = $container.find($this.data('target'));
			var $firstTarget = $target.first();

			var $selectedInput = $target.find('input[type=hidden]');

			if (!$selectedInput.length)
			{
				// deleted, so need to rename the input so it doesn't get sent through
				$hidden.attr('name', '');
			}
			else if ($selectedInput.length > 1)
			{
				var val = [];
				$selectedInput.each(function() {
					val.push($(this).val());
				});
				$hidden.val(val.join("\n"));
			}
			else
			{
				$hidden.val($selectedInput.val());
			}

			$container.children().hide();
			$container.addClass('resolved');
			$firstTarget.addClass('chosen').show();
			if ($hidden.length)
			{
				$firstTarget.html($('<span />').text($hidden.val()).append('<br />'));
			}

			if (!$buttons.filter(':visible').length)
			{
				$form.find('input:submit').removeClass('disabled').prop('disabled', false);
			}

			if ($target.length > 1)
			{
				$firstTarget.click();
			}
		});
	}

	$form.on('click', '.diff_u, .conflict.resolved .chosen', function() {
		var $this = $(this),
			$html = $this.find('span'),
			$textarea = $this.find('textarea'),
			$input = $this.find('input[type=hidden]');

		if (!$html.length)
		{
			return; // nothing to edit
		}

		if (!$input.length || !$input.attr('name'))
		{
			$input = $this.closest('.conflict').find('.MergedInput');
		}
		if (!$input)
		{
			return;
		}

		$html.hide();
		if (!$textarea.length)
		{
			$textarea = $('<textarea class="textCtrl Elastic editor" rows="1" />').val($input.val());
			$textarea.insertAfter($html);
			
			var elastic = new XenForo.TextareaElastic($textarea);
			$textarea.data('elastic', elastic);
			
			$textarea.on('blur', function() {
				$input.val($textarea.val());
				$html.text($textarea.val()).append('<br>');
				$html.show();
				$textarea.hide();
			});
		}

		$textarea.show().focus();
		$textarea.data('elastic').recalculate();
	});
});
</script>]]></template>
  <template title="template_modification.css"><![CDATA[.logSummary
{
	width: 60px;
}

	.logSummary .active
	{
		font-weight: bold;
		font-size: 13px;
	}

	.logSummary .ok
	{
		color: green;
	}

	.logSummary .notFound
	{
		color: grey;
	}

	.logSummary .error
	{
		color: red;
	}]]></template>
  <template title="template_modification_delete"><![CDATA[<xen:include template="base_template_modification_delete">
	<xen:set var="$prefix" value="template-modifications" />
</xen:include>]]></template>
  <template title="template_modification_edit"><![CDATA[<xen:include template="base_template_modification_edit">
	<xen:set var="$prefix" value="template-modifications" />
</xen:include>]]></template>
  <template title="template_modification_list"><![CDATA[<xen:title>{xen:phrase template_modifications}</xen:title>

<xen:include template="base_template_modification_list">
	<xen:set var="$prefix" value="template-modifications" />
</xen:include>]]></template>
  <template title="template_modification_log"><![CDATA[<xen:include template="base_template_modification_log" />]]></template>
  <template title="template_modification_test"><![CDATA[<xen:include template="base_template_modification_test" />]]></template>
  <template title="template_outdated"><![CDATA[<xen:title>{xen:phrase outdated_templates}</xen:title>

<xen:topctrl>
	<a href="{xen:adminlink styles/customized-components}" class="button">{xen:phrase customized_style_components}</a>
	<xen:if is="{$templatesGrouped}">
		<a href="{xen:adminlink templates/auto-merge}" class="button OverlayTrigger">{xen:phrase automatically_merge_changes}</a>
	</xen:if>
</xen:topctrl>

<xen:if is="{$successTemplates}">
	<div class="importantMessage">
		{xen:phrase following_templates_were_successfully_merged_automatically}:
		<ul>
		<xen:foreach loop="$successTemplates" value="$template">
			<li><a href="{xen:adminlink templates/edit, $template}" target="_blank">{$template.title}</a> ({$styles.{$template.style_id}.title})</li>
		</xen:foreach>
		</ul>
	</div>
</xen:if>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<xen:form action="{xen:adminlink 'templates/outdated'}" class="section">

	<h2 class="subHeading">
		<xen:include template="filter_list_controls" />
		{xen:phrase outdated_templates}
	</h2>

	<xen:if is="{$templatesGrouped}">
		<ul class="FilterList Scrollable">
			<xen:foreach loop="$styles" value="$style">
			<xen:if is="{$templatesGrouped.{$style.style_id}}">
				<li>
					<h3 class="textHeading">{$style.title}</h3>
					<ol>
					<xen:foreach loop="{$templatesGrouped.{$style.style_id}}" value="$template">
						<xen:listitem
							id="{$template.template_id}"
							href="{xen:adminlink templates/edit, $template}"
							label="{$template.title}"
							snippet="{xen:if '{$template.last_edit_date} AND {$template.outdated_by_date}', '{xen:phrase last_edited}: {xen:datetime $template.last_edit_date}, {xen:phrase parent_last_edited}: {xen:datetime $template.parent_last_edit_date}', '{xen:phrase custom_version}: {$template.version_string}, {xen:phrase parent_version}: {$template.parent_version_string}'}"
						>
							<xen:html>
								<a href="{xen:adminlink templates/merge-outdated, $template}" class="secondaryContent">{xen:phrase merge_changes}</a>
							</xen:html>
						</xen:listitem>
					</xen:foreach>
					</ol>
				</li>
			</xen:if>
			</xen:foreach>
		</ul>

		<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:number $totalTemplates}</span>', 'total={xen:number $totalTemplates}'}</p>
	<xen:else />
		<div class="primaryContent">{xen:phrase there_are_no_outdated_templates}</div>
	</xen:if>

</xen:form>]]></template>
  <template title="template_search"><![CDATA[<xen:title>{xen:phrase search_templates}</xen:title>

<xen:form action="{xen:adminlink templates/search}" method="get">
	
	<xen:selectunit label="{xen:phrase style}:" name="style_id" value="{$styleId}">
		<xen:option value="{$masterStyle.style_id}" displayif="{$masterStyle}">{$masterStyle.title}</xen:option>
		<xen:foreach loop="$styles" value="$style">
			<xen:option value="{$style.style_id}" depth="{$style.depth}">{$style.title}</xen:option>
		</xen:foreach>
	</xen:selectunit>
	
	<xen:textboxunit label="{xen:phrase title_contains}:" name="title" type="search" results="5" />
	
	<fieldset>
		<xen:textboxunit label="{xen:phrase template_contains}:" name="template" inputclass="Elastic code" rows="2">
			<xen:html>		
				<xen:checkbox>
					<xen:option name="template_case_sensitive">{xen:phrase case_sensitive}</xen:option>
				</xen:checkbox>
			</xen:html>
		</xen:textboxunit>
	</fieldset>
	
	<fieldset>
		<xen:checkboxunit label="{xen:phrase template_status}:" name="template_state[]">
			<xen:option value="default" selected="true">{xen:phrase unmodified}</xen:option>
			<xen:option value="inherited" selected="true">{xen:phrase modified_in_parent_style}</xen:option>
			<xen:option value="custom" selected="true">{xen:phrase modified_in_this_style}</xen:option>
		</xen:checkboxunit>
	</fieldset>
	
	<xen:submitunit save="{xen:phrase search_templates}" />

	<input type="hidden" name="search" value="1" />
</xen:form>]]></template>
  <template title="template_search_results"><![CDATA[<xen:title>{xen:phrase template_search_results}: {$style.title}</xen:title>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<xen:form action="{xen:adminlink templates/search}" class="section">

	<h2 class="subHeading">
		<xen:include template="filter_list_controls" />
		{xen:phrase templates}
	</h2>

	<ol class="FilterList Scrollable">
	<xen:foreach loop="$templates" value="$template">
		<li class="listItem primaryContent item_{$template.template_state}" id="listItem_{$template.template_id}">
			<xen:if is="{$template.canDelete}">
				<a href="{xen:adminlink 'templates/delete', $template, 'style_id={$style.style_id}'}" target="_blank" class="delete secondaryContent" title="{xen:phrase revert_customizations_to_this_template}..."><span>{xen:phrase revert_template}...</span></a>
			</xen:if>
			<h4><a href="{xen:adminlink 'templates/edit', $template, 'style_id={$style.style_id}'}" target="_blank">
				<em>{$template.title}</em> <dfn>{$template.addonTitle}</dfn>
			</a></h4>
		</li>
	</xen:foreach>
	</ol>

	<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:count $templates}</span>', 'total={xen:count $templates}'}</p>

</xen:form>]]></template>
  <template title="template_view_modifications"><![CDATA[<xen:title>{xen:phrase view_template_modifications} - {$template.title}</xen:title>

<xen:require css="diff.css" />

<div class="section">
	<div class="overlayScroll primaryContent ltr">
		<ul class="diffList code">
		<xen:foreach loop="$diffs" value="$diff">
			<xen:set var="$diffHtml" value="{xen:helper implode, '<br />', {$diff.1}}" />
			<li class="diffLine diff_{$diff.0}">{xen:if "trim({$diffHtml}) !== ''", {xen:raw $diffHtml}, '&nbsp;'}</li>
		</xen:foreach>
		</ul>
	</div>
	<xen:if is="{$canManuallyApply}">
		<form action="{xen:adminlink templates/apply-modifications, $template}" method="post" class="sectionFooter">
			<input type="submit" value="{xen:phrase manually_apply_modifications}" class="button primary" />
			<label><input type="checkbox" name="_xfConfirm" value="1" /> {xen:phrase confirm_manual_application}</label>
			<div style="clear: both">{xen:phrase manual_application_may_cause_modifications_applied_multiple_times}</div>
			<input type="hidden" name="_xfToken" value="{$visitor.csrf_token_page}" />
			<input type="hidden" name="style_id" value="{$styleId}" />
		</form>
	</xen:if>
</div>]]></template>
  <template title="thread_batch_update_confirm"><![CDATA[<xen:title>{xen:phrase batch_update_threads}</xen:title>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink threads/batch-update}">{xen:phrase batch_update_threads}</xen:breadcrumb>
</xen:navigation>

<xen:form action="{xen:adminlink threads/batch-update}">
	<xen:controlunit label="{xen:phrase matched_threads}:">
		{$totalThreads}
		<xen:if is="!{$threadIds}">(<a href="{xen:adminlink threads/list, '', '_params={$linkParams}', 'all=1'}">{xen:phrase view_or_filter_matches}</a>)</xen:if>
	</xen:controlunit>

	<h3 class="textHeading">{xen:phrase update_actions}</h3>

	<xen:selectunit label="{xen:phrase move_to_forum}:" name="actions[node_id]">
		<xen:option value="0"></xen:option>
		<xen:foreach loop="$nodes" value="$node">
			<xen:option value="{$node.node_id}" optdisabled="{xen:if "{$node.node_type_id} != 'Forum'", 1}">{xen:string repeat, '&nbsp; ', $node.depth}{$node.title}</xen:option>
		</xen:foreach>
	</xen:selectunit>

	<xen:selectunit label="{xen:phrase set_prefix}:" name="actions[prefix_id]">
		<xen:option value="0"></xen:option>
		<xen:options source="$prefixes" />
		<xen:explain>{xen:phrase prefix_will_only_be_applied_if_valid_for_forum}</xen:explain>
	</xen:selectunit>

	<xen:checkboxunit label="">
		<xen:option name="actions[stick]" value="1">{xen:phrase stick_threads}</xen:option>
		<xen:option name="actions[unstick]" value="1">{xen:phrase unstick_threads}</xen:option>
		<xen:option name="actions[lock]" value="1">{xen:phrase lock_threads}</xen:option>
		<xen:option name="actions[unlock]" value="1">{xen:phrase unlock_threads}</xen:option>
		<xen:option name="actions[approve]" value="1">{xen:phrase approve_threads}</xen:option>
		<xen:option name="actions[unapprove]" value="1">{xen:phrase unapprove_threads}</xen:option>
		<xen:option name="actions[soft_delete]" value="1">{xen:phrase soft_delete_threads}</xen:option>
	</xen:checkboxunit>

	<xen:submitunit save="{xen:phrase update_threads}" />

	<input type="hidden" name="_xfConfirm" value="1" />
	<input type="hidden" name="confirmUpdate" value="1" />
	<input type="hidden" name="criteria" value="{xen:escape {xen:helper json, $criteria}}" />
	<input type="hidden" name="thread_ids" value="{xen:escape {xen:helper json, $threadIds}}" />
</xen:form>

<xen:form action="{xen:adminlink threads/batch-update}">
	<h3 class="textHeading">{xen:phrase delete_threads}</h3>

	<xen:checkboxunit label="">
		<xen:option name="actions[delete]" value="1">{xen:phrase confirm_deletion_of_x_threads, 'cound={$totalThreads}'}</xen:option>
	</xen:checkboxunit>

	<xen:submitunit save="{xen:phrase delete_threads}" />

	<input type="hidden" name="_xfConfirm" value="1" />
	<input type="hidden" name="confirmUpdate" value="1" />
	<input type="hidden" name="criteria" value="{xen:escape {xen:helper json, $criteria}}" />
	<input type="hidden" name="thread_ids" value="{xen:escape {xen:helper json, $threadIds}}" />
</xen:form>]]></template>
  <template title="thread_batch_update_search"><![CDATA[<xen:title>{xen:phrase batch_update_threads}</xen:title>

<xen:if is="{$success}">
	<p class="importantMessage">{xen:phrase batch_update_was_completed_successfully}</p>
</xen:if>

<xen:form action="{xen:adminlink threads/batch-update}">
	<xen:include template="helper_thread_search_criteria" />

	<xen:submitunit save="{xen:phrase search}" />
	<input type="hidden" name="_xfConfirm" value="1" />
</xen:form>]]></template>
  <template title="thread_list"><![CDATA[<xen:title>{xen:phrase threads}</xen:title>

<xen:form action="{xen:adminlink threads/batch-update}" class="section">

	<table class="dataTable" width="100%" style="table-layout: fixed">
	<tr class="dataRow">
		<xen:if is="{$showingAll}">
			<th width="20"><input type="checkbox" class="CheckAll" checked="checked" /></th>
		</xen:if>
		<th>{xen:phrase title}</th>
		<th width="150">{xen:phrase forum}</th>
		<th width="100">{xen:phrase thread_starter}</th>
		<th width="50">{xen:phrase replies}</th>
		<th width="150">{xen:phrase last_message}</th>
	</tr>
	<xen:foreach loop="$threads" value="$thread">
		<tr class="dataRow">
			<xen:if is="{$showingAll}">
				<td><input type="checkbox" name="thread_ids[]" value="{$thread.thread_id}" checked="checked" /></td>
			</xen:if>
			<td><a href="{xen:link threads, $thread}" target="_blank">{$thread.title}</a></td>
			<td>{$thread.node_title}</td>
			<td>{$thread.username}</td>
			<td>{$thread.reply_count}</td>
			<td><xen:datetime time="{$thread.last_post_date}" />
		</tr>
	</xen:foreach>
	<tr>
		<td class="sectionFooter" colspan="{xen:if $showingAll, 6, 5}">
			<xen:if is="{$showAll}">
				<a href="{xen:adminlink threads/list, '', '_params={$linkParams}', 'all=1'}" class="left">{xen:phrase show_all_matches}</a>
			<xen:elseif is="{$showingAll}" />
				<input type="submit" class="button left" value="{xen:phrase batch_update_selected}" />
			</xen:if>
			<span class="right">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:count $threads}</span>', 'total={$totalThreads}'}</span>
		</td>
	</tr>
	</table>

	<input type="hidden" name="_xfConfirm" value="1" />
</xen:form>

<xen:if is="!{$showingAll}">
	{xen:adminpagenav $perPage, $totalThreads, $page, threads/list, '', '_params={$linkParams}'}
</xen:if>]]></template>
  <template title="thread_prefix_delete"><![CDATA[<xen:title>{xen:phrase confirm_deletion_of_thread_prefix}: {$prefix.title}</xen:title>
<xen:h1>{xen:phrase confirm_deletion_of_thread_prefix}</xen:h1>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'thread-prefixes/edit', $prefix}">{$prefix.title}</xen:breadcrumb>
</xen:navigation>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'thread-prefixes/delete', $prefix}" class="deleteConfirmForm formOverlay">
	<p>{xen:phrase please_confirm_that_you_want_to_delete_following_thread_prefix}:</p>
	<strong><a href="{xen:adminlink 'thread-prefixes/edit', $prefix}">{$prefix.title}</a></strong>

	<xen:submitunit save="{xen:phrase delete_thread_prefix}" />
	<input type="hidden" name="_xfConfirm" value="1" />
</xen:form>]]></template>
  <template title="thread_prefix_edit"><![CDATA[<xen:title>{xen:if $prefix.prefix_id, '{xen:phrase edit_thread_prefix}: {$masterTitle}', '{xen:phrase create_new_thread_prefix}'}</xen:title>

<xen:require css="public:thread_prefixes.css" />

<xen:if is="{$prefix.prefix_id}">
	<xen:navigation>
		<xen:breadcrumb href="{xen:adminlink thread-prefixes}#{xen:helper listitemid, $prefix.prefix_id}">{$masterTitle}</xen:breadcrumb>
	</xen:navigation>
</xen:if>

<xen:form action="{xen:adminlink 'thread-prefixes/save', $prefix}" class="AutoValidator" data-redirect="yes">

	<ul class="tabs Tabs" data-panes="#prefixPanes > li">
		<li class="active"><a>{xen:phrase basic_information}</a></li>
		<li><a>{xen:phrase forums_and_permissions}</a></li>
	</ul>

	<ul id="prefixPanes">
		<li>
			<xen:textboxunit label="{xen:phrase title}:" name="title" value="{$masterTitle}" id="PrefixTitle" data-livetitletemplate="{xen:if {$prefix.prefix_id},
				'{xen:phrase edit_thread_prefix}: <em>%s</em>',
				'{xen:phrase create_new_thread_prefix}: <em>%s</em>'}" />
			
			<xen:controlunit label="{xen:phrase display_styling}:">
				<xen:include template="thread_prefix_helper_css_class" />
			</xen:controlunit>

			<script>
			$(function()
			{
				$('#PrefixTitle').bind('LiveTitleSet', function(e, title)
				{
					$('span.PrefixTitle').text(title != '' ? title : '{xen:phrase prefix}');
				});
			});
			</script>
				
			<fieldset>
				<xen:selectunit label="{xen:phrase thread_prefix_group}:" name="prefix_group_id" value="{$prefix.prefix_group_id}">
					<xen:option value="0" label="({xen:phrase none})" />
					<xen:options source="$prefixGroupOptions" />
				</xen:selectunit>
				
				<xen:spinboxunit label="{xen:phrase display_order}:" name="display_order" value="{$prefix.display_order}" min="0" />
			</fieldset>
		</li>
		<li>
			<xen:controlunit label="{xen:phrase usable_by_user_groups}:">
				<xen:include template="thread_prefix_helper_user_groups" />
			</xen:controlunit>
			
			<script>
			$(function()
			{
				$('#SelectAllForums').click(function(e)
				{
					$('#ApplicableForums').find('option').attr('selected', this.checked);
				});
			});
			</script>
			
			<fieldset id="ApplicableForums">
				<xen:controlunit label="{xen:phrase applicable_forums}:">
					<xen:html>
						<xen:include template="thread_prefix_helper_forums" />
						<div><label class="muted"><input type="checkbox" id="SelectAllForums" /> <i>{xen:phrase select_all}</i></label></div>
					</xen:html>
				</xen:controlunit>
			</fieldset>
		</li>
	</ul>
	
	<xen:submitunit save="{xen:phrase save_thread_prefix}">
		<xen:if is="{$prefix.prefix_id}">
			<input type="button" value="{xen:phrase delete_thread_prefix}..." accesskey="d" class="button OverlayTrigger"
				data-href="{xen:adminlink 'thread-prefixes/delete', $prefix}" />
		</xen:if>
	</xen:submitunit>
</xen:form>]]></template>
  <template title="thread_prefix_group_delete"><![CDATA[<xen:title>{xen:phrase confirm_deletion_of_thread_prefix_group}: {$prefixGroup.title}</xen:title>
<xen:h1>{xen:phrase confirm_deletion_of_thread_prefix_group}</xen:h1>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'thread-prefixes/edit-group', '', 'prefix_group_id={$prefixGroup.prefix_group_id}'}">{$prefixGroup.title}</xen:breadcrumb>
</xen:navigation>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'thread-prefixes/delete-group', '', 'prefix_group_id={$prefixGroup.prefix_group_id}'}" class="deleteConfirmForm formOverlay">
	<p>{xen:phrase please_confirm_that_you_want_to_delete_following_thread_prefix_group}:</p>
	<strong><a href="{xen:adminlink 'thread-prefixes/edit-group', '', 'prefix_group_id={$prefixGroup.prefix_group_id}'}">{$prefixGroup.title}</a></strong>
	<p class="muted">{xen:phrase thread_prefixes_will_be_disassociated}</p>

	<xen:submitunit save="{xen:phrase delete_thread_prefix_group}" />
	<input type="hidden" name="_xfConfirm" value="1" />
</xen:form>]]></template>
  <template title="thread_prefix_group_edit"><![CDATA[<xen:title>{xen:if $prefixGroup.prefix_group_id, '{xen:phrase edit_thread_prefix_group}: {$masterTitle}', '{xen:phrase create_new_thread_prefix_group}'}</xen:title>

<xen:require css="public:thread_prefixes.css" />

<xen:if is="{$prefixGroup.prefix_group_id}">
	<xen:navigation>
		<xen:breadcrumb href="{xen:adminlink thread-prefixes}#_group{xen:helper listitemid, $prefixGroup.prefix_group_id}">{$masterTitle}</xen:breadcrumb>
	</xen:navigation>
</xen:if>

<xen:form action="{xen:adminlink thread-prefixes/save-group}" class="AutoValidator" data-redirect="yes">

	<xen:textboxunit name="title" value="{$masterTitle}" label="{xen:phrase title}:" data-livetitletemplate="{xen:if {$prefixGroup.prefix_group_id},
		'{xen:phrase edit_thread_prefix_group}: <em>%s</em>',
		'{xen:phrase create_new_thread_prefix_group}: <em>%s</em>'}" />
	
	<xen:spinboxunit name="display_order" value="{$prefixGroup.display_order}" label="{xen:phrase display_order}:" min="0" step="10" />
	
	<xen:submitunit save="{xen:phrase save_thread_prefix_group}">
		<xen:if is="{$prefixGroup.prefix_group_id}">
			<input type="button" value="{xen:phrase delete_thread_prefix_group}..." accesskey="d" class="button OverlayTrigger"
				data-href="{xen:adminlink 'thread-prefixes/delete-group', '', 'prefix_group_id={$prefixGroup.prefix_group_id}'}" />
		</xen:if>
	</xen:submitunit>
	
	<input type="hidden" name="prefix_group_id" value="{$prefixGroup.prefix_group_id}" />

</xen:form>]]></template>
  <template title="thread_prefix_group_list"><![CDATA[<xen:title>{xen:phrase thread_prefix_groups}</xen:title>

<xen:topctrl><a href="{xen:adminlink thread-prefixes/add-group}" class="button OverlayTrigger">+ {xen:phrase create_new_thread_prefix_group}</a></xen:topctrl>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<xen:form action="{xen:adminlink thread-prefixes/groups}" class="section">
	<xen:if is="{$prefixGroups}">

		<h2 class="subHeading">
			<xen:include template="filter_list_controls" />
			{xen:phrase thread_prefix_groups}
		</h2>

		<ol class="FilterList">
			<xen:foreach loop="$prefixGroups" value="$prefixGroup">
				<xen:listitem
					id="{$prefixGroup.prefix_group_id}"
					label="{$prefixGroup.title}"
					href="{xen:adminlink thread-prefixes/edit-group, '', 'prefix_group_id={$prefixGroup.prefix_group_id}'}"
					delete="{xen:adminlink thread-prefixes/delete-group, '', 'prefix_group_id={$prefixGroup.prefix_group_id}'}">
				</xen:listitem>
			</xen:foreach>
		</ol>

		<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:count $prefixGroups}</span>', 'total={xen:count $prefixGroups}'}</p>

	<xen:else />
		<div class="noResults">{xen:phrase no_thread_prefix_groups_have_been_added_yet}</div>
	</xen:if>
</xen:form>]]></template>
  <template title="thread_prefix_helper_css_class"><![CDATA[<xen:radio name="css_class" value="{$prefix.css_class}" listclass="checkboxColumns">
	<xen:foreach loop="$displayStyles" value="$class">
		<xen:option value="{$class}"><span title="{$class}" class="Tooltip"><span class="{$class} PrefixTitle">{xen:if {$prefix.title}, {$prefix.title}, {xen:phrase prefix}}</span> <span style="color: {xen:property link.color}">{xen:phrase title}...</span></span></xen:option>
	</xen:foreach>
	<xen:option value="" selected="{$displayStylesOther}" label="{xen:phrase other_using_custom_css_class_name}:">
		<xen:textbox name="css_class" value="{xen:if $displayStylesOther, {$prefix.css_class}, ''}" inputclass="autoSize" />
	</xen:option>
</xen:radio>]]></template>
  <template title="thread_prefix_helper_forums"><![CDATA[<select name="node_ids[]" class="textCtrl" multiple="multiple" size="8">
	<option value="0" {xen:selected 'in_array(0, {$selNodeIds})'}>({xen:phrase none})</option>
	<xen:foreach loop="$nodes" value="$node">
		<option value="{$node.node_id}" {xen:selected 'in_array({$node.node_id}, {$selNodeIds})'} {xen:if "{$node.node_type_id} != 'Forum'", 'disabled="disabled"'}>{xen:string repeat, '&nbsp; ', $node.depth}{$node.title}</option>
	</xen:foreach>
</select>]]></template>
  <template title="thread_prefix_helper_user_groups"><![CDATA[<xen:radio name="usable_user_group_type">
	<xen:option value="all" selected="{$allUserGroups}">{xen:phrase all_user_groups}</xen:option>
	<xen:option value="sel" selected="!{$allUserGroups}" label="{xen:phrase selected_user_groups}:">
		<xen:disabled>
			<xen:checkbox name="user_group_ids" listclass="checkboxColumns">
				<xen:foreach loop="$userGroups" value="$userGroup">
					<xen:option value="{$userGroup.user_group_id}" selected="in_array({$userGroup.user_group_id}, {$selUserGroupIds})">{$userGroup.title}</xen:option>
				</xen:foreach>
			</xen:checkbox>
			<label class="muted"><input type="checkbox" checked="checked" class="CheckAll" data-target="#ctrl_usable_user_group_type_sel_Disabler" /> <i>{xen:phrase select_all}</i></label>
		</xen:disabled>
	</xen:option>
</xen:radio>]]></template>
  <template title="thread_prefix_list"><![CDATA[<xen:title>{xen:phrase thread_prefixes}</xen:title>

<xen:topctrl>
	<a href="{xen:adminlink thread-prefixes/add}" class="button">+ {xen:phrase create_new_thread_prefix}</a>
	<a href="{xen:adminlink thread-prefixes/add-group}" class="button OverlayTrigger">+ {xen:phrase create_new_thread_prefix_group}</a>
</xen:topctrl>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<xen:form action="{xen:adminlink thread-prefixes/quick-set}" id="prefixBrowser">
	<xen:if is="{$prefixGroups}">
	
		<div class="section">
	
			<h2 class="subHeading">
				<xen:include template="filter_list_controls" />
				{xen:phrase thread_prefixes}
			</h2>
	
			<ol class="FilterList Scrollable" id="PrefixList">
				<xen:foreach loop="$prefixGroups" key="$prefixGroupId" value="$prefixes">
					<li>
						<h3 class="textHeading" id="{xen:helper listitemid, 'group_{$prefixGroupId}'}">
							<xen:if is="{$prefixGroupId}">{xen:helper threadPrefixGroup, $prefixGroupId}<xen:else />({xen:phrase ungrouped})</xen:if>
							<xen:if is="{$prefixes}"><label class="Tooltip checkAllColumn" title="{xen:phrase select_all_items_in_this_group}"><input type="checkbox" class="CheckAll" data-target="#prefixGroup{$prefixGroupId}" /></label></xen:if>
							<xen:if is="{$prefixGroupId}"><a href="{xen:adminlink 'thread-prefixes/edit-group', '', 'prefix_group_id={$prefixGroupId}'}" class="edit controls OverlayTrigger" title="{xen:phrase edit}..."><span>{xen:phrase edit}</span></a></xen:if>
						</h3>
						<xen:if is="{$prefixes}">
							<ol id="prefixGroup{$prefixGroupId}">
								<xen:foreach loop="$prefixes" value="$prefix">
									<xen:listitem
										id="{$prefix.prefix_id}"
										label="{$prefix.title}"
										href="{xen:adminlink 'thread-prefixes/edit', $prefix}"
										delete="{xen:adminlink 'thread-prefixes/delete', $prefix}">
										<xen:html><label class="secondaryContent"><input type="checkbox" name="prefix_ids[]" value="{$prefix.prefix_id}" /></label></xen:html>
									</xen:listitem>
								</xen:foreach>
							</ol>
						</xen:if>
					</li>
				</xen:foreach>
			</ol>
	
			<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:number $prefixCount}</span>', 'total={xen:number $prefixCount}'}</p>
		
		</div>
		
		<div class="footerControls">
			<div class="scrollSide">
				<label class="footerControl"><input type="checkbox" class="CheckAll" data-target="#PrefixList" /> {xen:phrase select_all}</label>
				<input type="submit" value="{xen:phrase quick_set_selected_items}" class="button OverlayTrigger footerControl" />
			</div>
		</div>

	<xen:else />
		<div class="noResults">{xen:phrase no_thread_prefixes_have_been_added_yet}</div>
	</xen:if>
</xen:form>]]></template>
  <template title="thread_prefix_quickset_editor"><![CDATA[<xen:title>{xen:phrase quick_set_thread_prefixes}</xen:title>

<xen:require css="public:thread_prefixes.css" />

<xen:if is="{$prefix.prefix_id}">
	<xen:navigation>
		<xen:breadcrumb href="{xen:adminlink thread-prefixes}#{xen:helper listitemid, $prefix.prefix_id}">{$masterTitle}</xen:breadcrumb>
	</xen:navigation>
</xen:if>

<xen:form action="{xen:adminlink thread-prefixes/quick-set}">

	<xen:controlunit label="{xen:phrase apply_options_to_these_prefixes}:">
		<ul>
			<xen:foreach loop="$prefixes" key="$_prefixId" value="$_prefix">
				<li style="float: left; margin-right: 5px;"><label class="{$_prefix.css_class}"><input type="checkbox" name="prefix_ids[]" value="{$_prefixId}" checked="checked" /> {$_prefix.title}</label></li>
			</xen:foreach>
		</ul>
	</xen:controlunit>

	<ul class="tabs Tabs" data-panes="#prefixPanes > li">
		<li class="active"><a>{xen:phrase basic_information}</a></li>
		<li><a>{xen:phrase forums_and_permissions}</a></li>
	</ul>

	<ul id="prefixPanes">
		<li>
			<xen:checkboxunit label="{xen:phrase display_styling}:">
				<xen:option name="apply_css_class" label="{xen:phrase apply_display_styling_options}:">
					<xen:disabled>			
						<xen:include template="thread_prefix_helper_css_class" />
					</xen:disabled>
				</xen:option>
			</xen:checkboxunit>
		
			<fieldset>
				<xen:checkboxunit label="{xen:phrase thread_prefix_group}:">
					<xen:option name="apply_prefix_group_id" label="{xen:phrase apply_thread_prefix_group_options}:">
						<xen:select name="prefix_group_id" value="{$prefix.prefix_group_id}">
							<xen:option value="0" label="({xen:phrase none})" />
							<xen:options source="$prefixGroupOptions" />
						</xen:select>
					</xen:option>
				</xen:checkboxunit>
			</fieldset>
		</li>
		<li>
			<xen:checkboxunit label="{xen:phrase usable_by_user_groups}:">
				<xen:option name="apply_user_group_ids" label="{xen:phrase apply_user_group_options}:">
					<xen:disabled>			
						<xen:include template="thread_prefix_helper_user_groups" />
					</xen:disabled>
				</xen:option>
			</xen:checkboxunit>
		
			<fieldset>
				<xen:checkboxunit label="{xen:phrase applicable_forums}:">
					<xen:option name="apply_node_ids" label="{xen:phrase apply_forum_options}:">
						<xen:disabled>			
							<xen:include template="thread_prefix_helper_forums" />
						</xen:disabled>
					</xen:option>
				</xen:checkboxunit>
			</fieldset>
		</li>
	</ul>
	
	<xen:submitunit save="{xen:phrase quick_set_thread_prefixes}" />
	
	<xen:if is="{$prefix.prefix_id}">
		<input type="hidden" name="prefix_id" value="{$prefix.prefix_id}" />
	</xen:if>
	
	<input type="hidden" name="_xfConfirm" value="1" />

</xen:form>]]></template>
  <template title="thread_prefix_quickset_prefix_chooser"><![CDATA[<xen:title>{xen:phrase quick_set_thread_prefixes}</xen:title>

<xen:form action="{xen:adminlink thread-prefixes/quick-set}">
	
	<xen:selectunit name="prefix_id" label="{xen:phrase copy_settings_from}:">
		<xen:option value="-1">({xen:phrase none})</xen:option>
		<xen:options source="$prefixOptions" />
		<xen:explain>{xen:phrase on_next_page_you_may_apply_settings_to_all_selected_prefixes}</xen:explain>
	</xen:selectunit>
	
	<xen:submitunit save="{xen:phrase proceed}..." />
	
	<xen:foreach loop="$prefixIds" value="$prefixId">
		<input type="hidden" name="prefix_ids[]" value="{$prefixId}" />
	</xen:foreach>

</xen:form>]]></template>
  <template title="thread_reply_ban_delete"><![CDATA[<xen:title>{xen:phrase delete_reply_ban}</xen:title>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'threads/reply-bans/delete', '', 'thread_id={$thread.thread_id}', 'user_id={$user.user_id}'}" class="deleteConfirmForm formOverlay">

	<p>{xen:phrase please_confirm_that_you_want_to_delete_following_reply_ban}:</p>
	<strong>{$thread.title} - {$user.username}</strong>

	<xen:submitunit save="{xen:phrase delete_reply_ban}" />
	
	<input type="hidden" name="_xfConfirm" value="1" />
</xen:form>]]></template>
  <template title="thread_reply_ban_list"><![CDATA[<xen:title>{xen:phrase thread_reply_bans}</xen:title>

<xen:topctrl>
	<form action="{xen:adminlink threads/reply-bans}" method="post">
		<input type="search" name="username" value="{$user.username}" class="textCtrl AutoComplete AcSingle" results="10" size="20" placeholder="{xen:phrase user_name}..." />
		<input type="submit" value="{xen:phrase filter}" class="button" />
		<input type="hidden" name="_xfToken" value="{$visitor.csrf_token_page}" />
	</form>
</xen:topctrl>

<xen:if is="{$bans}">
	<table class="dataTable">
	<col style="width: 19%" />
	<col style="width: 30%" />
	<col style="width: 30%" />
	<col style="width: 19%" />
	<col style="width: 1%" />

	<tr class="dataRow">
		<th>{xen:phrase user}</th>
		<th>{xen:phrase thread}</th>
		<th>{xen:phrase reason}</th>
		<th>{xen:phrase end_date}</th>
		<th>&nbsp;</th>
	</tr>
	<xen:foreach loop="$bans" value="$ban">
		<tr class="dataRow">
			<td><a href="{xen:adminlink users/edit, $ban}">{$ban.username}</a></td>
			<td><span class="Tooltip" title="{xen:phrase forum}: {$ban.node_title}"><a href="{xen:link threads, $ban}">{$ban.title}</a></span></td>
			<td><span class="Tooltip" title="{xen:phrase by_x, 'name={$ban.ban_username}'}, {xen:date $ban.ban_date}"><xen:if is="{$ban.reason}">{$ban.reason}<xen:else />{xen:phrase n_a}</xen:if></span></td>
			<td><xen:if is="{$ban.expiry_date}">{xen:date $ban.expiry_date}<xen:else />{xen:phrase permanent}</xen:if></td>
			<td class="delete"><a href="{xen:adminlink threads/reply-bans/delete, '', 'thread_id={$ban.thread_id}', 'user_id={$ban.user_id}'}" class="OverlayTrigger" title="{xen:phrase delete}...">{xen:phrase delete}</a></td>
		</tr>
	</xen:foreach>
	<tr>
		<td colspan="5" class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count={xen:count $bans}', 'total={xen:number $totalBans}'}</td>
	</tr>
	</table>

	{xen:adminpagenav $perPage, $totalBans, $page, threads/reply-bans, null, '_params={$linkParams}'}
<xen:else />
	<div class="noResults">{xen:phrase no_results_found}</div>
</xen:if>]]></template>
  <template title="tools_cache_rebuild"><![CDATA[<xen:title>{xen:phrase rebuilding_caches}...</xen:title>

<xen:require js="js/xenforo/cache_rebuild.js" />
	
<xen:topctrl>
	<a href="{xen:if $elements.redirect, $elements.redirect, {xen:adminlink index}}" class="button" id="ExitLink"{xen:if "!{$showExitLink}", ' style="display: none"'}>{xen:phrase stop_rebuilding}</a>
</xen:topctrl>

<xen:form action="{xen:adminlink tools/cache-rebuild}" class="CacheRebuild">
	
	<p id="ProgressText">{xen:phrase rebuilding}... <span class="RebuildMessage">{$rebuildMessage}</span> <span class="DetailedMessage">{$detailedMessage}</span></p>
	<p id="ErrorText" style="display: none">{xen:phrase error_occurred_or_request_stopped}</p>
	
	<input type="hidden" name="process" value="1" />
	<xen:foreach loop="$elements" key="$name" value="$value">
		<input type="hidden" name="{$name}" value="{$value}" />
	</xen:foreach>
	
	<input type="submit" class="button" value="{xen:phrase continue_rebuilding}" />
	
</xen:form>]]></template>
  <template title="tools_file_check"><![CDATA[<xen:title>{xen:phrase file_health_check}</xen:title>

<xen:if is="{$form}">

	<xen:form action="{xen:adminlink tools/file-check}">
	
		<blockquote class="baseHtml">{xen:phrase file_health_check_description, 'button={xen:phrase file_health_check}'}</blockquote>
		
		<xen:submitunit save="{xen:phrase file_health_check}" />
	
	</xen:form>

<xen:else />
	<xen:if is="{$errors}">

		<xen:require css="filter_list.css" />
		<xen:require js="js/xenforo/filter_list.js" />

		<div class="section">
		
			<h2 class="subHeading">
				{xen:phrase potential_problems}
			</h2>
		
			<ol class="FilterList secondRow">
				<xen:foreach loop="$errors" key="$file" value="$error" i="$i">
					<xen:listitem id="{$i}">
						<xen:label>{$file} <span class="secondRow muted">
							{xen:if "{$error} == 'mismatch'",
								{xen:phrase file_contents_unexpected},
								{xen:phrase file_not_found}
							}</span>
						</xen:label>
					</xen:listitem>
				</xen:foreach>
			</ol>
		
			<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:count $errors}</span>', 'total={xen:count $errors}'}</p>
		
		</div>
			
	<xen:else />
	
		<p style="display: inline-block; line-height: 18px; padding-right: 20px; background: transparent url('{xen:property imagePath}/xenforo/smilies/smile.png') no-repeat right">{xen:phrase file_health_check_okay, 'numFiles={xen:count $hashes}'}</p>
		
		
	
	</xen:if>
</xen:if>]]></template>
  <template title="tools_rebuild"><![CDATA[<xen:title>{xen:phrase rebuild_caches}</xen:title>

<xen:if is="{$success}">
	<p class="importantMessage">{xen:phrase cache_rebuilt_successfully}</p>
</xen:if>

<xen:form action="{xen:adminlink 'tools/trigger-deferred'}">
	<h2 class="subHeading">{xen:phrase rebuild_search_index}</h2>
	<xen:selectunit name="options[content_type]" value="" label="{xen:phrase build_content_type}:">
		<xen:option value="">({xen:phrase all})</xen:option>
		<xen:options source="$searchContentTypes" />
	</xen:selectunit>
	<xen:checkboxunit label="">
		<xen:option name="options[delete_index]">{xen:phrase delete_index_before_rebuilding}</xen:option>
	</xen:checkboxunit>
	<xen:spinboxunit name="options[batch]" value="500" step="50" min="1" label="{xen:phrase items_to_process_per_page}:" />
	<xen:textboxunit name="options[delay]" value="0" step="0.1" min="0" size="20" inputclass="number" label="{xen:phrase page_delay_in_seconds}:">
		<xen:explain>{xen:phrase allows_delay_each_page_load_by_specified_length_of_time}</xen:explain>
	</xen:textboxunit>
	
	<xen:submitunit save="{xen:phrase rebuild_now}" />
	<input type="hidden" name="cache" value="SearchIndex" />
</xen:form>

<xen:form action="{xen:adminlink 'tools/trigger-deferred'}">
	<h2 class="subHeading">{xen:phrase rebuild_xml_sitemap}</h2>
	<p class="section">{xen:phrase sitemap_contents_can_be_controlled_via_options}</p>

	<xen:submitunit save="{xen:phrase rebuild_now}" />
	<input type="hidden" name="cache" value="Sitemap" />
</xen:form>

<xen:form action="{xen:adminlink 'tools/trigger-deferred'}">
	<h2 class="subHeading">{xen:phrase rebuild_thread_information}</h2>
	<xen:spinboxunit name="options[batch]" value="250" step="50" min="1" label="{xen:phrase items_to_process_per_page}:" />
	<xen:checkboxunit label="">
		<xen:option name="options[positionRebuild]" value="1">
			<xen:label>{xen:phrase rebuild_position_and_post_counters}</xen:label>
			<xen:hint>{xen:phrase will_slow_process_down_only_needed_if_posts_in_incorrect_order}</xen:hint>
		</xen:option>
	</xen:checkboxunit>
	
	<xen:submitunit save="{xen:phrase rebuild_now}" />
	<input type="hidden" name="cache" value="Thread" />
</xen:form>

<xen:form action="{xen:adminlink 'tools/trigger-deferred'}">
	<h2 class="subHeading">{xen:phrase rebuild_attachment_thumbnails}</h2>
	<xen:spinboxunit name="options[batch]" value="200" step="10" min="1" label="{xen:phrase items_to_process_per_page}:" />
	
	<xen:submitunit save="{xen:phrase rebuild_now}" />
	<input type="hidden" name="cache" value="AttachmentThumb" />
</xen:form>

<xen:form action="{xen:adminlink 'tools/trigger-deferred'}">
	<h2 class="subHeading">{xen:phrase rebuild_poll_information}</h2>
	<xen:spinboxunit name="options[batch]" value="250" step="50" min="1" label="{xen:phrase items_to_process_per_page}:" />
	
	<xen:submitunit save="{xen:phrase rebuild_now}" />
	<input type="hidden" name="cache" value="Poll" />
</xen:form>

<xen:form action="{xen:adminlink 'tools/trigger-deferred'}">
	<h2 class="subHeading">{xen:phrase rebuild_forum_information}</h2>
	<xen:spinboxunit name="options[batch]" value="20" step="5" min="1" label="{xen:phrase items_to_process_per_page}:" />
	
	<xen:submitunit save="{xen:phrase rebuild_now}" />
	<input type="hidden" name="cache" value="Forum" />
</xen:form>

<xen:form action="{xen:adminlink 'tools/trigger-deferred'}">
	<h2 class="subHeading">{xen:phrase rebuild_user_caches}</h2>
	<xen:spinboxunit name="options[batch]" value="100" step="50" min="1" label="{xen:phrase items_to_process_per_page}:" />

	<xen:submitunit save="{xen:phrase rebuild_now}" />
	<input type="hidden" name="cache" value="User" />
</xen:form>

<xen:form action="{xen:adminlink 'tools/trigger-deferred'}">
	<h2 class="subHeading">{xen:phrase rebuild_trophies}</h2>
	<xen:spinboxunit name="options[batch]" value="100" step="50" min="1" label="{xen:phrase items_to_process_per_page}:" />

	<xen:submitunit save="{xen:phrase rebuild_now}" />
	<input type="hidden" name="cache" value="Trophy" />
</xen:form>

<xen:form action="{xen:adminlink 'tools/trigger-deferred'}">
	<h2 class="subHeading">{xen:phrase rebuild_user_group_promotions}</h2>
	<xen:spinboxunit name="options[batch]" value="100" step="50" min="1" label="{xen:phrase items_to_process_per_page}:" />

	<xen:submitunit save="{xen:phrase rebuild_now}" />
	<input type="hidden" name="cache" value="UserGroupPromotion" />
</xen:form>

<xen:form action="{xen:adminlink 'tools/trigger-deferred'}">
	<h2 class="subHeading">{xen:phrase rebuild_conversations}</h2>
	<xen:spinboxunit name="options[batch]" value="100" step="50" min="1" label="{xen:phrase items_to_process_per_page}:" />

	<xen:submitunit save="{xen:phrase rebuild_now}" />
	<input type="hidden" name="cache" value="Conversation" />
</xen:form>

<xen:form action="{xen:adminlink 'tools/trigger-deferred'}">
	<h2 class="subHeading">{xen:phrase rebuild_daily_statistics}</h2>
	<xen:spinboxunit name="options[batch]" value="28" step="28" min="1" label="{xen:phrase days_to_process_per_page}:" />
	<xen:checkboxunit label="">
		<xen:option name="options[delete]">
			<xen:label>{xen:phrase delete_existing_cached_data}</xen:label>
			<xen:hint>{xen:phrase some_data_can_not_be_rebuilt}</xen:hint>
		</xen:option>
	</xen:checkboxunit>

	<xen:submitunit save="{xen:phrase rebuild_now}" />
	<input type="hidden" name="cache" value="DailyStats" />
</xen:form>

<xen:form action="{xen:adminlink 'tools/clean-up-permissions'}">
	<h2 class="subHeading">{xen:phrase clean_up_permissions}</h2>
	<p class="section">{xen:phrase this_will_clean_up_permission_combinations_no_longer_in_use}</p>

	<xen:submitunit save="{xen:phrase run}" />
</xen:form>]]></template>
  <template title="tools_run_deferred"><![CDATA[<xen:title>{xen:phrase processing}...</xen:title>
<xen:if is="{$canCancel}">
	<xen:topctrl><a href="javascript:" id="CancelDeferred" data-cancelling="{xen:phrase cancelling}..." class="button">{xen:phrase cancel}</a></xen:topctrl>
</xen:if>

<xen:form action="{xen:adminlink tools/run-deferred}" id="DeferredForm" class="AutoSubmit">
	
	<div><xen:if is="{$status}">{$status}<xen:else />{xen:phrase processing}...</xen:if></div>
		
	<input type="submit" class="button" value="{xen:phrase continue_rebuilding}" />
	
	<input type="hidden" name="redirect" value="{$redirect}" />
	<input type="hidden" name="execute" value="1" />
	
</xen:form>

<script>
$(function() {
	$('#CancelDeferred').click(function(e) {
		e.preventDefault();
		$.setCookie('cancel_defer', '1');
		$(this).text($(this).data('cancelling'));
	});

	if ($.getCookie('cancel_defer'))
	{
		$('#CancelDeferred').text($('#CancelDeferred').data('cancelling'));
	}
});
</script>]]></template>
  <template title="tools_splash"><![CDATA[<xen:title>{xen:phrase tools}</xen:title>

<xen:topctrl></xen:topctrl>

<xen:require css="splash.css" />

<div class="splash">
	<div class="iconicContainer">
	<ul class="iconic">
	
	<xen:hook name="admin_icons_tools">
	
	<xen:if is="{$canManageCron}">
		<li><a href="{xen:adminlink 'cron'}" class="cron">
			<span class="icon"><span></span></span>
			<span class="linkText">{xen:phrase cron_entries}</span>
			</a></li>
	</xen:if>
	
	<!-- slot: pre_rebuild_caches -->

	<xen:if is="{$canRebuildCache}">
		<li><a href="{xen:adminlink 'tools/rebuild'}" class="tools_rebuild">
			<span class="icon"><span></span></span>
			<span class="linkText">{xen:phrase rebuild_caches}</span>
			</a></li>
	</xen:if>
	
	<!-- slot: pre_facebook_test -->

	<li><a href="{xen:adminlink 'tools/test-facebook'}" class="facebook_test">
		<span class="icon"><span></span></span>
		<span class="linkText">{xen:phrase test_facebook_integration}</span>
		</a></li>

	<!-- slot: pre_captcha_questions -->

	<xen:if is="{$canCaptcha}">	
		<li><a href="{xen:adminlink 'captcha-questions'}" class="qacaptcha">
			<span class="icon"><span></span></span>
			<span class="linkText">{xen:phrase question_and_answer_captchas}</span>
			</a></li>
	</xen:if>

	<!-- slot: pre_server_error_log -->

	<xen:if is="{$canViewLogs}">
		<li><a href="{xen:adminlink 'logs/server-error'}" class="server_error_log">
			<span class="icon"><span></span></span>
			<span class="linkText">{xen:phrase server_error_log}</span>
			</a></li>
	</xen:if>
	
	<xen:if is="{$canImport}">
		<!-- slot: pre_import -->
	
		<li><a href="{xen:adminlink 'import'}" class="import">
			<span class="icon"><span></span></span>
			<span class="linkText">{xen:phrase import_external_data}</span>
			</a></li>
	</xen:if>
	
	</xen:hook>
	
	</ul>
	</div>

	<div class="sidebar"><xen:hook name="admin_sidebar_tools" /></div>
	
</div>]]></template>
  <template title="tools_test_facebook"><![CDATA[<xen:title>{xen:phrase test_facebook_integration}</xen:title>

<xen:if is="{$fbInfo}">
	<xen:form action="">
		<h2 class="subHeading">{xen:phrase test_passed}</h2>
		<xen:controlunit label="{xen:phrase name}:">{$fbInfo.name}</xen:controlunit>
		<xen:controlunit label="{xen:phrase email}:">{$fbInfo.email}</xen:controlunit>
		<xen:controlunit label="{xen:phrase picture}:"><img src="https://graph.facebook.com/me/picture?type=small&amp;access_token={$userToken}" alt="" /></xen:controlunit>
	</xen:form>
<xen:else />
	<xen:form action="{xen:adminlink tools/test-facebook}">
		<p class="dimmed">{xen:phrase this_will_test_xenforo_facebook_integration}</p>
		<xen:controlunit label="{xen:phrase facebook_application_id}:">{$xenOptions.facebookAppId}</xen:controlunit>
		<xen:submitunit><a href="{xen:adminlink tools/test-facebook, '', 'test=1'}" class="button primary" accesskey="s">{xen:phrase run_test}</a></xen:submitunit>
	</xen:form>
</xen:if>]]></template>
  <template title="tools_test_image_proxy"><![CDATA[<xen:title>{xen:phrase test_image_proxy}</xen:title>
<xen:description>{xen:phrase tool_helps_diagnose_errors_relating_to_image_proxy_system}</xen:description>

<xen:form action="{xen:adminlink tools/test-image-proxy}">
	<xen:if is="{$results}">
		<xen:if is="{$results.failed}">
			<div class="errorPanel"><div class="errors">
				{xen:phrase url_x_could_not_be_fetched_or_is_not_valid_image_error_y, 'url={$url}', 'error={$results.error}'}
			</div></div>
		<xen:else />
			<div class="importantMessage">{xen:phrase url_x_was_fetched_successfully, 'url={$url}'}</div>
		</xen:if>
	</xen:if>

	<xen:textboxunit label="URL:" type="url" name="url" value="{$url}" />
	<xen:submitunit save="{xen:phrase run_test}" />
	
	<input type="hidden" name="_xfConfirm" value="1" />
</xen:form>]]></template>
  <template title="tools_test_twitter"><![CDATA[<xen:title>{xen:phrase test_twitter_integration}</xen:title>

<xen:if is="{$twitterInfo}">
	<xen:form action="">
		<h2 class="subHeading">{xen:phrase test_passed}</h2>
		<xen:controlunit label="{xen:phrase name}:">{$twitterInfo.name}, @{$twitterInfo.screen_name}</xen:controlunit>
		<xen:controlunit label="{xen:phrase picture}:"><img src="{$twitterInfo.profile_image_url_https}" alt="" /></xen:controlunit>
	</xen:form>
<xen:else />
	<xen:form action="{xen:adminlink tools/test-twitter}">
		<p class="dimmed">{xen:phrase this_will_test_xenforo_twitter_integration}</p>
		<xen:controlunit label="{xen:phrase option_twitterAppKey}:">{$xenOptions.twitterAppKey}</xen:controlunit>
		<xen:submitunit><a href="{xen:adminlink tools/test-twitter, '', 'test=1'}" class="button primary" accesskey="s">{xen:phrase run_test}</a></xen:submitunit>
	</xen:form>
</xen:if>]]></template>
  <template title="trophy_delete"><![CDATA[<xen:title>{xen:phrase confirm_deletion_of_trophy}: {$trophy.title}</xen:title>
<xen:h1>{xen:phrase confirm_deletion_of_trophy}</xen:h1>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'trophies/edit', $trophy}">{$trophy.title}</xen:breadcrumb>
</xen:navigation>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'trophies/delete', $trophy}" class="deleteConfirmForm">
	<p>{xen:phrase please_confirm_that_you_want_to_delete_following_trophy}:</p>
	<strong><a href="{xen:adminlink 'trophies/edit', $trophy}">{$trophy.title}</a></strong>

	<xen:submitunit save="{xen:phrase delete_trophy}" />

	<input type="hidden" name="_xfConfirm" value="1" />
</xen:form>]]></template>
  <template title="trophy_edit"><![CDATA[<xen:title>{xen:if {$trophy.trophy_id}, '{xen:phrase edit_trophy}: {$trophy.title}', '{xen:phrase create_new_trophy}'}</xen:title>

<xen:if is="{$trophy.trophy_id}">
	<xen:navigation>
		<xen:breadcrumb href="{xen:adminlink trophies}#{xen:helper listitemid, $trophy.trophy_id}">{$trophy.title}</xen:breadcrumb>
	</xen:navigation>
</xen:if>

<xen:form action="{xen:adminlink 'trophies/save', $trophy}" class="AutoValidator" data-redirect="yes">

	<ul class="tabs Tabs" data-panes="#trophyPanes > li">
		<li class="active"><a>{xen:phrase trophy_options}</a></li>
		<li><a>{xen:phrase award_this_trophy_if}</a></li>
		<li><a>{xen:phrase custom_userfield_criteria}</a></li>
	</ul>
	
	<ul id="trophyPanes">
		<li>
			<xen:textboxunit label="{xen:phrase title}:" name="title" value="{$masterTitle}" data-livetitletemplate="{xen:if {$trophy.trophy_id},
				'{xen:phrase edit_trophy}: <em>%s</em>',
				'{xen:phrase create_new_trophy}: <em>%s</em>'}" />
				
			<xen:spinboxunit label="{xen:phrase trophy_points}:" name="trophy_points" value="{$trophy.trophy_points}" min="0" size="8">
				<xen:explain>{xen:phrase points_can_be_used_track_progression_and_change_title}</xen:explain>
			</xen:spinboxunit>
		
			<xen:textboxunit label="{xen:phrase description}:" name="description" value="{$masterDescription}" rows="2" inputclass="Elastic">
				<xen:hint>{xen:phrase you_may_use_html}</xen:hint>
				<xen:explain>{xen:phrase optionally_describe_trophy_and_criteria_user_needs_to_award}</xen:explain>
			</xen:textboxunit>	
		</li>
		<li>
			<xen:include template="helper_criteria_user" />
			<xen:include template="helper_criteria_user_date">
				<xen:set var="$noDateFields">1</xen:set>
			</xen:include>
		<li><xen:include template="helper_criteria_user_field" /></li>
		</li>
	</ul>
	
	<xen:submitunit save="{xen:phrase save_trophy}">
		<xen:if is="{$trophy.trophy_id}">
			<input type="button" value="{xen:phrase delete_trophy}..." accesskey="d" class="button OverlayTrigger"
				data-href="{xen:adminlink 'trophies/delete', $trophy}" /></xen:if>
	</xen:submitunit>
</xen:form>]]></template>
  <template title="trophy_list"><![CDATA[<xen:title>{xen:phrase trophies}</xen:title>

<xen:topctrl>
	<a href="{xen:adminlink 'trophies/add'}" class="button">+ {xen:phrase create_new_trophy}</a>
</xen:topctrl>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<xen:form action="{xen:adminlink trophies}" class="section">

	<xen:if is="{$trophies}">

		<h2 class="subHeading">
		<xen:include template="filter_list_controls" />
			{xen:phrase trophies}
		</h2>

		<ol class="FilterList">
		<xen:foreach loop="$trophies" value="$trophy">
			<xen:listitem
				id="{$trophy.trophy_id}"
				label="{$trophy.title}"
				href="{xen:adminlink trophies/edit, $trophy}"
				snippet="{xen:phrase points}: {xen:number $trophy.trophy_points}"
				delete="{xen:adminlink trophies/delete, $trophy}"
			/>
		</xen:foreach>
		</ol>

		<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:count $trophies}</span>', 'total={xen:count $trophies}'}</p>
	
	<xen:else />
		<div class="noResults">{xen:phrase no_trophies_have_been_defined_yet}</div>
	</xen:if>
</xen:form>]]></template>
  <template title="user_avatar"><![CDATA[<xen:title>{xen:phrase avatar_editor}: {$user.username}</xen:title>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'users/edit', $user}">{$user.username}</xen:breadcrumb>
</xen:navigation>

<xen:form action="{xen:adminlink 'users/avatar-upload', $user}" upload="true">
	<fieldset>
		<xen:controlunit label="{xen:phrase current_avatar}:">
			<img src="{xen:helper avatar, {$user}, m}" alt="{xen:phrase avatar}" />
		</xen:controlunit>

		<xen:if is="{$user.avatar_date} OR {$user.gravatar}">
			<xen:checkboxunit label="">
				<xen:option name="delete">{xen:phrase delete_current_avatar}</xen:option>
			</xen:checkboxunit>
		</xen:if>
	</fieldset>
		
	<xen:uploadunit label="{xen:phrase upload_avatar}:" name="avatar" />

	<xen:submitunit save="{xen:phrase modify_avatar}" />
</xen:form>]]></template>
  <template title="user_batch_update_confirm"><![CDATA[<xen:title>{xen:phrase batch_update_users}</xen:title>

<xen:form action="{xen:adminlink users/batch-update}">
	<xen:controlunit label="{xen:phrase matched_users}:">
		{$totalUsers} <xen:if is="!{$userIds}">(<a href="{xen:adminlink users/list, '', '_params={$linkParams}', 'all=1'}">{xen:phrase view_or_filter_matches}</a>)</xen:if>
	</xen:controlunit>

	<h3 class="textHeading">{xen:phrase update_actions}</h3>

	<xen:selectunit label="{xen:phrase set_primary_user_group}:" name="actions[set_primary_group_id]">
		<xen:option value="0"></xen:option>
		<xen:options source="$userGroups" />
	</xen:selectunit>

	<xen:selectunit label="{xen:phrase add_secondary_user_group}:" name="actions[add_group_id]">
		<xen:option value="0"></xen:option>
		<xen:options source="$userGroups" />
	</xen:selectunit>

	<xen:selectunit label="{xen:phrase remove_secondary_user_group}:" name="actions[remove_group_id]">
		<xen:option value="0"></xen:option>
		<xen:options source="$userGroups" />
	</xen:selectunit>

	<xen:textboxunit label="{xen:phrase set_custom_title}:" name="actions[custom_title]" />

	<xen:checkboxunit label="">
		<xen:option name="actions[discourage]" value="1">{xen:phrase discourage_users}</xen:option>
		<xen:option name="actions[undiscourage]" value="1">{xen:phrase undiscourage_users}</xen:option>
		<xen:option name="actions[ban]" value="1">{xen:phrase ban_users_permanently}</xen:option>
		<xen:option name="actions[unban]" value="1">{xen:phrase unban_users}</xen:option>
		<xen:option name="actions[remove_avatar]" value="1">{xen:phrase remove_avatars}</xen:option>
		<xen:option name="actions[remove_signature]" value="1">{xen:phrase remove_signatures}</xen:option>
		<xen:option name="actions[remove_homepage]" value="1">{xen:phrase remove_home_pages}</xen:option>
	</xen:checkboxunit>

	<xen:submitunit save="{xen:phrase update_users}" explain="{xen:phrase super_admins_will_not_be_updated}" />

	<input type="hidden" name="_xfConfirm" value="1" />
	<input type="hidden" name="confirmUpdate" value="1" />
	<input type="hidden" name="criteria" value="{xen:escape {xen:helper json, $criteria}}" />
	<input type="hidden" name="user_ids" value="{xen:escape {xen:helper json, $userIds}}" />
</xen:form>

<xen:form action="{xen:adminlink users/batch-update}">
	<h3 class="textHeading">{xen:phrase delete_users}</h3>

	<xen:checkboxunit label="">
		<xen:option name="actions[delete]" value="1" hint="{xen:phrase administrators_and_moderators_will_not_be_deleted}">{xen:phrase confirm_deletion_of_x_users, 'totalUsers={$totalUsers}'}</xen:option>
	</xen:checkboxunit>

	<xen:submitunit save="{xen:phrase delete_users}" />

	<input type="hidden" name="_xfConfirm" value="1" />
	<input type="hidden" name="confirmUpdate" value="1" />
	<input type="hidden" name="criteria" value="{xen:escape {xen:helper json, $criteria}}" />
	<input type="hidden" name="user_ids" value="{xen:escape {xen:helper json, $userIds}}" />
</xen:form>]]></template>
  <template title="user_batch_update_search"><![CDATA[<xen:title>{xen:phrase batch_update_users}</xen:title>

<xen:if is="{$success}">
	<p class="importantMessage">{xen:phrase batch_update_was_completed_successfully}</p>
</xen:if>

<xen:form action="{xen:adminlink users/batch-update}">
	<xen:include template="helper_user_search_criteria" />
	
	<xen:submitunit save="{xen:phrase search}" />
	<input type="hidden" name="_xfConfirm" value="1" />
</xen:form>]]></template>
  <template title="user_change_log"><![CDATA[<xen:title><xen:if is="{$editUser}">
	{xen:phrase user_change_logs_by_x, 'username={$editUser.username}'}<xen:else />
	{xen:phrase user_change_logs}</xen:if></xen:title>
	
<xen:topctrl>
	<xen:form action="{xen:adminlink 'logs/user-change-log'}">
		<xen:textbox name="username" inputclass="quickSearchText AutoComplete AcSingle" placeholder="{xen:phrase user_name}..." type="search" results="5" value="{$editUser.username}" />
		<input type="submit" class="button primary quickSearchButton" value="{xen:phrase show_changes_made_by_user}" />
	</xen:form>
</xen:topctrl>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />
<xen:require css="user_change_log.css" />

<xen:if is="{$logs}">
	<table class="dataTable userChangeLogs" style="table-layout: fixed">
	<tr class="dataRow">
		<th width="48"></th>
		<th width="120">{xen:phrase field_name}</th>
		<th width="50%">{xen:phrase old_value}</th>
		<th width="50%">{xen:phrase new_value}</th>
	</tr>
	<xen:foreach loop="$logs" value="$log">
		<tr class="dataRow secondaryContent">
			<td rowspan="{xen:calc '{xen:count $log.fields} + 1'}" valign="top" width="48"><img src="{xen:helper avatar, $log.user, s}" alt="" class="_listAvatar" /></td>
			<td colspan="3" class="logHeader"><label class="muted" for="_{$log.edit_date}"><xen:datetime time="$log.edit_date" /></label><a href="{xen:adminlink users/edit, $log.user}">{$log.user.username}</a><xen:if is="{$log.editUser.user_id} != {$log.user.user_id}">, {xen:phrase edited_by_x, 'name=<a href="{xen:adminlink users/edit, $log.editUser}">{$log.editUser.username}</a>'}</xen:if></td>
		</tr>
		<xen:foreach loop="$log.fields" value="$field">
			<tr class="dataRow">
				<td class="logField">{$field.name} </td>
				<td>{$field.old_value}</td>
				<td>{$field.new_value}</td>
			</tr>
		</xen:foreach>
	</xen:foreach>
	<tr>
		<td colspan="4" class="sectionFooter">&nbsp;</td>
	</tr>
	</table>

	<xen:adminpagenav page="{$page}" perpage="{$perPage}" total="{$total}" link="logs/user-change-log" linkparams="{$pageNavParams}" />
<xen:else />
	<div class="noResults">{xen:phrase no_changes_have_been_logged}</div>
</xen:if>]]></template>
  <template title="user_change_log.css"><![CDATA[.userChangeLogs .logHeader
{
	font-size: 11px;
}

.userChangeLogs .logHeader label
{
	float: right;
}

.userChangeLogs .logField
{
	color: {xen:property primaryMedium};
}]]></template>
  <template title="user_change_log_user"><![CDATA[<xen:title>{xen:phrase user_change_logs}: {$user.username}</xen:title>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink users/edit, $user}">{$user.username}</xen:breadcrumb>
</xen:navigation>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />
<xen:require css="user_change_log.css" />

<xen:if is="{$logs}">
	<table class="dataTable userChangeLogs" style="table-layout: fixed">
	<tr class="dataRow">
		<th width="48"></th>
		<th width="120">{xen:phrase field_name}</th>
		<th width="50%">{xen:phrase old_value}</th>
		<th width="50%">{xen:phrase new_value}</th>
	</tr>
	<xen:foreach loop="$logs" value="$log">
		<tr class="dataRow secondaryContent">
			<td rowspan="{xen:calc '{xen:count $log.fields} + 1'}" valign="top" width="48"><img src="{xen:helper avatar, $log.user, s}" alt="" class="_listAvatar" /></td>
			<td colspan="3" class="logHeader"><label class="muted" for="_{$log.edit_date}"><xen:datetime time="$log.edit_date" /></label> <a href="{xen:adminlink users/edit, $log.user}">{$log.user.username}</a><xen:if is="{$log.editUser.user_id} != {$log.user.user_id}">, {xen:phrase edited_by_x, 'name=<a href="{xen:adminlink users/edit, $log.editUser}">{$log.editUser.username}</a>'}</xen:if></td>
		</tr>
		<xen:foreach loop="$log.fields" value="$field">
			<tr class="dataRow">
				<td class="logField">{$field.name} </td>
				<td>{$field.old_value}</td>
				<td>{$field.new_value}</td>
			</tr>
		</xen:foreach>
	</xen:foreach>
	<tr>
		<td colspan="4" class="sectionFooter">&nbsp;</td>
	</tr>
	</table>

	<xen:adminpagenav page="{$page}" perpage="{$perPage}" total="{$total}" link="users/change-log" linkdata="{$user}" />
<xen:else />
	<div class="noResults">{xen:phrase no_changes_have_been_logged}</div>
</xen:if>]]></template>
  <template title="user_conversation_delete"><![CDATA[<xen:title>{xen:phrase delete_conversations}</xen:title>

<xen:form action="{xen:adminlink users/delete-conversations, $user}">
	<p>{xen:phrase this_will_delete_conversations_started_by_user_cannot_be_undone}</p>

	<xen:submitunit save="{xen:phrase delete_conversations}" />

	<input type="hidden" name="_xfConfirm" value="1" />
</xen:form>]]></template>
  <template title="user_delete"><![CDATA[<xen:title>{xen:phrase confirm_deletion_of_user}: {$user.username}</xen:title>
<xen:h1>{xen:phrase confirm_deletion_of_user}</xen:h1>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'users/edit', $user}">{$user.username}</xen:breadcrumb>
</xen:navigation>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'users/delete', $user}" class="deleteConfirmForm formOverlay">

	<p>{xen:phrase please_confirm_that_you_want_to_delete_following_user}:</p>
	<strong><a href="{xen:adminlink 'users/edit', $user}">{$user.username}</a></strong>

	<p>{xen:phrase this_will_not_remove_any_content_this_user_has_already_created}</p>
	
	<xen:if is="{$user.is_super_admin}">
		<xen:passwordunit label="{xen:phrase your_password}:" name="visitor_password">
			<xen:explain>{xen:phrase you_must_enter_your_current_password_to_validate_this_request}</xen:explain>
		</xen:passwordunit>
	</xen:if>

	<xen:submitunit save="{xen:phrase delete_user}" />
	<input type="hidden" name="_xfConfirm" value="1" />
	
</xen:form>]]></template>
  <template title="user_edit"><![CDATA[<xen:title>{xen:if '{$user.user_id}', '{xen:phrase edit_user}: {$user.username}', '{xen:phrase create_new_user}'}</xen:title>

<xen:if is="{$user.user_id}">
	<xen:navigation>
		<xen:breadcrumb href="{xen:adminlink users/list}#{xen:helper listitemid, $user.user_id}">{$user.username}</xen:breadcrumb>
	</xen:navigation>

	<xen:topctrl>
		<div class="Popup">
			<a rel="Menu">{xen:phrase actions}</a>
			<div class="Menu">
				<ul class="secondaryContent blockLinksList">
					<li><a href="{xen:link members, $user}" target="_blank">{xen:phrase view_public_profile}</a></li>
				<xen:if is="{$user.is_banned}">
					<li><a href="{xen:adminlink banning/users/lift, $user}" class="OverlayTrigger">{xen:phrase lift_ban}</a></li>
				<xen:else />
					<li><a href="{xen:adminlink banning/users/add, $user}" class="OverlayTrigger">{xen:phrase ban_user}</a></li>
				</xen:if>
				<xen:if is="!{$user.is_moderator} AND !{$user.is_admin}">
					<li><a href="{xen:adminlink users/merge, $user}" class="OverlayTrigger">{xen:phrase merge_with_user}</a></li>
					<li><a href="{xen:adminlink users/delete-conversations, $user}" class="OverlayTrigger">{xen:phrase delete_conversations}</a></li>
				</xen:if>
				<xen:if is="!{$user.is_super_admin} AND {$xenOptions.editHistory.enabled}">
					<li><a href="{xen:adminlink users/revert-message-edit, $user}" class="OverlayTrigger">{xen:phrase revert_message_edits}</a></li>
				</xen:if>
				<xen:if is="!{$user.is_super_admin}">
					<li><a href="{xen:adminlink users/remove-likes, $user}" class="OverlayTrigger">{xen:phrase remove_likes}</a></li>
				</xen:if>
					<li><a href="{xen:adminlink users/manage-watched-threads, $user}" class="OverlayTrigger">{xen:phrase manage_watched_threads}</a></li>
				</ul>
			</div>
		</div>
	</xen:topctrl>
</xen:if>

<div class="commaElements">
	<xen:if is="{$user.is_super_admin}"><span>{xen:phrase super_administrator}</span></xen:if>
	<xen:if is="{$user.is_admin}"><a href="{xen:adminlink admins/edit, $user}" title="{xen:phrase edit_administrator_permissions}">{xen:phrase administrator}</a></xen:if>
	<xen:if is="{$user.is_moderator}"><span>{xen:phrase moderator}</span></xen:if>	  
	<xen:if is="{$user.is_discouraged}"><span>{xen:phrase discouraged}</span></xen:if>
	<xen:if is="{$user.is_banned}"><a href="{xen:adminlink banning/users/lift, $user}" class="OverlayTrigger">{xen:phrase banned}</a></xen:if>
</div>

<xen:form action="{xen:adminlink 'users/save', $user}"
	class="AutoValidator"
	data-fieldvalidatorurl="{xen:adminlink 'users/validate-field', $user}"
	data-redirect="yes">
	
	<xen:if is="{$user.is_super_admin}">
		<xen:passwordunit label="{xen:phrase your_password}:" name="visitor_password" inputclass="NoAutoValidate">
			<xen:explain>{xen:phrase you_must_enter_your_current_password_to_validate_this_request}</xen:explain>
		</xen:passwordunit>
	</xen:if>

	<ul class="tabs Tabs" data-panes="#userPanes > li">
		<xen:hook name="admin_user_edit_tabs">
		<li id="tabUserEssentials" class="active"><a>{xen:phrase user_essentials}</a></li>
		<!-- slot: pre_personal_details -->
		<li id="tabPersonalDetails"><a>{xen:phrase personal_details}</a></li>
		<!-- slot: pre_profile_info -->
		<li id="tabProfileInfo"><a>{xen:phrase profile_info}</a></li>
		<!-- slot: pre_authentication -->
		<!--<li id="tabAuthentication"><a>{xen:phrase authentication}</a></li>-->
		<!-- slot: pre_additional_contact -->
		<li id="tabAdditionalContact"><a>{xen:phrase additional_contact}</a></li>
		<!-- slot: pre_preferences -->
		<li id="tabPreferences"><a>{xen:phrase preferences}</a></li>
		<!-- slot: pre_privacy -->
		<li id="tabPrivacy"><a>{xen:phrase privacy}</a></li>
		<xen:if is="{$user.user_id}"><li id="tabExtra"><a>{xen:phrase extra}</a></li></xen:if>
		<!-- slot: pre_ips -->
		<xen:if is="{$user.user_id}">
			<li id="tabIps" style="float:{xen:if '{$visitorLanguage.text_direction} == "RTL"', left, right}"><a>{xen:phrase ip_addresses}</a></li>
			<li id="tabChangeLog" style="float:{xen:if '{$visitorLanguage.text_direction} == "RTL"', left, right}"><a>{xen:phrase change_log}</a></li>
		</xen:if>
		</xen:hook>
	</ul>

	<ul id="userPanes">
		<xen:hook name="admin_user_edit_panes">
		<li>
			<xen:textboxunit label="{xen:phrase user_name}:" name="username" value="{$user.username}" data-livetitletemplate="{xen:if {$user.user_id},
				'{xen:phrase edit_user}: <em>%s</em>',
				'{xen:phrase create_new_user}: <em>%s</em>'}" />

			<xen:textboxunit label="{xen:phrase email}:" name="email" value="{$user.email}" dir="ltr" />

			<xen:textboxunit label="{xen:phrase password}:" name="password" inputclass="OptOut" autocomplete="off" />

			<xen:if is="{$user.user_id}">
				<xen:controlunit label="{xen:phrase avatar}:">
					<xen:avatar user="$user" size="s" img="true" class="NoOverlay" href="{xen:adminlink 'users/avatar', $user}" />
					<a href="{xen:adminlink 'users/avatar', $user}">{xen:phrase edit_avatar}</a>
				</xen:controlunit>
				<xen:controlunit label="{xen:phrase joined}:">
					<xen:datetime time="{$user.register_date}" />
				</xen:controlunit>
				<xen:if is="{$user.last_activity}">
					<xen:controlunit label="{xen:phrase last_activity}:">
						<xen:datetime time="{$user.last_activity}" />
					</xen:controlunit>
				</xen:if>
			</xen:if>

			<fieldset>
				<xen:set var="$_userChangesHtml">
					<xen:if is="{$user.user_id}">
						<xen:if is="!{$user.is_moderator}"><a href="{xen:adminlink moderators}">{xen:phrase make_this_user_moderator}</a></xen:if>
						<xen:if is="!{$user.is_admin} AND !{$user.is_moderator}">/</xen:if>
						<xen:if is="!{$user.is_admin}"><a href="{xen:adminlink admins}">{xen:phrase make_this_user_administrator}</a></xen:if>
					</xen:if>
				</xen:set>
				
				<xen:selectunit label="{xen:phrase user_group}:" name="user_group_id" value="{$user.user_group_id}">
					<xen:options source="$userGroups" />
					<xen:explain>{xen:raw $_userChangesHtml}</xen:explain>
				</xen:selectunit>

				<xen:checkboxunit label="{xen:phrase secondary_user_groups}:" name="secondary_group_ids" class="checkboxColumns">
					<xen:options source="$secondaryGroups" />
				</xen:checkboxunit>

				<xen:checkboxunit label="">
					<xen:option name="is_staff" selected="{$user.is_staff}" label="{xen:phrase display_user_as_staff}" hint="{xen:phrase if_selected_this_user_will_be_listed_publicly_as_staff_member}" />
				</xen:checkboxunit>

				<xen:selectunit label="{xen:phrase user_state}:" name="user_state" value="{$user.user_state}">
					<xen:option value="valid">{xen:phrase valid}</xen:option>
					<xen:option value="email_confirm">{xen:phrase awaiting_email_confirmation}</xen:option>
					<xen:option value="email_confirm_edit">{xen:phrase awaiting_email_confirmation_from_edit}</xen:option>
					<xen:option value="email_bounce">{xen:phrase email_invalid_bounced}</xen:option>
					<xen:option value="moderated">{xen:phrase awaiting_approval}</xen:option>
				</xen:selectunit>
			</fieldset>
				
			<xen:checkboxunit label="">
				<xen:option name="is_discouraged" selected="{$user.is_discouraged}" hint="{xen:phrase discouraged_hint}">{xen:phrase discouraged}</xen:option>
				<xen:explain><a href="{xen:adminlink banning/discouraged-ips}">{xen:phrase alternatively_use_ip_discouragement}</a></xen:explain>
			</xen:checkboxunit>
		</li>
		
		<!-- slot: pre_personal_details -->
		<li>
			<xen:radiounit label="{xen:phrase gender}:" name="gender" value="{$user.gender}">
				<xen:option value="male">{xen:phrase male}</xen:option>
				<xen:option value="female">{xen:phrase female}</xen:option>
				<xen:option value="">({xen:phrase unspecified})</xen:option>
			</xen:radiounit>

			<xen:controlunit label="{xen:phrase date_of_birth}:">
				<xen:select name="dob_month" value="{$user.dob_month}" inputclass="autoSize">
					<xen:option value=""></xen:option>
					<xen:option value="1">{xen:phrase month_1}</xen:option>
					<xen:option value="2">{xen:phrase month_2}</xen:option>
					<xen:option value="3">{xen:phrase month_3}</xen:option>
					<xen:option value="4">{xen:phrase month_4}</xen:option>
					<xen:option value="5">{xen:phrase month_5}</xen:option>
					<xen:option value="6">{xen:phrase month_6}</xen:option>
					<xen:option value="7">{xen:phrase month_7}</xen:option>
					<xen:option value="8">{xen:phrase month_8}</xen:option>
					<xen:option value="9">{xen:phrase month_9}</xen:option>
					<xen:option value="10">{xen:phrase month_10}</xen:option>
					<xen:option value="11">{xen:phrase month_11}</xen:option>
					<xen:option value="12">{xen:phrase month_12}</xen:option>
				</xen:select>
				<xen:textbox name="dob_day" value="{xen:if {$user.dob_day}, {$user.dob_day}}" size="2" inputclass="autoSize" placeholder="{xen:phrase day}" />
				<xen:textbox name="dob_year" value="{xen:if {$user.dob_year}, {$user.dob_year}}" size="4" inputclass="autoSize" placeholder="{xen:phrase year}" />
			</xen:controlunit>

			<fieldset>
				<xen:textboxunit label="{xen:phrase location}:" name="location" value="{$user.location}" />
				<xen:textboxunit label="{xen:phrase occupation}:" name="occupation" value="{$user.occupation}" />
				<xen:textboxunit label="{xen:phrase home_page}:" name="homepage" value="{$user.homepage}" />
				<xen:if is="{$customFieldsGrouped.personal}">
					<xen:include template="custom_fields_edit">
						<xen:map from="$customFieldsGrouped.personal" to="$customFields" />
					</xen:include>
				</xen:if>
				<xen:textboxunit label="{xen:phrase about}:" name="about" value="{$user.about}" hint="{xen:phrase you_may_use_bb_code}" rows="2" inputclass="Elastic" />
			</fieldset>
		</li>

		<!-- slot: pre_profile_info -->
		<li>
			<xen:if is="{$user.status}">
				<xen:controlunit label="{xen:phrase status_message}:">
					<blockquote class="dimmed">{xen:helper bodytext, $user.status}</blockquote>
				</xen:controlunit>
			</xen:if>

			<fieldset>
				<xen:textboxunit label="{xen:phrase custom_title}:" name="custom_title" value="{$user.custom_title}" />
				<xen:textboxunit label="{xen:phrase signature}:" name="signature" value="{$user.signature}" hint="{xen:phrase you_may_use_bb_code}" rows="2" inputclass="Elastic" />
			</fieldset>
			
			<fieldset>
				<xen:spinboxunit label="{xen:phrase messages}:" name="message_count" value="{$user.message_count}" min="0" />
				<xen:spinboxunit label="{xen:phrase likes_received}:" name="like_count" value="{$user.like_count}" min="0" />
				<xen:spinboxunit label="{xen:phrase trophy_points}:" name="trophy_points" value="{$user.trophy_points}" min="0" />
			</fieldset>
		</li>

		<!-- slot: pre_authentication -->
		<!--<li><i>This space left intentionally blank...</i></li>-->

		<!-- slot: pre_additional_contact -->
		<li>
			<xen:if is="{$customFieldsGrouped.contact}">
				<xen:include template="custom_fields_edit">
					<xen:map from="$customFieldsGrouped.contact" to="$customFields" />
				</xen:include>
			</xen:if>
		</li>

		<!-- slot: pre_preferences -->
		<li>
			<xen:selectunit name="style_id" value="{$user.style_id}" label="{xen:phrase style}">
				<xen:option value="0" selected="{$user.style_id} == 0">({xen:phrase use_default_style})</xen:option>
				<xen:options source="$styles" />
			</xen:selectunit>

			<fieldset>
				<xen:selectunit name="language_id" value="{$user.language_id}" label="{xen:phrase language}:">
					<xen:options source="$languages" />
				</xen:selectunit>

				<xen:selectunit label="{xen:phrase time_zone}:" name="timezone" value="{$user.timezone}">
					<xen:options source="$timeZones" />
				</xen:selectunit>
			</fieldset>

			<xen:checkboxunit label="">
				<xen:option name="enable_rte" selected="{$user.enable_rte}">{xen:phrase use_rich_text_editor_to_create_and_edit_messages}</xen:option>
				<xen:option name="enable_flash_uploader" selected="{$user.enable_flash_uploader}">{xen:phrase use_flash_uploader_to_upload_attachments}</xen:option>
				<xen:option name="content_show_signature" selected="{$user.content_show_signature}">{xen:phrase show_signatures_with_messages}</xen:option>
				<xen:option name="email_on_conversation" selected="{$user.email_on_conversation}">{xen:phrase receive_email_when_new_conversation_message_is_received}</xen:option>
			</xen:checkboxunit>

			<xen:selectunit label="{xen:phrase watch_threads_when_creating_or_replying}:" name="default_watch_state" value="{$user.default_watch_state}">
				<xen:option value="watch_no_email">{xen:phrase yes}</xen:option>
				<xen:option value="watch_email">{xen:phrase yes_with_email}</xen:option>
				<xen:option value="">{xen:phrase no}</xen:option>
			</xen:selectunit>
			
			<xen:if is="{$customFieldsGrouped.preferences}">
				<xen:include template="custom_fields_edit">
					<xen:map from="$customFieldsGrouped.preferences" to="$customFields" />
				</xen:include>
			</xen:if>
		</li>

		<!-- slot: pre_privacy -->
		<li>
			<xen:checkboxunit label="{xen:phrase general_privacy}:">
				<xen:option name="visible" selected="{$user.visible}">{xen:phrase show_online_status}</xen:option>
				<xen:option name="activity_visible" selected="{$user.activity_visible}">{xen:phrase show_current_activity}</xen:option>
				<xen:option name="receive_admin_email" selected="{$user.receive_admin_email}">{xen:phrase receive_site_mailings}</xen:option>
				<xen:option name="show_dob_date" selected="{$user.show_dob_date}">{xen:phrase show_day_and_month_of_birth}</xen:option>
				<xen:option name="show_dob_year" selected="{$user.show_dob_year}">{xen:phrase show_year_of_birth}</xen:option>
			</xen:checkboxunit>

			<fieldset>
				<xen:include template="user_edit_privacy_select">
					<xen:set var="$label">{xen:phrase view_this_users_profile_page_details}:</xen:set>
					<xen:set var="$name">allow_view_profile</xen:set>
				</xen:include>

				<xen:include template="user_edit_privacy_select">
					<xen:set var="$label">{xen:phrase post_messages_on_this_users_profile_page}:</xen:set>
					<xen:set var="$name">allow_post_profile</xen:set>
					<xen:set var="$hideEveryone">1</xen:set>
				</xen:include>

				<xen:include template="user_edit_privacy_select">
					<xen:set var="$label">{xen:phrase receive_this_users_news_feed}:</xen:set>
					<xen:set var="$name">allow_receive_news_feed</xen:set>
				</xen:include>
			</fieldset>

			<fieldset>
				<xen:include template="user_edit_privacy_select">
					<xen:set var="$label">{xen:phrase initiate_conversations_with_this_user}:</xen:set>
					<xen:set var="$name">allow_send_personal_conversation</xen:set>
					<xen:set var="$hideEveryone">1</xen:set>
				</xen:include>

				<xen:include template="user_edit_privacy_select">
					<xen:set var="$label">{xen:phrase view_this_users_identities}:</xen:set>
					<xen:set var="$name">allow_view_identities</xen:set>
				</xen:include>
			</fieldset>
		</li>

		<!-- slot: pre_extra -->
		<xen:if is="{$user.user_id}"><li data-loadurl="{xen:adminlink users/extra, $user}"><div class="section">{xen:phrase loading}...</div></li></xen:if>
		
		<!-- slot: pre_ips -->
		<xen:if is="{$user.user_id}"><li data-loadurl="{xen:adminlink users/user-ips, $user}"><div class="section">{xen:phrase loading}...</div></li></xen:if>
		
		<!-- slot: pre_change_log -->
		<xen:if is="{$user.user_id}"><li data-loadurl="{xen:adminlink users/change-log, $user}" id="ChangeLogsTab"><div class="section">{xen:phrase loading}...</div></li></xen:if>
		
		</xen:hook>
	</ul>

	<xen:submitunit save="{xen:phrase save_user}">
		<xen:if is="{$user.user_id}">
			<input type="button" value="{xen:phrase delete_user}..." accesskey="d" class="button OverlayTrigger"
				data-href="{xen:adminlink users/delete, $user}" />
		</xen:if>
	</xen:submitunit>

</xen:form>]]></template>
  <template title="user_edit_privacy_select"><![CDATA[<xen:checkboxunit label="">
	<xen:option name="{$name}_enable" selected="{xen:if '{$user.{$name}} != "none"', 1, 0}" label="{$label}">
		<xen:select name="{$name}" value="{$user.{$name}}" inputclass="autoSize">
			<xen:option value="everyone" displayif="!{$hideEveryone}">{xen:phrase all_visitors}</xen:option>
			<xen:option value="members">{xen:phrase members_only}</xen:option>
			<xen:option value="followed">{xen:phrase people_x_follows, 'name={xen:if $user.username, $user.username, '[{xen:phrase user}]'}'}</xen:option>
		</xen:select>
	</xen:option>
</xen:checkboxunit>]]></template>
  <template title="user_email"><![CDATA[<xen:title>{xen:phrase email_users}</xen:title>

<xen:if is="{$sent}">
	<div class="importantMessage">
		{xen:phrase your_email_was_sent_to_x_users, 'total={xen:number $sent}'}
		<xen:if is="{$failed}">({xen:phrase email_sending_failed_x_users, 'total={xen:number $failed}'})</xen:if>
	</div>
</xen:if>

<xen:form action="{xen:adminlink users/email}">
	
	<xen:checkboxunit label="">
		<xen:option name="list_only">{xen:phrase only_generate_list_of_email_addresses}</xen:option>
	</xen:checkboxunit>
	
	<xen:textboxunit label="{xen:phrase from_name}:" name="from_name" value="{xen:if $xenOptions.emailSenderName, $xenOptions.emailSenderName, $xenOptions.boardTitle}" />
	<xen:textboxunit label="{xen:phrase from_email}:" name="from_email" value="{$xenOptions.defaultEmailAddress}" />
		
	<fieldset>
		<xen:textboxunit label="{xen:phrase email_title}:" name="email_title" />
		
		<xen:radiounit label="{xen:phrase email_format}:" name="email_format">
			<xen:option value="text" selected="true">{xen:phrase plain_text}</xen:option>
			<xen:option value="html">
				<xen:label>HTML</xen:label>
				<xen:hint>{xen:phrase note_that_email_clients_handle_html_in_widely_varying_ways}</xen:hint>
			</xen:option>
		</xen:radiounit>
		
		<xen:textboxunit label="{xen:phrase email_body}:" name="email_body" rows="5" inputclass="Elastic">
			<xen:explain>{xen:phrase following_placeholders_will_be_replaced_in_message_for_email}</xen:explain>
		</xen:textboxunit>
	</fieldset>

	<h3 class="textHeading">{xen:phrase user_criteria}</h3>
	
	<xen:checkboxunit label="">
		<xen:option name="criteria[receive_admin_email]" selected="true">{xen:phrase only_send_to_users_opting_to_receive_emails_from_admin}</xen:option>
	</xen:checkboxunit>
	
	<xen:include template="helper_user_search_criteria" />
	
	<xen:submitunit save="{xen:phrase continue}...">
		<p class="explain">{xen:phrase your_email_will_not_be_sent_yet}</p>
	</xen:submitunit>
		
	<input type="hidden" name="_xfConfirm" value="1" />

</xen:form>]]></template>
  <template title="user_email_confirm"><![CDATA[<xen:title>{xen:phrase confirm_sending_email}</xen:title>

<xen:if is="{$test}">
	<div class="importantMessage">{xen:phrase test_email_sent_to_x, 'email={$visitor.email}'}</div>
</xen:if>

<xen:form action="{xen:adminlink users/email-send}">
	
	<xen:controlunit label="{xen:phrase number_of_users_matching_criteria}:">
		{xen:number $total}
		(<a href="{xen:adminlink users/list, '', 'criteria={$criteria}'}" target="_blank">{xen:phrase view_full_list}</a>)
	</xen:controlunit>
	
	<xen:controlunit label="{xen:phrase test}:">
		<xen:html><input type="submit" name="test" value="{xen:phrase send_test_email}" class="button" /></xen:html>
		<xen:explain>{xen:phrase this_will_send_copy_of_this_email_to_x_for_testing, 'email={$visitor.email}'}</xen:explain>
	</xen:controlunit>
	
	<xen:submitunit save="{xen:phrase send_email}" />
		
	<input type="hidden" name="criteria" value="{xen:escape {xen:helper json, $criteria}}" />
	
	<input type="hidden" name="total" value="{$total}" />
	
	<input type="hidden" name="from_name" value="{$email.from_name}" />
	<input type="hidden" name="from_email" value="{$email.from_email}" />
	<input type="hidden" name="email_title" value="{$email.email_title}" />
	<input type="hidden" name="email_format" value="{$email.email_format}" />
	<input type="hidden" name="email_body" value="{$email.email_body}" />
	
	<input type="hidden" name="_xfConfirm" value="1" />
	
</xen:form>]]></template>
  <template title="user_email_list"><![CDATA[<xen:title>{xen:phrase email_list}</xen:title>

<pre style="max-height: 400px; overflow: auto; border: 1px solid {xen:property primaryLightest}; padding: 5px;">
<xen:foreach loop="$users" value="$user"><xen:if is="{$user.email}">{$user.email}	{$user.username}
</xen:if></xen:foreach>
</pre>]]></template>
  <template title="user_email_send"><![CDATA[<xen:title>{xen:phrase sending_email}...</xen:title>

<xen:form action="{xen:adminlink users/email-send}" id="emailForm">
	
	<p>
		{xen:phrase sending_email}... {xen:number $completed} / {xen:number $total}
		<img src="{xen:property imagePath}/xenforo/widgets/ajaxload.info_000000_facebook.gif" alt="{xen:phrase loading}..." id="loadingImage" style="display:none" />
	</p>
	<input type="submit" value="{xen:phrase continue}" class="button primary" id="emailButton" />
	
	<input type="hidden" name="page" value="{$nextPage}" />
		
	<input type="hidden" name="criteria" value="{xen:escape {xen:helper json, $criteria}}" />
	
	<input type="hidden" name="total" value="{$total}" />
	<input type="hidden" name="failed" value="{$failed}" />
	
	<input type="hidden" name="from_name" value="{$email.from_name}" />
	<input type="hidden" name="from_email" value="{$email.from_email}" />
	<input type="hidden" name="email_title" value="{$email.email_title}" />
	<input type="hidden" name="email_format" value="{$email.email_format}" />
	<input type="hidden" name="email_body" value="{$email.email_body}" />
	
	<input type="hidden" name="_xfConfirm" value="1" />
	
</xen:form>

<script>
$(function() {
	$('#emailForm').submit();
	$('#emailButton').hide();
	$('#loadingImage').show();
});
</script>]]></template>
  <template title="user_extra"><![CDATA[<xen:title>{$user.username}</xen:title>

<div>
<h3 class="textHeading">{xen:phrase active_user_upgrades}</h3>
	<xen:if is="{$upgradeRecords}">
		<table class="dataTable">
		<col style="width: 20%" />
		<col style="width: 20%" />
		<col style="width: 20%" />
		<col style="width: 1%" />
		<tr class="dataRow">
			<th>{xen:phrase user_upgrade_title}</th>
			<th>{xen:phrase start_date}</th>
			<th>{xen:phrase end_date}</th>
			<th>&nbsp;</th>
		</tr>
		<xen:foreach loop="$upgradeRecords" value="$upgradeRecord">
			<tr class="dataRow">
				<td>{$upgradeRecord.title}</td>
				<td><xen:datetime time="{$upgradeRecord.start_date}" /></td>
				<td><xen:if is="{$upgradeRecord.end_date}">{xen:date $upgradeRecord.end_date}<xen:else />{xen:phrase permanent}</xen:if></td>
				<td class="dataOptions">
					<a href="{xen:adminlink user-upgrades/edit-active, '', 'user_upgrade_record_id={$upgradeRecord.user_upgrade_record_id}'}" class="secondaryContent OverlayTrigger">{xen:phrase edit}</a><!--
					--><a href="{xen:adminlink user-upgrades/downgrade, '', 'user_upgrade_record_id={$upgradeRecord.user_upgrade_record_id}'}" class="secondaryContent OverlayTrigger">{xen:phrase downgrade}</a>
				</td>
			</tr>
		</xen:foreach>
		</table>
	<xen:else />
		{xen:phrase n_a}
	</xen:if>
</div>

<div>
<h3 class="textHeading">{xen:phrase external_accounts}</h3>
	<xen:if hascontent="true">
		<div class="xenForm">
		<xen:contentcheck>
			<xen:if is="{$external.facebook}">
				<xen:controlunit label="{xen:phrase associated_facebook_account}:">
					<a href="http://www.facebook.com/profile.php?id={$external.facebook.provider_key}" class="avatar NoOverlay"><img src="https://graph.facebook.com/{$external.facebook.provider_key}/picture" alt="" /></a>
					<div><a href="http://www.facebook.com/profile.php?id={$external.facebook.provider_key}"><xen:if is="{$fbUser.name}">{$fbUser.name}<xen:else />{xen:phrase unknown_account}</xen:if></a></div>
				</xen:controlunit>
			</xen:if>

			<xen:if is="{$external.twitter}">
				<xen:controlunit label="{xen:phrase associated_twitter_account}:">
				<xen:if is="{$twitterUser}">
					<a href="https://twitter.com/{$twitterUser.screen_name}" class="avatar NoOverlay"><img src="{$twitterUser.profile_image_url_https}" alt="" /></a>
					<div><a href="https://twitter.com/{$twitterUser.screen_name}">@{$twitterUser.screen_name} ({$twitterUser.name})</a></div>
				<xen:else />
					{xen:phrase unknown_account}
				</xen:if>
				</xen:controlunit>
			</xen:if>

			<xen:if is="{$external.google}">
				<xen:controlunit label="{xen:phrase associated_google_account}:">
					<a href="https://plus.google.com/u/0/{$external.google.provider_key}">{xen:phrase view_account}</a>
				</xen:controlunit>
			</xen:if>

			<xen:comment>external_account_insert</xen:comment>
		</xen:contentcheck>
		</div>
	<xen:else />
		{xen:phrase n_a}
	</xen:if>
</div>]]></template>
  <template title="user_field_delete"><![CDATA[<xen:title>{xen:phrase confirm_deletion_of_field}: {$field.title}</xen:title>
<xen:h1>{xen:phrase confirm_deletion_of_field}</xen:h1>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'user-fields/edit', $field}">{$field.title}</xen:breadcrumb>
</xen:navigation>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'user-fields/delete', $field}" class="deleteConfirmForm">
	<p>{xen:phrase please_confirm_that_you_want_to_delete_following_field}:</p>
	<strong><a href="{xen:adminlink 'user-fields/edit', $field}">{$field.title}</a></strong>
	
	<xen:submitunit save="{xen:phrase delete_field}" />

	<input type="hidden" name="_xfConfirm" value="1" />
</xen:form>]]></template>
  <template title="user_field_edit"><![CDATA[<xen:title>{xen:if {$field.field_id}, '{xen:phrase edit_field}: {$field.title}', '{xen:phrase create_new_field}'}</xen:title>

<xen:if is="{$field.field_id}">
	<xen:navigation>
		<xen:breadcrumb href="{xen:adminlink user-fields}#{xen:helper listitemid, $field.field_id}">{$masterTitle}</xen:breadcrumb>
	</xen:navigation>
<xen:else />
	<script type="text/javascript">
	<!--
	$(function()
	{
		$('#ctrl_new_field_id').keyup(function()
		{
			$('#FieldId').text($(this).val());
		});
	});
	//-->
	</script>
</xen:if>

<xen:form action="{xen:adminlink 'user-fields/save', $field}" class="AutoValidator" data-redirect="on">

	<ul class="tabs Tabs" data-panes="#userFieldPanes > li">
		<li class="active"><a>{xen:phrase basic_information}</a></li>
		<xen:if is="!{$existingType} OR {$existingType} == 'text'">
			<li><a>{xen:phrase options_for_text_fields}</a></li>
		</xen:if>
		<xen:if is="!{$existingType} OR {$existingType} == 'single' OR {$existingType} == 'multiple'">
			<li><a>{xen:phrase options_for_choice_fields}</a></li>
		</xen:if>
		<li><a>{xen:phrase general_options}</a></li>
	</ul>
	
	<ul id="userFieldPanes">
		<li>
			<xen:if is="{$field.field_id}">
				<xen:controlunit label="{xen:phrase field_id}:">
					<xen:html>{$field.field_id}</xen:html>
					<xen:explain>{xen:phrase this_is_unique_identifier_for_field_cannot_be_changed}</xen:explain>
				</xen:controlunit>
			<xen:else />
				<xen:textboxunit label="{xen:phrase field_id}:" name="new_field_id">
					<xen:explain>{xen:phrase this_is_unique_identifier_for_field_cannot_be_changed}</xen:explain>
				</xen:textboxunit>
			</xen:if>
		
			<fieldset>
				<xen:textboxunit label="{xen:phrase title}:" name="title" value="{$masterTitle}" data-livetitletemplate="{xen:if {$field.field_id},
					'{xen:phrase edit_field}: <em>%s</em>',
					'{xen:phrase create_new_field}: <em>%s</em>'}" />
					
				<xen:textboxunit label="{xen:phrase description}:" name="description" value="{$masterDescription}" rows="2" inputclass="Elastic" />
			</fieldset>
			
			<fieldset>
				<xen:radiounit label="{xen:phrase display_location}:" name="display_group" value="{$field.display_group}">
					<xen:options source="$fieldGroups" />
				</xen:radiounit>
			
				<xen:spinboxunit label="{xen:phrase display_order}:" name="display_order" value="{$field.display_order}" min="0" />
			</fieldset>
			
			<xen:if is="!{$existingType}">
				<fieldset>
					<xen:radiounit label="{xen:phrase field_type}:" name="field_type" value="{$field.field_type}">
						<xen:options source="$validFieldTypes" />
					</xen:radiounit>
				</fieldset>
			</xen:if>
		</li>	
		<xen:if is="!{$existingType} OR {$existingType} == 'text'">
			<li>
				<!--<h3 class="textHeading">{xen:phrase options_for_text_fields}</h3>-->
			
				<xen:if is="{$existingType}">
					<xen:radiounit label="{xen:phrase field_type}:" name="field_type" value="{$field.field_type}">
						<xen:options source="$validFieldTypes" />
					</xen:radiounit>
				</xen:if>
				
				<fieldset>
					<xen:radiounit label="{xen:phrase value_match_requirements}:" name="match_type" value="{$field.match_type}" hint="{xen:phrase empty_values_always_allowed}">
						<xen:option value="none">{xen:phrase none}</xen:option>
						<xen:option value="number">{xen:phrase number}</xen:option>
						<xen:option value="alphanumeric">{xen:phrase a_z_0_9_and_only}</xen:option>
						<xen:option value="email">{xen:phrase email_address}</xen:option>
						<xen:option value="url">URL</xen:option>
						<xen:option value="regex" label="{xen:phrase regular_expression}:">
							<xen:textbox name="match_regex" value="{$field.match_regex}" />
						</xen:option>
						<xen:option value="callback" label="{xen:phrase php_callback}:">
							<xen:disabled>
								<xen:textbox name="match_callback_class" value="{$field.match_callback_class}" placeholder="{xen:phrase class}" size="25" />
								::
								<xen:textbox name="match_callback_method" value="{$field.match_callback_method}" placeholder="{xen:phrase method}" size="25" />
							</xen:disabled>
						</xen:option>
					</xen:radiounit>
				</fieldset>
				
				<fieldset>
					<xen:spinboxunit label="{xen:phrase maximum_length}:" name="max_length" value="{$field.max_length}" min="0" />
				</fieldset>
			</li>
		<xen:else />
			<input type="hidden" name="match_type" value="none" />
		</xen:if>
		<xen:if is="!{$existingType} OR {$existingType} == 'single' OR {$existingType} == 'multiple'">
			<li>
				<!--<h3 class="textHeading">{xen:phrase options_for_choice_fields}</h3>-->
			
				<xen:if is="{$existingType}">
					<xen:radiounit label="{xen:phrase field_type}:" name="field_type" value="{$field.field_type}">
						<xen:options source="$validFieldTypes" />
					</xen:radiounit>
				</xen:if>
				
				<fieldset>
					<xen:controlunit label="{xen:phrase possible_choices}:">
						<ul class="FieldChoices">
							<xen:foreach loop="$masterFieldChoices" key="$choice" value="$text">
								<li>
									<input type="text" name="field_choice[]" value="{$choice}" class="textCtrl" placeholder="{xen:phrase value_a_z_0_9_and_only}" size="25" maxlength="25" />
									<input type="text" name="field_choice_text[]" value="{$text}" class="textCtrl" placeholder="{xen:phrase text}" size="25" />
								</li>
							</xen:foreach>
							<li>
								<input type="text" name="field_choice[]" class="textCtrl" placeholder="{xen:phrase value_a_z_0_9_and_only}" size="25" maxlength="25" />
								<input type="text" name="field_choice_text[]" class="textCtrl" placeholder="{xen:phrase text}" size="25" />
							</li>
						</ul>
						<input type="button" value="{xen:phrase add_additional_choice}" class="button smallButton FieldAdder" data-source="ul.FieldChoices li" />
						<p class="explain">{xen:phrase value_represents_internal_value_for_choice_text_is_displayed}</p>
					</xen:controlunit>
				</fieldset>
			</li>
		</xen:if>
		<li>
			<!--<h3 class="textHeading">{xen:phrase general_options}</h3>-->
			
			<xen:checkboxunit label="">
				<xen:option name="required" selected="{$field.required}" label="{xen:phrase field_is_required}">
					<xen:hint>{xen:phrase required_fields_will_always_be_shown_during_registration}</xen:hint>
				</xen:option>
				<xen:option name="show_registration" selected="{$field.show_registration}">{xen:phrase show_during_registration}</xen:option>
				<xen:option name="user_editable_base" selected="{$field.user_editable} != 'never'" label="{xen:phrase user_editable}">
					<xen:checkbox>
						<xen:option name="user_editable_once" selected="{$field.user_editable} == 'once'">{xen:phrase editable_only_once}</xen:option>
					</xen:checkbox>
				</xen:option>
				<xen:option name="moderator_editable" selected="{$field.moderator_editable}" label="{xen:phrase moderator_editable}" />
				<xen:option name="viewable_profile" selected="{$field.viewable_profile}" label="{xen:phrase viewable_on_profile_pages}">
					<xen:hint>{xen:phrase this_does_not_apply_to_fields_displayed_within_preferences_page}</xen:hint>
				</xen:option>
				<xen:option name="viewable_message" selected="{$field.viewable_message}" label="{xen:phrase viewable_in_message_user_info}">
					<xen:hint>{xen:phrase dependent_upon_show_custom_fields_style_property}</xen:hint>
				</xen:option>
			</xen:checkboxunit>
			
			<fieldset>
				<xen:textboxunit label="{xen:phrase value_display_html}:" name="display_template" value="{$field.display_template}" rows="2" inputclass="Elastic code">
					<xen:explain>{xen:phrase field_display_html_description, 'fieldId={$field.field_id}'}</xen:explain>
				</xen:textboxunit>
			</fieldset>
		</li>
	</ul>
	
	<xen:submitunit save="{xen:phrase save_field}">
		<xen:if is="{$field.field_id}">
			<input type="button" value="{xen:phrase delete_field}..." accesskey="d" class="button OverlayTrigger"
				data-href="{xen:adminlink 'user-fields/delete', $field}" />
		</xen:if>
	</xen:submitunit>
</xen:form>]]></template>
  <template title="user_field_list"><![CDATA[<xen:title>{xen:phrase custom_user_fields}</xen:title>

<xen:topctrl>
	<a href="{xen:adminlink user-fields/add}" class="button">+ {xen:phrase create_new_field}</a>
</xen:topctrl>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<xen:form action="{xen:adminlink user-fields}" class="section">
	<xen:if is="{$fieldsGrouped}">
		<h2 class="subHeading">
			<xen:include template="filter_list_controls" />
			{xen:phrase custom_user_fields}
		</h2>
	
		<ol class="FilterList">
		<xen:foreach loop="$fieldsGrouped" key="$groupId" value="$fields">
			<h3 class="textHeading">{$fieldGroups.{$groupId}.label}</h3>
			<xen:foreach loop="$fields" value="$field">
				<xen:listitem
					id="{$field.field_id}"
					label="{$field.title}"
					snippet="{$fieldTypes.{$field.field_type}.label}"
					href="{xen:adminlink user-fields/edit, $field}"
					delete="{xen:adminlink user-fields/delete, $field}"
				/>
			</xen:foreach>
		</xen:foreach>
		</ol>
	
		<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:number $fieldCount}</span>', 'total={xen:number $fieldCount}'}</p>
	<xen:else />
		<div class="noResults">{xen:phrase no_custom_user_fields_have_been_defined}</div>
	</xen:if>
</xen:form>]]></template>
  <template title="user_group_delete"><![CDATA[<xen:title>{xen:phrase confirm_deletion_of_user_group}: {$userGroup.title}</xen:title>
<xen:h1>{xen:phrase confirm_deletion_of_user_group}</xen:h1>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'user-groups/edit', $userGroup}">{$userGroup.title}</xen:breadcrumb>
</xen:navigation>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'user-groups/delete'}" class="deleteConfirmForm">
	<p>{xen:phrase please_confirm_that_you_want_to_delete_following_user_group}:</p>
	<strong><a href="{xen:adminlink 'user-groups/edit', $userGroup}">{$userGroup.title}</a></strong>

	<input type="hidden" name="user_group_id" value="{$userGroup.user_group_id}" />
	<input type="hidden" name="_xfConfirm" value="1" />

	<xen:submitunit save="{xen:phrase delete_user_group}" />
</xen:form>]]></template>
  <template title="user_group_edit"><![CDATA[<xen:title>{xen:if '{$userGroup.user_group_id}', '{xen:phrase edit_user_group}: {$userGroup.title}', '{xen:phrase create_new_user_group}'}</xen:title>

<xen:if is="{$userGroup.user_group_id}">
	<xen:navigation>
		<xen:breadcrumb href="{xen:adminlink user-groups}#{xen:helper listitemid, $userGroup.user_group_id}">{$userGroup.title}</xen:breadcrumb>
	</xen:navigation>
</xen:if>

<xen:require js="js/xenforo/permission.js" />
<xen:require css="permission.css" />

<xen:form action="{xen:adminlink 'user-groups/save', $userGroup}" class="PermissionChoices section">

	<xen:textboxunit label="{xen:phrase title}:" name="title" value="{$userGroup.title}" data-livetitletemplate="{xen:if {$userGroup.user_group_id},
		'{xen:phrase edit_user_group}: <em>%s</em>',
		'{xen:phrase create_new_user_group}: <em>%s</em>'}" />

	<xen:spinboxunit label="{xen:phrase display_styling_priority}:" name="display_style_priority" value="{$userGroup.display_style_priority}" min="0">
		<xen:explain>{xen:phrase if_usermultiple_groups_user_title_from_highest_priority}</xen:explain>
	</xen:spinboxunit>

	<fieldset>
		<xen:radiounit label="{xen:phrase user_title_override}:" name="user_title_override" value="{xen:if $userGroup.user_title, '1', '0'}">
			<xen:explain>{xen:phrase you_may_use_html}</xen:explain>
			<xen:option value="0">{xen:phrase use_default_user_title_ladder}</xen:option>
			<xen:option value="1">
				<xen:label>{xen:phrase use_following_user_title}:</xen:label>
				<xen:textbox name="user_title" value="{$userGroup.user_title}" size="50" />
			</xen:option>
		</xen:radiounit>
		<xen:textboxunit label="{xen:phrase user_name_css}:" name="username_css" value="{$userGroup.username_css}" rows="2" inputclass="Elastic" code="true" />
	</fieldset>

	<fieldset>
		<xen:textboxunit label="{xen:phrase user_banner_text}:" explain="{xen:phrase banner_displayed_under_name_of_members_of_this_group}" name="banner_text" value="{$userGroup.banner_text}" maxlength="100" />
		<xen:require css="public:user_banners.css" />
		<xen:controlunit label="{xen:phrase user_banner_styling}:">
			<xen:radio name="banner_css_class" value="{$userGroup.banner_css_class}" listclass="checkboxColumns">
				<xen:foreach loop="$displayStyles" value="$class">
					<xen:option value="{$class}"><span title="{$class}" class="Tooltip {$class}" style="display: inline">{xen:phrase banner}</span></xen:option>
				</xen:foreach>
				<xen:option selected="{$displayStylesOther}" label="{xen:phrase other_using_custom_css_class_name}:">
					<xen:textbox name="banner_css_class" value="{xen:if $displayStylesOther, {$userGroup.banner_css_class}, ''}" inputclass="autoSize" maxlength="75" />
				</xen:option>
			</xen:radio>
		</xen:controlunit>
	</fieldset>

	<fieldset id="piGroups">
	
		<xen:include template="permission_tooltip" />
		
		<xen:include template="permission_check_all">
			<xen:set var="$target">#piGroups</xen:set>
		</xen:include>
	
		<xen:foreach loop="$permissions" value="$interfaceGroup">
			<xen:include template="permission_list_group" />
		</xen:foreach>
	
	</fieldset>

	<xen:submitunit save="{xen:phrase save_user_group}">
		<xen:if is="{$userGroup.user_group_id}">
			<input type="button" value="{xen:phrase delete_user_group}..." accesskey="d" class="button OverlayTrigger"
				data-href="{xen:adminlink 'user-groups/delete', $userGroup}" />
		</xen:if>
	</xen:submitunit>

</xen:form>]]></template>
  <template title="user_group_list"><![CDATA[<xen:title>{xen:phrase user_groups}</xen:title>

<xen:topctrl>
	<a href="{xen:adminlink 'user-groups/add'}" class="button">+ {xen:phrase create_new_user_group}</a>
</xen:topctrl>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<xen:form action="{xen:adminlink user-groups}" class="section">

	<h2 class="subHeading">
		<xen:include template="filter_list_controls" />
		{xen:phrase user_groups}
	</h2>

	<ol class="FilterList Scrollable">
		<xen:foreach loop="$userGroups" value="$userGroup">
			<xen:listitem
				id="{$userGroup.user_group_id}"
				label="{$userGroup.title}"
				href="{xen:adminlink 'user-groups/edit', $userGroup}"
				snippet="{$userGroup.user_title}"
				delete="{xen:adminlink 'user-groups/delete', $userGroup}" />
		</xen:foreach>
	</ol>

	<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:count $userGroups}</span>', 'total={xen:count $userGroups}'}</p>

</xen:form>]]></template>
  <template title="user_group_promotion_delete"><![CDATA[<xen:title>{xen:phrase confirm_deletion_of_promotion}: {$promotion.title}</xen:title>
<xen:h1>{xen:phrase confirm_deletion_of_promotion}</xen:h1>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'user-group-promotions/edit', $promotion}">{$promotion.title}</xen:breadcrumb>
</xen:navigation>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'user-group-promotions/delete', $promotion}" class="deleteConfirmForm">
	<p>{xen:phrase please_confirm_that_you_want_to_delete_following_promotion}:</p>
	<strong><a href="{xen:adminlink 'user-group-promotions/edit', $promotion}">{$promotion.title}</a></strong>
	
	<p>{xen:phrase users_given_promotion_not_be_demoted_when_promotion_deleted}</p>

	<xen:submitunit save="{xen:phrase delete_promotion}" />

	<input type="hidden" name="_xfConfirm" value="1" />
</xen:form>]]></template>
  <template title="user_group_promotion_demote"><![CDATA[<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'user-group-promotions/demote', '', 'user_id={$user.user_id}', 'promotion_id={$promotion.promotion_id}'}" class="deleteConfirmForm">
	<xen:if is="{$isDemotion}">

		<xen:title>{xen:phrase confirm_demotion_of_user}: {$user.username}</xen:title>
		<xen:h1>{xen:phrase confirm_demotion_of_user}</xen:h1>
			
		<p>{xen:phrase please_confirm_want_remove_user_from_promotion}:</p>
		<strong>{$user.username} - {$promotion.title}</strong>
		
		<p>{xen:phrase this_user_not_receive_promotion_even_if_meets_requirements}</p>
		
		<xen:submitunit save="{xen:phrase demote_user}" />

	<xen:else />

		<xen:title>{xen:phrase confirm_enabling_of_promotion_for_user}: {$promotion.title}</xen:title>
		<xen:h1>{xen:phrase confirm_enabling_of_promotion_for_user}</xen:h1>
			
		<p>{xen:phrase please_confirm_want_enable_promotion_for_user}:</p>
		<strong>{$user.username} - {$promotion.title}</strong>
		
		<p>{xen:phrase this_user_will_receive_promotion_when_meets_requirements}</p>
		
		<xen:submitunit save="{xen:phrase enable_promotion_for_user}" />	

	</xen:if>

	<input type="hidden" name="_xfConfirm" value="1" />
	<input type="hidden" name="redirect" value="{$redirect}" />
</xen:form>]]></template>
  <template title="user_group_promotion_edit"><![CDATA[<xen:title>{xen:if {$promotion.promotion_id}, '{xen:phrase edit_promotion}: {$promotion.title}', '{xen:phrase create_new_promotion}'}</xen:title>

<xen:if is="{$promotion.promotion_id}">
	<xen:navigation>
		<xen:breadcrumb href="{xen:adminlink user-group-promotions}#{xen:helper listitemid, $promotion.promotion_id}">{$promotion.title}</xen:breadcrumb>
	</xen:navigation>
</xen:if>

<xen:form action="{xen:adminlink 'user-group-promotions/save', $promotion}" class="AutoValidator" data-redirect="yes">

	<ul class="tabs Tabs" data-panes="#promoPanes > li">
		<li class="active"><a>{xen:phrase promotion_options}</a></li>
		<li><a>{xen:phrase apply_this_promotion_while}</a></li>		
		<li><a>{xen:phrase custom_userfield_criteria}</a></li>
	</ul>
	
	<ul id="promoPanes">
		<li>
			<xen:textboxunit label="{xen:phrase title}:" name="title" value="{$promotion.title}" data-livetitletemplate="{xen:if {$promotion.promotion_id},
				'{xen:phrase edit_promotion}: <em>%s</em>',
				'{xen:phrase create_new_promotion}: <em>%s</em>'}" />
				
			<xen:checkboxunit label="">
				<xen:option name="active" selected="{$promotion.active}">{xen:phrase promotion_is_active}</xen:option>
			</xen:checkboxunit>
	
			<fieldset>
				<xen:checkboxunit label="{xen:phrase add_user_to_user_groups}:" name="extra_user_group_ids" class="checkboxColumns">
					<xen:options source="$userGroupOptions" />
				</xen:checkboxunit>
			</fieldset>
		</li>
		<li>
			<xen:include template="helper_criteria_user">
				<xen:set var="$criteriaHintHtml">{xen:phrase user_must_meet_all_criteria_to_be_promoted_active_only}</xen:set>
			</xen:include>
			<xen:include template="helper_criteria_user_date">
				<xen:set var="$noDateFields">1</xen:set>
			</xen:include>
		</li>
		<li><xen:include template="helper_criteria_user_field" /></li>
	</ul>
	
	<xen:submitunit save="{xen:phrase save_promotion}">
		<xen:if is="{$promotion.promotion_id}">
			<input type="button" value="{xen:phrase delete_promotion}..." accesskey="d" class="button OverlayTrigger"
				data-href="{xen:adminlink 'user-group-promotions/delete', $promotion}" /></xen:if>
	</xen:submitunit>
</xen:form>]]></template>
  <template title="user_group_promotion_history"><![CDATA[<xen:title>{xen:phrase promotion_history}</xen:title>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink user-group-promotions/manage}">{xen:phrase manage_promoted_users}</xen:breadcrumb>
</xen:navigation>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<xen:if is="{$entries}">

	<div class="section">
	
		<h2 class="subHeading">
			{xen:phrase promotion_history}
		</h2>
	
		<ol class="FilterList secondRow">
			<xen:foreach loop="$entries" value="$entry">
				<xen:listitem id="{$entry.promotion_id}-{$entry.user_id}"
					delete="{xen:adminlink user-group-promotions/demote, '', 'user_id={$entry.user_id}', 'promotion_id={$entry.promotion_id}'}">
					<xen:label>{$entry.username} <span class="muted">{$entry.title}</span>
						<span class="secondRow">
							<xen:datetime time="{$entry.promotion_date}" class="faint" />
							{xen:if "{$entry.promotion_state} == 'manual'", '- {xen:phrase manually_applied}',
								{xen:if "{$entry.promotion_state} == 'disabled'", '- {xen:phrase promotion_disabled}'}
							}
						</span>
					</xen:label>
				</xen:listitem>
			</xen:foreach>
		</ol>
	
		<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:count $entries}</span>', 'total={xen:number $totalEntries}'}</p>
	
	</div>
		
	<xen:adminpagenav page="{$page}" perpage="{$perPage}" total="{$totalEntries}" link="user-group-promotions/history" linkparams="{$linkParams}" />

<xen:else />
	<div class="noResults">{xen:phrase no_promotion_history_meeting_criteria_found}</div>
</xen:if>]]></template>
  <template title="user_group_promotion_list"><![CDATA[<xen:title>{xen:phrase user_group_promotions}</xen:title>

<xen:topctrl>
	<a href="{xen:adminlink user-group-promotions/manage}" class="button">{xen:phrase manage_promoted_users}</a>
	<a href="{xen:adminlink user-group-promotions/add}" class="button">+ {xen:phrase create_new_promotion}</a>
</xen:topctrl>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<xen:form action="{xen:adminlink user-group-promotions/toggle}" class="section AutoValidator">
	<xen:if is="{$promotions}">
		<h2 class="subHeading">
			<xen:include template="filter_list_controls" />
			{xen:phrase user_group_promotions}
		</h2>
	
		<ol class="FilterList">
		<xen:foreach loop="$promotions" value="$promotion">
			<xen:listitem
				id="{$promotion.promotion_id}"
				label="{$promotion.title}"
				href="{xen:adminlink user-group-promotions/edit, $promotion}"
				delete="{xen:adminlink user-group-promotions/delete, $promotion}"
				toggle="{$promotion.active}"
				toggletitle="{xen:phrase enable_disable_x, 'title={$promotion.title}'}" />
		</xen:foreach>
		</ol>
	
		<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:count $promotions}</span>', 'total={xen:count $promotions}'}</p>
	<xen:else />
		<div class="noResults">{xen:phrase no_promotions_have_been_defined}</div>
	</xen:if>
</xen:form>]]></template>
  <template title="user_group_promotion_manage"><![CDATA[<xen:title>{xen:phrase manage_promoted_users}</xen:title>

<xen:form action="{xen:adminlink user-group-promotions/history}">
	<h2 class="textHeading">{xen:phrase search_promotion_history}</h2>
	
	<xen:textboxunit label="{xen:phrase user_name}:" hint="{xen:phrase you_may_leave_this_blank}" name="username" inputclass="AutoComplete AcSingle" />
	
	<xen:selectunit label="{xen:phrase promotion}:" name="promotion_id">
		<xen:option value="0">({xen:phrase any})</xen:option>
		<xen:foreach loop="$promotions" value="$promotion">
			<xen:option value="{$promotion.promotion_id}">{$promotion.title}</xen:option>
		</xen:foreach>
	</xen:selectunit>
	
	<xen:submitunit save="{xen:phrase search}" />
	
</xen:form>

<xen:form action="{xen:adminlink user-group-promotions/manual}">
	<h2 class="textHeading">{xen:phrase manually_promote_user}</h2>
	
	<xen:textboxunit label="{xen:phrase user_name}:" name="username" inputclass="AutoComplete AcSingle" />
	
	<xen:selectunit label="{xen:phrase promotion}:" name="promotion_id">
		<xen:foreach loop="$promotions" value="$promotion">
			<xen:option value="{$promotion.promotion_id}">{$promotion.title}</xen:option>
		</xen:foreach>
	</xen:selectunit>
	
	<xen:radiounit label="{xen:phrase action}:" name="action">
		<xen:option value="promote" selected="true">{xen:phrase promote_this_user}</xen:option>
		<xen:option value="demote">{xen:phrase prevent_this_user_from_receiving_this_promotion_automatically}</xen:option>
	</xen:radiounit>
	
	<xen:submitunit save="{xen:phrase save_changes}" />
</xen:form>]]></template>
  <template title="user_ips"><![CDATA[<xen:title>{xen:phrase ip_addresses_logged_for_username, 'username={$user.username}'}</xen:title>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'users/edit', $user}">{$user.username}</xen:breadcrumb>
</xen:navigation>

<xen:require css="user_ips.css" />

<div class="section userIpList">
	<ol class="overlayScroll">
	<xen:foreach loop="$ips" key="$date" value="$ip">
		<li class="primaryContent">
			<a class="ip" href="{xen:link misc/ip-info, '', 'ip={$ip}'}" target="_blank">{$ip}</a>
			<div class="infoControls secondaryContent">
				<xen:datetime time="$date" class="muted" />
				<a class="OverlayTrigger" href="{xen:adminlink 'users/ip-users', '', 'ip={$ip}'}">{xen:phrase more_users}</a>
				<a class="OverlayTrigger" href="{xen:adminlink banning/discouraged-ips-add, '', 'ip={$ip}'}" target="_blank">{xen:phrase discourage_ip}</a>
				<a class="OverlayTrigger" href="{xen:adminlink banning/ips-add, '', 'ip={$ip}'}" target="_blank">{xen:phrase ban_ip}</a>
			</div>
		</li>
	</xen:foreach>
	</ol>
	<div class="sectionFooter overlayOnly"><a class="button primary OverlayCloser">{xen:phrase close}</a></div>
</div>]]></template>
  <template title="user_ips.css"><![CDATA[.userIpList li
{
	overflow: hidden; zoom: 1;
	padding: 0;
}

.userIpList .ip,
.userIpList .secondaryContent
{
	padding: 5px {xen:property ctrlUnitEdgeSpacer};
	border-bottom: none;
}

.userIpList .ip
{
	height: 27px;
	line-height: 27px;
	font-size: 13pt;
	float: left;
}

.userIpList .infoControls
{
	font-size: 11px;
	float: right;
}

	.userIpList .DateTime
	{
		display: block;
	}
	
		.userIpList .DateTime.thingy
		{
			font-size: 11px;
		}
	
	.userIpList .infoControls a
	{
		margin-left: 10px;
	}
	
.xenForm .userIpList .primaryContent:last-child
{
	border-bottom: none;
}

.ipUserList .primaryContent
{
	overflow: hidden; zoom: 1;
	padding: 5px 10px;
}

	.ipUserList .avatar
	{
		float: left;
		margin-right: 10px;
	}
	
		.ipUserList .avatar img
		{
			/*height: 36px;
			width: 36px;*/
		}
	
	.ipUserList .username
	{
		font-size: 13pt;
	}
	
	.ipUserList .userBlurb
	{
		font-size: 11px;
	}
	
	.ipUserList .DateTime
	{
		color: {xen:property mutedTextColor};
		font-size: 11px;
		margin-top: 5px;
	}]]></template>
  <template title="user_list"><![CDATA[<xen:title>{xen:phrase users}</xen:title>

<xen:topctrl>
	<a href="{xen:adminlink 'users/add'}" class="button">+ {xen:phrase create_new_user}</a>
</xen:topctrl>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<xen:form action="{xen:if $showingAll, {xen:adminlink users/batch-update}, {xen:adminlink users/list, '', '_params={$linkParams}'}}" class="section">

	<h2 class="subHeading">
		<xen:if is="!{$showingAll}">
			<xen:include template="filter_list_controls" />
		<xen:else />
			<input type="checkbox" class="CheckAll" data-filter=".selectListItem input:checkbox" checked="checked" />
		</xen:if>
		{xen:phrase users}
	</h2>

	<ol class="FilterList Scrollable" data-ajaxfilter="true">
		<xen:include template="user_list_items" />
	</ol>

	<p class="sectionFooter">
		<xen:if is="{$showAll}">
			<a href="{xen:adminlink users/list, '', '_params={$linkParams}', 'all=1'}" class="left">{xen:phrase show_all_matches}</a>
		<xen:elseif is="{$showingAll}" />
			<input type="submit" class="button left" value="{xen:phrase batch_update_selected}" />
		</xen:if>
		{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:count $users}</span>', 'total={xen:number $totalUsers}'}
	</p>

	<input type="hidden" name="_xfConfirm" value="1" />

</xen:form>

<xen:if is="!{$showingAll}">
	{xen:adminpagenav $usersPerPage, $totalUsers, $page, users/list, '', '_params={$linkParams}'}
</xen:if>]]></template>
  <template title="user_list_items"><![CDATA[<xen:foreach loop="$users" value="$user">
	<xen:listitem
		id="{$user.user_id}"
		selectable="{$showingAll}"
		selected="1"
		selectname="user_ids[]"
		label="{$user.username}"
		href="{xen:adminlink 'users/edit', $user}"
		snippet="{$user.email}"
		delete="{xen:adminlink users/delete, $user}">
		<xen:beforelabel>
			<img src="{xen:helper avatar, $user, s}" alt="" class="listAvatar" />
		</xen:beforelabel>
		<xen:html>
			<xen:if is="{$user.is_banned}">
				<a href="{xen:adminlink banning/users/lift, $user}" class="secondaryContent OverlayTrigger liftCtrl">{xen:phrase lift_ban}...</a>
			<xen:else />
				<a href="{xen:adminlink banning/users/add, $user}" class="secondaryContent OverlayTrigger banCtrl">{xen:phrase ban_user}...</a>
			</xen:if>
			<a href="{xen:adminlink user-permissions, $user}" class="secondaryContent">{xen:phrase permissions}</a>
		</xen:html>
	</xen:listitem>
</xen:foreach>
<xen:if is="{$filterMore}">
	<li class="listNote">{xen:phrase more_records_matching_filter_more_specific}</li>
</xen:if>]]></template>
  <template title="user_manage_watched_threads"><![CDATA[<xen:title>{xen:phrase manage_watched_threads} - {$user.username}</xen:title>

<xen:form action="{xen:adminlink 'users/manage-watched-threads', $user}" class="formOverlay">

	<xen:radiounit name="act" label="{xen:phrase action}:" value="watch_no_email">
		<xen:option value="watch_no_email">{xen:phrase disable_email_notification}</xen:option>
		<xen:option value="">{xen:phrase stop_watching_threads}</xen:option>
	</xen:radiounit>
	
	<xen:submitunit save="{xen:phrase save_changes}" />
	
	<input type="hidden" name="_xfConfirm" value="1" />
</xen:form>]]></template>
  <template title="user_merge"><![CDATA[<xen:title>{xen:phrase merge_users}</xen:title>

<xen:form action="{xen:adminlink users/merge, $user}">

	<xen:controlunit label="{xen:phrase source_user}:" explain="{xen:phrase this_user_will_be_deleted}">{$user.username}</xen:controlunit>
	<xen:textboxunit label="{xen:phrase target_user}:" name="username" inputclass="AutoComplete AcSingle" explain="{xen:phrase x_will_be_merged_into_this_user_and_all_of_xs_content_moved, 'name={$user.username}', 'name1={$user.username}'}" />

	<xen:submitunit save="{xen:phrase merge_users}" />

	<input type="hidden" name="_xfConfirm" value="1" />
</xen:form>]]></template>
  <template title="user_moderated"><![CDATA[<xen:title>{xen:phrase users_awaiting_approval}</xen:title>

<xen:form action="{xen:adminlink 'users/moderated/update'}">
	<xen:foreach loop="$users" value="$user">
		<fieldset>
			<xen:controlunit label="{xen:phrase user}:"><a href="{xen:adminlink users/edit, $user}" target="_blank">{$user.username}</a> ({$user.email})</xen:controlunit>
			<xen:controlunit label="{xen:phrase joined}:"><xen:datetime time="{$user.register_date}" /></xen:controlunit>
			<xen:if is="{$user.ip}">
				<xen:controlunit label="{xen:phrase ip}:"><a href="{xen:link misc/ip-info, '', 'ip={$user.ip}'}" target="_blank">{$user.ip}</a> <xen:if is="{$user.ipHost}">({$user.ipHost})</xen:if></xen:controlunit>
			</xen:if>
			<xen:if is="{$user.spamDetails}">
				<xen:controlunit label="{xen:phrase spam_log}:"><ul>
					<xen:foreach loop="{$user.spamDetails}" value="{$detail}">
						<li>{xen:escape $detail, false}</li>
					</xen:foreach>
				</ul></xen:controlunit>
			</xen:if>
			<xen:radiounit label="{xen:phrase action}:" name="users[{$user.user_id}][action]">
				<xen:option value="none" selected="true">{xen:phrase do_nothing}</xen:option>
				<xen:option value="approve">{xen:phrase approve}</xen:option>
				<xen:option value="reject">
					<xen:label>{xen:phrase reject_and_delete_with_rejection_reason}:</xen:label>
					<xen:textbox placeholder="{xen:phrase optional}" name="users[{$user.user_id}][reject_reason]" size="45" />
				</xen:option>
			</xen:radiounit>
			<xen:checkboxunit label="">
				<xen:option name="users[{$user.user_id}][notify]" selected="!{$user.spamDetails}">{xen:phrase notify_user_if_action_was_taken}</xen:option>
			</xen:checkboxunit>
		</fieldset>
	</xen:foreach>
	
	<xen:submitunit save="{xen:phrase process_users}" />
</xen:form>]]></template>
  <template title="user_remove_likes"><![CDATA[<xen:title>{xen:phrase remove_likes}</xen:title>

<xen:form action="{xen:adminlink users/remove-likes, $user}">

	<xen:controlunit label="{xen:phrase user}:">{$user.username}</xen:controlunit>
	<xen:controlunit label="{xen:phrase remove_likes_within_last}:">
		<input type="text" size="5" name="cutoff_value" value="1" class="textCtrl autoSize" />
		<select name="cutoff_unit" class="textCtrl autoSize">
			<option value="hours">{xen:phrase hours}</option>
			<option value="days" selected="selected">{xen:phrase days}</option>
			<option value="weeks">{xen:phrase weeks}</option>
			<option value="months">{xen:phrase months}</option>
		</select>
	</xen:controlunit>
	<xen:submitunit save="{xen:phrase remove_likes}" />

	<input type="hidden" name="_xfConfirm" value="1" />
</xen:form>]]></template>
  <template title="user_revert_message_edit"><![CDATA[<xen:title>{xen:phrase revert_message_edits}</xen:title>

<xen:form action="{xen:adminlink users/revert-message-edit, $user}">

	<xen:controlunit label="{xen:phrase user}:">{$user.username}</xen:controlunit>
	<xen:controlunit label="{xen:phrase revert_edits_within_last}:">
		<input type="text" size="5" name="cutoff_value" value="1" class="textCtrl autoSize" />
		<select name="cutoff_unit" class="textCtrl autoSize">
			<option value="hours">{xen:phrase hours}</option>
			<option value="days" selected="selected">{xen:phrase days}</option>
			<option value="weeks">{xen:phrase weeks}</option>
			<option value="months">{xen:phrase months}</option>
		</select>
		<xen:if is="{$xenOptions.editHistory.length}">
			<p class="explain">{xen:phrase only_edits_within_last_x_days_will_be_reverted, 'count={$xenOptions.editHistory.length}'}</p>
		</xen:if>
	</xen:controlunit>
	<xen:submitunit save="{xen:phrase revert_edits}" />

	<input type="hidden" name="_xfConfirm" value="1" />
</xen:form>]]></template>
  <template title="user_search"><![CDATA[<xen:title>{xen:phrase search_for_users}</xen:title>

<xen:topctrl>
	<xen:popup title="{xen:phrase common_searches}">
		<xen:link href="{xen:adminlink users/list}">{xen:phrase all_users}</xen:link>
		<xen:link href="{xen:adminlink users/list, '', 'criteria={xen:array "user_state={xen:array '0=email_confirm', '1=email_confirm_edit'}"}', 'order=register_date', 'direction=desc'}">{xen:phrase awaiting_email_confirmation}</xen:link>
		<xen:link href="{xen:adminlink users/list, '', 'order=register_date', 'direction=desc'}">{xen:phrase newest_registrations}</xen:link>
		<xen:link href="{xen:adminlink users/list, '', 'order=last_activity', 'direction=desc'}">{xen:phrase recently_active}</xen:link>
		<xen:link href="{xen:adminlink users/list, '', 'order=message_count', 'direction=desc'}">{xen:phrase most_messages}</xen:link>
	</xen:popup>
</xen:topctrl>

<xen:if is="{$lastUser}">
	<div class="section userMessage">
		<div class="secondaryContent">
			<xen:avatar user="$lastUser" size="s" />
			<div class="message">
				<h2>{xen:phrase changes_saved}</h2>
				<a href="{xen:adminlink users/edit, $lastUser}">{xen:phrase edit_x_again, 'name={$lastUser.username}'}</a>
			</div>
		</div>
	</div>
</xen:if>

<ul class="tabs Tabs xenFormTabs" data-panes="#searchPanes > li">
	<li id="tabUserSearch"><a>{xen:phrase standard_search}</a></li>
	<li id="tabIpSearch"><a>{xen:phrase search_by_ip_address}</a></li>
</ul>

<ul id="searchPanes">
	<li>
		<xen:form action="{xen:adminlink users/list}">
			<xen:include template="helper_user_search_criteria" />
		
			<xen:controlunit label="{xen:phrase sort}:">
				<xen:select name="order" inputclass="autoSize">
					<xen:option value="username">{xen:phrase user_name}</xen:option>
					<xen:option value="register_date">{xen:phrase join_date}</xen:option>
					<xen:option value="message_count">{xen:phrase messages}</xen:option>
					<xen:option value="last_activity">{xen:phrase last_activity}</xen:option>
				</xen:select>
				<xen:select name="direction" inputclass="autoSize">
					<xen:option value="asc">{xen:phrase ascending}</xen:option>
					<xen:option value="desc">{xen:phrase descending}</xen:option>
				</xen:select>
			</xen:controlunit>
			
			<xen:submitunit save="{xen:phrase search}" />
		</xen:form>
	</li>
	<li>
		<xen:form action="{xen:adminlink users/ip-users}">
		
			<xen:textboxunit label="{xen:phrase ip_address}:" name="ip" explain="{xen:phrase ip_search_explain}" />
			
			<xen:submitunit save="{xen:phrase search}" />
		
		</xen:form>
	</li>
</ul>]]></template>
  <template title="user_splash"><![CDATA[<xen:title>{xen:phrase users}</xen:title>

<xen:topctrl>
	<xen:if is="{$canManageUsers}"><a href="{xen:adminlink users/add}" class="button">+ {xen:phrase create_new_user}</a></xen:if>
	<xen:if is="{$canManageBans}"><a href="{xen:adminlink banning/users/add}" class="button">{xen:phrase ban_user}</a></xen:if>
	<xen:if is="{$canManageUserGroups}"><a href="{xen:adminlink user-group-permissions}" class="button">{xen:phrase group_permissions}</a></xen:if>
</xen:topctrl>

<xen:require css="splash.css" />

<div class="splash">
	<div class="iconicContainer">
	<ul class="iconic">
	
	<xen:hook name="admin_icons_users">
		
	<xen:if is="{$canManageUsers}">			
		<li><a href="{xen:adminlink 'users/list'}" class="users_list list">
			<span class="icon"><span></span></span>
			<span class="linkText">{xen:phrase list_all_users}</span>
			</a></li>
	
		<!-- slot: pre_users_moderated -->
			
		<li><a href="{xen:adminlink 'users/moderated'}" class="users_moderated moderated">
			<span class="icon"><span></span></span>
			<span class="linkText">{xen:phrase users_awaiting_approval}</span>
			</a></li>
	</xen:if>
	
	<!-- slot: pre_banning_users -->
			
	<xen:if is="{$canManageBans}">		
		<li><a href="{xen:adminlink 'banning/users'}" class="banning_users list">
			<span class="icon"><span></span></span>
			<span class="linkText">{xen:phrase banned_users}</span>
			</a></li>
	</xen:if>
	
	<!-- slot: pre_user_groups -->
	
	<xen:if is="{$canManageUserGroups}">
		<li><a href="{xen:adminlink 'user-groups'}" class="user_groups">
			<span class="icon"><span></span></span>
			<span class="linkText">{xen:phrase user_groups}</span>
			</a></li>
		
		<!-- slot: pre_user_group_permissions -->
			
		<li><a href="{xen:adminlink 'user-group-permissions'}" class="user_group_permissions">
			<span class="icon"><span></span></span>
			<span class="linkText">{xen:phrase group_permissions}</span>
			</a></li>
	</xen:if>
		
	<!-- slot: pre_manage_trophies -->
	
	<xen:if is="{$canManageTrophies}">
		<li><a href="{xen:adminlink 'trophies'}" class="trophies">
			<span class="icon"><span></span></span>
			<span class="linkText">{xen:phrase trophies}</span>
			</a></li>
		</xen:if>
		
	<!-- slot: pre_user_title_ladder -->

	<xen:if is="{$canManageUsers}">			
		<li><a href="{xen:adminlink 'user-title-ladder'}" class="user_title_ladder">
			<span class="icon"><span></span></span>
			<span class="linkText">{xen:phrase user_title_ladder}</span>
			</a></li>
	</xen:if>
	
	<!-- slot: pre_user_upgrades -->
			
	<xen:if is="{$canManageUserUpgrades}">
		<li><a href="{xen:adminlink 'user-upgrades'}" class="user_upgrades">
			<span class="icon"><span></span></span>
			<span class="linkText">{xen:phrase user_upgrades}</span>
			</a></li>
	</xen:if>
	
	</xen:hook>
	
	</ul>
	</div>
	
	<xen:if hascontent="true">
		<div class="sidebar">
		<xen:contentcheck>		
			<xen:hook name="admin_sidebar_users">
			
			<xen:if is="{$canManageUsers}">
				<xen:form action="{xen:adminlink 'users/list'}" class="section">
					<xen:textbox name="criteria[username]" inputclass="quickSearchText AutoComplete AcSingle" placeholder="{xen:phrase user_name}..." type="search" results="5" />
					<input type="submit" class="button primary quickSearchButton" value="{xen:phrase find_user}" />
					<a href="{xen:adminlink 'users/search'}" class="quickSearchAdvanced">{xen:phrase advanced_search}...</a>
				</xen:form>
		
				<!-- slot: pre_member_stats -->
				
				<div class="section">		
					<div class="secondaryContent">
						<h3 class="textHeading">{xen:phrase member_statistics}</h3>
						<div class="statsBlock">		
							<a href="{xen:adminlink users/list}"><span class="label">{xen:phrase total_members}:</span> <strong>{xen:number $users.total}</strong></a>	
							<a href="{xen:adminlink users/moderated}"><span class="label">{xen:phrase awaiting_approval}:</span> <strong>{xen:number $users.awaitingApproval}</strong></a>
							<a href="{xen:adminlink admins}"><span class="label">{xen:phrase administrators}:</span> <strong>{xen:number $users.admins}</strong></a>
							<a href="{xen:adminlink moderators}"><span class="label">{xen:phrase moderators}:</span> <strong>{xen:number $users.moderators}</strong></a>
						</div>
					</div>
				</div>
		
				<!-- slot: post_member_stats -->
			</xen:if>
				
			<xen:if is="{$canManageBans}">
				<div class="section">		
					<div class="secondaryContent">
						<h3 class="textHeading">{xen:phrase banning}</h3>
						<div class="statsBlock">
							<a href="{xen:adminlink banning/users}"><span class="label">{xen:phrase banned_members}:</span> <strong>{xen:number $users.banned}</strong></a>
							<a href="{xen:adminlink banning/ips}"><span class="label">{xen:phrase banned_ip_addresses}:</span> <strong>{xen:number $bannedIps}</strong></a>
							<a href="{xen:adminlink banning/emails}"><span class="label">{xen:phrase banned_emails}:</span> <strong>{xen:number $bannedEmails}</strong></a>
						</div>
					</div>
				</div>
			</xen:if>
			
			</xen:hook>			
		</xen:contentcheck>
		</div>
	</xen:if>
</div>]]></template>
  <template title="user_title_ladder_list"><![CDATA[<xen:title>{xen:phrase user_title_ladder}</xen:title>

<xen:form action="{xen:adminlink 'options/save'}" class="AutoValidator OptIn">
	<xen:foreach loop="$renderedOptions" value="$renderedOption">
		{xen:raw $renderedOption}
	</xen:foreach>

	<xen:submitunit save="{xen:phrase save}" />
</xen:form>

<xen:form action="{xen:adminlink 'user-title-ladder/update'}">
	<table class="dataTable">
	<col style="width: 1%" />
	<col style="width: 1%" />
	<thead>
		<tr class="dataRow">
			<th>{xen:phrase delete}</th>
			<th>{xen:phrase title}</th>
			<th>{xen:phrase minimum_value}</th>
		</tr>
	</thead>
	<tbody>
		<xen:foreach loop="$titles" value="$title">
			<tr class="dataRow">
				<td><input type="checkbox" name="delete[]" value="{$title.minimum_level}" /></td>
				<td><xen:textbox name="update[{$title.minimum_level}][title]" value="{$title.title}" size="35" /></td>
				<td><xen:textbox name="update[{$title.minimum_level}][minimum_level]" value="{$title.minimum_level}" size="3" /></td>
			</tr>
		</xen:foreach>
		<tr class="dataRow">
			<td>{xen:phrase new}:</td>
			<td><xen:textbox name="title" size="35" /></td>
			<td><xen:textbox name="minimum_level" value="0" size="3" /></td>
		</tr>
	</tbody>
	<tfoot>
		<tr>
			<td colspan="3" class="sectionFooter"><input type="submit" value="{xen:phrase update_user_titles}" class="button primary" /></td>
		</tr>
	</tfoot>
	</table>
</xen:form>]]></template>
  <template title="user_upgrade_active"><![CDATA[<xen:if is="{$upgrade}">
	<xen:title>{xen:phrase active_user_upgrades}: {$upgrade.title}</xen:title>
<xen:else />
	<xen:title>{xen:phrase active_user_upgrades}</xen:title>
</xen:if>

<xen:topctrl>
	<form action="{xen:adminlink user-upgrades/active, $upgrade, '_params={$pageNavParams}', 'username='}" method="post">
		<input type="search" name="username" value="{$user.username}" class="textCtrl AutoComplete AcSingle" results="10" size="20" placeholder="{xen:phrase user_name}..." />
		<input type="submit" value="{xen:phrase filter}" class="button" />
		<input type="hidden" name="_xfToken" value="{$visitor.csrf_token_page}" />
	</form>
</xen:topctrl>

<xen:if is="{$upgradeRecords}">
	<table class="dataTable">
	<col  />
	<col style="width: 20%" />
	<col style="width: 20%" />
	<col style="width: 20%" />
	<col style="width: 1%" />
	<tr class="dataRow">
		<th><a href="{xen:adminlink user-upgrades/active, $upgrade, '_params={$pageNavParams}', 'order=username', 'direction='}">{xen:phrase user}</a></th>
		<th>{xen:phrase user_upgrade_title}</th>
		<th><a href="{xen:adminlink user-upgrades/active, $upgrade, '_params={$pageNavParams}', 'order=start_date', 'direction=desc'}">{xen:phrase start_date}</a></th>
		<th><a href="{xen:adminlink user-upgrades/active, $upgrade, '_params={$pageNavParams}', 'order=end_date', 'direction=desc'}">{xen:phrase end_date}</a></th>
		<th>&nbsp;</th>
	</tr>
	<xen:foreach loop="$upgradeRecords" value="$upgradeRecord">
		<tr class="dataRow">
			<td><a href="{xen:adminlink users/edit, $upgradeRecord}">{$upgradeRecord.username}</a></td>
			<td>{$upgradeRecord.title}</td>
			<td><xen:datetime time="{$upgradeRecord.start_date}" /></td>
			<td><xen:if is="{$upgradeRecord.end_date}">{xen:date $upgradeRecord.end_date}<xen:else />{xen:phrase permanent}</xen:if></td>
			<td class="dataOptions">
				<a href="{xen:adminlink user-upgrades/edit-active, '', 'user_upgrade_record_id={$upgradeRecord.user_upgrade_record_id}'}" class="secondaryContent OverlayTrigger">{xen:phrase edit}</a><!--
				--><a href="{xen:adminlink user-upgrades/downgrade, '', 'user_upgrade_record_id={$upgradeRecord.user_upgrade_record_id}'}" class="secondaryContent OverlayTrigger">{xen:phrase downgrade}</a>
			</td>
		</tr>
	</xen:foreach>
	<tr>
		<td colspan="5" class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count={xen:count $upgradeRecords}', 'total={xen:number $totalRecords}'}</td>
	</tr>
	</table>

	{xen:adminpagenav $perPage, $totalRecords, $page, user-upgrades/active, $upgrade, '_params={$pageNavParams}'}
<xen:else />
	{xen:phrase no_results_found}
</xen:if>]]></template>
  <template title="user_upgrade_delete"><![CDATA[<xen:title>{xen:phrase confirm_deletion_of_user_upgrade}: {$upgrade.title}</xen:title>
<xen:h1>{xen:phrase confirm_deletion_of_user_upgrade}</xen:h1>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'user-upgrades/edit', $upgrade}">{$upgrade.title}</xen:breadcrumb>
</xen:navigation>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'user-upgrades/delete', $upgrade}" class="deleteConfirmForm formOverlay">

	<p>{xen:phrase please_confirm_that_you_want_to_delete_following_user_upgrade}:</p>
	<strong><a href="{xen:adminlink 'user-upgrades/edit', $upgrade}">{$upgrade.title}</a></strong>
	<p>{xen:phrase if_any_users_have_active_upgrades_recommend_disable}</p>

	<xen:submitunit save="{xen:phrase delete_user_upgrade}" />
	<input type="hidden" name="_xfConfirm" value="1" />
	
</xen:form>]]></template>
  <template title="user_upgrade_downgrade"><![CDATA[<xen:title>{xen:phrase confirm_downgrade_of_user}: {$upgradeRecord.username}</xen:title>
<xen:h1>{xen:phrase confirm_downgrade_of_user}</xen:h1>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'user-upgrades/downgrade', '', 'user_upgrade_record_id={$upgradeRecord.user_upgrade_record_id}'}" class="deleteConfirmForm">
	<p>{xen:phrase please_confirm_that_you_want_to_downgrade_following_user}:</p>
	<strong>{$upgradeRecord.username}, {$upgrade.title}</strong>

	<xen:submitunit save="{xen:phrase downgrade_user}" />
	
	<input type="hidden" name="redirect" value="{$redirect}" />
</xen:form>]]></template>
  <template title="user_upgrade_edit"><![CDATA[<xen:title>{xen:if '{$upgrade.title}', '{xen:phrase edit_user_upgrade}: {$upgrade.title}', '{xen:phrase create_new_user_upgrade}'}</xen:title>

<xen:if is="{$upgrade.title}">
	<xen:navigation>
		<xen:breadcrumb href="{xen:adminlink user-upgrades}#{xen:helper listitemid, $upgrade.user_upgrade_id}">{$upgrade.title}</xen:breadcrumb>
	</xen:navigation>
</xen:if>

<xen:form action="{xen:adminlink user-upgrades/save, $upgrade}" class="AutoValidator" data-redirect="yes">
	<xen:textboxunit label="{xen:phrase title}:" name="title" value="{$upgrade.title}" data-livetitletemplate="{xen:if {$upgrade.title},
		'{xen:phrase edit_user_upgrade}: <em>%s</em>',
		'{xen:phrase create_new_user_upgrade}: <em>%s</em>'}" />
	<xen:textboxunit label="{xen:phrase description}:" hint="{xen:phrase you_may_use_html}" name="description" value="{$upgrade.description}" rows="2" inputclass="Elastic" />
	<xen:spinboxunit label="{xen:phrase display_order}:" name="display_order" value="{$upgrade.display_order}" min="1" />
		
	<xen:controlunit label="{xen:phrase cost}:">
		<xen:textbox name="cost_amount" value="{$upgrade.cost_amount}" size="3" />
		<xen:select name="cost_currency" value="{$upgrade.cost_currency}" inputclass="autoSize">
			<xen:option value="usd">USD</xen:option>
			<xen:option value="cad">CAD</xen:option>
			<xen:option value="aud">AUD</xen:option>
			<xen:option value="gbp">GBP</xen:option>
			<xen:option value="eur">EUR</xen:option>
		</xen:select>
	</xen:controlunit>
	
	<xen:radiounit label="{xen:phrase length}:" name="length_type" value="{xen:if $upgrade.length_unit, 'timed', 'permanent'}">
		<xen:option value="permanent">{xen:phrase permanent}</xen:option>
		<xen:option value="timed" label="{xen:phrase for_length}:">
			<xen:disabled>
				<xen:textbox name="length_amount" value="{xen:if $upgrade.length_unit, $upgrade.length_amount, ''}" size="3" />
				<xen:select name="length_unit" value="{$upgrade.length_unit}"  inputclass="autoSize">
					<xen:option value="day">{xen:phrase days}</xen:option>
					<xen:option value="month">{xen:phrase months}</xen:option>
					<xen:option value="year">{xen:phrase years}</xen:option>
				</xen:select>
			</xen:disabled>
			<xen:disabled>
				<label for="ctrl_recurring"><input type="checkbox" name="recurring" value="1" id="ctrl_recurring" {xen:checked $upgrade.recurring} /> {xen:phrase recurring_payments}</label>
				<p class="hint">{xen:phrase payment_automatically_aken_every_time_period_to_keep_active}</p>
			</xen:disabled>
		</xen:option>
	</xen:radiounit>
	
	<xen:checkboxunit label="{xen:phrase additional_user_groups}:" name="extra_group_ids" explain="{xen:phrase puts_user_in_selected_groups_while_upgrade_is_active}" class="checkboxColumns">
		<xen:options source="$userGroupOptions" />
	</xen:checkboxunit>
	
	<xen:if is="{$disabledUpgradeOptions}">
		<xen:checkboxunit label="{xen:phrase disabled_user_upgrades}:" name="disabled_upgrade_ids" explain="{xen:phrase disables_selected_user_upgrades_while_this_upgrade_is_active}">
			<xen:options source="$disabledUpgradeOptions" />
		</xen:checkboxunit>
	</xen:if>
	
	<xen:checkboxunit label="">
		<xen:option label="{xen:phrase can_be_purchased}" name="can_purchase" selected="{$upgrade.can_purchase}" />
	</xen:checkboxunit>
	
	<xen:submitunit save="{xen:phrase save_user_upgrade}">
		<xen:if is="{$upgrade.user_upgrade_id}">
			<input type="button" value="{xen:phrase delete_user_upgrade}..." accesskey="d" class="button OverlayTrigger"
				data-href="{xen:adminlink user-upgrades/delete, $upgrade}" />
		</xen:if>
	</xen:submitunit>
</xen:form>]]></template>
  <template title="user_upgrade_edit_active"><![CDATA[<xen:title>{xen:phrase edit_active_user_upgrade}</xen:title>

<xen:form action="{xen:adminlink user-upgrades/edit-active, '', 'user_upgrade_record_id={$upgradeRecord.user_upgrade_record_id}'}">
	<xen:controlunit label="{xen:phrase user_name}:">{$user.username}</xen:controlunit>
	<xen:controlunit label="{xen:phrase user_upgrade_title}:">{$upgrade.title}</xen:controlunit>
	<xen:radiounit label="{xen:phrase upgrade_ends}:" name="end_type">
		<xen:option value="permanent" selected="{$upgradeRecord.end_date} == 0">{xen:phrase permanent}</xen:option>
		<xen:option value="date" selected="{$upgradeRecord.end_date} != 0" label="{xen:phrase date}:">
			<xen:textbox type="date" name="end_date" value="{xen:date {xen:if $upgradeRecord.end_date, $upgradeRecord.end_date, $serverTime}, picker}" />
		</xen:option>
	</xen:radiounit>

	<xen:submitunit save="{xen:phrase save_changes}" />
	<input type="hidden" name="redirect" value="{$redirect}" />
</xen:form>]]></template>
  <template title="user_upgrade_expired"><![CDATA[<xen:if is="{$upgrade}">
	<xen:title>{xen:phrase expired_user_upgrades}: {$upgrade.title}</xen:title>
<xen:else />
	<xen:title>{xen:phrase expired_user_upgrades}</xen:title>
</xen:if>

<xen:topctrl>
	<form action="{xen:adminlink user-upgrades/expired, $upgrade, '_params={$pageNavParams}', 'username='}" method="post">
		<input type="search" name="username" value="{$user.username}" class="textCtrl AutoComplete AcSingle" results="10" size="20" placeholder="{xen:phrase user_name}..." />
		<input type="submit" value="{xen:phrase filter}" class="button" />
		<input type="hidden" name="_xfToken" value="{$visitor.csrf_token_page}" />
	</form>
</xen:topctrl>

<xen:if is="{$upgradeRecords}">
	<table class="dataTable">
	<col  />
	<col style="width: 22%" />
	<col style="width: 22%" />
	<col style="width: 22%" />
	<tr class="dataRow">
		<th><a href="{xen:adminlink user-upgrades/expired, $upgrade, '_params={$pageNavParams}', 'order=username', 'direction='}">{xen:phrase user}</a></th>
		<th>{xen:phrase user_upgrade_title}</th>
		<th><a href="{xen:adminlink user-upgrades/expired, $upgrade, '_params={$pageNavParams}', 'order=start_date', 'direction=desc'}">{xen:phrase start_date}</a></th>
		<th><a href="{xen:adminlink user-upgrades/expired, $upgrade, '_params={$pageNavParams}', 'order=end_date', 'direction=desc'}">{xen:phrase end_date}</a></th>
	</tr>
	<xen:foreach loop="$upgradeRecords" value="$upgradeRecord">
		<tr class="dataRow">
			<td><a href="{xen:adminlink users/edit, $upgradeRecord}">{$upgradeRecord.username}</a></td>
			<td>{$upgradeRecord.title}</td>
			<td><xen:datetime time="{$upgradeRecord.start_date}" /></td>
			<td><xen:if is="{$upgradeRecord.end_date}">{xen:date $upgradeRecord.end_date}<xen:else />{xen:phrase permanent}</xen:if></td>
		</tr>
	</xen:foreach>
	<tr>
		<td colspan="4" class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count={xen:count $upgradeRecords}', 'total={xen:number $totalRecords}'}</td>
	</tr>
	</table>

	{xen:adminpagenav $perPage, $totalRecords, $page, user-upgrades/expired, $upgrade, '_params={$pageNavParams}'}
<xen:else />
	{xen:phrase no_results_found}
</xen:if>]]></template>
  <template title="user_upgrade_list"><![CDATA[<xen:title>{xen:phrase user_upgrades}</xen:title>

<xen:topctrl>
	<a href="{xen:adminlink user-upgrades/add}" class="button">+ {xen:phrase create_new_user_upgrade}</a>
</xen:topctrl>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<xen:form action="{xen:adminlink user-upgrades/toggle}" class="section AutoValidator">
	<xen:if is="{$upgrades}">

		<h2 class="subHeading">
			<xen:include template="filter_list_controls" />
			{xen:phrase user_upgrades}
		</h2>

		<ol class="FilterList Scrollable">
			<xen:foreach loop="$upgrades" value="$upgrade">
				<xen:listitem
					id="{$upgrade.user_upgrade_id}"
					label="{$upgrade.title}"
					href="{xen:adminlink 'user-upgrades/edit', $upgrade}"
					delete="{xen:adminlink 'user-upgrades/delete', $upgrade}"
					snippet="{$upgrade.costPhrase}"
					toggle="{$upgrade.can_purchase}"
					toggletitle="{xen:phrase enable_disable_x, 'title={$upgrade.title}'}">
					<xen:popup title="{xen:phrase controls}">
						<xen:link href="{xen:adminlink user-upgrades/active, $upgrade}">{xen:phrase view_users}</xen:link>
						<xen:link href="{xen:adminlink user-upgrades/expired, $upgrade}">{xen:phrase view_expired_upgrades}</xen:link>
						<xen:link href="{xen:adminlink user-upgrades/manual, $upgrade}">{xen:phrase manually_upgrade_user}</xen:link>
					</xen:popup>
				</xen:listitem>
			</xen:foreach>
		</ol>

		<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:count $upgrades}</span>', 'total={xen:count $upgrades}'}</p>

	<xen:else />

		<div class="noResults">{xen:phrase no_user_upgrades_have_been_created_yet}</div>

	</xen:if>
</xen:form>

<xen:form action="{xen:adminlink 'options/save'}" class="AutoValidator OptIn">
	<h3 class="subHeading">{xen:phrase payment_gateway_setup}</h3>

	<xen:foreach loop="$renderedOptions" value="$renderedOption">
		{xen:raw $renderedOption}
	</xen:foreach>

	<xen:submitunit save="{xen:phrase save}" />
</xen:form>]]></template>
  <template title="user_upgrade_manual"><![CDATA[<xen:title>{xen:phrase manually_upgrade_user}</xen:title>

<xen:form action="{xen:adminlink user-upgrades/manual, $upgrade}">

	<xen:textboxunit label="{xen:phrase user_name}:" name="username" inputclass="AutoComplete AcSingle" />
	<xen:controlunit label="{xen:phrase upgrade_to_apply}:">{$upgrade.title}</xen:controlunit>
	<xen:if is="{$endDate}">
		<xen:textboxunit label="{xen:phrase upgrade_ends}:" type="date" name="end_date" value="{xen:date $endDate, picker}" />
	</xen:if>

	<xen:submitunit save="{xen:phrase upgrade_user}" />

</xen:form>]]></template>
  <template title="user_upgrade_transaction_log"><![CDATA[<xen:title>{xen:phrase user_upgrade_transaction_log}</xen:title>

<xen:topctrl>
	<a href="{xen:adminlink user-upgrades/transaction-log/search}" class="button">{xen:phrase search_transaction_log}</a>
</xen:topctrl>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<div class="section">
	
	<h2 class="subHeading">
		{xen:phrase user_upgrade_transaction_log}
	</h2>

	<ol class="FilterList secondRow">
		<xen:foreach loop="$logs" value="$log">
			<xen:listitem id="{$log.user_upgrade_log_id}"
				href="{xen:adminlink user-upgrades/transaction-log, '', 'id={$log.user_upgrade_log_id}'}"
				linkclass="OverlayTrigger">
				<xen:label>{xen:if $log.user_upgrade_id, $log.title, '{xen:phrase unknown_upgrade}'}
					- {xen:if "{$log.transaction_type} == 'payment'", '{xen:phrase payment}',
						{xen:if "{$log.transaction_type} == 'info'", '{xen:phrase information}',
						{xen:if "{$log.transaction_type} == 'error'", '{xen:phrase error}',
						{xen:if "{$log.transaction_type} == 'cancel'", '{xen:phrase cancellation}',
						$log.transaction_type}}}}: {$log.message}
					<span class="secondRow">
						<xen:datetime time="{$log.log_date}" class="faint" />,
						{xen:if $log.user_id, $log.username, {xen:phrase unknown_account}}
					</span>
				</xen:label>
			</xen:listitem>
		</xen:foreach>
	</ol>

	<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:count $logs}</span>', 'total={xen:number $totalLogs}'}</p>

</div>
	
<xen:adminpagenav page="{$page}" perpage="{$perPage}" total="{$totalLogs}" link="user-upgrades/transaction-log" linkparams="{$conditions}" />]]></template>
  <template title="user_upgrade_transaction_log_search"><![CDATA[<xen:title>{xen:phrase search_transaction_log}</xen:title>

<xen:form action="{xen:adminlink user-upgrades/transaction-log}">
	<xen:textboxunit label="{xen:phrase transaction_id}:" name="transaction_id" />
	<xen:textboxunit label="{xen:phrase subscriber_id}:" name="subscriber_id" />
	<xen:textboxunit label="{xen:phrase user}:" name="username" inputclass="AutoComplete AcSingle" />
	<xen:selectunit label="{xen:phrase upgrade}:" name="user_upgrade_id">
		<xen:option value="0">({xen:phrase any})</xen:option>
		<xen:foreach loop="$upgrades" value="$upgrade">
			<xen:option value="{$upgrade.user_upgrade_id}">{$upgrade.title}</xen:option>
		</xen:foreach>
	</xen:selectunit>
	<xen:submitunit save="{xen:phrase search_transaction_log}" />
</xen:form>]]></template>
  <template title="user_upgrade_transaction_log_view"><![CDATA[<xen:title>{xen:phrase user_upgrade_transaction_log}</xen:title>

<div class="section xenForm">
	<div class="overlayScroll">
		<div class="primaryContent">
			<dl class="ctrlUnit">
				<dt>{xen:phrase action}:</dt>
				<dd>
					{xen:if "{$log.transaction_type} == 'payment'", '{xen:phrase payment}',
						{xen:if "{$log.transaction_type} == 'info'", '{xen:phrase information}',
						{xen:if "{$log.transaction_type} == 'error'", '{xen:phrase error}',
						{xen:if "{$log.transaction_type} == 'cancel'", '{xen:phrase cancellation}',
						$log.transaction_type}}}}: {$log.message}
				</dd>
			</dl>

			<dl class="ctrlUnit">
				<dt>{xen:phrase user}:</dt>
				<dd>
					<xen:if is="{$log.user_id}">
						<xen:username user="{$log}" />
					<xen:else />
						{xen:phrase unknown_account}
						<p class="explain">{xen:phrase only_log_entries_involve_successful_payment_attached_user_upgrade}</p>
					</xen:if>
				</dd>
			</dl>

			<dl class="ctrlUnit">
				<dt>{xen:phrase upgrade}:</dt>
				<dd>
					<xen:if is="{$log.user_upgrade_id}">
						{$log.title}
					<xen:else />
						{xen:phrase unknown_upgrade}
					</xen:if>
				</dd>
			</dl>

			<dl class="ctrlUnit">
				<dt>{xen:phrase date}:</dt>
				<dd><xen:datetime time="{$log.log_date}" /></dd>
			</dl>

			<xen:if is="{$log.transaction_id}">
				<dl class="ctrlUnit">
					<dt>{xen:phrase transaction_id}:</dt>
					<dd>{$log.transaction_id}</dd>
				</dl>
			</xen:if>

			<xen:if is="{$log.subscriber_id}">
				<dl class="ctrlUnit">
					<dt>{xen:phrase subscriber_id}:</dt>
					<dd>{$log.subscriber_id}</dd>
				</dl>
			</xen:if>

			<h3 class="subHeading">{xen:phrase details}</h3>
			<table class="dataTable">
			<xen:foreach loop="$log.transactionDetails" key="$key" value="$value">
				<tr class="dataRow">
					<td>{$key}</td>
					<td>{$value}</td>
				</tr>
			</xen:foreach>
			</table>
		</div>
	</div>
	<div class="sectionFooter overlayOnly">
		<a class="button primary OverlayCloser">{xen:phrase close}</a>
	</div>
</div>]]></template>
  <template title="warning_action_delete"><![CDATA[<xen:title>{xen:phrase confirm_deletion_of_warning_action}</xen:title>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'warnings/action/delete', $action}" class="deleteConfirmForm formOverlay">

	<p>{xen:phrase please_confirm_that_you_want_to_delete_following_warning_action}:</p>
	<strong><a href="{xen:adminlink 'warnings/action/edit', $action}">{xen:phrase points}: {$action.points}</a></strong>

	<xen:submitunit save="{xen:phrase delete_warning_action}" />
	<input type="hidden" name="_xfConfirm" value="1" />
	
</xen:form>]]></template>
  <template title="warning_action_edit"><![CDATA[<xen:title>{xen:if $action.warning_action_id, '{xen:phrase edit_warning_action}', '{xen:phrase create_new_warning_action}'}</xen:title>

<xen:form action="{xen:adminlink warnings/action/save, $action}" class="AutoValidator" data-redirect="yes">
	<xen:spinboxunit label="{xen:phrase points_threshold}:" explain="{xen:phrase warning_action_applied_crossing_threshold}" name="points" value="{$action.points}" min="1" />

	<xen:radiounit label="{xen:phrase action_to_take}:" name="action" value="{$action.action}">
		<xen:option value="ban" label="{xen:phrase ban}" />
		<xen:option value="discourage" label="{xen:phrase discourage}" />
		<xen:option value="groups" label="{xen:phrase add_to_selected_groups}">
			<xen:checkbox name="extra_user_group_ids">
				<xen:options source="$userGroupOptions" />
			</xen:checkbox>
		</xen:option>
	</xen:radiounit>

	<xen:radiounit name="action_length_type_base" label="{xen:phrase for_time_period}:" value="{$action.action_length_type}">
		<xen:option value="points">{xen:phrase while_at_or_above_points_threshold}</xen:option>
		<xen:option value="permanent">{xen:phrase permanent}</xen:option>
		<xen:option value="temporary" selected="{$action.action_length_type} != 'permanent' AND {$action.action_length_type} != 'points'" label="{xen:phrase temporary}">
			<xen:disabled>
				<xen:spinbox name="action_length" value="{xen:if $action.action_length, $action.action_length, 1}" min="0" />
				<xen:select name="action_length_type" value="{xen:if '{$action.action_length_type} == "permanent" OR {$action.action_length_type} == "points"', 'months', $action.action_length_type}"
					inputclass="autoSize">
					<xen:option value="days">{xen:phrase days}</xen:option>
					<xen:option value="weeks">{xen:phrase weeks}</xen:option>
					<xen:option value="months">{xen:phrase months}</xen:option>
					<xen:option value="years">{xen:phrase years}</xen:option>
				</xen:select>
			</xen:disabled>
		</xen:option>
	</xen:radiounit>

	<xen:submitunit save="{xen:phrase save_warning_action}">
		<xen:if is="{$action.warning_action_id}">
			<input type="button" value="{xen:phrase delete_warning_action}..." accesskey="d" class="button OverlayTrigger"
				data-href="{xen:adminlink warnings/action/delete, $action}" />
		</xen:if>
	</xen:submitunit>
</xen:form>]]></template>
  <template title="warning_delete"><![CDATA[<xen:title>{xen:phrase confirm_deletion_of_warning}: {$warning.title}</xen:title>
<xen:h1>{xen:phrase confirm_deletion_of_warning}</xen:h1>

<xen:navigation>
	<xen:breadcrumb href="{xen:adminlink 'warnings/edit', $warning}">{$warning.title}</xen:breadcrumb>
</xen:navigation>

<xen:require css="public:delete_confirmation.css" />

<xen:form action="{xen:adminlink 'warnings/delete', $warning}" class="deleteConfirmForm formOverlay">

	<p>{xen:phrase please_confirm_that_you_want_to_delete_following_warning}:</p>
	<strong><a href="{xen:adminlink 'warnings/edit', $warning}">{$warning.title}</a></strong>

	<xen:submitunit save="{xen:phrase delete_warning}" />
	<input type="hidden" name="_xfConfirm" value="1" />
	
</xen:form>]]></template>
  <template title="warning_edit"><![CDATA[<xen:title>{xen:if $warning.warning_definition_id, '{xen:phrase edit_warning}: {$masterTitle}', '{xen:phrase create_new_warning}'}</xen:title>

<xen:if is="{$warning.warning_definition_id}">
	<xen:navigation>
		<xen:breadcrumb href="{xen:adminlink warnings}#{xen:helper listitemid, $warning.warning_definition_id}">{$masterTitle}</xen:breadcrumb>
	</xen:navigation>
</xen:if>

<xen:form action="{xen:adminlink warnings/save, $warning}" class="AutoValidator" data-redirect="yes">
	<xen:textboxunit label="{xen:phrase title}:" name="title" value="{$masterTitle}" data-livetitletemplate="{xen:if $warning.warning_definition_id,
		'{xen:phrase edit_warning}: <em>%s</em>',
		'{xen:phrase create_new_warning}: <em>%s</em>'}" />
	
	<fieldset>
		<xen:spinboxunit label="{xen:phrase warning_points}:" name="points_default" value="{$warning.points_default}" min="0" />
		
		<xen:radiounit label="{xen:phrase points_expiry}:" name="expiry_type_base">
			<xen:option value="never" selected="{$warning.expiry_type} == 'never'">{xen:phrase never}</xen:option>
			<xen:option value="other" selected="{$warning.expiry_type} != 'never'" label="{xen:phrase after_time}:">
				<xen:disabled>
					<xen:spinbox name="expiry_default" value="{xen:if $warning.expiry_default, $warning.expiry_default, 1}" min="0" />
					<xen:select name="expiry_type" value="{xen:if '{$warning.expiry_type} == "never"', 'months', $warning.expiry_type}"
						inputclass="autoSize"
					>
						<xen:option value="days">{xen:phrase days}</xen:option>
						<xen:option value="weeks">{xen:phrase weeks}</xen:option>
						<xen:option value="months">{xen:phrase months}</xen:option>
						<xen:option value="years">{xen:phrase years}</xen:option>
					</xen:select>
				</xen:disabled>
			</xen:option>
		</xen:radiounit>
		
		<xen:checkboxunit label="">
			<xen:option name="is_editable" selected="{$warning.is_editable}">{xen:phrase points_and_expiry_time_editable_when_giving_warning}</xen:option>
		</xen:checkboxunit>
	</fieldset>
	
	<xen:checkboxunit label="{xen:phrase extra_user_groups}:" name="extra_user_group_ids">
		<xen:options source="$userGroupOptions" />
		<xen:explain>{xen:phrase user_receiving_warning_can_be_added_to_groups_until_expiry}</xen:explain>
	</xen:checkboxunit>
	
	<h3 class="textHeading">{xen:phrase conversation_settings}</h3>
	
	<xen:textboxunit label="{xen:phrase default_title}:" name="conversationTitle" value="{$masterConversationTitle}" />
	<xen:textboxunit label="{xen:phrase default_text}:" name="conversationText" value="{$masterConversationText}" rows="2" inputclass="Elastic">
		<xen:explain>{xen:phrase you_may_use_placeholders_to_dynamically_insert_warning}</xen:explain>
	</xen:textboxunit>
	
	<xen:submitunit save="{xen:phrase save_warning}">
		<xen:if is="{$warning.warning_definition_id}">
			<input type="button" value="{xen:phrase delete_warning}..." accesskey="d" class="button OverlayTrigger"
				data-href="{xen:adminlink warnings/delete, $warning}" />
		</xen:if>
	</xen:submitunit>
</xen:form>]]></template>
  <template title="warning_list"><![CDATA[<xen:title>{xen:phrase warnings}</xen:title>

<xen:topctrl>
	<a href="{xen:adminlink warnings/add}" class="button">+ {xen:phrase create_new_warning}</a>
	<a href="{xen:adminlink warnings/action/add}" class="button">+ {xen:phrase create_new_warning_action}</a>
</xen:topctrl>

<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />

<xen:form action="{xen:adminlink warnings}" class="section">
	<xen:if is="{$warnings}">
	
		<h2 class="subHeading">
			<xen:include template="filter_list_controls" />
			{xen:phrase warnings}
		</h2>
	
		<ol class="FilterList Scrollable">
			<xen:foreach loop="$warnings" value="$warning">
				<xen:listitem
					id="warning-{$warning.warning_definition_id}"
					label="{$warning.title}"
					href="{xen:adminlink warnings/edit, $warning}"
					delete="{xen:adminlink warnings/delete, $warning}" />
			</xen:foreach>
		</ol>
	
		<p class="sectionFooter">{xen:phrase showing_x_of_y_items, 'count=<span class="FilterListCount">{xen:count $warnings}</span>', 'total={xen:count $warnings}'}</p>
	
	<xen:else />
		<div class="noResults">{xen:phrase no_warnings_have_been_defined}</div>
	</xen:if>
</xen:form>

<xen:if is="{$warningActions}">
	<xen:form action="{xen:adminlink warnings}" class="section">
		<h2 class="subHeading">
			{xen:phrase warning_actions}
		</h2>
	
		<ol class="FilterList Scrollable">
			<xen:foreach loop="$warningActions" value="$action">
				<xen:listitem
					id="action-{$action.warning_action_id}"
					label="{xen:phrase points}: {$action.points}"
					href="{xen:adminlink warnings/action/edit, $action}"
					delete="{xen:adminlink warnings/action/delete, $action}"
				>
					<xen:snippet>
						{xen:if "{$action.action} == 'ban'", '{xen:phrase ban}',
							{xen:if "{$action.action} == 'discourage'", '{xen:phrase discourage}',
							{xen:if "{$action.action} == 'groups'", '{xen:phrase add_to_selected_groups}'}
						}},
						{xen:if "{$action.action_length_type} == 'permanent'", '{xen:phrase permanent}',
							{xen:if "{$action.action_length_type} == 'points'", '{xen:phrase while_at_or_above_points_threshold}',
							'{xen:phrase temporary}'
						}}
					</xen:snippet>
				</xen:listitem>
			</xen:foreach>
		</ol>
	</xen:form>
</xen:if>]]></template>
</admin_templates>
