Functions |
| if(!isset($g_format_dictionary)||!is_array($g_format_dictionary)||!count($g_format_dictionary)) | DisplaySearchResultsCSV ($in_http_vars, &$return_array=null, &$return_geocode=null) |
| | If you wish to override this, simply set this up in your auto-config.inc.php file. That will supersede this.
|
| | ReturnNAWSFormatCSV ($in_http_vars, &$server) |
| | Returns the CSV file in NAWS format.
|
| | ReturnNAWSDeletedMeetings (&$server, $in_transfer_dictionary) |
| | Returns deleted meetings with NAWS IDs.
|
| | BMLT_FuncNAWSReturnOpenOrClosed ($in_meeting_id, &$server) |
| | Returns 'OPEN' or 'CLOSED', if the meeting is open or closed (used for the NAWS format)
|
| | BMLT_FuncNAWSReturnWheelchair ($in_meeting_id, &$server) |
| | Returns 'TRUE' or 'FALSE', if the meeting is or is not wheelchair-accessible (used for the NAWS format)
|
| | BMLT_FuncNAWSReturnInst ($in_meeting_id, &$server) |
| | Returns 'TRUE' or 'FALSE', if the meeting is or is not an institution meeting (used for the NAWS format)
|
| | BMLT_FuncNAWSReturnWeekday ($in_meeting_id, &$server) |
| | Returns the string for the weekday the meeting gathers (used for the NAWS format)
|
| | BMLT_FuncNAWSReturnTime ($in_meeting_id, &$server) |
| | Returns the string for the weekday the meeting gathers (used for the NAWS format)
|
| | BMLT_FuncNAWSReturnMeetingNAWSID ($in_meeting_id, &$server) |
| | Returns the string for the NAWS ID for the meeting (used for the NAWS format)
|
| | BMLT_FuncNAWSReturnMeetingTown ($in_meeting_id, &$server) |
| | Returns the string for the town field the meeting (used for the NAWS format). This may use the borough name, instead.
|
| | BMLT_FuncNAWSReturnLastMeetingChangeTime ($in_meeting_id, &$server) |
| | Returns the string for the NAWS ID for the meeting (used for the NAWS format)
|
| | BMLT_FuncNAWSReturnMeetingServiceBodyNAWSID ($in_meeting_id, &$server) |
| | Returns the string for the NAWS ID for the meeting's Service Body (used for the NAWS format)
|
| | BMLT_FuncNAWSReturnFormat1 ($in_meeting_id, &$server) |
| | Returns the string for the first format (used for the NAWS format)
|
| | BMLT_FuncNAWSReturnFormat2 ($in_meeting_id, &$server) |
| | Returns the string for the second format (used for the NAWS format)
|
| | BMLT_FuncNAWSReturnFormat3 ($in_meeting_id, &$server) |
| | Returns the string for the third format (used for the NAWS format)
|
| | BMLT_FuncNAWSReturnFormat4 ($in_meeting_id, &$server) |
| | Returns the string for the fourth format (used for the NAWS format)
|
| | BMLT_FuncNAWSReturnFormat5 ($in_meeting_id, &$server) |
| | Returns the string for the fifth format (used for the NAWS format)
|
| | BMLT_FuncNAWSReturnMeetingServiceBodyName ($in_meeting_id, &$server) |
| | Returns the string for the name for the meeting's Service Body (used for the NAWS format)
|
Variables |
if(!defined('WC_FORMAT')) if(!defined('O_FORMAT'))
if(!defined('C_FORMAT'))
global | $g_format_dictionary |
| | These are the default formats for wheelchair, open and closed (used for the NAWS format). They can be overridden in the auto-config.inc.php file.
|
| if (!isset($g_format_dictionary)||!is_array($g_format_dictionary)||!count($g_format_dictionary)) DisplaySearchResultsCSV |
( |
$ |
in_http_vars, |
|
|
&$ |
return_array = null, |
|
|
&$ |
return_geocode = null |
|
) |
| |
If you wish to override this, simply set this up in your auto-config.inc.php file. That will supersede this.
This function does a search, then builds a CSV result, with each row being a meeting. The first row is a row of keys.
- Returns:
- a string, containing CSV data, with the first row a key header.
- Parameters:
-
| in_http_vars | The various HTTP GET and POST parameters. If this is defined and set to 'yes', then that means the client supports AJAX.
- 'supports_ajax' We serve non-JavaScript content to clients that don't support AJAX, even if they support JavaScript.
|
The values that are important to the list paging are:
- 'page' This is a positive integer, specifying which page of results to display.
- 'results_per_page' This is the number of meetings to list on one "page" of results. The search results are paged, so that a large search is broken into multiple pages of page_display_size results.
- 'sort_key' This is the key to use for sorting. There are three possible values:
- 'town' This is sorted by town, borough and neighborhood first, weekday and time second.
- 'weekday' This is sorted by weekday first, town, borough and neighborhood second, then time
- 'time' This is sorted by weekday first, time, second, then town, borough and neighborhood.
- 'sort_dir' This is the direction of the sort. It can be one of the following:
- 'asc' Ascending, from least to greatest.
- 'desc' Descending, from greatest to least.
These are used to specify a search:
- 'services' This is an array of positive integers. This is interpreted as an array of integers. Each integer represents the ID of a Service Body. A positive integer means that the search will look specifically for meetings that contain that Service Body ID. If the integer is negative (preceded by a minus sign -), then the criteria will be to look for meetings that don't contain that ID. If no 'services' values are given, then the search will not use the Service Body field as a search criteria.
- 'weekdays' This is an array of positive integers ( 1-7). This is interpreted as an array of integers. Each integer represents a weekday (1 -> Sunday, 7 -> Saturday). A positive integer means that the search will look specifically for meetings that occur on that weekday. If the integer is negative (preceded by a minus sign -), then the criteria will be to look for meetings that don't occur on that weekday. If no 'weekdays' values are given, then the search will not use the weekday field as a search criteria.
- 'formats' This is an array of positive integers. This is interpreted as an array of integers. Each integer represents a format shared ID. A format ID means that the search will look specifically for meetings that have that format. If the format is negative (preceded by a minus sign -), then the criteria will be to look for meetings that don't have that format. If no 'formats' values are given, then the search will not use the formats field as a search criteria.
- 'langs' This is an array of 2-character strings. This is interpreted as an array of strings. Each string represents a language code, and is a 2-character string. A language string means that the search will look specifically for meetings that are in that language. If the language is preceded by a minus sign -, then the criteria will be to look for meetings that are not in that language. If no 'langs' values are given, then the search will not use the lang_enum field as a search criteria.
- 'bmlt_search_type' This is set to 'advanced' if the search is an advanced one (we need to take more criteria into consideration).
- 'advanced_formats' This is the formats array, but is only counted if the bmlt_search_type is set to 'advanced'.
- 'advanced_service_bodies' This is the same, but for Service Bodies.
- 'advanced_weekdays' ...and weekdays.
- 'advanced_radius' ...and radius (in degrees)
- advanced_mapmode If this is true (1), then the Advanced form is using its map.
The following values specify a start time "window." The meeting must start on, or after StartsAfterH/M, and can start no later than StartsBeforeH/M
- 'StartsAfterH' A positive integer between 0 and 23. The hour of the minimal start time for meetings, in military time.
- 'StartsAfterM' A positive integer between 0 and 59. The minute of the minimal start time for meetings, in military time.
- 'StartsBeforeH' A positive integer between 0 and 23. The hour of the maximal start time for meetings, in military time.
- 'StartsBeforeM' A positive integer between 0 and 59. The minute of the maximal start time for meetings, in military time.
The following values specify a time duration "window." The meeting can last no longer than MaxDurationH/M, and no less than MinDurationH/M.
- 'MinDurationH' A positive integer. This is the number of hours in the minimal duration.
- 'MinDurationM' A positive integer. This is the number of minutes in the minimal duration.
- 'MaxDurationH' A positive integer. This is the number of hours in the maximal duration.
- 'MaxDurationM' A positive integer. This is the number of minutes in the maximal duration.
This is how meetings are located. We don't use address lookups. Instead, we geolocate the meetings via the longitude and latitude fields in each record. If you don't specify a geolocation, then the entire database is searched. If you do specify one, then only the portion within the radius is searched.
- 'geo_width' A floating point number. This is the radius (not diameter) of the search, in MILES (not Kilometers). If this is negative, then it should be an integer, and that indicates an auto-radius is requested to find the number of meetings in the integer.
- 'geo_width_km' A floating point number. This is the radius (not diameter) of the search, in KILOMETERS (not Miles). If this is negative, then it should be an integer, and that indicates an auto-radius is requested to find the number of meetings in the integer.
- 'long_val' If one of the three radius specifiers is zero or undefined, this is ignored. This is a floating point number that specifies the longitude, in degrees, of the center of the search radius.
- 'lat_val' If one of the three radius specifiers is zero or undefined, this is ignored. This is a floating point number that specifies the latitude, in degrees, of the center of the search radius.
- 'SearchString' A string. If this is specified, then all the string fields of the meetings specified by the above criteria will be searched for the string. By default, if the language supports metaphone (sound like search), then that is used.
- 'StringSearchIsAnAddress' A boolean. Nonzero means that the given string should not be checked against any of the fields in the meeting data. Instead, it is to be considered a submission to the Google Maps geocode, and will be used to determine a cernter point in a local search.
- 'SearchStringAll' If nonzero, then all of the words in the search string will have to be matched for a meetings to qualify.
- 'SearchStringExact' If nonzero, metaphone will not be used, and the spelling must be exact.
- 'meeting_ids' An array of positive integers. Each integer is an ID of an individual meeting. If this is set, all other search criteria are ignored.
- Parameters:
-
| return_array | If this is supplied, then the result will be saved in this as an array. It must be an empty array, supplied by reference. |
| return_geocode | If this is supplied, the response will be an associative array, with the search center and radius. It will return:
- 'radius' The radius of the search, in Km
- 'longitude' The longitude of the search center
- 'latitude' Th latitude of the search center
|
Referenced by GetSearchResults(), and ReturnNAWSFormatCSV().