Documentation TYPO3 par Ameos

tx_indexedsearch Class Reference

Inheritance diagram for tx_indexedsearch:

Inheritance graph
[legend]
Collaboration diagram for tx_indexedsearch:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 main ($content, $conf)
 doSearch ($sWArr)
 getSearchWords ($defOp)
 getPhashList ($sWArr)
 execPHashListQuery ($wordSel, $plusQ="")
 sectionTableWhere ()
 mediaTypeWhere ()
 languageWhere ()
 execFinalQuery ($list)
 checkResume ($row)
 isDescending ($inverse=0)
 writeSearchStat ($sWArr, $count, $pt)
 makeSearchForm ($optValues)
 printRules ()
 printResultSectionLinks ()
 makePointerSelector ($count, $displayCount, $pointer)
 makePointerSelector_link ($str, $p)
 tellUsWhatIsSeachedFor ($sWArr)
 wrapSW ($str)
 renderSelectBox ($name, $value, $optValues)
 compileResult ($resultRows)
 makeSectionHeader ($id, $sectionTitleLinked, $countResultRows)
 printResultRow ($row, $headerOnly=0)
 makeItemTypeIcon ($it, $alt="", $specRowConf=array())
 makeRating ($row)
 makeDescription ($row, $noMarkup=0, $lgd=180)
 markupSWpartsOfString ($str)
 makeTitle ($row)
 makeInfo ($row)
 getSpecialConfigForRow ($row)
 makeLanguageIndication ($row)
 makeAccessIndication ($id)
 linkPage ($id, $str, $row=array())
 getRootLine ($id, $pathMP="")
 getFirstSysDomainRecordForPage ($id)
 getPathFromPageId ($id, $pathMP="")
 pi_list_browseresults ($showResultCount=1, $addString="", $addPart="")
 getMenu ($id)

Public Attributes

 $prefixId = "tx_indexedsearch"
 $scriptRelPath = "pi/class.tx_indexedsearch.php"
 $extKey = "indexed_search"
 $join_pages = 0
 $defaultResultNumber = 20
 $wholeSiteIdList = 0
 $operator_translate_table
 $cache_path = array()
 $cache_rl = array()
 $fe_groups_required = array()
 $domain_records = array()
 $sWArr = array()
 $wSelClauses = array()
 $firstRow = array()
 $resultSections = array()
 $anchorPrefix = ''

Detailed Description

Index search frontend

Id
class.tx_indexedsearch.php,v 1.5 2004/04/19 15:23:24 typo3 Exp

Creates a searchform for indexed search. Indexing must be enabled for this to make sense.

Author:
Kasper Skrhj <kasperYYYY@typo3.com> -author Christian Jul Jensen <christian@typo3.com>

Definition at line 46 of file class.tx_indexedsearch.php.


Member Function Documentation

tx_indexedsearch::checkResume row  ) 
 

Checking if the resume can be shown for the search result:

Definition at line 745 of file class.tx_indexedsearch.php.

Referenced by doSearch().

tx_indexedsearch::compileResult resultRows  ) 
 

Takes the array with resultrows as input and returns the result-HTML-code Takes the "group" var into account: Makes a "section" or "flat" display.

Definition at line 1040 of file class.tx_indexedsearch.php.

Referenced by doSearch().

tx_indexedsearch::doSearch sWArr  ) 
 

Performs the search, if any search words found.

Definition at line 249 of file class.tx_indexedsearch.php.

References $sWArr, checkResume(), compileResult(), execFinalQuery(), getPathFromPageId(), getPhashList(), t3lib_div::intInRange(), t3lib_div::milliseconds(), tslib_pibase::pi_getLL(), pi_list_browseresults(), printResultSectionLinks(), tellUsWhatIsSeachedFor(), and writeSearchStat().

Referenced by main().

tx_indexedsearch::execFinalQuery list  ) 
 

Execute final query:

Definition at line 612 of file class.tx_indexedsearch.php.

References t3lib_div::intExplode(), isDescending(), languageWhere(), and mediaTypeWhere().

Referenced by doSearch().

tx_indexedsearch::execPHashListQuery wordSel,
plusQ = ""
 

