Project

General

Profile

Bug #17470 » ext_tables.php

Administrator Admin, 2007-07-16 11:16

 
<?php
if (!defined ('TYPO3_MODE')) die ('Access denied.');
$tempColumns = Array (
"tx_elgatochlib_keyword" => Array (
"exclude" => 0,
"label" => "LLL:EXT:elgato_chlib/locallang_db.xml:tx_dam.tx_elgatochlib_keyword",
"config" => Array (
"type" => "select",
"foreign_table" => "tx_elgatochlib_keywords",
"foreign_table_where" => "ORDER BY tx_elgatochlib_keywords.uid",
"size" => 8,
"minitems" => 0,
"maxitems" => 40,
)
),
"tx_elgatochlib_view" => Array (
"exclude" => 0,
"label" => "LLL:EXT:elgato_chlib/locallang_db.xml:tx_dam.tx_elgatochlib_view",
"config" => Array (
"type" => "select",
"items" => Array (
Array("", "0"),
),
"foreign_table" => "tx_elgatochlib_views",
"foreign_table_where" => "ORDER BY tx_elgatochlib_views.uid",
"size" => 1,
"minitems" => 0,
"maxitems" => 1,
)
),
"tx_elgatochlib_year" => Array (
"exclude" => 0,
"label" => "LLL:EXT:elgato_chlib/locallang_db.xml:tx_dam.tx_elgatochlib_year",
"config" => Array (
"type" => "input",
"size" => "4",
"max" => "4",
"eval" => "int",
"checkbox" => "0",
"range" => Array (
"upper" => "2020",
"lower" => "1995"
),
"default" => 0
)
),
"tx_elgatochlib_ir" => Array (
"exclude" => 0,
"label" => "LLL:EXT:elgato_chlib/locallang_db.xml:tx_dam.tx_elgatochlib_ir",
"config" => Array (
"type" => "select",
"items" => Array (
Array("LLL:EXT:elgato_chlib/locallang_db.xml:tx_dam.tx_elgatochlib_ir.I.0", "0"),
Array("LLL:EXT:elgato_chlib/locallang_db.xml:tx_dam.tx_elgatochlib_ir.I.1", "1"),
Array("LLL:EXT:elgato_chlib/locallang_db.xml:tx_dam.tx_elgatochlib_ir.I.2", "2"),
),
"size" => 1,
"maxitems" => 1,
)
),
"tx_elgatochlib_language" => Array (
"exclude" => 0,
"label" => "LLL:EXT:elgato_chlib/locallang_db.xml:tx_dam.tx_elgatochlib_language",
"config" => Array (
"type" => "select",
"items" => Array (
Array("LLL:EXT:elgato_chlib/locallang_db.xml:tx_dam.tx_elgatochlib_language.I.0", "0"),
Array("LLL:EXT:elgato_chlib/locallang_db.xml:tx_dam.tx_elgatochlib_language.I.1", "1"),
Array("LLL:EXT:elgato_chlib/locallang_db.xml:tx_dam.tx_elgatochlib_language.I.2", "2"),
Array("LLL:EXT:elgato_chlib/locallang_db.xml:tx_dam.tx_elgatochlib_language.I.3", "3"),
Array("LLL:EXT:elgato_chlib/locallang_db.xml:tx_dam.tx_elgatochlib_language.I.99", "99"),
),
"size" => 1,
"maxitems" => 1,
)
),
"tx_elgatochlib_region" => Array (
"exclude" => 0,
"label" => "LLL:EXT:elgato_chlib/locallang_db.xml:tx_dam.tx_elgatochlib_region",
"config" => Array (
"type" => "select",
"items" => Array (
Array("LLL:EXT:elgato_chlib/locallang_db.xml:tx_dam.tx_elgatochlib_region.I.0", "0"),
Array("LLL:EXT:elgato_chlib/locallang_db.xml:tx_dam.tx_elgatochlib_region.I.1", "1"),
Array("LLL:EXT:elgato_chlib/locallang_db.xml:tx_dam.tx_elgatochlib_region.I.2", "2"),
),
"size" => 1,
"maxitems" => 1,
)
),
"tx_elgatochlib_country" => Array (
"exclude" => 0,
"label" => "LLL:EXT:elgato_chlib/locallang_db.xml:tx_dam.tx_elgatochlib_country",
"config" => Array (
"type" => "select",
"foreign_table" => "static_countries",
"foreign_table_where" => "AND static_countries.tx_elgatochlib_avail>0 ORDER BY static_countries.uid",
"size" => 9,
"minitems" => 0,
"maxitems" => 30,
"MM" => "tx_dam_tx_elgatochlib_country_mm",
)
),
"tx_elgatochlib_morekeywords" => Array (
"exclude" => 1,
"label" => "LLL:EXT:elgato_chlib/locallang_db.xml:tx_dam.tx_elgatochlib_morekeywords",
"config" => Array (
"type" => "none",
"cols" => "48",
"rows" => "3",
)
),
"tx_elgatochlib_cattext" => Array (
"exclude" => 1,
"label" => "LLL:EXT:elgato_chlib/locallang_db.xml:tx_dam.tx_elgatochlib_cattext",
"config" => Array (
"type" => "none",
"size" => "48",
)
),
"tx_elgatochlib_countrytext" => Array (
"exclude" => 1,
"label" => "LLL:EXT:elgato_chlib/locallang_db.xml:tx_dam.tx_elgatochlib_countrytext",
"config" => Array (
"type" => "none",
"type" => "none",
"size" => "48",
)
),
);


