[TASK] Update T3.Icons to 0.0.7
[Packages/TYPO3.CMS.git] / typo3 / sysext / indexed_search / ext_localconf.php
1 <?php
2 defined('TYPO3_MODE') or die();
3
4 // register pibase plugin
5 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScript(
6 'indexed_search',
7 'setup',
8 trim('
9 plugin.tx_indexedsearch = USER_INT
10 plugin.tx_indexedsearch.userFunc = ' . \TYPO3\CMS\IndexedSearch\Controller\SearchFormController::class . '->main
11 ')
12 );
13
14 // add default rendering for pibase plugin
15 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScript(
16 'indexed_search',
17 'setup',
18 'tt_content.list.20.indexed_search =< plugin.tx_indexedsearch',
19 'defaultContentRendering'
20 );
21
22 // register extbase plugin
23 \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin('TYPO3.CMS.IndexedSearch', 'Pi2', array('Search' => 'form,search'), array('Search' => 'form,search'));
24
25 // Attach to hooks:
26 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['pageIndexing'][] = \TYPO3\CMS\IndexedSearch\Indexer::class;
27 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['headerNoCache']['tx_indexedsearch'] = \TYPO3\CMS\IndexedSearch\Hook\TypoScriptFrontendHook::class . '->headerNoCache';
28 // Register with "crawler" extension:
29 $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['crawler']['procInstructions']['tx_indexedsearch_reindex'] = 'Re-indexing';
30 $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['crawler']['cli_hooks']['tx_indexedsearch_crawl'] = \TYPO3\CMS\IndexedSearch\Hook\CrawlerHook::class;
31 // Register with TCEmain:
32 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass']['tx_indexedsearch'] = \TYPO3\CMS\IndexedSearch\Hook\CrawlerHook::class;
33 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass']['tx_indexedsearch'] = \TYPO3\CMS\IndexedSearch\Hook\CrawlerHook::class;
34 // Configure default document parsers:
35 $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['indexed_search']['external_parsers'] = array(
36 'pdf' => \TYPO3\CMS\IndexedSearch\FileContentParser::class,
37 'doc' => \TYPO3\CMS\IndexedSearch\FileContentParser::class,
38 'docx' => \TYPO3\CMS\IndexedSearch\FileContentParser::class,
39 'dotx' => \TYPO3\CMS\IndexedSearch\FileContentParser::class,
40 'pps' => \TYPO3\CMS\IndexedSearch\FileContentParser::class,
41 'ppsx' => \TYPO3\CMS\IndexedSearch\FileContentParser::class,
42 'ppt' => \TYPO3\CMS\IndexedSearch\FileContentParser::class,
43 'pptx' => \TYPO3\CMS\IndexedSearch\FileContentParser::class,
44 'potx' => \TYPO3\CMS\IndexedSearch\FileContentParser::class,
45 'xls' => \TYPO3\CMS\IndexedSearch\FileContentParser::class,
46 'xlsx' => \TYPO3\CMS\IndexedSearch\FileContentParser::class,
47 'xltx' => \TYPO3\CMS\IndexedSearch\FileContentParser::class,
48 'sxc' => \TYPO3\CMS\IndexedSearch\FileContentParser::class,
49 'sxi' => \TYPO3\CMS\IndexedSearch\FileContentParser::class,
50 'sxw' => \TYPO3\CMS\IndexedSearch\FileContentParser::class,
51 'ods' => \TYPO3\CMS\IndexedSearch\FileContentParser::class,
52 'odp' => \TYPO3\CMS\IndexedSearch\FileContentParser::class,
53 'odt' => \TYPO3\CMS\IndexedSearch\FileContentParser::class,
54 'rtf' => \TYPO3\CMS\IndexedSearch\FileContentParser::class,
55 'txt' => \TYPO3\CMS\IndexedSearch\FileContentParser::class,
56 'html' => \TYPO3\CMS\IndexedSearch\FileContentParser::class,
57 'htm' => \TYPO3\CMS\IndexedSearch\FileContentParser::class,
58 'csv' => \TYPO3\CMS\IndexedSearch\FileContentParser::class,
59 'xml' => \TYPO3\CMS\IndexedSearch\FileContentParser::class,
60 'jpg' => \TYPO3\CMS\IndexedSearch\FileContentParser::class,
61 'jpeg' => \TYPO3\CMS\IndexedSearch\FileContentParser::class,
62 'tif' => \TYPO3\CMS\IndexedSearch\FileContentParser::class
63 );
64 $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['indexed_search']['use_tables'] = 'index_phash,index_fulltext,index_rel,index_words,index_section,index_grlist,index_stat_search,index_stat_word,index_debug,index_config';
65 // unserializing the configuration so we can use it here:
66 $_EXTCONF = unserialize($_EXTCONF);
67 // Use the advanced doubleMetaphone parser instead of the internal one (usage of metaphone parsers is generally disabled by default)
68 if (isset($_EXTCONF['enableMetaphoneSearch']) && (int)$_EXTCONF['enableMetaphoneSearch'] == 2) {
69 $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['indexed_search']['metaphone'] = \TYPO3\CMS\IndexedSearch\Utility\DoubleMetaPhoneUtility::class;
70 }