Returns a query which selects the search-word from the word/rel tables.

Definition at line 529 of file class.tx_indexedsearch.php.

Referenced by getPhashList().

tx_indexedsearch::getFirstSysDomainRecordForPage id  ) 
 

Gets the first sys_domain record for the page, $id

Definition at line 1507 of file class.tx_indexedsearch.php.

tx_indexedsearch::getMenu id  ) 
 

Return the menu of pages used for the selector.

Definition at line 1609 of file class.tx_indexedsearch.php.

Referenced by main().

tx_indexedsearch::getPathFromPageId id,
pathMP = ""
 

Returns the path to the page $id

Definition at line 1516 of file class.tx_indexedsearch.php.

Referenced by doSearch().

tx_indexedsearch::getPhashList sWArr  ) 
 

Returns a COMPLETE list of phash-integers matching the search-result composed of the search-words in the sWArr array. The list of phash integers are unsorted and should be used for subsequent selection of index_phash records for display of the result.

Definition at line 416 of file class.tx_indexedsearch.php.

References $sWArr, and execPHashListQuery().

Referenced by doSearch().

tx_indexedsearch::getRootLine id,
pathMP = ""
 

Returns the path to the page $id

Definition at line 1495 of file class.tx_indexedsearch.php.

tx_indexedsearch::getSearchWords defOp  ) 
 

This splits the search word input into an array where each word is

Only words with 2 or more characters are accepted Max 200 chars total Space is used to split words, "" can be used search for a whole string (not indexed search then) AND, OR and NOT are prefix words, overruling the default operator +/|/- equals AND, OR and NOT as operators. All search words are converted to lowercase.

$defOp is the default operator. 1=OR, 0=AND

Definition at line 396 of file class.tx_indexedsearch.php.

References t3lib_div::makeInstance().

Referenced by main().

tx_indexedsearch::getSpecialConfigForRow row  ) 
 

Returns the info-string in the bottom of the result-row display (size, dates, path)

Definition at line 1406 of file class.tx_indexedsearch.php.

tx_indexedsearch::isDescending inverse = 0  ) 
 

Returns "DESC" or "" depending on the settings of the incoming highest/lowest result order.

Definition at line 780 of file class.tx_indexedsearch.php.

Referenced by execFinalQuery().

tx_indexedsearch::languageWhere  ) 
 

Returns AND statement for selection of langauge

Definition at line 603 of file class.tx_indexedsearch.php.

Referenced by execFinalQuery().

tx_indexedsearch::linkPage id,
str,
row = array()
 

Links the $str to page $id

Definition at line 1458 of file class.tx_indexedsearch.php.

References t3lib_div::getIndpEnv().

tx_indexedsearch::makeAccessIndication id  ) 
 

Returns the HTML code for the locking symbol.

Definition at line 1449 of file class.tx_indexedsearch.php.

tx_indexedsearch::makeDescription row,
noMarkup = 0,
lgd = 180
 

Returns the resume for the search-result. If noMarkup is NOT set, then the index_fulltext table is used to select the content of the page, split it with regex to display the search words in the text.

Definition at line 1285 of file class.tx_indexedsearch.php.

References t3lib_div::fixed_lgd().

tx_indexedsearch::makeInfo row  ) 
 

Returns the info-string in the bottom of the result-row display (size, dates, path)

Definition at line 1391 of file class.tx_indexedsearch.php.

References t3lib_div::formatSize().

tx_indexedsearch::makeItemTypeIcon it,
alt = "",
specRowConf = array()
 

Return the icon corresponding to media type $it;

Definition at line 1196 of file class.tx_indexedsearch.php.

References t3lib_extMgm::siteRelPath().

tx_indexedsearch::makeLanguageIndication row  ) 
 

Returns the HTML code for language indication.

Definition at line 1428 of file class.tx_indexedsearch.php.

tx_indexedsearch::makePointerSelector count,
displayCount,
pointer
 

Returns the links for the result browser bar (next/prev/1-2-3)

Definition at line 932 of file class.tx_indexedsearch.php.

References t3lib_div::intInRange(), and makePointerSelector_link().

