From 60aecde7f040c2fdc88ff4ecd276775613f4016a Mon Sep 17 00:00:00 2001 From: Kevin Purrmann Date: Thu, 26 Nov 2015 09:47:24 +0100 Subject: [PATCH] Refactored TCA definition. Removed tca.php and established Configureation/TCA --- .../TCA/tx_kesearch_filteroptions.php | 113 +++ Configuration/TCA/tx_kesearch_filters.php | 162 ++++ Configuration/TCA/tx_kesearch_index.php | 193 +++++ .../TCA/tx_kesearch_indexerconfig.php | 421 ++++++++++ ext_tables.php | 78 -- tca.php | 771 ------------------ 6 files changed, 889 insertions(+), 849 deletions(-) create mode 100644 Configuration/TCA/tx_kesearch_filteroptions.php create mode 100644 Configuration/TCA/tx_kesearch_filters.php create mode 100644 Configuration/TCA/tx_kesearch_index.php create mode 100644 Configuration/TCA/tx_kesearch_indexerconfig.php delete mode 100644 tca.php diff --git a/Configuration/TCA/tx_kesearch_filteroptions.php b/Configuration/TCA/tx_kesearch_filteroptions.php new file mode 100644 index 00000000..0657ffcb --- /dev/null +++ b/Configuration/TCA/tx_kesearch_filteroptions.php @@ -0,0 +1,113 @@ + array( + 'title' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_filteroptions', + 'label' => 'title', + 'tstamp' => 'tstamp', + 'crdate' => 'crdate', + 'cruser_id' => 'cruser_id', + 'languageField' => 'sys_language_uid', + 'transOrigPointerField' => 'l10n_parent', + 'transOrigDiffSourceField' => 'l10n_diffsource', + 'sortby' => 'sorting', + 'delete' => 'deleted', + 'enablecolumns' => array( + 'disabled' => 'hidden', + ), + 'iconfile' => 'EXT:ke_search/res/img/table_icons/icon_tx_kesearch_filteroptions.gif', + 'searchFields' => 'title,tag' + ), + 'interface' => array( + 'showRecordFieldList' => 'sys_language_uid,l10n_parent,l10n_diffsource,hidden,title,tag' + ), + 'columns' => array( + 'sys_language_uid' => array( + 'exclude' => 1, + 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.language', + 'config' => array( + 'type' => 'select', + 'renderType' => 'selectSingle', + 'foreign_table' => 'sys_language', + 'foreign_table_where' => 'ORDER BY sys_language.title', + 'items' => array( + array('LLL:EXT:lang/locallang_general.xml:LGL.allLanguages', -1), + array('LLL:EXT:lang/locallang_general.xml:LGL.default_value', 0) + ) + ) + ), + 'l10n_parent' => array( + 'displayCond' => 'FIELD:sys_language_uid:>:0', + 'exclude' => 1, + 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.l18n_parent', + 'config' => array( + 'type' => 'select', + 'renderType' => 'selectSingle', + 'items' => array( + array('', 0), + ), + 'foreign_table' => 'tx_kesearch_filteroptions', + 'foreign_table_where' => 'AND tx_kesearch_filteroptions.pid=###CURRENT_PID### AND tx_kesearch_filteroptions.sys_language_uid IN (-1,0)', + ) + ), + 'l10n_diffsource' => array( + 'config' => array( + 'type' => 'passthrough' + ) + ), + 'hidden' => array( + 'exclude' => 1, + 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.hidden', + 'config' => array( + 'type' => 'check', + 'default' => '0' + ) + ), + 'title' => array( + 'exclude' => 0, + 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_filteroptions.title', + 'config' => array( + 'type' => 'input', + 'size' => '30', + ) + ), + 'tag' => array( + 'exclude' => 0, + 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_filteroptions.tag', + 'config' => array( + 'type' => 'input', + 'size' => '30', + ) + ), + 'automated_tagging' => array( + 'exclude' => 1, + 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_filteroptions.automated_tagging', + 'config' => array( + 'type' => 'group', + 'internal_type' => 'db', + 'allowed' => 'pages', + 'size' => 1, + 'minitems' => 0, + 'maxitems' => 1, + ) + ), + 'automated_tagging_exclude' => array( + 'exclude' => 1, + 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_filteroptions.automated_tagging_exclude', + 'config' => array( + 'type' => 'group', + 'internal_type' => 'db', + 'allowed' => 'pages', + 'size' => 5, + 'minitems' => 0, + 'maxitems' => 99, + ) + ), + ), + 'types' => array( + '0' => array('showitem' => 'sys_language_uid;;;;1-1-1, l10n_parent, l10n_diffsource, hidden;;1;;1-1-1, title;;;;2-2-2, tag;;;;3-3-3, automated_tagging;;;;4-4-4,automated_tagging_exclude;;;;5-5-5') + ), + 'palettes' => array( + '1' => array('showitem' => '') + ) +); \ No newline at end of file diff --git a/Configuration/TCA/tx_kesearch_filters.php b/Configuration/TCA/tx_kesearch_filters.php new file mode 100644 index 00000000..1fb402b2 --- /dev/null +++ b/Configuration/TCA/tx_kesearch_filters.php @@ -0,0 +1,162 @@ + array( + 'title' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_filters', + 'label' => 'title', + 'tstamp' => 'tstamp', + 'crdate' => 'crdate', + 'cruser_id' => 'cruser_id', + 'languageField' => 'sys_language_uid', + 'transOrigPointerField' => 'l10n_parent', + 'transOrigDiffSourceField' => 'l10n_diffsource', + 'default_sortby' => 'ORDER BY crdate', + 'delete' => 'deleted', + 'type' => 'rendertype', + 'enablecolumns' => array( + 'disabled' => 'hidden', + ), + 'iconfile' => 'EXT:ke_search/res/img/table_icons/icon_tx_kesearch_filters.gif', + 'searchFields' => 'title' + ), + 'interface' => array( + 'showRecordFieldList' => 'sys_language_uid,l10n_parent,l10n_diffsource,hidden,title,options,rendertype' + ), + 'columns' => array( + 'sys_language_uid' => array( + 'exclude' => 1, + 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.language', + 'config' => array( + 'type' => 'select', + 'renderType' => 'selectSingle', + 'foreign_table' => 'sys_language', + 'foreign_table_where' => 'ORDER BY sys_language.title', + 'items' => array( + array('LLL:EXT:lang/locallang_general.xml:LGL.allLanguages', -1), + array('LLL:EXT:lang/locallang_general.xml:LGL.default_value', 0) + ) + ) + ), + 'l10n_parent' => array( + 'displayCond' => 'FIELD:sys_language_uid:>:0', + 'exclude' => 1, + 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.l18n_parent', + 'config' => array( + 'type' => 'select', + 'renderType' => 'selectSingle', + 'items' => array( + array('', 0), + ), + 'foreign_table' => 'tx_kesearch_filters', + 'foreign_table_where' => 'AND tx_kesearch_filters.pid=###CURRENT_PID### AND tx_kesearch_filters.sys_language_uid IN (-1,0)', + ) + ), + 'l10n_diffsource' => array( + 'config' => array( + 'type' => 'passthrough' + ) + ), + 'hidden' => array( + 'exclude' => 1, + 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.hidden', + 'config' => array( + 'type' => 'check', + 'default' => '0' + ) + ), + 'title' => array( + 'exclude' => 0, + 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_filters.title', + 'config' => array( + 'type' => 'input', + 'size' => '30', + ) + ), + 'rendertype' => array( + 'exclude' => 0, + 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_filters.rendertype', + 'config' => array( + 'type' => 'select', + 'renderType' => 'selectSingle', + 'items' => array( + array('LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_filters.rendertype.I.0', 'select'), + array('LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_filters.rendertype.I.1', 'list'), + array('LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_filters.rendertype.I.2', 'checkbox'), + array('LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_filters.rendertype.I.3', 'textlinks'), + ), + 'size' => 1, + 'maxitems' => 1, + 'default' => 'select', + ) + ), + + 'markAllCheckboxes' => array( + 'exclude' => 0, + 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_filters.markAllCheckboxes', + 'config' => array( + 'type' => 'check', + 'default' => '0' + ) + ), + 'options' => array( + 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_filters.options', + 'config' => Array( + 'type' => 'inline', + 'foreign_table' => 'tx_kesearch_filteroptions', + 'maxitems' => 500, + 'appearance' => Array( + 'collapseAll' => 1, + 'expandSingle' => 1, + 'useSortable' => 1, + ), + ), + ), + 'target_pid' => array( + 'exclude' => 1, + 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_filters.target_pid', + 'config' => array( + 'type' => 'group', + 'internal_type' => 'db', + 'allowed' => 'pages', + 'size' => 1, + 'minitems' => 0, + 'maxitems' => 1, + ) + ), + 'amount' => array( + 'exclude' => 0, + 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_filters.amount', + 'config' => array( + 'type' => 'input', + 'default' => '10', + 'size' => '30', + 'eval' => 'trim,int', + ) + ), + 'shownumberofresults' => array( + 'exclude' => 0, + 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_filters.shownumberofresults', + 'config' => array( + 'type' => 'check', + 'default' => '1' + ) + ), + 'alphabeticalsorting' => array( + 'exclude' => 0, + 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_filters.alphabeticalsorting', + 'config' => array( + 'type' => 'check', + 'default' => '1', + ) + ), + ), + 'types' => array( + 'select' => array('showitem' => 'sys_language_uid;;;;1-1-1,l10n_parent, l10n_diffsource, hidden;;1;;1-1-1, title;;;;2-2-2,rendertype;;;;3-3-3, options, shownumberofresults, alphabeticalsorting;;;;4-4-4'), + 'list' => array('showitem' => 'sys_language_uid;;;;1-1-1,l10n_parent, l10n_diffsource, hidden;;1;;1-1-1, title;;;;2-2-2,rendertype;;;;3-3-3, options, shownumberofresults, alphabeticalsorting;;;;4-4-4'), + 'checkbox' => array('showitem' => 'sys_language_uid;;;;1-1-1,l10n_parent, l10n_diffsource, hidden;;1;;1-1-1, title;;;;2-2-2,rendertype;;;;3-3-3, markAllCheckboxes, options, shownumberofresults, alphabeticalsorting;;;;4-4-4'), + 'textlinks' => array('showitem' => 'sys_language_uid;;;;1-1-1,l10n_parent, l10n_diffsource, hidden;;1;;1-1-1, title;;;;2-2-2,rendertype;;;;3-3-3, target_pid, amount, shownumberofresults, alphabeticalsorting;;;;4-4-4, options') + ), + 'palettes' => array( + '1' => array('showitem' => '') + ) +); \ No newline at end of file diff --git a/Configuration/TCA/tx_kesearch_index.php b/Configuration/TCA/tx_kesearch_index.php new file mode 100644 index 00000000..80bfcadc --- /dev/null +++ b/Configuration/TCA/tx_kesearch_index.php @@ -0,0 +1,193 @@ + array( + 'title' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_index', + 'label' => 'title', + 'tstamp' => 'tstamp', + 'crdate' => 'crdate', + 'cruser_id' => 'cruser_id', + 'default_sortby' => 'ORDER BY crdate', + 'enablecolumns' => array( + 'starttime' => 'starttime', + 'endtime' => 'endtime', + 'fe_group' => 'fe_group', + ), + 'iconfile' => 'EXT:ke_search/res/img/table_icons/icon_tx_kesearch_index.gif', + ), + 'interface' => array( + 'showRecordFieldList' => 'targetpid,content,params,type,tags,abstract,title,language' + ), + 'columns' => array( + 'starttime' => array( + 'exclude' => 1, + 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.starttime', + 'config' => array( + 'type' => 'input', + 'size' => '8', + 'max' => '20', + 'eval' => 'date', + 'default' => '0', + 'checkbox' => '0' + ) + ), + 'endtime' => array( + 'exclude' => 1, + 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.endtime', + 'config' => array( + 'type' => 'input', + 'size' => '8', + 'max' => '20', + 'eval' => 'date', + 'checkbox' => '0', + 'default' => '0', + 'range' => array( + 'upper' => mktime(3, 14, 7, 1, 19, 2038), + 'lower' => mktime(0, 0, 0, date('m') - 1, date('d'), date('Y')) + ) + ) + ), + 'fe_group' => array( + 'exclude' => 1, + 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.fe_group', + 'config' => array( + 'type' => 'select', + 'renderType' => 'selectSingleBox', + 'items' => array( + array('', 0), + array('LLL:EXT:lang/locallang_general.xml:LGL.hide_at_login', -1), + array('LLL:EXT:lang/locallang_general.xml:LGL.any_login', -2), + array('LLL:EXT:lang/locallang_general.xml:LGL.usergroups', '--div--') + ), + 'foreign_table' => 'fe_groups', + 'foreign_table_where' => 'ORDER BY fe_groups.title', + 'size' => 6, + 'minitems' => 0, + 'maxitems' => 99999, + ) + ), + 'targetpid' => array( + 'exclude' => 0, + 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_index.targetpid', + 'config' => array( + 'type' => 'group', + 'internal_type' => 'db', + 'allowed' => 'pages', + 'size' => 1, + 'minitems' => 0, + 'maxitems' => 1, + ) + ), + 'content' => array( + 'exclude' => 0, + 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_index.content', + 'config' => array( + 'type' => 'text', + 'wrap' => 'OFF', + 'cols' => '30', + 'rows' => '5', + ) + ), + 'params' => array( + 'exclude' => 0, + 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_index.params', + 'config' => array( + 'type' => 'input', + 'size' => '30', + ) + ), + 'type' => array( + 'exclude' => 0, + 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_index.type', + 'config' => array( + 'type' => 'input', + 'size' => '30', + ) + ), + 'tags' => array( + 'exclude' => 0, + 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_index.tags', + 'config' => array( + 'type' => 'text', + 'wrap' => 'OFF', + 'cols' => '30', + 'rows' => '5', + ) + ), + 'abstract' => array( + 'exclude' => 0, + 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_index.abstract', + 'config' => array( + 'type' => 'text', + 'cols' => '30', + 'rows' => '5', + ) + ), + 'title' => array( + 'exclude' => 0, + 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_index.title', + 'config' => array( + 'type' => 'input', + 'size' => '30', + ) + ), + 'language' => array( + 'exclude' => 0, + 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_index.language', + 'config' => array( + 'type' => 'select', + 'renderType' => 'selectSingle', + 'items' => array( + array('LLL:EXT:lang/locallang_general.xlf:LGL.allLanguages', -1), + array('LLL:EXT:lang/locallang_general.xlf:LGL.default_value', 0) + ), + 'foreign_table' => 'sys_language', + 'foreign_table_where' => 'ORDER BY sys_language.uid', + 'size' => 1, + 'minitems' => 0, + 'maxitems' => 1, + ) + ), + 'sortdate' => Array( + 'exclude' => 0, + 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_index.sortdate', + 'config' => Array( + 'type' => 'input', + 'size' => '10', + 'max' => '20', + 'eval' => 'datetime', + 'checkbox' => '0', + 'default' => '0' + ) + ), + 'orig_uid' => array( + 'config' => array( + 'type' => 'passthrough' + ) + ), + 'orig_pid' => array( + 'config' => array( + 'type' => 'passthrough' + ) + ), + 'directory' => array( + 'exclude' => 0, + 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_index.directory', + 'config' => array( + 'type' => 'input', + 'size' => '30', + ) + ), + 'hash' => array( + 'config' => array( + 'type' => 'passthrough' + ) + ), + ), + 'types' => array( + '0' => array('showitem' => 'starttime;;;;1-1-1, endtime, fe_group, targetpid, content, params, type, tags, abstract, title;;;;2-2-2, language;;;;3-3-3') + ), + 'palettes' => array( + '1' => array('showitem' => '') + ) +); \ No newline at end of file diff --git a/Configuration/TCA/tx_kesearch_indexerconfig.php b/Configuration/TCA/tx_kesearch_indexerconfig.php new file mode 100644 index 00000000..e2314ed2 --- /dev/null +++ b/Configuration/TCA/tx_kesearch_indexerconfig.php @@ -0,0 +1,421 @@ + array( + 'title' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig', + 'label' => 'title', + 'tstamp' => 'tstamp', + 'crdate' => 'crdate', + 'cruser_id' => 'cruser_id', + 'default_sortby' => 'ORDER BY crdate', + 'delete' => 'deleted', + 'enablecolumns' => array( + 'disabled' => 'hidden', + ), + 'iconfile' => 'EXT:ke_search/res/img/table_icons/icon_tx_kesearch_indexerconfig.gif', + 'searchFields' => 'title' + ), + 'interface' => array( + 'showRecordFieldList' => 'hidden,title,storagepid,startingpoints_recursive,single_pages,sysfolder,type,index_content_with_restrictions,index_passed_events,,index_news_category_mode,index_news_category_selection,directories,fileext,filteroption' + ), + 'columns' => array( + 'hidden' => array( + 'exclude' => 1, + 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.hidden', + 'config' => array( + 'type' => 'check', + 'default' => '0' + ) + ), + 'title' => array( + 'exclude' => 0, + 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.title', + 'config' => array( + 'type' => 'input', + 'size' => '30', + ) + ), + 'storagepid' => array( + 'exclude' => 0, + 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.storagepid', + 'config' => array( + 'type' => 'group', + 'internal_type' => 'db', + 'allowed' => 'pages', + 'size' => 1, + 'minitems' => 1, + 'maxitems' => 1, + ) + ), + 'targetpid' => array( + 'displayCond' => 'FIELD:type:!IN:page,tt_content,file,templavoila,comments,remote', + 'exclude' => 0, + 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.targetpid', + 'config' => array( + 'type' => 'group', + 'internal_type' => 'db', + 'allowed' => 'pages', + 'size' => 1, + 'minitems' => 1, + 'maxitems' => 1, + ) + ), + 'type' => array( + 'exclude' => 0, + 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.type', + 'config' => array( + 'type' => 'select', + 'renderType' => 'selectSingle', + 'items' => array( + array( + 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.type.I.0', + 'page', + $extRelPath . 'res/img/types_backend/selicon_tx_kesearch_indexerconfig_type_0.gif' + ), + array( + 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.type.I.1', + 'ke_yac', + $extRelPath . 'res/img/types_backend/selicon_tx_kesearch_indexerconfig_type_1.gif' + ), + array( + 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.type.I.2', + 'ttnews', + $extRelPath . 'res/img/types_backend/selicon_tx_kesearch_indexerconfig_type_2.gif' + ), + array( + 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.type.I.5', + 'tt_address', + $extRelPath . 'res/img/types_backend/selicon_tx_kesearch_indexerconfig_type_5.gif' + ), + array( + 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.type.I.6', + 'tt_content', + $extRelPath . 'res/img/types_backend/selicon_tx_kesearch_indexerconfig_type_6.gif' + ), + array( + 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.type.I.7', + 'file', + $extRelPath . 'res/img/types_backend/selicon_tx_kesearch_indexerconfig_type_7.gif' + ), + array( + 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.type.I.8', + 't3s_content', + $extRelPath . 'res/img/types_backend/selicon_tx_kesearch_indexerconfig_type_8.gif' + ), + array( + 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.type.I.9', + 'templavoila', + $extRelPath . 'res/img/types_backend/selicon_tx_kesearch_indexerconfig_type_9.gif' + ), + array( + 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.type.I.10', + 'mmforum', + $extRelPath . 'res/img/types_backend/selicon_tx_kesearch_indexerconfig_type_10.gif' + ), + array( + 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.type.I.11', + 'comments', + $extRelPath . 'res/img/types_backend/selicon_tx_kesearch_indexerconfig_type_11.gif' + ), + array( + 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.type.I.12', + 'news', + $extRelPath . 'res/img/types_backend/selicon_tx_kesearch_indexerconfig_type_12.gif' + ), + array( + 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.type.I.13', + 'a21glossary', + $extRelPath . 'res/img/types_backend/selicon_tx_kesearch_indexerconfig_type_13.gif' + ), + ), + 'itemsProcFunc' => 'tx_kesearch_lib_items->fillIndexerConfig', + 'size' => 1, + 'maxitems' => 1, + 'default' => 'page', + ) + ), + 'startingpoints_recursive' => array( + 'exclude' => 0, + 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.startingpoints_recursive', + 'displayCond' => 'FIELD:type:IN:page,tt_content,ttnews,tt_address,templavoila,comments,news,a21glossary', + 'config' => array( + 'type' => 'group', + 'internal_type' => 'db', + 'allowed' => 'pages', + 'size' => 10, + 'minitems' => 0, + 'maxitems' => 99, + ) + ), + 'single_pages' => array( + 'exclude' => 0, + 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.single_pages', + 'displayCond' => 'FIELD:type:IN:page,tt_content,templavoila', + 'config' => array( + 'type' => 'group', + 'internal_type' => 'db', + 'allowed' => 'pages', + 'size' => 10, + 'minitems' => 0, + 'maxitems' => 99, + ) + ), + 'sysfolder' => array( + 'exclude' => 0, + 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.sysfolder', + 'displayCond' => 'FIELD:type:IN:ke_yac,ttnews,tt_address,mmforum,comments,news,a21glossary', + 'config' => array( + 'type' => 'group', + 'internal_type' => 'db', + 'allowed' => 'pages', + 'size' => 10, + 'minitems' => 0, + 'maxitems' => 99, + ) + ), + 'index_content_with_restrictions' => array( + 'exclude' => 0, + 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.index_content_with_restrictions', + 'displayCond' => 'FIELD:type:=:page', + 'config' => array( + 'type' => 'select', + 'renderType' => 'selectSingle', + 'items' => array( + array( + 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.index_content_with_restrictions.I.0', + 'yes' + ), + array( + 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.index_content_with_restrictions.I.1', + 'no' + ), + ), + 'size' => 1, + 'maxitems' => 1, + 'default' => 'no' + ) + ), + 'index_passed_events' => array( + 'exclude' => 0, + 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.index_passed_events', + 'displayCond' => 'FIELD:type:=:ke_yac', + 'config' => array( + 'type' => 'select', + 'renderType' => 'selectSingle', + 'items' => array( + array( + 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.index_passed_events.I.0', + 'yes' + ), + array('LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.index_passed_events.I.1', 'no'), + ), + 'size' => 1, + 'maxitems' => 1, + ) + ), + 'index_news_category_mode' => array( + 'exclude' => 0, + 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.index_news_category_mode', + 'displayCond' => 'FIELD:type:IN:ttnews,news', + 'config' => array( + 'type' => 'select', + 'renderType' => 'selectSingle', + 'items' => array( + array( + 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.index_news_category_mode.I.1', + '1' + ), + array( + 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.index_news_category_mode.I.2', + '2' + ), + ), + 'size' => 1, + 'maxitems' => 1, + ) + ), + 'index_news_category_selection' => Array( + 'exclude' => 1, + 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.index_news_category_selection', + 'displayCond' => 'FIELD:type:=:ttnews', + 'config' => Array( + 'type' => 'none', + ) + ), + 'index_extnews_category_selection' => array( + 'exclude' => 1, + 'l10n_mode' => 'mergeIfNotBlank', + 'label' => 'LLL:EXT:news/Resources/Private/Language/locallang_db.xml:tx_news_domain_model_news.categories', + 'displayCond' => 'FIELD:type:=:news', + 'config' => array( + 'type' => 'none', + ) + ), + 'index_news_useHRDatesSingle' => array( + 'exclude' => 0, + 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.index_news_useHRDatesSingle', + 'displayCond' => 'FIELD:type:=:ttnews', + 'config' => array( + 'type' => 'check', + 'default' => '0' + ) + ), + 'index_news_useHRDatesSingleWithoutDay' => array( + 'exclude' => 0, + 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.index_news_useHRDatesSingleWithoutDay', + 'displayCond' => 'FIELD:type:=:ttnews', + 'config' => array( + 'type' => 'check', + 'default' => '0' + ) + ), + 'index_use_page_tags' => array( + 'exclude' => 0, + 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.index_use_page_tags', + 'displayCond' => 'FIELD:type:IN:ttnews,tt_address,mmforum,comments,news', + 'config' => array( + 'type' => 'check', + 'default' => '0' + ) + ), + 'directories' => array( + 'exclude' => 0, + 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.directories', + 'displayCond' => 'FIELD:type:IN:file', + 'config' => array( + 'type' => 'text', + 'cols' => 48, + 'rows' => 10, + 'eval' => 'trim', + ) + ), + 'fileext' => array( + 'exclude' => 0, + 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.fileext', + 'displayCond' => 'FIELD:type:IN:file,page,tt_content', + 'config' => array( + 'type' => 'input', + 'size' => '30', + 'default' => 'pdf,ppt,doc,xls' + ) + ), + 'index_use_page_tags_for_files' => array( + 'exclude' => 0, + 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.index_use_page_tags_for_files', + 'displayCond' => 'FIELD:type:IN:page,tt_content', + 'config' => array( + 'type' => 'check', + 'default' => '0' + ) + ), + 'commenttypes' => array( + 'exclude' => 0, + 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.commenttypes', + 'displayCond' => 'FIELD:type:=:comments', + 'config' => array( + 'type' => 'input', + 'size' => '30', + 'default' => 'pages' + ) + ), + 'filteroption' => array( + 'exclude' => 0, + 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.filteroption', + 'config' => array( + 'type' => 'select', + 'renderType' => 'selectSingle', + 'items' => array( + array('', 0), + ), + 'itemsProcFunc' => 'user_filterlist->getListOfAvailableFiltersForTCA', + 'size' => 1, + 'minitems' => 0, + 'maxitems' => 1, + ) + ), + 'tvpath' => array( + 'exclude' => 0, + 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.tvpath', + 'displayCond' => 'FIELD:type:=:templavoila', + 'config' => array( + 'type' => 'input', + 'size' => '30', + 'default' => 'field_content' + ) + ), + 'fal_storage' => array( + 'exclude' => 0, + 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.fal_storage', + 'displayCond' => 'FIELD:type:=:file', + 'config' => array( + 'type' => 'select', + 'renderType' => 'selectSingle', + 'items' => array( + array('LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.fal_storage.dont_use_fal', -1), + ), + 'size' => 1, + 'maxitems' => 1, + 'default' => -1, + 'foreign_table' => 'sys_file_storage', + 'allowNonIdValues' => 1 + ) + ), + 'contenttypes' => array( + 'exclude' => 0, + 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.contenttypes', + 'displayCond' => 'FIELD:type:IN:page,tt_content', + 'config' => array( + 'type' => 'input', + 'size' => '30', + 'default' => 'text,textpic,bullets,table,html,header,uploads' + ) + ), + ), + 'types' => array( + '0' => array('showitem' => 'hidden;;1;;1-1-1, title;;;;2-2-2, storagepid,targetpid;;;;3-3-3,type,startingpoints_recursive,single_pages,sysfolder,index_content_with_restrictions,index_passed_events,index_news_category_mode,index_news_category_selection,index_extnews_category_selection,index_news_useHRDatesSingle,index_news_useHRDatesSingleWithoutDay,index_use_page_tags,fal_storage,directories,fileext,contenttypes,commenttypes,filteroption,tvpath,index_use_page_tags_for_files') + ), + 'palettes' => array( + '1' => array('showitem' => '') + ) +); + +// define dependencies to tt_news only if tt_news is installed +if (TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('tt_news')) { + $GLOBALS['TCA']['tx_kesearch_indexerconfig']['columns']['index_news_category_selection']['config'] = array( + 'type' => 'select', + 'form_type' => 'user', + 'userFunc' => 'tx_ttnews_TCAform_selectTree->renderCategoryFields', + 'treeView' => 1, + 'foreign_table' => 'tt_news_cat', + 'autoSizeMax' => 50, + 'minitems' => 0, + 'maxitems' => 500, + ); +} + +// define dependencies to news only if news is installed +if (TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('news')) { + $GLOBALS['TCA']['tx_kesearch_indexerconfig']['columns']['index_extnews_category_selection']['config'] = array( + 'type' => 'select', + 'renderType' => 'selectTree', + 'renderMode' => 'tree', + 'treeConfig' => array( + 'parentField' => 'parentcategory', + ), + 'foreign_table' => 'tx_news_domain_model_category', + 'foreign_table_where' => ' AND (tx_news_domain_model_category.sys_language_uid = 0 OR tx_news_domain_model_category.l10n_parent = 0) ORDER BY tx_news_domain_model_category.sorting', + 'size' => 10, + 'autoSizeMax' => 20, + 'minitems' => 0, + 'maxitems' => 20, + ); + + // news version 3 features system categories instead of it's own + // category system which was used in previous versions + if (version_compare(TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getExtensionVersion('news'), '3.0.0') >= 0) { + $GLOBALS['TCA']['tx_kesearch_indexerconfig']['columns']['index_extnews_category_selection']['config']['treeConfig']['parentField'] = 'parent'; + $GLOBALS['TCA']['tx_kesearch_indexerconfig']['columns']['index_extnews_category_selection']['config']['foreign_table'] = 'sys_category'; + $GLOBALS['TCA']['tx_kesearch_indexerconfig']['columns']['index_extnews_category_selection']['config']['foreign_table_where'] = ''; + } +} \ No newline at end of file diff --git a/ext_tables.php b/ext_tables.php index ddbde9c3..a8e3ae90 100644 --- a/ext_tables.php +++ b/ext_tables.php @@ -70,89 +70,11 @@ $extRelPath . 'ext_icon.gif'), 'list_type' ); -$GLOBALS['TCA']['tx_kesearch_filters'] = array( - 'ctrl' => array( - 'title' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_filters', - 'label' => 'title', - 'tstamp' => 'tstamp', - 'crdate' => 'crdate', - 'cruser_id' => 'cruser_id', - 'languageField' => 'sys_language_uid', - 'transOrigPointerField' => 'l10n_parent', - 'transOrigDiffSourceField' => 'l10n_diffsource', - 'default_sortby' => 'ORDER BY crdate', - 'delete' => 'deleted', - 'type' => 'rendertype', - 'enablecolumns' => array( - 'disabled' => 'hidden', - ), - 'dynamicConfigFile' => $extPath . 'tca.php', - 'iconfile' => 'EXT:ke_search/res/img/table_icons/icon_tx_kesearch_filters.gif', - 'searchFields' => 'title' - ), -); - -$GLOBALS['TCA']['tx_kesearch_filteroptions'] = array( - 'ctrl' => array( - 'title' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_filteroptions', - 'label' => 'title', - 'tstamp' => 'tstamp', - 'crdate' => 'crdate', - 'cruser_id' => 'cruser_id', - 'languageField' => 'sys_language_uid', - 'transOrigPointerField' => 'l10n_parent', - 'transOrigDiffSourceField' => 'l10n_diffsource', - 'sortby' => 'sorting', - 'delete' => 'deleted', - 'enablecolumns' => array( - 'disabled' => 'hidden', - ), - 'dynamicConfigFile' => $extPath . 'tca.php', - 'iconfile' => 'EXT:ke_search/res/img/table_icons/icon_tx_kesearch_filteroptions.gif', - 'searchFields' => 'title,tag' - ), -); - -$GLOBALS['TCA']['tx_kesearch_index'] = array( - 'ctrl' => array( - 'title' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_index', - 'label' => 'title', - 'tstamp' => 'tstamp', - 'crdate' => 'crdate', - 'cruser_id' => 'cruser_id', - 'default_sortby' => 'ORDER BY crdate', - 'enablecolumns' => array( - 'starttime' => 'starttime', - 'endtime' => 'endtime', - 'fe_group' => 'fe_group', - ), - 'dynamicConfigFile' => $extPath . 'tca.php', - 'iconfile' => 'EXT:ke_search/res/img/table_icons/icon_tx_kesearch_index.gif', - ), -); - // class for displaying the category tree for tt_news in BE forms. if (TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('tt_news')) { include_once(TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('tt_news') . 'lib/class.tx_ttnews_TCAform_selectTree.php'); } -$GLOBALS['TCA']['tx_kesearch_indexerconfig'] = array( - 'ctrl' => array( - 'title' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig', - 'label' => 'title', - 'tstamp' => 'tstamp', - 'crdate' => 'crdate', - 'cruser_id' => 'cruser_id', - 'default_sortby' => 'ORDER BY crdate', - 'delete' => 'deleted', - 'enablecolumns' => array( - 'disabled' => 'hidden', - ), - 'dynamicConfigFile' => $extPath . 'tca.php', - 'iconfile' => 'EXT:ke_search/res/img/table_icons/icon_tx_kesearch_indexerconfig.gif', - 'searchFields' => 'title' - ), -); if (TYPO3_MODE == 'BE') { $TBE_MODULES_EXT['xMOD_db_new_content_el']['addElClasses']['tx_kesearch_pi1_wizicon'] = $extPath . 'pi1/class.tx_kesearch_pi1_wizicon.php'; diff --git a/tca.php b/tca.php deleted file mode 100644 index 3071bc46..00000000 --- a/tca.php +++ /dev/null @@ -1,771 +0,0 @@ - $TCA['tx_kesearch_filters']['ctrl'], - 'interface' => array ( - 'showRecordFieldList' => 'sys_language_uid,l10n_parent,l10n_diffsource,hidden,title,options,rendertype' - ), - 'columns' => array ( - 'sys_language_uid' => array ( - 'exclude' => 1, - 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.language', - 'config' => array ( - 'type' => 'select', - 'renderType' => 'selectSingle', - 'foreign_table' => 'sys_language', - 'foreign_table_where' => 'ORDER BY sys_language.title', - 'items' => array( - array('LLL:EXT:lang/locallang_general.xml:LGL.allLanguages', -1), - array('LLL:EXT:lang/locallang_general.xml:LGL.default_value', 0) - ) - ) - ), - 'l10n_parent' => array ( - 'displayCond' => 'FIELD:sys_language_uid:>:0', - 'exclude' => 1, - 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.l18n_parent', - 'config' => array ( - 'type' => 'select', - 'renderType' => 'selectSingle', - 'items' => array ( - array('', 0), - ), - 'foreign_table' => 'tx_kesearch_filters', - 'foreign_table_where' => 'AND tx_kesearch_filters.pid=###CURRENT_PID### AND tx_kesearch_filters.sys_language_uid IN (-1,0)', - ) - ), - 'l10n_diffsource' => array ( - 'config' => array ( - 'type' => 'passthrough' - ) - ), - 'hidden' => array ( - 'exclude' => 1, - 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.hidden', - 'config' => array ( - 'type' => 'check', - 'default' => '0' - ) - ), - 'title' => array ( - 'exclude' => 0, - 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_filters.title', - 'config' => array ( - 'type' => 'input', - 'size' => '30', - ) - ), - 'rendertype' => array ( - 'exclude' => 0, - 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_filters.rendertype', - 'config' => array ( - 'type' => 'select', - 'renderType' => 'selectSingle', - 'items' => array ( - array('LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_filters.rendertype.I.0', 'select'), - array('LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_filters.rendertype.I.1', 'list'), - array('LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_filters.rendertype.I.2', 'checkbox'), - array('LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_filters.rendertype.I.3', 'textlinks'), - ), - 'size' => 1, - 'maxitems' => 1, - 'default' => 'select', - ) - ), - - 'markAllCheckboxes' => array ( - 'exclude' => 0, - 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_filters.markAllCheckboxes', - 'config' => array ( - 'type' => 'check', - 'default' => '0' - ) - ), - 'options' => array ( - 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_filters.options', - 'config' => Array( - 'type' => 'inline', - 'foreign_table' => 'tx_kesearch_filteroptions', - 'maxitems' => 500, - 'appearance' => Array( - 'collapseAll' => 1, - 'expandSingle' => 1, - 'useSortable' => 1, - ), - ), - ), - 'target_pid' => array ( - 'exclude' => 1, - 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_filters.target_pid', - 'config' => array ( - 'type' => 'group', - 'internal_type' => 'db', - 'allowed' => 'pages', - 'size' => 1, - 'minitems' => 0, - 'maxitems' => 1, - ) - ), - 'amount' => array ( - 'exclude' => 0, - 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_filters.amount', - 'config' => array ( - 'type' => 'input', - 'default' => '10', - 'size' => '30', - 'eval' => 'trim,int', - ) - ), - 'shownumberofresults' => array ( - 'exclude' => 0, - 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_filters.shownumberofresults', - 'config' => array ( - 'type' => 'check', - 'default' => '1' - ) - ), - 'alphabeticalsorting' => array ( - 'exclude' => 0, - 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_filters.alphabeticalsorting', - 'config' => array ( - 'type' => 'check', - 'default' => '1', - ) - ), - ), - 'types' => array ( - 'select' => array('showitem' => 'sys_language_uid;;;;1-1-1,l10n_parent, l10n_diffsource, hidden;;1;;1-1-1, title;;;;2-2-2,rendertype;;;;3-3-3, options, shownumberofresults, alphabeticalsorting;;;;4-4-4'), - 'list' => array('showitem' => 'sys_language_uid;;;;1-1-1,l10n_parent, l10n_diffsource, hidden;;1;;1-1-1, title;;;;2-2-2,rendertype;;;;3-3-3, options, shownumberofresults, alphabeticalsorting;;;;4-4-4'), - 'checkbox' => array('showitem' => 'sys_language_uid;;;;1-1-1,l10n_parent, l10n_diffsource, hidden;;1;;1-1-1, title;;;;2-2-2,rendertype;;;;3-3-3, markAllCheckboxes, options, shownumberofresults, alphabeticalsorting;;;;4-4-4'), - 'textlinks' => array('showitem' => 'sys_language_uid;;;;1-1-1,l10n_parent, l10n_diffsource, hidden;;1;;1-1-1, title;;;;2-2-2,rendertype;;;;3-3-3, target_pid, amount, shownumberofresults, alphabeticalsorting;;;;4-4-4, options') - ), - 'palettes' => array ( - '1' => array('showitem' => '') - ) -); - -$TCA['tx_kesearch_filteroptions'] = array ( - 'ctrl' => $TCA['tx_kesearch_filteroptions']['ctrl'], - 'interface' => array ( - 'showRecordFieldList' => 'sys_language_uid,l10n_parent,l10n_diffsource,hidden,title,tag' - ), - 'columns' => array ( - 'sys_language_uid' => array ( - 'exclude' => 1, - 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.language', - 'config' => array ( - 'type' => 'select', - 'renderType' => 'selectSingle', - 'foreign_table' => 'sys_language', - 'foreign_table_where' => 'ORDER BY sys_language.title', - 'items' => array( - array('LLL:EXT:lang/locallang_general.xml:LGL.allLanguages', -1), - array('LLL:EXT:lang/locallang_general.xml:LGL.default_value', 0) - ) - ) - ), - 'l10n_parent' => array ( - 'displayCond' => 'FIELD:sys_language_uid:>:0', - 'exclude' => 1, - 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.l18n_parent', - 'config' => array ( - 'type' => 'select', - 'renderType' => 'selectSingle', - 'items' => array ( - array('', 0), - ), - 'foreign_table' => 'tx_kesearch_filteroptions', - 'foreign_table_where' => 'AND tx_kesearch_filteroptions.pid=###CURRENT_PID### AND tx_kesearch_filteroptions.sys_language_uid IN (-1,0)', - ) - ), - 'l10n_diffsource' => array ( - 'config' => array ( - 'type' => 'passthrough' - ) - ), - 'hidden' => array ( - 'exclude' => 1, - 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.hidden', - 'config' => array ( - 'type' => 'check', - 'default' => '0' - ) - ), - 'title' => array ( - 'exclude' => 0, - 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_filteroptions.title', - 'config' => array ( - 'type' => 'input', - 'size' => '30', - ) - ), - 'tag' => array ( - 'exclude' => 0, - 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_filteroptions.tag', - 'config' => array ( - 'type' => 'input', - 'size' => '30', - ) - ), - 'automated_tagging' => array ( - 'exclude' => 1, - 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_filteroptions.automated_tagging', - 'config' => array ( - 'type' => 'group', - 'internal_type' => 'db', - 'allowed' => 'pages', - 'size' => 1, - 'minitems' => 0, - 'maxitems' => 1, - ) - ), - 'automated_tagging_exclude' => array ( - 'exclude' => 1, - 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_filteroptions.automated_tagging_exclude', - 'config' => array ( - 'type' => 'group', - 'internal_type' => 'db', - 'allowed' => 'pages', - 'size' => 5, - 'minitems' => 0, - 'maxitems' => 99, - ) - ), - ), - 'types' => array ( - '0' => array('showitem' => 'sys_language_uid;;;;1-1-1, l10n_parent, l10n_diffsource, hidden;;1;;1-1-1, title;;;;2-2-2, tag;;;;3-3-3, automated_tagging;;;;4-4-4,automated_tagging_exclude;;;;5-5-5') - ), - 'palettes' => array ( - '1' => array('showitem' => '') - ) -); - - - -$TCA['tx_kesearch_index'] = array ( - 'ctrl' => $TCA['tx_kesearch_index']['ctrl'], - 'interface' => array ( - 'showRecordFieldList' => 'targetpid,content,params,type,tags,abstract,title,language' - ), - 'columns' => array ( - 'starttime' => array ( - 'exclude' => 1, - 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.starttime', - 'config' => array ( - 'type' => 'input', - 'size' => '8', - 'max' => '20', - 'eval' => 'date', - 'default' => '0', - 'checkbox' => '0' - ) - ), - 'endtime' => array ( - 'exclude' => 1, - 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.endtime', - 'config' => array ( - 'type' => 'input', - 'size' => '8', - 'max' => '20', - 'eval' => 'date', - 'checkbox' => '0', - 'default' => '0', - 'range' => array ( - 'upper' => mktime(3, 14, 7, 1, 19, 2038), - 'lower' => mktime(0, 0, 0, date('m')-1, date('d'), date('Y')) - ) - ) - ), - 'fe_group' => array ( - 'exclude' => 1, - 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.fe_group', - 'config' => array ( - 'type' => 'select', - 'renderType' => 'selectSingleBox', - 'items' => array ( - array('', 0), - array('LLL:EXT:lang/locallang_general.xml:LGL.hide_at_login', -1), - array('LLL:EXT:lang/locallang_general.xml:LGL.any_login', -2), - array('LLL:EXT:lang/locallang_general.xml:LGL.usergroups', '--div--') - ), - 'foreign_table' => 'fe_groups', - 'foreign_table_where' => 'ORDER BY fe_groups.title', - 'size' => 6, - 'minitems' => 0, - 'maxitems' => 99999, - ) - ), - 'targetpid' => array ( - 'exclude' => 0, - 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_index.targetpid', - 'config' => array ( - 'type' => 'group', - 'internal_type' => 'db', - 'allowed' => 'pages', - 'size' => 1, - 'minitems' => 0, - 'maxitems' => 1, - ) - ), - 'content' => array ( - 'exclude' => 0, - 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_index.content', - 'config' => array ( - 'type' => 'text', - 'wrap' => 'OFF', - 'cols' => '30', - 'rows' => '5', - ) - ), - 'params' => array ( - 'exclude' => 0, - 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_index.params', - 'config' => array ( - 'type' => 'input', - 'size' => '30', - ) - ), - 'type' => array ( - 'exclude' => 0, - 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_index.type', - 'config' => array ( - 'type' => 'input', - 'size' => '30', - ) - ), - 'tags' => array ( - 'exclude' => 0, - 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_index.tags', - 'config' => array ( - 'type' => 'text', - 'wrap' => 'OFF', - 'cols' => '30', - 'rows' => '5', - ) - ), - 'abstract' => array ( - 'exclude' => 0, - 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_index.abstract', - 'config' => array ( - 'type' => 'text', - 'cols' => '30', - 'rows' => '5', - ) - ), - 'title' => array ( - 'exclude' => 0, - 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_index.title', - 'config' => array ( - 'type' => 'input', - 'size' => '30', - ) - ), - 'language' => array ( - 'exclude' => 0, - 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_index.language', - 'config' => array ( - 'type' => 'select', - 'renderType' => 'selectSingle', - 'items' => array ( - array('LLL:EXT:lang/locallang_general.xlf:LGL.allLanguages', -1), - array('LLL:EXT:lang/locallang_general.xlf:LGL.default_value', 0) - ), - 'foreign_table' => 'sys_language', - 'foreign_table_where' => 'ORDER BY sys_language.uid', - 'size' => 1, - 'minitems' => 0, - 'maxitems' => 1, - ) - ), - 'sortdate' => Array ( - 'exclude' => 0, - 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_index.sortdate', - 'config' => Array ( - 'type' => 'input', - 'size' => '10', - 'max' => '20', - 'eval' => 'datetime', - 'checkbox' => '0', - 'default' => '0' - ) - ), - 'orig_uid' => array ( - 'config' => array ( - 'type' => 'passthrough' - ) - ), - 'orig_pid' => array ( - 'config' => array ( - 'type' => 'passthrough' - ) - ), - 'directory' => array ( - 'exclude' => 0, - 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_index.directory', - 'config' => array ( - 'type' => 'input', - 'size' => '30', - ) - ), - 'hash' => array ( - 'config' => array ( - 'type' => 'passthrough' - ) - ), - ), - 'types' => array ( - '0' => array('showitem' => 'starttime;;;;1-1-1, endtime, fe_group, targetpid, content, params, type, tags, abstract, title;;;;2-2-2, language;;;;3-3-3') - ), - 'palettes' => array ( - '1' => array('showitem' => '') - ) -); - - -$TCA['tx_kesearch_indexerconfig']['ctrl']['requestUpdate'] = 'type'; -$TCA['tx_kesearch_indexerconfig'] = array ( - 'ctrl' => $TCA['tx_kesearch_indexerconfig']['ctrl'], - 'interface' => array ( - 'showRecordFieldList' => 'hidden,title,storagepid,startingpoints_recursive,single_pages,sysfolder,type,index_content_with_restrictions,index_passed_events,,index_news_category_mode,index_news_category_selection,directories,fileext,filteroption' - ), - 'columns' => array ( - 'hidden' => array ( - 'exclude' => 1, - 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.hidden', - 'config' => array ( - 'type' => 'check', - 'default' => '0' - ) - ), - 'title' => array ( - 'exclude' => 0, - 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.title', - 'config' => array ( - 'type' => 'input', - 'size' => '30', - ) - ), - 'storagepid' => array ( - 'exclude' => 0, - 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.storagepid', - 'config' => array ( - 'type' => 'group', - 'internal_type' => 'db', - 'allowed' => 'pages', - 'size' => 1, - 'minitems' => 1, - 'maxitems' => 1, - ) - ), - 'targetpid' => array ( - 'displayCond' => 'FIELD:type:!IN:page,tt_content,file,templavoila,comments,remote', - 'exclude' => 0, - 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.targetpid', - 'config' => array ( - 'type' => 'group', - 'internal_type' => 'db', - 'allowed' => 'pages', - 'size' => 1, - 'minitems' => 1, - 'maxitems' => 1, - ) - ), - 'type' => array ( - 'exclude' => 0, - 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.type', - 'config' => array ( - 'type' => 'select', - 'renderType' => 'selectSingle', - 'items' => array ( - array('LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.type.I.0', 'page', $extRelPath . 'res/img/types_backend/selicon_tx_kesearch_indexerconfig_type_0.gif'), - array('LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.type.I.1', 'ke_yac', $extRelPath . 'res/img/types_backend/selicon_tx_kesearch_indexerconfig_type_1.gif'), - array('LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.type.I.2', 'ttnews', $extRelPath . 'res/img/types_backend/selicon_tx_kesearch_indexerconfig_type_2.gif'), - array('LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.type.I.5', 'tt_address', $extRelPath . 'res/img/types_backend/selicon_tx_kesearch_indexerconfig_type_5.gif'), - array('LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.type.I.6', 'tt_content', $extRelPath . 'res/img/types_backend/selicon_tx_kesearch_indexerconfig_type_6.gif'), - array('LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.type.I.7', 'file', $extRelPath . 'res/img/types_backend/selicon_tx_kesearch_indexerconfig_type_7.gif'), - array('LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.type.I.8', 't3s_content', $extRelPath . 'res/img/types_backend/selicon_tx_kesearch_indexerconfig_type_8.gif'), - array('LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.type.I.9', 'templavoila', $extRelPath . 'res/img/types_backend/selicon_tx_kesearch_indexerconfig_type_9.gif'), - array('LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.type.I.10', 'mmforum', $extRelPath . 'res/img/types_backend/selicon_tx_kesearch_indexerconfig_type_10.gif'), - array('LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.type.I.11', 'comments', $extRelPath . 'res/img/types_backend/selicon_tx_kesearch_indexerconfig_type_11.gif'), - array('LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.type.I.12', 'news', $extRelPath . 'res/img/types_backend/selicon_tx_kesearch_indexerconfig_type_12.gif'), - array('LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.type.I.13', 'a21glossary', $extRelPath . 'res/img/types_backend/selicon_tx_kesearch_indexerconfig_type_13.gif'), - ), - 'itemsProcFunc' => 'tx_kesearch_lib_items->fillIndexerConfig', - 'size' => 1, - 'maxitems' => 1, - 'default' => 'page', - ) - ), - 'startingpoints_recursive' => array ( - 'exclude' => 0, - 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.startingpoints_recursive', - 'displayCond' => 'FIELD:type:IN:page,tt_content,ttnews,tt_address,templavoila,comments,news,a21glossary', - 'config' => array ( - 'type' => 'group', - 'internal_type' => 'db', - 'allowed' => 'pages', - 'size' => 10, - 'minitems' => 0, - 'maxitems' => 99, - ) - ), - 'single_pages' => array ( - 'exclude' => 0, - 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.single_pages', - 'displayCond' => 'FIELD:type:IN:page,tt_content,templavoila', - 'config' => array ( - 'type' => 'group', - 'internal_type' => 'db', - 'allowed' => 'pages', - 'size' => 10, - 'minitems' => 0, - 'maxitems' => 99, - ) - ), - 'sysfolder' => array ( - 'exclude' => 0, - 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.sysfolder', - 'displayCond' => 'FIELD:type:IN:ke_yac,ttnews,tt_address,mmforum,comments,news,a21glossary', - 'config' => array ( - 'type' => 'group', - 'internal_type' => 'db', - 'allowed' => 'pages', - 'size' => 10, - 'minitems' => 0, - 'maxitems' => 99, - ) - ), - 'index_content_with_restrictions' => array ( - 'exclude' => 0, - 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.index_content_with_restrictions', - 'displayCond' => 'FIELD:type:=:page', - 'config' => array ( - 'type' => 'select', - 'renderType' => 'selectSingle', - 'items' => array ( - array('LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.index_content_with_restrictions.I.0', 'yes'), - array('LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.index_content_with_restrictions.I.1', 'no'), - ), - 'size' => 1, - 'maxitems' => 1, - 'default' => 'no' - ) - ), - 'index_passed_events' => array ( - 'exclude' => 0, - 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.index_passed_events', - 'displayCond' => 'FIELD:type:=:ke_yac', - 'config' => array ( - 'type' => 'select', - 'renderType' => 'selectSingle', - 'items' => array ( - array('LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.index_passed_events.I.0', 'yes'), - array('LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.index_passed_events.I.1', 'no'), - ), - 'size' => 1, - 'maxitems' => 1, - ) - ), - 'index_news_category_mode' => array ( - 'exclude' => 0, - 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.index_news_category_mode', - 'displayCond' => 'FIELD:type:IN:ttnews,news', - 'config' => array ( - 'type' => 'select', - 'renderType' => 'selectSingle', - 'items' => array ( - array('LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.index_news_category_mode.I.1', '1'), - array('LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.index_news_category_mode.I.2', '2'), - ), - 'size' => 1, - 'maxitems' => 1, - ) - ), - 'index_news_category_selection' => Array ( - 'exclude' => 1, - 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.index_news_category_selection', - 'displayCond' => 'FIELD:type:=:ttnews', - 'config' => Array ( - 'type' => 'none', - ) - ), - 'index_extnews_category_selection' => array( - 'exclude' => 1, - 'l10n_mode' => 'mergeIfNotBlank', - 'label' => 'LLL:EXT:news/Resources/Private/Language/locallang_db.xml:tx_news_domain_model_news.categories', - 'displayCond' => 'FIELD:type:=:news', - 'config' => array( - 'type' => 'none', - ) - ), - 'index_news_useHRDatesSingle' => array ( - 'exclude' => 0, - 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.index_news_useHRDatesSingle', - 'displayCond' => 'FIELD:type:=:ttnews', - 'config' => array ( - 'type' => 'check', - 'default' => '0' - ) - ), - 'index_news_useHRDatesSingleWithoutDay' => array ( - 'exclude' => 0, - 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.index_news_useHRDatesSingleWithoutDay', - 'displayCond' => 'FIELD:type:=:ttnews', - 'config' => array ( - 'type' => 'check', - 'default' => '0' - ) - ), - 'index_use_page_tags' => array ( - 'exclude' => 0, - 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.index_use_page_tags', - 'displayCond' => 'FIELD:type:IN:ttnews,tt_address,mmforum,comments,news', - 'config' => array ( - 'type' => 'check', - 'default' => '0' - ) - ), - 'directories' => array ( - 'exclude' => 0, - 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.directories', - 'displayCond' => 'FIELD:type:IN:file', - 'config' => array ( - 'type' => 'text', - 'cols' => 48, - 'rows' => 10, - 'eval' => 'trim', - ) - ), - 'fileext' => array ( - 'exclude' => 0, - 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.fileext', - 'displayCond' => 'FIELD:type:IN:file,page,tt_content', - 'config' => array ( - 'type' => 'input', - 'size' => '30', - 'default' => 'pdf,ppt,doc,xls' - ) - ), - 'index_use_page_tags_for_files' => array ( - 'exclude' => 0, - 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.index_use_page_tags_for_files', - 'displayCond' => 'FIELD:type:IN:page,tt_content', - 'config' => array ( - 'type' => 'check', - 'default' => '0' - ) - ), - 'commenttypes' => array ( - 'exclude' => 0, - 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.commenttypes', - 'displayCond' => 'FIELD:type:=:comments', - 'config' => array ( - 'type' => 'input', - 'size' => '30', - 'default' => 'pages' - ) - ), - 'filteroption' => array ( - 'exclude' => 0, - 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.filteroption', - 'config' => array ( - 'type' => 'select', - 'renderType' => 'selectSingle', - 'items' => array ( - array('', 0), - ), - 'itemsProcFunc' => 'user_filterlist->getListOfAvailableFiltersForTCA', - 'size' => 1, - 'minitems' => 0, - 'maxitems' => 1, - ) - ), - 'tvpath' => array ( - 'exclude' => 0, - 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.tvpath', - 'displayCond' => 'FIELD:type:=:templavoila', - 'config' => array ( - 'type' => 'input', - 'size' => '30', - 'default' => 'field_content' - ) - ), - 'fal_storage' => array ( - 'exclude' => 0, - 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.fal_storage', - 'displayCond' => 'FIELD:type:=:file', - 'config' => array ( - 'type' => 'select', - 'renderType' => 'selectSingle', - 'items' => array ( - array('LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.fal_storage.dont_use_fal', -1), - ), - 'size' => 1, - 'maxitems' => 1, - 'default' => -1, - 'foreign_table' => 'sys_file_storage', - 'allowNonIdValues' => 1 - ) - ), - 'contenttypes' => array ( - 'exclude' => 0, - 'label' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig.contenttypes', - 'displayCond' => 'FIELD:type:IN:page,tt_content', - 'config' => array ( - 'type' => 'input', - 'size' => '30', - 'default' => 'text,textpic,bullets,table,html,header,uploads' - ) - ), - ), - 'types' => array ( - '0' => array('showitem' => 'hidden;;1;;1-1-1, title;;;;2-2-2, storagepid,targetpid;;;;3-3-3,type,startingpoints_recursive,single_pages,sysfolder,index_content_with_restrictions,index_passed_events,index_news_category_mode,index_news_category_selection,index_extnews_category_selection,index_news_useHRDatesSingle,index_news_useHRDatesSingleWithoutDay,index_use_page_tags,fal_storage,directories,fileext,contenttypes,commenttypes,filteroption,tvpath,index_use_page_tags_for_files') - ), - 'palettes' => array ( - '1' => array('showitem' => '') - ) -); - -// define dependencies to tt_news only if tt_news is installed -if (TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('tt_news')) { - $TCA['tx_kesearch_indexerconfig']['columns']['index_news_category_selection']['config'] = array ( - 'type' => 'select', - 'form_type' => 'user', - 'userFunc' => 'tx_ttnews_TCAform_selectTree->renderCategoryFields', - 'treeView' => 1, - 'foreign_table' => 'tt_news_cat', - 'autoSizeMax' => 50, - 'minitems' => 0, - 'maxitems' => 500, - ); -} - -// define dependencies to news only if news is installed -if (TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('news')) { - $TCA['tx_kesearch_indexerconfig']['columns']['index_extnews_category_selection']['config'] = array( - 'type' => 'select', - 'renderType' => 'selectTree', - 'renderMode' => 'tree', - 'treeConfig' => array( - 'parentField' => 'parentcategory', - ), - 'foreign_table' => 'tx_news_domain_model_category', - 'foreign_table_where' => ' AND (tx_news_domain_model_category.sys_language_uid = 0 OR tx_news_domain_model_category.l10n_parent = 0) ORDER BY tx_news_domain_model_category.sorting', - 'size' => 10, - 'autoSizeMax' => 20, - 'minitems' => 0, - 'maxitems' => 20, - ); - - // news version 3 features system categories instead of it's own - // category system which was used in previous versions - if (version_compare(TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getExtensionVersion('news'), '3.0.0') >= 0) { - $TCA['tx_kesearch_indexerconfig']['columns']['index_extnews_category_selection']['config']['treeConfig']['parentField'] = 'parent'; - $TCA['tx_kesearch_indexerconfig']['columns']['index_extnews_category_selection']['config']['foreign_table'] = 'sys_category'; - $TCA['tx_kesearch_indexerconfig']['columns']['index_extnews_category_selection']['config']['foreign_table_where'] = ''; - } -} \ No newline at end of file