Methods

Constructor set object properties

Index($oDB) : void

Parameters

$oDB

Contenido Database object

addSpecialUmlauts()

addSpecialUmlauts($key) : \$key
modified 2008-04-17, Timo Trautmann - reverse function to removeSpecialChars (important for syntaxhighlighting searchterm in searchresults) adds umlauts to search term

Parameters

$key

Keyword

Returns

\$key

check if the current cms type is in the cms_options array

checkCmsType($idtype) : \bolean

Parameters

$idtype

Returns

\bolean

for each cms-type create index structure.

createKeywords() : void

it looks like Array ( [die] => CMS_HTML-1 [inhalte] => CMS_HTML-1 [auf] => CMS_HTML-1 CMS_HTMLHEAD-2 [dieser] => CMS_HTML-1 [website] => CMS_HTML-1 CMS_HTML-1 CMS_HTMLHEAD-2 )

if keywords don't occur in the article anymore, update index_string and delete keyword if necessary

deleteKeywords() : void

get the keywords of an article

getKeywords() : void

remove special characters from index term

removeSpecialChars($key) : \$key

Parameters

$key

Keyword

Returns

\$key

generate index_string from index structure and save keywords The index_string looks like "&12=2(CMS_HTMLHEAD-1,CMS_HTML-1)"

saveKeywords() : void

set the cms_options array of cms types which should be treated special

setCmsOptions(\none $cms_options) : void

Parameters

$cms_options

\none

set the cms types

setContentTypes() : void

set the array of stopwords which should not be indexed

setStopwords(array $aStopwords) : void

Parameters

$aStopwords

array

start indexing the article

start(int $idart, array $aContent, string $place, array $cms_options, \arary $aStopwords) : void

Parameters

$idart

int

Article Id

$aContent

array

The complete content of an article specified by its content types. It looks like Array ( [CMS_HTMLHEAD] => Array ( [1] => Herzlich Willkommen... [2] => ...auf Ihrer Website! ) [CMS_HTML] => Array ( [1] => Die Inhalte auf dieser Website ...

$place

string

The field where to store the index information in db.

$cms_options

array

One can specify explicitly cms types which should not be indexed.

$aStopwords

\arary

Array with words which should not be indexed.

 Properties

 

$bDebug : boolean
 

$cfg : array
 

$cms_options : array
 

$cms_type : array

htmlhead - HTML Headline html - HTML Text head - Headline (no HTML) text - Text (no HTML) img - Upload id of the element imgdescr - Image description link - Link (URL) linktarget - Linktarget (_self, _blank, _top ...) linkdescr - Linkdescription swf - Upload id of the element etc.

 

$cms_type_suffix : array
 

$db : object
 

$idart : int
 

$keycode : array
 

$keywords : array
 

$keywords_del : array
 

$keywords_old : array
 

$lang : int
 

$place : string

The value is a string like "&12=2(CMS_HTMLHEAD-1,CMS_HTML-1)", which means a keyword occurs 2 times in article with $idart 12 and can be found in CMS_HTMLHEAD[1] and CMS_HTML[1]. The field 'self' can be used in the article properties to index the article manually.

 

$stopwords : array