t3lib_div::loadTCA("tx_dam");
t3lib_extMgm::addTCAcolumns("tx_dam",$tempColumns,1);

$TCA['tx_dam']['palettes']['123']['showitem'] = 'tx_elgatochlib_view, tx_elgatochlib_year, tx_elgatochlib_language, tx_elgatochlib_region, tx_elgatochlib_ir';
$TCA['tx_dam']['palettes']['123']['canNotCollapse'] = 1;

$TCA['tx_dam']['txdamInterface']['index_fieldList'] = str_replace('keywords',
'keywords, tx_elgatochlib_keywords, tx_elgatochlib_view, tx_elgatochlib_year, tx_elgatochlib_language, tx_elgatochlib_region, tx_elgatochlib_ir, tx_elgatochlib_country, fe_group',
$TCA['tx_dam']['txdamInterface']['index_fieldList']);

$TCA['tx_dam']['txdamInterface']['index_fieldList'] = str_replace(',category','',$TCA['tx_dam']['txdamInterface']['index_fieldList']);

$TCA['tx_dam']['interface']['excludeFieldList'] = 'category,tx_elgatochlib_country';

for ($i=0;$i<count($TCA['tx_dam']['types']);$i++) {
$TCA['tx_dam']['types'][$i] = str_replace('keywords','keywords, tx_elgatochlib_keyword, tx_elgatochlib_morekeywords',$TCA['tx_dam']['types'][$i]);
$TCA['tx_dam']['types'][$i] = str_replace('category;;;;4-4-4, ','',$TCA['tx_dam']['types'][$i]);
$TCA['tx_dam']['types'][$i] = str_replace('description,',
'description,'."--palette--;;123;;1-1-1, tx_elgatochlib_country, category;;;;4-4-4, ",$TCA['tx_dam']['types'][$i]);
}

$tempColumns = Array (
"tx_elgatochlib_avail" => Array (
"exclude" => 0,
"label" => "LLL:EXT:elgato_chlib/locallang_db.xml:static_countries.tx_elgatochlib_avail",
"config" => Array (
"type" => "check",
)
),
);


t3lib_div::loadTCA("static_countries");
t3lib_extMgm::addTCAcolumns("static_countries",$tempColumns,1);
t3lib_extMgm::addToAllTCAtypes("static_countries","tx_elgatochlib_avail;;;;1-1-1");

$TCA["tx_elgatochlib_keywords"] = array (
"ctrl" => array (
'title' => 'LLL:EXT:elgato_chlib/locallang_db.xml:tx_elgatochlib_keywords',
'label' => 'title',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
'sortby' => 'sorting',
'delete' => 'deleted',
'enablecolumns' => array (
'disabled' => 'hidden',
'fe_group' => 'fe_group',
),
'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY).'tca.php',
'iconfile' => t3lib_extMgm::extRelPath($_EXTKEY).'icon_tx_elgatochlib_keywords.gif',
),
"feInterface" => array (
"fe_admin_fieldList" => "hidden, fe_group, title",
)
);

$TCA["tx_elgatochlib_views"] = array (
"ctrl" => array (
'title' => 'LLL:EXT:elgato_chlib/locallang_db.xml:tx_elgatochlib_views',
'label' => 'title',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
'default_sortby' => "ORDER BY crdate",
'delete' => 'deleted',
'enablecolumns' => array (
'disabled' => 'hidden',
),
'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY).'tca.php',
'iconfile' => t3lib_extMgm::extRelPath($_EXTKEY).'icon_tx_elgatochlib_views.gif',
),
"feInterface" => array (
"fe_admin_fieldList" => "hidden, title",
)
);


t3lib_div::loadTCA('tt_content');
$TCA['tt_content']['types']['list']['subtypes_excludelist'][$_EXTKEY.'_pi1']='layout,select_key';
$TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY.'_pi1']='pi_flexform,---div---;;;;1-1-1';
t3lib_extMgm::addPiFlexFormValue($_EXTKEY."_pi1", "FILE:EXT:elgato_chlib/pi1/flexform.xml");
t3lib_extMgm::addPlugin(array('LLL:EXT:elgato_chlib/locallang_db.xml:tt_content.list_type_pi1', $_EXTKEY.'_pi1'),'list_type');
t3lib_extMgm::addStaticFile($_EXTKEY,"pi1/static/","Channel Library");

?>
(2-2/2)