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

Class: md_search

Source Location: /search_engine_api.php

Class Overview




Variables

Methods



Class Details

[line 10]


[ Top ]


Class Variables

$admin_right =  0

[line 1600]



Tags:

var:  right
access:  public

Type:   admin


[ Top ]

$and_part =  ''

[line 1649]



Tags:

access:  public

Type:   mixed


[ Top ]

$cat_list =  ''

[line 1677]



Tags:

access:  public

Type:   mixed


[ Top ]

$config =  ''

[line 1605]



Tags:

var:  config
access:  public

Type:   current


[ Top ]

$date_query =  ''

[line 1681]



Tags:

access:  public

Type:   mixed


[ Top ]

$dbhr =

[line 1637]



Tags:

access:  public

Type:   mixed


[ Top ]

$dbht =

[line 1645]



Tags:

access:  public

Type:   mixed


[ Top ]

$dbhw =

[line 1641]



Tags:

access:  public

Type:   mixed


[ Top ]

$display_subcat_name =  0

[line 1689]



Tags:

access:  public

Type:   mixed


[ Top ]

$error_status =  ''

[line 1673]



Tags:

access:  public

Type:   mixed


[ Top ]

$forum_rewritten_name =  ''

[line 1610]



Tags:

var:  rewritten name
access:  public

Type:   forum


[ Top ]

$has_temp_table =  0

[line 1669]



Tags:

access:  public

Type:   mixed


[ Top ]

$id_pseudo =  0

[line 1629]



Tags:

access:  public

Type:   mixed


[ Top ]

$id_user =  0

[line 1590]



Tags:

var:  the user id
access:  public

Type:   set


[ Top ]

$max_results =  20

[line 1529]



Tags:

var:  number of returned results
access:  public

Type:   max


[ Top ]

$max_search_results =  0

[line 1694]



Tags:

access:  public

Type:   mixed


[ Top ]

$moderation =  0

[line 1595]



Tags:

var:  to 2 to search in apriori posts
access:  public

Type:   set


[ Top ]

$number_of_results =  30

[line 1575]



Tags:

var:  of displayed results
access:  public

Type:   number


[ Top ]

$offset =  0

[line 1580]



Tags:

var:  at this result number
access:  public

Type:   begin


[ Top ]

$one_database =  0

[line 1621]



Tags:

access:  public

Type:   mixed


[ Top ]

$or_part =  ''

[line 1653]



Tags:

access:  public

Type:   mixed


[ Top ]

$page_limit =  ''

[line 1661]



Tags:

access:  public

Type:   mixed


[ Top ]

$pseudo_form =  ''

[line 1625]



Tags:

access:  public

Type:   mixed


[ Top ]

$query_limit =  ''

[line 1657]



Tags:

access:  public

Type:   mixed


[ Top ]

$registered_user =  0

[line 1685]



Tags:

access:  public

Type:   mixed


[ Top ]

$search_cat =  0

[line 1563]



Tags:

var:  inside this cat.
  1. : all the cats of the current forum
-1 : all the cats of all the forums
access:  public

Type:   search


[ Top ]

$search_content_scope =  1

[line 1556]



Tags:

var:  : search in the titles
  1. : search in the contents
3 : search in title + content
access:  public

Type:   1


[ Top ]

$search_date_type =  2

[line 1509]



Tags:

var:  by date mode :
    1. : search since the given day
    2. : no date search
    access:  public

    Type:   search


    [ Top ]

    $search_day =  0

    [line 1514]



    Tags:

    var:  used in search by date mode
    access:  public

    Type:   day


    [ Top ]

    $search_db_name =  ''

    [line 1495]



    Tags:

    var:  name used by the forum
    access:  public

    Type:   db


    [ Top ]

    $search_form =  ''

    [line 1633]



    Tags:

    access:  public

    Type:   mixed


    [ Top ]

    $search_in_trash =  0

    [line 1544]



    Tags:

    var:  to 1 to search in trash
    access:  public

    Type:   set


    [ Top ]

    $search_in_trash_post =  0

    [line 1549]



    Tags:

    var:  to 1 to search in post trash
    access:  public

    Type:   set


    [ Top ]

    $search_month =  0

    [line 1519]



    Tags:

    var:  used in search by date mode
    access:  public

    Type:   month


    [ Top ]

    $search_order =  0

    [line 1501]



    Tags:

    var:  : sort according to the latest match of the topic
    1. : sort according to the latest post of the topic
    access:  public

    Type:   0


    [ Top ]

    $search_pseudo =  ''

    [line 1539]



    Tags:

    var:  pseudo
    access:  public

    Type:   searched


    [ Top ]

    $search_query =  ''

    [line 1534]



    Tags:

    var:  expression
    access:  public

    Type:   searched


    [ Top ]

    $search_scope =  0

    [line 1665]



    Tags:

    access:  public

    Type:   mixed


    [ Top ]

    $search_type =  1

    [line 1570]



    Tags:

    var:  : advanced search
      2 : search any of the words
      access:  public

      Type:   0


      [ Top ]

      $search_year =  0

      [line 1524]



      Tags:

      var:  used in search by date mode
      access:  public

      Type:   year


      [ Top ]

      $site =  ''

      [line 1615]



      Tags:

      var:  name
      access:  public

      Type:   forum


      [ Top ]

      $subcat =  0

      [line 1585]



      Tags:

      var:  in a subcat
      access:  public

      Type:   search


      [ Top ]



      Class Methods


      static method md_build_search_index [line 198]

      static 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 ]

      static method md_parser [line 573]

      static void md_parser( $string, $return_array)

      Description : Parse the string & return it without bbcode



      Parameters:

         $string  
         $return_array  

      [ Top ]

      constructor __construct [line 22]

      md_search __construct( 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 563]

      void get_max_search_results( )

      Description : Get the max result search



      [ Top ]

      method get_word_id [line 706]

      void get_word_id( $word, [ $already_safe = 0])

      Description : Get word id



      Parameters:

         $word  
         $already_safe  

      [ Top ]

      method launch_search [line 1461]

      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 set_date_search [line 400]

      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 378]

      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 426]

      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 328]

      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 497]

      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 359]

      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 551]

      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 476]

      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 487]

      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 519]

      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 543]

      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 510]

      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 435]

      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 368]

      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_topic_can_be_resolved [line 555]

      void set_topic_can_be_resolved( $topic_can_be_resolved)



      Parameters:

         $topic_can_be_resolved  

      [ Top ]

      method set_user [line 351]

      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 Tue, 19 Oct 2010 17:24:11 +0200 by phpDocumentor 1.4.3