/**
  * Returns the TCA description for a DAM media field
  *
  *	$options = array(
  *			'label' => 'Ein Bild',
  *			'config' => array(
  *					'maxitems' => 2,
  *					'size' => 2,
  *				),
  *		)
  *
  * @param array $ref
  * @param array $options	These options are merged into the resulting TCA
  * @return array
  */
 public static function getMediaTCA($ref, $options = array())
 {
     // $options war früher ein String. Daher muss auf String getestet werden.
     $type = 'image_field';
     if (is_string($options)) {
         $type = $options;
     }
     if (is_array($options)) {
         $type = isset($options['type']) ? $options['type'] : $type;
         unset($options['type']);
     }
     $tca = array();
     if (tx_rnbase_util_Extensions::isLoaded('dam')) {
         require_once tx_rnbase_util_Extensions::extPath('dam') . 'tca_media_field.php';
         $tca = txdam_getMediaTCA($type, $ref);
     }
     if (!empty($tca) && is_array($options)) {
         foreach ($options as $key => $option) {
             if (is_array($option)) {
                 if (!isset($tca[$key])) {
                     $tca[$key] = array();
                 }
                 foreach ($option as $subkey => $suboption) {
                     $tca[$key][$subkey] = $suboption;
                 }
             } else {
                 $tca[$key] = $option;
             }
         }
     }
     return $tca;
 }
