Constuctor
Parameters:
|
bool |
$dynamic_album: |
set true for dynamic albums (limits the search fields) |
array allowedSearchFields(
)
|
|
Returns an array of the enabled search fields
string codifySearchString(
[string
$quote = '"']
)
|
|
recodes the search words replacing the boolean operators with text versions
Parameters:
|
string |
$quote: |
how to represent quoted strings |
int getAlbumIndex(
string
$curalbum
)
|
|
Returns the index of the album within the search albums
Parameters:
|
string |
$curalbum: |
The album sought |
array getAlbums(
[int
$page = 0], [string
$sorttype = NULL], [string
$sortdirection = NULL], [bool
$care = false]
)
|
|
Returns an array of album names found in the search.
If $page is not zero, it returns the current page's albums
Parameters:
|
int |
$page: |
the page number we are on |
|
string |
$sorttype: |
what to sort on |
|
string |
$sortdirection: |
what direction |
|
bool |
$care: |
set to false if the order of the albums does not matter |
object getImage(
int
$index
)
|
|
Returns a specific image
Parameters:
|
int |
$index: |
the index of the image desired |
int getImageIndex(
string
$album, string
$filename
)
|
|
Returns the index of this image in the search images
Parameters:
|
string |
$album: |
The folder name of the image |
|
string |
$filename: |
the filename of the image |
array getImages(
[int
$page = 0], [int
$firstPageCount = 0], [string
$sorttype = NULL], [string
$sortdirection = NULL]
)
|
|
Returns an array of images found in the search It will return a "page's worth" if $page is non zero
Parameters:
|
int |
$page: |
the page number desired |
|
int |
$firstPageCount: |
count of images that go on the album/image transition page |
|
string |
$sorttype: |
what to sort on |
|
string |
$sortdirection: |
what direction |
object getNextAlbum(
string
$curalbum
)
|
|
Returns the album following the current one
Parameters:
|
string |
$curalbum: |
the name of the current album |
Returns the number of albums found in a search
Returns the number of images found in the search
object getPrevAlbum(
string
$curalbum
)
|
|
Returns the album preceding the current one
Parameters:
|
string |
$curalbum: |
the name of the current album |
array getSearchAlbums(
string
$sorttype, string
$sortdirection
)
|
|
Returns an array of albums found in the search
Parameters:
|
string |
$sorttype: |
what to sort on |
|
string |
$sortdirection: |
what direction |
Returns the search dates variable
array getSearchFieldList(
)
|
|
Returns a list of search fields display names indexed by the search mask
mixed getSearchFields(
[bool
$array = false]
)
|
|
Returns the search fields variable
Parameters:
|
bool |
$array: |
set to true to return the fields as array elements. Otherwise a comma delimited string is returned |
string getSearchFieldsText(
array
$fields, [string
$param = '&searchfields=']
)
|
|
Returns the "searchstring" element of a query parameter set
Parameters:
|
array |
$fields: |
the fields required |
|
string |
$param: |
the query parameter (possibly with the intro character |
array getSearchImages(
$sorttype,
$sortdirection
)
|
|
Returns an array of image names found in the search
Parameters:
|
|
$sorttype: |
|
|
|
$sortdirection: |
|
array getSearchNews(
[string
$sortorder = "date"], [string
$sortdirection = "desc"]
)
|
|
Returns a list of News IDs found in the search
Parameters:
|
string |
$sortorder: |
"date" for sorting by date (default) "title" for sorting by title |
|
string |
$sortdirection: |
"desc" (default) for descending sort order "asc" for ascending sort order |
Returns a list of Pages IDs found in the search
string getSearchParams(
[bool
$long = true]
)
|
|
creates a search query from the search words
Parameters:
|
bool |
$long: |
set to false to omit albumname and page parts |
Parses a search string Items within quotations are treated as atomic AND, OR and NOT are converted to &, |, and !
Returns an array of search elements
Returns the search words variable
array numericFields(
bit
$fields
)
|
|
converts old style bitmask field spec into field list array
Parameters:
Returns the set of fields from the url query/post
Information Tags:
string searchDate(
string
$searchstring, string
$searchdate, string
$tbl, string
$sorttype, string
$sortdirection, [
$whichdate = 'date']
)
|
|
returns the results of a date search
Parameters:
|
string |
$searchstring: |
the search target |
|
string |
$searchdate: |
the date target |
|
string |
$tbl: |
the database table to search |
|
string |
$sorttype: |
what to sort on |
|
string |
$sortdirection: |
what direction |
|
|
$whichdate: |
|
Information Tags:
array searchFieldsAndTags(
string
$searchstring, string
$tbl, string
$sorttype, string
$sortdirection
)
|
|
Searches the table for tags Returns an array of database records.
Parameters:
|
string |
$searchstring: |
|
|
string |
$tbl: |
set to 'albums' or 'images' |
|
string |
$sorttype: |
what to sort on |
|
string |
$sortdirection: |
what direction |
void setSearchParams(
string
$paramstr
)
|
|
Parses and stores a search string NOTE!! this function assumes that the 'words' part of the list has been urlencoded!!!
Parameters:
|
string |
$paramstr: |
the string containing the search words |