Function Reference: geodir_autocompleter_options

Summary

This function has not been documented yet.

Filters

‘geodir_ajax_geolocation_options’ [Line: 1865]

Source File

geodir_autocompleter_options() is located in geodir_advance_search_filters/geodirectory_advance_search_function.php [Line: 1715]

Source Code

function geodir_autocompleter_options($arr = array())
{	global $geodir_addon_list;
	
	$arr[] = array( 'name' => __( 'Autocompleter for GeoDirectory', GEODIRADVANCESEARCH_TEXTDOMAIN ), 'type' => 'no_tabs', 'desc' => '', 'id' => 'geodir_autocompleter_options' );
	
	
	$arr[] = array( 'name' => __( 'Search Autocompleter Settings', GEODIRADVANCESEARCH_TEXTDOMAIN ), 'type' => 'sectionstart', 'id' => 'geodir_ajax_autocompleter_alert_options');
	
	$arr[] = array(  
			'name' => __( 'Enable Search autocompleter:', GEODIRADVANCESEARCH_TEXTDOMAIN ),
			'desc' 		=> __( 'If an option is selected, the autocompleter for Search is enabled.', GEODIRADVANCESEARCH_TEXTDOMAIN ),
			'id' 		=> 'geodir_enable_autocompleter',
			'type' 		=> 'checkbox',
			'css' 		=> '',
			'std' 		=> '1'
		);
	
	$arr[] = array(  
			'name' => __( 'Autosubmit the form on select a Search option:', GEODIRADVANCESEARCH_TEXTDOMAIN ),
			'desc' 		=> __( 'If an option is selected, the search form automatically is triggered when selecting a Search option.', GEODIRADVANCESEARCH_TEXTDOMAIN ),
			'id' 		=> 'geodir_autocompleter_autosubmit',
			'type' 		=> 'checkbox',
			'css' 		=> '',
			'std' 		=> '1'
		);
	
	$arr[] = array( 'type' => 'sectionend', 'id' => 'geodir_ajax_autocompleter_alert_options');
	
	if(isset($geodir_addon_list['geodir_location_manager'])){
	$arr[] = array( 'name' => __( 'Near Autocompleter Settings', GEODIRADVANCESEARCH_TEXTDOMAIN ), 'type' => 'sectionstart', 'id' => 'geodir_autocompleter_options_near');
	
	$arr[] = array(  
			'name' => __( 'Enable Near autocompleter:', GEODIRADVANCESEARCH_TEXTDOMAIN ),
			'desc' 		=> __( 'If an option is selected, the autocompleter for Near is enabled.', GEODIRADVANCESEARCH_TEXTDOMAIN ),
			'id' 		=> 'geodir_enable_autocompleter_near',
			'type' 		=> 'checkbox',
			'css' 		=> '',
			'std' 		=> '1'
		);
	
	$arr[] = array(  
			'name' => __( 'Autosubmit the form on select a Near option:', GEODIRADVANCESEARCH_TEXTDOMAIN ),
			'desc' 		=> __( 'If an option is selected, the search form automatically is triggered when selecting a Near option.', GEODIRADVANCESEARCH_TEXTDOMAIN ),
			'id' 		=> 'geodir_autocompleter_autosubmit_near',
			'type' 		=> 'checkbox',
			'css' 		=> '',
			'std' 		=> '0'
		);
	

	
	$arr[] = array( 'type' => 'sectionend', 'id' => 'geodir_autocompleter_options_near');
	}
	
	$arr[] = array( 'name' => __( 'GeoLocation Settings', GEODIRADVANCESEARCH_TEXTDOMAIN ), 'type' => 'sectionstart', 'id' => 'geodir_ajax_geolocation_options');
	
if(defined('POST_LOCATION_TABLE')){	
	$arr[] = array(  
			'name' => __( 'Disable geolocate on first load:', GEODIRADVANCESEARCH_TEXTDOMAIN ),
			'desc' 		=> __( 'If this option is selected, users will not be auto geolocated on first load.', GEODIRADVANCESEARCH_TEXTDOMAIN ),
			'id' 		=> 'geodir_autolocate_disable',
			'type' 		=> 'checkbox',
			'css' 		=> '',
			'std' 		=> '0'
		);
}
	
	
	
	
	$arr[] = array(  
			'name' => __( 'Default Near Me miles limit (1-200)', GEODIRADVANCESEARCH_TEXTDOMAIN ),
			'desc' 		=> __( 'Enter whole number only ex. 40 (Tokyo is largest city in the world @40 sq miles) LEAVE BLANK FOR NO DISTANCE LIMIT', GEODIRADVANCESEARCH_TEXTDOMAIN ),
			'id' 		=> 'geodir_near_me_dist',
			'type' 		=> 'text',
			'css' 		=> 'min-width:300px;',
			'std' 		=> '40' // Default value for the page title - changed in settings
		);
	
if(defined('POST_LOCATION_TABLE')){
	$arr[] = array(  
			'name' => __( 'Ask user if they wish to be geolocated', GEODIRADVANCESEARCH_TEXTDOMAIN ),
			'desc' 		=> __( 'If this option is selected, users will be asked if they with to be geolocated via a popup', GEODIRADVANCESEARCH_TEXTDOMAIN ),
			'id' 		=> 'geodir_autolocate_ask',
			'type' 		=> 'checkbox',
			'css' 		=> '',
			'std' 		=> '0'
		);
}
	
	
	
	/*
	$i=15;
	$compass_arr=array();
	$compass_arr['']=__( 'Default (36)', GEODIRECTORY_TEXTDOMAIN );
	while($i<=55){
		$compass_arr[$i] = $i;
		$i++;
	}
	
	$arr[] = array(  
			'name' => __( 'Compass size', GEODIRECTORY_TEXTDOMAIN ),
			'desc' 		=> __( 'The size of the compass that is inside the near field of search bar.', GEODIRECTORY_TEXTDOMAIN ),
			'id' 		=> 'geodir_geo_compass_size',
			'css' 		=> 'min-width:300px;',
			'std' 		=> '',
			'type' 		=> 'select',
			'class'		=> 'chosen_select',
			'options' => array_unique( $compass_arr)
		);
	
	$i=-100;
	$compass_margin_left_arr=array();
	$compass_margin_left_arr['']=__( 'Default (-45)', GEODIRECTORY_TEXTDOMAIN );
	while($i<=100){
		$compass_margin_left_arr[$i] = $i;
		$i++;
	}
	$arr[] = array(  
			'name' => __( 'Compass margin left', GEODIRECTORY_TEXTDOMAIN ),
			'desc' 		=> __( 'The horizontal position of the icon', GEODIRECTORY_TEXTDOMAIN ),
			'id' 		=> 'geodir_geo_compass_margin_left',
			'css' 		=> 'min-width:300px;',
			'std' 		=> '',
			'type' 		=> 'select',
			'class'		=> 'chosen_select',
			'options' => array_unique( $compass_margin_left_arr)
		);
	
	$i=-100;
	$compass_margin_top_arr=array();
	$compass_margin_top_arr['']=__( 'Default (8)', GEODIRECTORY_TEXTDOMAIN );
	while($i<=100){
		$compass_margin_top_arr[$i] = $i;
		$i++;
	}
	$arr[] = array(  
			'name' => __( 'Compass margin top', GEODIRECTORY_TEXTDOMAIN ),
			'desc' 		=> __( 'The vertical position of the icon', GEODIRECTORY_TEXTDOMAIN ),
			'id' 		=> 'geodir_geo_compass_margin_top',
			'css' 		=> 'min-width:300px;',
			'std' 		=> '',
			'type' 		=> 'select',
			'class'		=> 'chosen_select',
			'options' => array_unique( $compass_margin_top_arr)
		);*/

	$arr[] = array( 'type' => 'sectionend', 'id' => 'geodir_autocompleter_options');

	$arr = apply_filters('geodir_ajax_geolocation_options' ,$arr );
	
	return $arr;
}