BugFix tx_ removed from linkBuilder
[TYPO3CMS/Extensions/typo3wiki.git] / ext_tables.php
1 <?php
2 if (!defined('TYPO3_MODE')) {
3 die ('Access denied.');
4 }
5
6 Tx_Extbase_Utility_Extension::registerPlugin(
7 $_EXTKEY,
8 'Typo3wiki',
9 'TYPO3 Wiki'
10 );
11
12 t3lib_extMgm::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'TYPO3 Wiki');
13
14 t3lib_extMgm::addLLrefForTCAdescr('tx_typo3wiki_domain_model_page', 'EXT:typo3wiki/Resources/Private/Language/locallang_csh_tx_typo3wiki_domain_model_page.xlf');
15 t3lib_extMgm::allowTableOnStandardPages('tx_typo3wiki_domain_model_page');
16 $TCA['tx_typo3wiki_domain_model_page'] = array(
17 'ctrl' => array(
18 'title' => 'LLL:EXT:typo3wiki/Resources/Private/Language/locallang_db.xlf:tx_typo3wiki_domain_model_page',
19 'label' => 'page_title',
20 'tstamp' => 'tstamp',
21 'crdate' => 'crdate',
22 'cruser_id' => 'cruser_id',
23 'dividers2tabs' => TRUE,
24
25 'origUid' => 't3_origuid',
26 'languageField' => 'sys_language_uid',
27 'transOrigPointerField' => 'l10n_parent',
28 'transOrigDiffSourceField' => 'l10n_diffsource',
29 'delete' => 'deleted',
30 'enablecolumns' => array(
31 'disabled' => 'hidden',
32 'starttime' => 'starttime',
33 'endtime' => 'endtime',
34 ),
35 'searchFields' => 'page_title,subscriber,revisions,main_revision,related_pages,',
36 'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY) . 'Configuration/TCA/Page.php',
37 'iconfile' => t3lib_extMgm::extRelPath($_EXTKEY) . 'Resources/Public/Icons/tx_typo3wiki_domain_model_page.gif'
38 ),
39 );
40
41 t3lib_extMgm::addLLrefForTCAdescr('tx_typo3wiki_domain_model_textrevision', 'EXT:typo3wiki/Resources/Private/Language/locallang_csh_tx_typo3wiki_domain_model_textrevision.xlf');
42 t3lib_extMgm::allowTableOnStandardPages('tx_typo3wiki_domain_model_textrevision');
43 $TCA['tx_typo3wiki_domain_model_textrevision'] = array(
44 'ctrl' => array(
45 'title' => 'LLL:EXT:typo3wiki/Resources/Private/Language/locallang_db.xlf:tx_typo3wiki_domain_model_textrevision',
46 'label' => 'write_date',
47 'tstamp' => 'tstamp',
48 'crdate' => 'crdate',
49 'cruser_id' => 'cruser_id',
50 'dividers2tabs' => TRUE,
51 'sortby' => 'sorting',
52
53 'origUid' => 't3_origuid',
54 'languageField' => 'sys_language_uid',
55 'transOrigPointerField' => 'l10n_parent',
56 'transOrigDiffSourceField' => 'l10n_diffsource',
57 'delete' => 'deleted',
58 'enablecolumns' => array(
59 'disabled' => 'hidden',
60 'starttime' => 'starttime',
61 'endtime' => 'endtime',
62 ),
63 'searchFields' => 'write_date,unrendered_text,rendered_text,changes,owner,',
64 'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY) . 'Configuration/TCA/TextRevision.php',
65 'iconfile' => t3lib_extMgm::extRelPath($_EXTKEY) . 'Resources/Public/Icons/tx_typo3wiki_domain_model_textrevision.gif'
66 ),
67 );
68
69 t3lib_div::loadTCA('fe_users');
70 if (!isset($TCA['fe_users']['ctrl']['type'])) {
71 // no type field defined, so we define it here. This will only happen the first time the extension is installed!!
72 $TCA['fe_users']['ctrl']['type'] = 'tx_extbase_type';
73 $tempColumns = array();
74 $tempColumns[$TCA['fe_users']['ctrl']['type']] = array(
75 'exclude' => 1,
76 'label' => 'LLL:EXT:typo3wiki/Resources/Private/Language/locallang_db.xlf:tx_typo3wiki_domain_model_user.tx_extbase_type',
77 'config' => array(
78 'type' => 'select',
79 'items' => array(
80 array('LLL:EXT:typo3wiki/Resources/Private/Language/locallang_db.xlf:tx_typo3wiki_domain_model_user.tx_extbase_type.0','0'),
81 ),
82 'size' => 1,
83 'maxitems' => 1,
84 'default' => 'Tx_Typo3wiki_User'
85 )
86 );
87 t3lib_extMgm::addTCAcolumns('fe_users', $tempColumns, 1);
88 }
89
90 $TCA['fe_users']['types']['Tx_Typo3wiki_User']['showitem'] = $TCA['fe_users']['types']['Tx_Extbase_Domain_Model_FrontendUser']['showitem'];
91 $TCA['fe_users']['columns'][$TCA['fe_users']['ctrl']['type']]['config']['items'][] = array('LLL:EXT:typo3wiki/Resources/Private/Language/locallang_db.xlf:tx_typo3wiki_domain_model_user','Tx_Typo3wiki_User');
92 t3lib_extMgm::addToAllTCAtypes('fe_users', $TCA['fe_users']['ctrl']['type'],'','after:hidden');
93
94 $tmp_typo3wiki_columns = array(
95
96 );
97
98 t3lib_extMgm::addTCAcolumns('fe_users',$tmp_typo3wiki_columns);
99
100 $TCA['fe_users']['columns'][$TCA['fe_users']['ctrl']['type']]['config']['items'][] = array('LLL:EXT:typo3wiki/Resources/Private/Language/locallang_db.xlf:fe_users.tx_extbase_type.Tx_Typo3wiki_User','Tx_Typo3wiki_User');
101
102 $TCA['fe_users']['types']['Tx_Typo3wiki_User']['showitem'] = $TCA['fe_users']['types']['Tx_Extbase_Domain_Model_FrontendUser']['showitem'];
103 $TCA['fe_users']['types']['Tx_Typo3wiki_User']['showitem'] .= ',--div--;LLL:EXT:typo3wiki/Resources/Private/Language/locallang_db.xlf:tx_typo3wiki_domain_model_user,';
104 $TCA['fe_users']['types']['Tx_Typo3wiki_User']['showitem'] .= '';
105
106 $pluginSignature = str_replace('_','',$_EXTKEY) . '_typo3wiki';
107 $TCA['tt_content']['types']['list']['subtypes_addlist'][$pluginSignature] = 'pi_flexform';
108 t3lib_extMgm::addPiFlexFormValue($pluginSignature, 'FILE:EXT:' . $_EXTKEY . '/Configuration/FlexForms/flexform_typo3wiki.xml');
109
110 if (TYPO3_MODE == 'BE') {
111 $TBE_MODULES_EXT['xMOD_db_new_content_el']['addElClasses'][$pluginSignature . '_wizicon'] = t3lib_extMgm::extPath($_EXTKEY) . 'Resources/Private/Php/class.' . $_EXTKEY . '_wizicon.php';
112 }