‪TYPO3CMS  ‪main
ext_localconf.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
12 
13 defined('TYPO3') or die();
14 
15 // register plugin
16 ‪ExtensionUtility::configurePlugin(
17  'IndexedSearch',
18  'Pi2',
19  [‪SearchController::class => 'form,search,noTypoScript'],
20  [‪SearchController::class => 'form,search']
21 );
22 
23 ‪$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearCachePostProc']['indexed_search'] = ‪DeleteIndexedData::class . '->delete';
24 
25 // Configure default document parsers:
26 ‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['indexed_search']['external_parsers'] = [
27  'pdf' => ‪FileContentParser::class,
28  'doc' => ‪FileContentParser::class,
29  'docx' => ‪FileContentParser::class,
30  'dotx' => ‪FileContentParser::class,
31  'pps' => ‪FileContentParser::class,
32  'ppsx' => ‪FileContentParser::class,
33  'ppt' => ‪FileContentParser::class,
34  'pptx' => ‪FileContentParser::class,
35  'potx' => ‪FileContentParser::class,
36  'xls' => ‪FileContentParser::class,
37  'xlsx' => ‪FileContentParser::class,
38  'xltx' => ‪FileContentParser::class,
39  'sxc' => ‪FileContentParser::class,
40  'sxi' => ‪FileContentParser::class,
41  'sxw' => ‪FileContentParser::class,
42  'ods' => ‪FileContentParser::class,
43  'odp' => ‪FileContentParser::class,
44  'odt' => ‪FileContentParser::class,
45  'rtf' => ‪FileContentParser::class,
46  'txt' => ‪FileContentParser::class,
47  'html' => ‪FileContentParser::class,
48  'htm' => ‪FileContentParser::class,
49  'csv' => ‪FileContentParser::class,
50  'xml' => ‪FileContentParser::class,
51  'jpg' => ‪FileContentParser::class,
52  'jpeg' => ‪FileContentParser::class,
53  'tif' => ‪FileContentParser::class,
54 ];
55 
58 )->get('indexed_search');
59 
60 ‪if (isset(‪$extConf['useMysqlFulltext']) && (bool)‪$extConf['useMysqlFulltext']) {
61  // Use all index_* tables except "index_rel" and "index_words"
62  ‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['indexed_search']['use_tables'] =
63  'index_phash,index_fulltext,index_section,index_grlist,index_stat_word,index_debug,index_config';
64 } else {
65  ‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['indexed_search']['use_tables'] =
66  'index_phash,index_fulltext,index_rel,index_words,index_section,index_grlist,index_stat_word,index_debug,index_config';
67 }
68 
69 // Use the advanced doubleMetaphone parser instead of the internal one (usage of metaphone parsers is generally disabled by default)
70 if (isset(‪$extConf['enableMetaphoneSearch']) && (int)‪$extConf['enableMetaphoneSearch'] == 2) {
71  ‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['indexed_search']['metaphone'] = DoubleMetaPhoneUtility::class;
72 }
73 unset(‪$extConf);
‪TYPO3\CMS\IndexedSearch\Controller\SearchController
Definition: SearchController.php:50
‪TYPO3\CMS\IndexedSearch\Utility\DoubleMetaPhoneUtility
Definition: DoubleMetaPhoneUtility.php:27
‪TYPO3\CMS\Core\Configuration\ExtensionConfiguration
Definition: ExtensionConfiguration.php:47
‪TYPO3\CMS\Extbase\Utility\ExtensionUtility
Definition: ExtensionUtility.php:26
‪TYPO3\CMS\IndexedSearch\Hook\DeleteIndexedData
Definition: DeleteIndexedData.php:28
‪TYPO3\CMS\IndexedSearch\FileContentParser
Definition: FileContentParser.php:33
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:25
‪if
‪if(PHP_SAPI !=='cli')
Definition: checkNamespaceIntegrity.php:25
‪$extConf
‪$extConf
Definition: ext_localconf.php:56
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:51