Project

General

Profile

Bug #22983 ยป rfc14849_v3.diff

Administrator Admin, 2010-07-25 19:23

View differences:

t3lib/stddb/tables.php (Arbeitskopie)
* $PAGES_TYPES defines the various types of pages (field: doktype) the system can handle and what restrictions may apply to them.
* Here you can set the icon and especially you can define which tables are allowed on a certain pagetype (doktype)
* NOTE: The 'default' entry in the $PAGES_TYPES-array is the 'base' for all types, and for every type the entries simply overrides the entries in the 'default' type!
*
* NOTE: usage of 'icon' is deprecated since TYPO3 4.4, use t3lib_SpriteManager::addTcaTypeIcon() instead
*/
$PAGES_TYPES = array(
'254' => array( // Doktype 254 is a 'sysFolder' - a general purpose storage folder for whatever you like. In CMS context it's NOT a viewable page. Can contain any element.
'type' => 'sys',
'icon' => 'sysf.gif',
'allowedTables' => '*'
),
'255' => array( // Doktype 255 is a recycle-bin.
'type' => 'sys',
'icon' => 'recycler.gif',
'allowedTables' => '*'
),
'default' => array(
'type' => 'web',
'icon' => 'pages.gif',
'allowedTables' => 'pages',
'onlyAllowedTables' => '0'
)
......
* Each key is a value from the "module" field of page records and the value is an array with a key/value pair, eg. "icon" => "modules_shop.gif"
*
* @see t3lib_iconWorks::getIcon(), typo3/sysext/cms/ext_tables.php
* @deprecated since TYPO3 4.4, use t3lib_SpriteManager::addTcaTypeIcon instead
*/
$ICON_TYPES = array();
t3lib/class.t3lib_spritemanager.php (Arbeitskopie)
if (!is_dir(PATH_site . self::$tempPath)) {
t3lib_div::mkdir(PATH_site . self::$tempPath);
}
// fallback for ways before 4.4, will be removed in 4.7
$this->compatibilityCalls();
// create a fileName, the hash includes all icons and css-styles registered and the extlist
$this->tempFileName = PATH_site . self::$tempPath .
md5(serialize($GLOBALS['TBE_STYLES']['spritemanager']) .
......
t3lib_div::writeFile($this->tempFileName, $fileContent);
}
/**
* function ensures backwards compatiblity and will throw deprecation warnings
* aimed to be removed in version 4.7
*/
private function compatibilityCalls() {
// fallback for deprecated $TYPE_ICONS "contains-module" icon assignement
foreach ((array) $GLOBALS['ICON_TYPES'] as $module => $icon) {
$iconFile = $icon['icon'];
t3lib_div::deprecationLog('Usage of $ICON_TYPES is depreciated since 4.4.' . LF .
'The extTables.php entry $ICON_TYPES[\'' . $module . '\'] = \'' . $iconFile . '\'; should be replaced with' . LF .
't3lib_SpriteManager::addTcaTypeIcon(\'pages\', \'contains-' . $module . '\', \'' . $iconFile . '\');' . LF .
'instead.'
);
t3lib_SpriteManager::addTcaTypeIcon('pages', 'contains-' . $module, $iconFile);
}
// fallback for deprecated $PAGE_TYPES icons assignement
foreach ((array) $GLOBALS['PAGES_TYPES'] as $type => $icon) {
if(isset($icon['icon'])) {
$iconFile = $icon['icon'];
t3lib_div::deprecationLog('Usage of $PAGES_TYPES[\'icon\'] is depreciated since 4.4.' . LF .
'The extTables.php entry $PAGE_TYPES[\'' . $type . '\'][\'icon\'] = \'' . $iconFile . '\'; should be replaced with' . LF .
't3lib_SpriteManager::addTcaTypeIcon(\'pages\', ' . $type . '\', \'' . $iconFile . '\');' . LF .
'instead.'
);
t3lib_SpriteManager::addTcaTypeIcon('pages', $module, $iconFile);
}
}
}
/**
* includes the generated cacheFile, if present
*
typo3/sysext/cms/ext_tables.php (Arbeitskopie)
// ******************************************************************
if (TYPO3_MODE=='BE') {
// Setting ICON_TYPES (obsolete by the removal of the plugin_mgm extension)
$ICON_TYPES = array(
'shop' => array('icon' => 'gfx/i/modules_shop.gif'),
'board' => array('icon' => 'gfx/i/modules_board.gif'),
'news' => array('icon' => 'gfx/i/modules_news.gif'),
'fe_users' => array('icon' => 'gfx/i/fe_users.gif'),
'approve' => array('icon' => 'gfx/state_checked.png'),
);
}
// Adding pages_types:
// t3lib_div::array_merge() MUST be used!
$PAGES_TYPES = t3lib_div::array_merge(array(
'3' => array(
'icon' => 'pages_link.gif'
),
'4' => array(
'icon' => 'pages_shortcut.gif'
),
'5' => array(
'icon' => 'pages_notinmenu.gif'
),
'6' => array(
'type' => 'web',
'icon' => 'be_users_section.gif',
'allowedTables' => '*'
),
'7' => array(
'icon' => 'pages_mountpoint.gif'
),
'199' => array( // TypoScript: Limit is 200. When the doktype is 200 or above, the page WILL NOT be regarded as a 'page' by TypoScript. Rather is it a system-type page
'type' => 'sys',
'icon' => 'spacer_icon.gif',
)
),$PAGES_TYPES);
    (1-1/1)