Exemplo n.º 2
0
}
if (!defined('PATH_txdam_siteRel')) {
    define('PATH_txdam_siteRel', t3lib_extMgm::siteRelPath('dam'));
}
// extend beusers for access control
$tempColumns = array('tx_dam_mountpoints' => array('exclude' => 1, 'label' => 'LLL:EXT:dam/locallang_db.xml:label.tx_dam_mountpoints', 'config' => $GLOBALS['T3_VAR']['ext']['dam']['TCA']['mountpoints_config']));
t3lib_div::loadTCA('be_groups');
t3lib_extMgm::addTCAcolumns('be_groups', $tempColumns, 1);
t3lib_extMgm::addToAllTCAtypes('be_groups', 'tx_dam_mountpoints', '', 'after:file_mountpoints');
t3lib_div::loadTCA('be_users');
t3lib_extMgm::addTCAcolumns('be_users', $tempColumns, 1);
t3lib_extMgm::addToAllTCAtypes('be_users', 'tx_dam_mountpoints', '', 'after:fileoper_perms');
unset($tempColumns);
t3lib_div::loadTCA('tt_content');
// extend tt_content with fields for general usage
$tempColumns = array('tx_dam_images' => txdam_getMediaTCA('image_field', 'tx_dam_images'), 'tx_dam_files' => txdam_getMediaTCA('media_field', 'tx_dam_files'));
if (!isset($TCA['tt_content']['columns']['ce_flexform'])) {
    $tempColumns['ce_flexform'] = array('l10n_display' => 'hideDiff', 'exclude' => 1, 'label' => 'LLL:EXT:dam/lib/locallang.xml:options', 'config' => array('type' => 'flex', 'ds_pointerField' => 'CType', 'ds' => array('default' => '
					<T3DataStructure>
					  <ROOT>
					    <type>array</type>
					    <el>
							<!-- Repeat an element like "xmlTitle" beneath for as many elements you like. Remember to name them uniquely  -->
					      <xmlTitle>
							<TCEforms>
								<label>The Title:</label>
								<config>
									<type>input</type>
									<size>48</size>
								</config>
							</TCEforms>
    $TBE_STYLES['stylesheet2'] = $temp_eP . 'go_backend_layout.css';
    t3lib_div::loadTCA('be_users');
    $TCA['be_users']['columns']['lang']['config']['default'] = 'de';
    //t3lib_extMgm::addModule('user', 'gobeconfig', '', t3lib_extMgm::extPath($_EXTKEY) . 'moduls/config/');
}
###########################
## EXTENSION: go_teaser
## FILE:      C:/Dokumente und Einstellungen/Gosign/Desktop/TYPO3Winstaller/htdocs/Dummy/typo3conf/ext/go_teaser/ext_tables.php
###########################
$_EXTKEY = 'go_teaser';
$_EXTCONF = $TYPO3_CONF_VARS['EXT']['extConf'][$_EXTKEY];
if (!defined('TYPO3_MODE')) {
    die('Access denied.');
}
t3lib_div::loadTCA("tt_content");
$tempColumns = array('header_rte' => array('l10n_mode' => 'prefixLangTitle', 'l10n_cat' => 'text', 'label' => 'LLL:EXT:go_teaser/locallang_db.xml:tt_content.header_rte', 'config' => array('type' => 'text', 'cols' => '48', 'rows' => '3', 'wizards' => array('_PADDING' => 4, '_VALIGN' => 'middle', 'RTE' => array('notNewRecords' => 1, 'RTEonly' => 1, 'type' => 'script', 'title' => 'LLL:EXT:cms/locallang_ttc.php:bodytext.W.RTE', 'icon' => 'wizard_rte2.gif', 'script' => 'wizard_rte.php'), 'table' => array('notNewRecords' => 1, 'enableByTypeConfig' => 1, 'type' => 'script', 'title' => 'Table wizard', 'icon' => 'wizard_table.gif', 'script' => 'wizard_table.php', 'params' => array('xmlOutput' => 0)), 'forms' => array('notNewRecords' => 1, 'enableByTypeConfig' => 1, 'type' => 'script', 'title' => 'Forms wizard', 'icon' => 'wizard_forms.gif', 'script' => 'wizard_forms.php?special=formtype_mail', 'params' => array('xmlOutput' => 0))), 'softref' => 'typolink_tag,images,email[subst],url')), 'header_rte2' => array('l10n_mode' => 'prefixLangTitle', 'l10n_cat' => 'text', 'label' => 'LLL:EXT:go_teaser/locallang_db.xml:tt_content.header_rte2', 'config' => array('type' => 'text', 'cols' => '48', 'rows' => '3', 'wizards' => array('_PADDING' => 4, '_VALIGN' => 'middle', 'RTE' => array('notNewRecords' => 1, 'RTEonly' => 1, 'type' => 'script', 'title' => 'LLL:EXT:cms/locallang_ttc.php:bodytext.W.RTE', 'icon' => 'wizard_rte2.gif', 'script' => 'wizard_rte.php'), 'table' => array('notNewRecords' => 1, 'enableByTypeConfig' => 1, 'type' => 'script', 'title' => 'Table wizard', 'icon' => 'wizard_table.gif', 'script' => 'wizard_table.php', 'params' => array('xmlOutput' => 0)), 'forms' => array('notNewRecords' => 1, 'enableByTypeConfig' => 1, 'type' => 'script', 'title' => 'Forms wizard', 'icon' => 'wizard_forms.gif', 'script' => 'wizard_forms.php?special=formtype_mail', 'params' => array('xmlOutput' => 0))), 'softref' => 'typolink_tag,images,email[subst],url')), 'go_content_image' => txdam_getMediaTCA('image_field', 'go_content_image'), 'go_teaser_layout' => array('exclude' => 0, 'label' => 'LLL:EXT:go_teaser/locallang_db.xml:tt_content.tx_goteaser.piBoxTeaser_layout', 'config' => array('type' => 'select', 'items' => array(array('LLL:EXT:go_teaser/locallang_db.xml:tt_content.tx_goteaser.piThemenTeaser_layout.I.0', '0', t3lib_extMgm::extRelPath('go_teaser') . 'res/selicon_tt_content_tx_goteaser.piThemenTeaser_layout_0.gif'), array('LLL:EXT:go_teaser/locallang_db.xml:tt_content.tx_goteaser.piThemenTeaser_layout.I.1', '1', t3lib_extMgm::extRelPath('go_teaser') . 'res/selicon_tt_content_tx_goteaser.piThemenTeaser_layout_1.gif')), 'size' => 1, 'maxitems' => 1)), 'go_content_linktext' => array('exclude' => 1, 'label' => 'LLL:EXT:go_teaser/locallang_db.xml:tt_content.go_content_linktext', 'config' => array('type' => 'input', 'size' => '20', 'max' => '64')));
t3lib_extMgm::addTCAcolumns('tt_content', $tempColumns, 1);
$TCA['tt_content']['columns']['go_content_image']['label'] = 'LLL:EXT:go_teaser/locallang_db.xml:tt_content.go_content_image';
$TCA['tt_content']['columns']['go_content_image']['exclude'] = 1;
$TCA['tt_content']['columns']['go_content_image']['config']['show_thumbs'] = 1;
$TCA['tt_content']['columns']['go_content_image']['config']['size'] = 1;
$TCA['tt_content']['columns']['go_content_image']['config']['maxitems'] = 1;
$TCA['tt_content']['columns']['go_content_image']['config']['minitems'] = 0;
$TCA['tt_content']['columns']['go_content_image']['config']['autoSizeMax'] = 1;
// #
// ### piTeaser
// #
$TCA['tt_content']['types'][$_EXTKEY . '_piTeaser']['showitem'] = 'CType;;;button;1-1-1, tx_damttcontent_files, header_rte, header_rte2;;;richtext:rte_transform[flag=rte_enabled|mode=ts];2-2-2, image_link, 
																			--div--;LLL:EXT:go_imageedit_be/locallang_db.xml:tabLabel, tx_goimageeditbe_croped_image,
																			--div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.access, starttime, endtime, fe_group';
$TCA['tt_content']['imageedit'][$_EXTKEY . '_piTeaser'] = array("debug" => 0, "imgPath" => '../uploads/pics/', "rootImgPath" => 'uploads/pics/', "selector" => array("allowCustomRatio" => 1, "lockWH" => 1, "formatW" => '211', "formatH" => '158', "minHeight" => 211, "minWidth" => 158), "menu" => array("displayType" => 0, "showImageName" => 0, "showThumbnail" => 1, "showThumbnail_size" => "211x158", "showResolution" => 1, "maxImages" => 1), "adjustResolution" => array("enabled" => 1, "maxDisplayedWidth" => "700", "maxDisplayedHeight" => "400"));
Exemplo n.º 4
0
    $tempColumns['tx_gokeyvisual_flash']['config']['autoSizeMax'] = 1;
}
t3lib_div::loadTCA('pages');
t3lib_extMgm::addTCAcolumns('pages', $tempColumns, 1);
t3lib_extMgm::addToAllTCAtypes('pages', 'tx_gokeyvisual_flash;;;;1-1-1, tx_gokeyvisual_image, tx_gokeyvisual_imagelink');
$tempColumns = array('tx_gokeyvisual_image' => array('exclude' => 1, 'label' => 'LLL:EXT:go_keyvisual/locallang_db.xml:pages_language_overlay.tx_gokeyvisual_image', 'config' => array('type' => 'group', 'internal_type' => 'file', 'allowed' => 'gif,png,jpeg,jpg', 'max_size' => $GLOBALS['TYPO3_CONF_VARS']['BE']['maxFileSize'], 'uploadfolder' => 'uploads/tx_gokeyvisual', 'show_thumbs' => 1, 'size' => 1, 'minitems' => 0, 'maxitems' => 1)), 'tx_gokeyvisual_imagelink' => array('label' => 'LLL:EXT:go_keyvisual/locallang_db.xml:pages_language_overlay.tx_gokeyvisual_imagelink', 'exclude' => 1, 'config' => array('type' => 'input', 'size' => '15', 'max' => '256', 'checkbox' => '', 'eval' => 'trim', 'wizards' => array('_PADDING' => 2, 'link' => array('type' => 'popup', 'title' => 'Link', 'icon' => 'link_popup.gif', 'script' => 'browse_links.php?mode=wizard', 'JSopenParams' => 'height=300,width=500,status=0,menubar=0,scrollbars=1')), 'softref' => 'typolink')), 'tx_gokeyvisual_flash' => array('exclude' => 1, 'label' => 'LLL:EXT:go_keyvisual/locallang_db.xml:pages_language_overlay.tx_gokeyvisual_flash', 'config' => array('type' => 'group', 'internal_type' => 'file', 'allowed' => 'swf', 'max_size' => $GLOBALS['TYPO3_CONF_VARS']['BE']['maxFileSize'], 'uploadfolder' => 'uploads/tx_gokeyvisual', 'size' => 1, 'minitems' => 0, 'maxitems' => 1)));
// If DAM is installed, use DAM fields...
if (t3lib_extMgm::isLoaded('dam')) {
    $tempColumns['tx_gokeyvisual_image'] = txdam_getMediaTCA('image_field', 'tx_gokeyvisual_image');
    $tempColumns['tx_gokeyvisual_image']['exclude'] = 1;
    $tempColumns['tx_gokeyvisual_image']['label'] = 'LLL:EXT:go_keyvisual/locallang_db.xml:pages_language_overlay.tx_gokeyvisual_image';
    $tempColumns['tx_gokeyvisual_image']['config']['allowed_types'] = 'gif,png,jpeg,jpg';
    $tempColumns['tx_gokeyvisual_image']['config']['max_size'] = $GLOBALS['TYPO3_CONF_VARS']['BE']['maxFileSize'];
    $tempColumns['tx_gokeyvisual_image']['config']['size'] = 1;
    $tempColumns['tx_gokeyvisual_image']['config']['maxitems'] = 1;
    $tempColumns['tx_gokeyvisual_image']['config']['minitems'] = 0;
    $tempColumns['tx_gokeyvisual_image']['config']['autoSizeMax'] = 1;
    $tempColumns['tx_gokeyvisual_flash'] = txdam_getMediaTCA('image_field', 'tx_gokeyvisual_flash');
    $tempColumns['tx_gokeyvisual_flash']['exclude'] = 1;
    $tempColumns['tx_gokeyvisual_flash']['label'] = 'LLL:EXT:go_keyvisual/locallang_db.xml:pages_language_overlay.tx_gokeyvisual_flash';
    $tempColumns['tx_gokeyvisual_flash']['config']['allowed_types'] = 'swf';
    $tempColumns['tx_gokeyvisual_flash']['config']['max_size'] = $GLOBALS['TYPO3_CONF_VARS']['BE']['maxFileSize'];
    $tempColumns['tx_gokeyvisual_flash']['config']['show_thumbs'] = 0;
    $tempColumns['tx_gokeyvisual_flash']['config']['size'] = 1;
    $tempColumns['tx_gokeyvisual_flash']['config']['maxitems'] = 1;
    $tempColumns['tx_gokeyvisual_flash']['config']['minitems'] = 0;
    $tempColumns['tx_gokeyvisual_flash']['config']['autoSizeMax'] = 1;
}
t3lib_div::loadTCA('pages_language_overlay');
t3lib_extMgm::addTCAcolumns('pages_language_overlay', $tempColumns, 1);
t3lib_extMgm::addToAllTCAtypes('pages_language_overlay', 'tx_gokeyvisual_flash;;;;1-1-1, tx_gokeyvisual_image, tx_gokeyvisual_imagelink');
Exemplo n.º 5
0
<?php

if (!defined('TYPO3_MODE')) {
    die('Access denied.');
}
$tempColumns = array('tx_damttcontent_files' => txdam_getMediaTCA('image_field', 'tx_damttcontent_files'));
t3lib_div::loadTCA('tt_content');
t3lib_extMgm::addTCAcolumns('tt_content', $tempColumns, 1);
$tempSetup = $GLOBALS['T3_VAR']['ext']['dam_ttcontent']['setup'];
// CTypes "text w/image" and "image"
// for TYPO3 < 4.5
if ($tempSetup['ctypes_textpic_image_add_ref'] && t3lib_div::int_from_ver(TYPO3_version) < 4005000) {
    if ($tempSetup['ctypes_textpic_image_add_orig_field']) {
        t3lib_extMgm::addToAllTCAtypes('tt_content', 'tx_damttcontent_files', 'image', 'after:image');
        t3lib_extMgm::addToAllTCAtypes('tt_content', 'tx_damttcontent_files', 'textpic', 'after:image');
    } else {
        $TCA['tt_content']['types']['image']['showitem'] = str_replace(', image;', ', tx_damttcontent_files;', $TCA['tt_content']['types']['image']['showitem']);
        $TCA['tt_content']['types']['textpic']['showitem'] = str_replace(', image;', ', tx_damttcontent_files;', $TCA['tt_content']['types']['textpic']['showitem']);
    }
}
// for TYPO3 >= 4.5
if ($tempSetup['ctypes_textpic_image_add_ref'] && t3lib_div::int_from_ver(TYPO3_version) >= 4005000) {
    if ($tempSetup['ctypes_textpic_image_add_orig_field']) {
        t3lib_extMgm::addToAllTCAtypes('tt_content', 'tx_damttcontent_files', 'image', 'after:image');
        t3lib_extMgm::addToAllTCAtypes('tt_content', 'tx_damttcontent_files', 'textpic', 'after:image');
    } else {
        t3lib_extMgm::addToAllTCAtypes('tt_content', 'tx_damttcontent_files', 'textpic', 'replace:image');
    }
}
if ($GLOBALS['T3_VAR']['ext']['dam_ttcontent']['setup']['add_css_styled_hook']) {
    t3lib_extMgm::addStaticFile($_EXTKEY, 'pi_cssstyledcontent/static/', 'DAM: CSS Styled Content');