tx_indexedsearch::makePointerSelector_link str,
p
 

Used to make the link for the result-browser. Notive now the links must resubmit the form after setting the new pointer-value in a hidden formfield.

Definition at line 958 of file class.tx_indexedsearch.php.

Referenced by makePointerSelector().

tx_indexedsearch::makeRating row  ) 
 

Return the rating-HTML code for the result row. This makes use of the $this->firstRow

Definition at line 1233 of file class.tx_indexedsearch.php.

References t3lib_div::intInRange().

tx_indexedsearch::makeSearchForm optValues  ) 
 

Make search form

Definition at line 840 of file class.tx_indexedsearch.php.

References tslib_pibase::pi_getLL(), and renderSelectBox().

Referenced by main().

tx_indexedsearch::makeSectionHeader id,
sectionTitleLinked,
countResultRows
 

Returns the section header of the search result.

Definition at line 1111 of file class.tx_indexedsearch.php.

tx_indexedsearch::makeTitle row  ) 
 

Returns the title of the search result row

Definition at line 1376 of file class.tx_indexedsearch.php.

References t3lib_div::fixed_lgd().

tx_indexedsearch::markupSWpartsOfString str  ) 
 

Marks up the search words from $this->sWarr in the $str with a color.

Definition at line 1308 of file class.tx_indexedsearch.php.

tx_indexedsearch::mediaTypeWhere  ) 
 

Returns AND statement for selection of media type

Definition at line 575 of file class.tx_indexedsearch.php.

Referenced by execFinalQuery().

tx_indexedsearch::pi_list_browseresults showResultCount = 1,
addString = "",
addPart = ""
 

Returns a results browser

Definition at line 1568 of file class.tx_indexedsearch.php.

References t3lib_div::intInRange().

Referenced by doSearch().

tx_indexedsearch::printResultRow row,
headerOnly = 0
 

This prints a single result row, including a recursive call for subrows.

Definition at line 1123 of file class.tx_indexedsearch.php.

tx_indexedsearch::printResultSectionLinks  ) 
 

Returns the anchor-links to the sections inside the displayed result rows.

Definition at line 919 of file class.tx_indexedsearch.php.

References tslib_pibase::pi_getLL().

Referenced by doSearch().

tx_indexedsearch::printRules  ) 
 

Print the searching rules

Definition at line 907 of file class.tx_indexedsearch.php.

References tslib_pibase::pi_getLL().

Referenced by main().

tx_indexedsearch::renderSelectBox name,
value,
optValues
 

Makes a selector box

Definition at line 1001 of file class.tx_indexedsearch.php.

Referenced by makeSearchForm().

tx_indexedsearch::sectionTableWhere  ) 
 

Returns AND statement for selection of section in database. (rootlevel 0-2 + page_id)

Definition at line 547 of file class.tx_indexedsearch.php.

References t3lib_div::intExplode().

tx_indexedsearch::tellUsWhatIsSeachedFor sWArr  ) 
 

Returns a string that tells which search words are searched for.

Definition at line 965 of file class.tx_indexedsearch.php.

Referenced by doSearch().

tx_indexedsearch::wrapSW str  ) 
 

Wraps the search words in the search-word list display (from ->tellUsWhatIsSeachedFor())

Definition at line 994 of file class.tx_indexedsearch.php.

tx_indexedsearch::writeSearchStat sWArr,
count,
pt
 

Write statistics information for the search:

Definition at line 789 of file class.tx_indexedsearch.php.

References $sWArr, and t3lib_div::getIndpEnv().

Referenced by doSearch().


Member Data Documentation

tx_indexedsearch::$operator_translate_table
 

Initial value:

 Array (                // case-sensitiv. Defineres the words, which will be operators between words
                Array ("+" , "AND"),
                Array ("|" , "OR"),
                Array ("-" , "AND NOT"),
                        // english
#               Array ("AND" , "AND"),
#               Array ("OR" , "OR"),
#               Array ("NOT" , "AND NOT"),
        )

Definition at line 55 of file class.tx_indexedsearch.php.


The documentation for this class was generated from the following file:


Gnr par TYPO3 Ameos avec  doxygen 1.4.6