SDK
[ class tree: SDK ] [ index: SDK ] [ all elements ]

Class: md_search

Source Location: /search_engine_api.php

Class Overview




Methods



Class Details

[line 9]


[ Top ]


Class Methods


constructor md_search [line 21]

md_search md_search( string $search_db_name, string $forum_rewritten_name, int $site, string $cat, string $config, bool $admin_right, resource $dbhr, resource $dbhw, [ $one_database = 0])

constructor



Parameters:

string   $search_db_name   // db name
string   $forum_rewritten_name   // rewritten name of the forum
int   $site   // forum id
string   $cat   // cat id, 0 : all the cats of the current forum, -1 : all the cats of all the forums
string   $config  
bool   $admin_right   // set to 1 if you have the admin right
resource   $dbhr  
resource   $dbhw  
   $one_database  

[ Top ]

method get_max_search_results [line 393]

void get_max_search_results( )

Description : Get the max result search



[ Top ]

method launch_search [line 1262]

array launch_search( )

Description : Launch the search engine



Tags:

return:  

// ($select, $nb_answers, matching cat*forum list, error_status, search_menu )

// $select is a mysql resource, the result of the search query // $select contains (title, topic_id, author, icone_id, topic_nb_answers, topic_maxnumrep, last_post_date, nb_view, opened_topic, last_author, is_poll, subcat_id, is_sticky, subcat_name, subcat_url_name, 0, 0, 0, flag_last_numreponse, flag_last_position, flag_owntopic, 0, search_maxnumrep)



[ Top ]

method md_build_search_index [line 35]

void md_build_search_index( $use_current_db, $current_forum, $cat, $topic_id, $post_id, $build_title_index, $dbhr, $dbhw, [ $titre = ''], [ $parsed_string_array = ''])



Parameters:

   $use_current_db  
   $current_forum  
   $cat  
   $topic_id  
   $post_id  
   $build_title_index  
   $dbhr  
   $dbhw  
   $titre  
   $parsed_string_array  

[ Top ]

method md_parser [line 403]

void md_parser( $string, $return_array)

Description : Parse the string & return it without bbcode



Parameters:

   $string  
   $return_array  

[ Top ]

method set_date_search [line 234]

void set_date_search( int $year, int $month, int $day)

Description : Set the search date



Parameters:

int   $year  
int   $month  
int   $day  

[ Top ]

method set_date_search_mode [line 212]

void set_date_search_mode( int $date_type)

Description : Set the search by date method



Parameters:

int   $date_type  
  • 0 : search on the given day
  • 1 : search since the given day
  • 2 : no date search

[ Top ]

method set_max_results [line 260]

void set_max_results( int $max_results)

Description : Set the max number of result the function will return



Parameters:

int   $max_results  

[ Top ]

method set_search_cat [line 162]

void set_search_cat( int $cat)

Description : Search inside this cat.



Parameters:

int   $cat  
  • 0 : all the cats of the current forum
  • 1 : all the cats of all the forums

[ Top ]

method set_search_content_scope [line 331]

void set_search_content_scope( int $search_content_scope)

Description : Set the content scope of the search



Parameters:

int   $search_content_scope  
  • 1 : search in the titles
  • 0 : search in the contents
  • 3 : search in title + content

[ Top ]

method set_search_forum [line 193]

void set_search_forum( string $forum_db_name)

Description : Set the forum db_name in which you want the launch the search



Parameters:

string   $forum_db_name   // db name

[ Top ]

method set_search_in_apriori [line 385]

void set_search_in_apriori( int $moderation)

Description : Set the search in apriori topics/posts



Parameters:

int   $moderation   set to 2 to search in apriori posts

[ Top ]

method set_search_in_trash [line 310]

void set_search_in_trash( int $search_in_trash)

Description : Set the search in trash topic mode



Parameters:

int   $search_in_trash   // set to 1 to search in the topic trash

[ Top ]

method set_search_in_trash_post [line 321]

void set_search_in_trash_post( $search_in_trash_post, int $search_in_trash)

Description : Set the search in trash post mode



Parameters:

int   $search_in_trash   // set to 1 to search in the post trash
   $search_in_trash_post  

[ Top ]

method set_search_limit [line 353]

void set_search_limit( int $offset, int $number_of_results)

Description : Set the offset and limit of the search resultset



Parameters:

int   $offset   // set the offset you want the search resultset to begin
int   $number_of_results   // set the number of results you want in the resultset

[ Top ]

method set_search_subcat [line 377]

void set_search_subcat( int $subcat)

Description : Set the subcat in which the searchengine should search



Parameters:

int   $subcat   // subcat id

[ Top ]

method set_search_type [line 344]

void set_search_type( int $search_type)

Description : Set the type of the search



Parameters:

int   $search_type  
  • 0 : advanced search
  • 1 : search all the words
  • 2 : search any of the words

[ Top ]

method set_search_words_and_pseudo [line 269]

void set_search_words_and_pseudo( string $query, string $pseudo)

Description : Set the searched words and pseudo



Parameters:

string   $query   // searched string
string   $pseudo   // searched pseudo

[ Top ]

method set_sort_order [line 202]

void set_sort_order( int $order)

Description : Set the sorting method used



Parameters:

int   $order  
  • 0 : sort according to the latest match of the topic
  • 1 : sort according to the latest post of the topic

[ Top ]

method set_user [line 185]

void set_user( int $id_user)

Description : Set your current id user



Parameters:

int   $id_user   // set the id_user of who is launching the search

[ Top ]


Documentation generated on Sun, 08 Jul 2007 20:48:08 +0200 by phpDocumentor 1.3.1