<commit_before>{* $Id$ *}
{popup_init src="lib/overlib.js"}

{if !( $searchStyle eq "menu" )}
	{title admpage="search" help="Search+User"}{tr}Search{/tr}{/title}
{/if}

{capture name=advanced_search_help}
	{include file='advanced_search_help.tpl'}	 
{/capture}

<div class="nohighlight">
	{if $searchStyle neq "menu" && $prefs.feature_search_show_object_filter eq 'y'}
		<div class="navbar">
			{tr}Search in{/tr}:
			{foreach item=name key=k from=$where_list}
				{button _auto_args='where,highlight' href="tiki-searchresults.php?where=$k"  _selected="'$where'=='$k'" _selected_class="highlight" _text="$name"}
			{/foreach}
		</div>
	{/if}

	{if $prefs.feature_search_show_search_box eq 'y'}
		<form action="tiki-searchresults.php" method="get" id="search-form" class="findtable" role="search">
			<label class="findtitle">
				{tr}Find{/tr} <input name="highlight" size="14" type="text" accesskey="s" value="{$words|escape}" />
			</label>
			{if !( $searchStyle eq "menu" )}
				<label class="searchboolean" for="boolean">
					{tr}Advanced search:{/tr}<input type="checkbox" name="boolean" id="boolean" {if $boolean eq 'y'} checked="checked"{/if} />
				</label>
				{add_help show='y' title="{tr}Help{/tr}" id="advanced_search_help"}
					{$smarty.capture.advanced_search_help}
				{/add_help}
				<label class="searchdate" for="date">
					{tr}Date Search:{/tr}
					<select id="date" name="date" onchange="javascript:submit()">
						{section name=date start=0 loop=12 step=1}	
							<option value="{$smarty.section.date.index|escape}" {if $smarty.section.date.index eq $date}selected="selected"{/if}>
								{if $smarty.section.date.index eq 0}
									{tr}All dates{/tr}
								{else}
									{$smarty.section.date.index|escape} {tr}Month{/tr}
								{/if}
							</option>
						{/section}
					</select>
				</label>
				{if $prefs.feature_multilingual eq 'y' and $where eq 'wikis'}
					<label class="searchLang" for="searchLang">
						   <select id="searchLang" name="searchLang">
						   <option value="" >{tr}any language{/tr}</option>
						   {section name=ix loop=$languages}
						   		{if !is_array($prefs.available_languages) || count($prefs.available_languages) == 0 || in_array($languages[ix].value, $prefs.available_languages)}
									<option value="{$languages[ix].value|escape}" {if $searchLang eq $languages[ix].value}selected="selected"{/if}>
									{tr}{$languages[ix].name}{/tr}
									</option>
								{/if}
							{/section}
						   </select>
					</label>
				{/if}
			{/if}

			{if $prefs.feature_categories eq 'y' and !empty($categories)}
				<div id="category_singleselect_find" style="display: {if $find_cat_categories|@count > 1}none{else}block{/if};">
					<label class="findcateg"> 
						<select name="categId">
							<option value='' {if $find_categId eq ''}selected="selected"{/if}>{tr}any category{/tr}</option>
							{section name=ix loop=$categories}
								<option value="{$categories[ix].categId|escape}" {if $find_categId eq $categories[ix].categId}selected="selected"{/if}>
									{capture}{tr}{$categories[ix].categpath}{/tr}{/capture}{$smarty.capture.default|escape}
								</option>
							{/section}
						</select>
					</label>
					{if $prefs.javascript_enabled eq 'y'}<a href="#" onclick="show('category_multiselect_find');hide('category_singleselect_find');">{tr}Multiple select{/tr}</a>{/if}
				</div>
				<div id="category_multiselect_find" style="display: {if $find_cat_categories|@count > 1}block{else}none{/if};">
			  		<div class="multiselect"> 
			  			{if count($categories) gt 0}
							{$cat_tree}
							<div class="clear">
							{if $tiki_p_admin_categories eq 'y'}
			    				<div class="floatright"><a href="tiki-admin_categories.php" class="link">{tr}Admin Categories{/tr} {icon _id='wrench'}</a></div>
							{/if}
							{select_all checkbox_names='cat_categories[]' label="{tr}Select/deselect all categories{/tr}"}
						{else}
							<div class="clear">
			 				{if $tiki_p_admin_categories eq 'y'}
			    				<div class="floatright"><a href="tiki-admin_categories.php" class="link">{tr}Admin Categories{/tr} {icon _id='wrench'}</a></div>
			 				{/if}
			    			{tr}No categories defined{/tr}
			  			{/if}
						</div> {* end .clear *}
					</div> {* end #multiselect *}
				</div> {* end #category_multiselect_find *}
			{/if}
			
			{if $prefs.feature_search_show_object_filter eq 'y'}
				{if $searchStyle eq "menu" }
					<span class='searchMenu'>
						{tr}in{/tr}
						<select name="where">
							{if empty($where_list)} {* Required when file included outside tiki-searchindex.php. eg. error.rpl *}
								<option value="pages">{tr}Entire Site{/tr}</option>
								{if $prefs.feature_wiki eq 'y'}
									<option value="wikis">{tr}Wiki Pages{/tr}</option>
								{/if}
								{if $prefs.feature_calendar eq 'y'}
									<option value="calendars">{tr}Calendar Items{/tr}</option>
								{/if}
								{if $prefs.feature_galleries eq 'y'}
									<option value="galleries">{tr}Galleries{/tr}</option>
									<option value="images">{tr}Images{/tr}</option>
								{/if}<commit_msg>[FIX] previous commit (this should only show in the main search area, not on the top bar search...)<commit_after>{* $Id$ *}
{popup_init src="lib/overlib.js"}

{if !( $searchStyle eq "menu" )}
	{title admpage="search" help="Search+User"}{tr}Search{/tr}{/title}
{/if}

{capture name=advanced_search_help}
	{include file='advanced_search_help.tpl'}	 
{/capture}

<div class="nohighlight">
	{if $searchStyle neq "menu" && $prefs.feature_search_show_object_filter eq 'y'}
		<div class="navbar">
			{tr}Search in{/tr}:
			{foreach item=name key=k from=$where_list}
				{button _auto_args='where,highlight' href="tiki-searchresults.php?where=$k"  _selected="'$where'=='$k'" _selected_class="highlight" _text="$name"}
			{/foreach}
		</div>
	{/if}

	{if $prefs.feature_search_show_search_box eq 'y'}
		<form action="tiki-searchresults.php" method="get" id="search-form" class="findtable" role="search">
			<label class="findtitle">
				{tr}Find{/tr} <input name="highlight" size="14" type="text" accesskey="s" value="{$words|escape}" />
			</label>
			{if !( $searchStyle eq "menu" )}
				<label class="searchboolean" for="boolean">
					{tr}Advanced search:{/tr}<input type="checkbox" name="boolean" id="boolean" {if $boolean eq 'y'} checked="checked"{/if} />
				</label>
				{add_help show='y' title="{tr}Help{/tr}" id="advanced_search_help"}
					{$smarty.capture.advanced_search_help}
				{/add_help}
				<label class="searchdate" for="date">
					{tr}Date Search:{/tr}
					<select id="date" name="date" onchange="javascript:submit()">
						{section name=date start=0 loop=12 step=1}	
							<option value="{$smarty.section.date.index|escape}" {if $smarty.section.date.index eq $date}selected="selected"{/if}>
								{if $smarty.section.date.index eq 0}
									{tr}All dates{/tr}
								{else}
									{$smarty.section.date.index|escape} {tr}Month{/tr}
								{/if}
							</option>
						{/section}
					</select>
				</label>
				{if $prefs.feature_multilingual eq 'y' and $where eq 'wikis'}
					<label class="searchLang" for="searchLang">
						   <select id="searchLang" name="searchLang">
						   <option value="" >{tr}any language{/tr}</option>
						   {section name=ix loop=$languages}
						   		{if !is_array($prefs.available_languages) || count($prefs.available_languages) == 0 || in_array($languages[ix].value, $prefs.available_languages)}
									<option value="{$languages[ix].value|escape}" {if $searchLang eq $languages[ix].value}selected="selected"{/if}>
									{tr}{$languages[ix].name}{/tr}
									</option>
								{/if}
							{/section}
						   </select>
					</label>
				{/if}
				
				{if $prefs.feature_categories eq 'y' and !empty($categories)}
					<div id="category_singleselect_find" style="display: {if $find_cat_categories|@count > 1}none{else}block{/if};">
						<label class="findcateg"> 
							<select name="categId">
								<option value='' {if $find_categId eq ''}selected="selected"{/if}>{tr}any category{/tr}</option>
								{section name=ix loop=$categories}
									<option value="{$categories[ix].categId|escape}" {if $find_categId eq $categories[ix].categId}selected="selected"{/if}>
										{capture}{tr}{$categories[ix].categpath}{/tr}{/capture}{$smarty.capture.default|escape}
									</option>
								{/section}
							</select>
						</label>
						{if $prefs.javascript_enabled eq 'y'}<a href="#" onclick="show('category_multiselect_find');hide('category_singleselect_find');">{tr}Multiple select{/tr}</a>{/if}
					</div>
					<div id="category_multiselect_find" style="display: {if $find_cat_categories|@count > 1}block{else}none{/if};">
				  		<div class="multiselect"> 
				  			{if count($categories) gt 0}
								{$cat_tree}
								<div class="clear">
								{if $tiki_p_admin_categories eq 'y'}
				    				<div class="floatright"><a href="tiki-admin_categories.php" class="link">{tr}Admin Categories{/tr} {icon _id='wrench'}</a></div>
								{/if}
								{select_all checkbox_names='cat_categories[]' label="{tr}Select/deselect all categories{/tr}"}
							{else}
								<div class="clear">
				 				{if $tiki_p_admin_categories eq 'y'}
				    				<div class="floatright"><a href="tiki-admin_categories.php" class="link">{tr}Admin Categories{/tr} {icon _id='wrench'}</a></div>
				 				{/if}
				    			{tr}No categories defined{/tr}
				  			{/if}
							</div> {* end .clear *}
						</div> {* end #multiselect *}
					</div> {* end #category_multiselect_find *}
				{/if}
				
			{/if}
			
			{if $prefs.feature_search_show_object_filter eq 'y'}
				{if $searchStyle eq "menu" }
					<span class='searchMenu'>
						{tr}in{/tr}
						<select name="where">
							{if empty($where_list)} {* Required when file included outside tiki-searchindex.php. eg. error.rpl *}
								<option value="pages">{tr}Entire Site{/tr}</option>
								{if $prefs.feature_wiki eq 'y'}
									<option value="wikis">{tr}Wiki Pages{/tr}</option>
								{/if}
								{if $prefs.feature_calendar eq 'y'}
									<option value="calendars">{tr}Calendar Items{/tr}</option>
								{/if}
								{if $prefs.feature_galleries eq 'y'}
									<option value="galleries">{tr}Galleries{/tr}</option>
									<option value="images">{tr}Images{/tr}</option>
								{/if}
{'fraction_non_alphanumeric': 0.18713110788582488, 'fraction_numerical': 0.0021286889211417515, 'mean_word_length': 3.5533039647577094, 'pattern_counts': {'":': 0, '<': 129, '<?xml version=': 0, '>': 133, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5428405', 'n_tokens_mistral': 4640, 'n_tokens_neox': 3598, 'n_words': 654}