[ Index ]

PHP Cross Reference of MyBB 1.8.38

title

Body

[close]

/inc/ -> functions_search.php (summary)

MyBB 1.8 Copyright 2014 MyBB Group, All Rights Reserved Website: http://www.mybb.com License: http://www.mybb.com/about/license

File Size: 1808 lines (45 kb)
Included or required: 4 times
Referenced: 0 times
Includes or requires: 0 files

Defines 10 functions

  make_searchable_forums()
  get_unsearchable_forums()
  get_visible_where()
  get_password_protected_forums()
  clean_keywords()
  clean_keywords_ft()
  privatemessage_perform_search_mysql()
  helpdocument_perform_search_mysql()
  perform_search_mysql()
  perform_search_mysql_ft()

Functions
Functions that are not part of a class:

make_searchable_forums($pid=0, $selitem=0, $addselect=1, $depth='')   X-Ref
Build a select box list of forums the current user has permission to search
return: string The forum select boxes
param: int $pid The parent forum ID to start at
param: int $selitem The selected forum ID
param: int $addselect Add select boxes at this call or not
param: string $depth The current depth

get_unsearchable_forums($pid=0, $first=1)   X-Ref
Build a comma separated list of the forums this user cannot search
return: string return a CSV list of forums the user cannot search
param: int $pid The parent ID to build from
param: int $first First rotation or not (leave at default)

get_visible_where($table_alias = null)   X-Ref
Build query condition for threads/posts the user is allowed to see.
Will return for example:
- visible = 1 - for normal users
- visible >= -1 - for admins & super mods
- (visible = 1 OR (visible = ? AND fid IN ...)) - for forum moderators

return: string the query condition
param: string $table_alias The alias of the table eg t to use t.visible instead of visible

get_password_protected_forums($fids=array()   X-Ref
Build a array list of the forums this user cannot search due to password protection
return: array return a array list of password protected forums the user cannot search
param: array $fids the fids to check (leave blank to check all forums)

clean_keywords($keywords)   X-Ref
Clean search keywords and make them safe for querying
return: string The cleaned keywords
param: string $keywords The keywords to be cleaned

clean_keywords_ft($keywords)   X-Ref
Clean search keywords for fulltext searching, making them safe for querying
return: string|bool The cleaned keywords or false on failure
param: string $keywords The keywords to be cleaned

privatemessage_perform_search_mysql($search)   X-Ref
Perform a thread and post search under MySQL or MySQLi
return: array Array of search data with results mixed in
param: array $search Array of search data

helpdocument_perform_search_mysql($search)   X-Ref
Perform a help document search under MySQL or MySQLi
return: array Array of search data with results mixed in
param: array $search Array of search data

perform_search_mysql($search)   X-Ref
Perform a thread and post search under MySQL or MySQLi
return: array Array of search data with results mixed in
param: array $search Array of search data

perform_search_mysql_ft($search)   X-Ref
Perform a thread and post search under MySQL or MySQLi using boolean fulltext capabilities
return: array Array of search data with results mixed in
param: array $search Array of search data



2005 - 2021 © MyBB.de | Alle Rechte vorbehalten! | Sponsor: netcup Cross-referenced by PHPXref