TYPO3 API  SVNRelease
ext_tables.php
Go to the documentation of this file.
00001 <?php
00002 if (!defined ('TYPO3_MODE'))    die ('Access denied.');
00003 
00004 if (TYPO3_MODE == 'BE' || (TYPO3_MODE == 'FE' && isset($GLOBALS['BE_USER']))) {
00005     global $TBE_STYLES;
00006 
00007         // register as a skin
00008     $TBE_STYLES['skins'][$_EXTKEY] = array(
00009         'name' => 't3skin',
00010     );
00011 
00012         // Support for other extensions to add own icons...
00013     $presetSkinImgs = is_array($TBE_STYLES['skinImg']) ?
00014         $TBE_STYLES['skinImg'] :
00015         array();
00016 
00017     $TBE_STYLES['skins'][$_EXTKEY]['stylesheetDirectories']['sprites'] = 'EXT:t3skin/stylesheets/sprites/';
00018 
00019     /**
00020      * Setting up backend styles and colors
00021      */
00022     $TBE_STYLES['mainColors'] = array(  // Always use #xxxxxx color definitions!
00023         'bgColor'    => '#FFFFFF',      // Light background color
00024         'bgColor2'   => '#FEFEFE',      // Steel-blue
00025         'bgColor3'   => '#F1F3F5',      // dok.color
00026         'bgColor4'   => '#E6E9EB',      // light tablerow background, brownish
00027         'bgColor5'   => '#F8F9FB',      // light tablerow background, greenish
00028         'bgColor6'   => '#E6E9EB',      // light tablerow background, yellowish, for section headers. Light.
00029         'hoverColor' => '#FF0000',
00030         'navFrameHL' => '#F8F9FB'
00031     );
00032 
00033     $TBE_STYLES['colorschemes'][0] = '-|class-main1,-|class-main2,-|class-main3,-|class-main4,-|class-main5';
00034     $TBE_STYLES['colorschemes'][1] = '-|class-main11,-|class-main12,-|class-main13,-|class-main14,-|class-main15';
00035     $TBE_STYLES['colorschemes'][2] = '-|class-main21,-|class-main22,-|class-main23,-|class-main24,-|class-main25';
00036     $TBE_STYLES['colorschemes'][3] = '-|class-main31,-|class-main32,-|class-main33,-|class-main34,-|class-main35';
00037     $TBE_STYLES['colorschemes'][4] = '-|class-main41,-|class-main42,-|class-main43,-|class-main44,-|class-main45';
00038     $TBE_STYLES['colorschemes'][5] = '-|class-main51,-|class-main52,-|class-main53,-|class-main54,-|class-main55';
00039 
00040     $TBE_STYLES['styleschemes'][0]['all'] = 'CLASS: formField';
00041     $TBE_STYLES['styleschemes'][1]['all'] = 'CLASS: formField1';
00042     $TBE_STYLES['styleschemes'][2]['all'] = 'CLASS: formField2';
00043     $TBE_STYLES['styleschemes'][3]['all'] = 'CLASS: formField3';
00044     $TBE_STYLES['styleschemes'][4]['all'] = 'CLASS: formField4';
00045     $TBE_STYLES['styleschemes'][5]['all'] = 'CLASS: formField5';
00046 
00047     $TBE_STYLES['styleschemes'][0]['check'] = 'CLASS: checkbox';
00048     $TBE_STYLES['styleschemes'][1]['check'] = 'CLASS: checkbox';
00049     $TBE_STYLES['styleschemes'][2]['check'] = 'CLASS: checkbox';
00050     $TBE_STYLES['styleschemes'][3]['check'] = 'CLASS: checkbox';
00051     $TBE_STYLES['styleschemes'][4]['check'] = 'CLASS: checkbox';
00052     $TBE_STYLES['styleschemes'][5]['check'] = 'CLASS: checkbox';
00053 
00054     $TBE_STYLES['styleschemes'][0]['radio'] = 'CLASS: radio';
00055     $TBE_STYLES['styleschemes'][1]['radio'] = 'CLASS: radio';
00056     $TBE_STYLES['styleschemes'][2]['radio'] = 'CLASS: radio';
00057     $TBE_STYLES['styleschemes'][3]['radio'] = 'CLASS: radio';
00058     $TBE_STYLES['styleschemes'][4]['radio'] = 'CLASS: radio';
00059     $TBE_STYLES['styleschemes'][5]['radio'] = 'CLASS: radio';
00060 
00061     $TBE_STYLES['styleschemes'][0]['select'] = 'CLASS: select';
00062     $TBE_STYLES['styleschemes'][1]['select'] = 'CLASS: select';
00063     $TBE_STYLES['styleschemes'][2]['select'] = 'CLASS: select';
00064     $TBE_STYLES['styleschemes'][3]['select'] = 'CLASS: select';
00065     $TBE_STYLES['styleschemes'][4]['select'] = 'CLASS: select';
00066     $TBE_STYLES['styleschemes'][5]['select'] = 'CLASS: select';
00067 
00068     $TBE_STYLES['borderschemes'][0] = array('', '', '', 'wrapperTable');
00069     $TBE_STYLES['borderschemes'][1] = array('', '', '', 'wrapperTable1');
00070     $TBE_STYLES['borderschemes'][2] = array('', '', '', 'wrapperTable2');
00071     $TBE_STYLES['borderschemes'][3] = array('', '', '', 'wrapperTable3');
00072     $TBE_STYLES['borderschemes'][4] = array('', '', '', 'wrapperTable4');
00073     $TBE_STYLES['borderschemes'][5] = array('', '', '', 'wrapperTable5');
00074 
00075 
00076 
00077         // Setting the relative path to the extension in temp. variable:
00078     $temp_eP = t3lib_extMgm::extRelPath($_EXTKEY);
00079 
00080         // Alternative dimensions for frameset sizes:
00081     $TBE_STYLES['dims']['leftMenuFrameW'] = 190;        // Left menu frame width
00082     $TBE_STYLES['dims']['topFrameH']      = 42;         // Top frame height
00083     $TBE_STYLES['dims']['navFrameWidth']  = 280;        // Default navigation frame width
00084 
00085         // Setting roll-over background color for click menus:
00086         // Notice, this line uses the the 'scriptIDindex' feature to override another value in this array (namely $TBE_STYLES['mainColors']['bgColor5']), for a specific script "typo3/alt_clickmenu.php"
00087     $TBE_STYLES['scriptIDindex']['typo3/alt_clickmenu.php']['mainColors']['bgColor5'] = '#dedede';
00088 
00089         // Setting up auto detection of alternative icons:
00090     $TBE_STYLES['skinImgAutoCfg'] = array(
00091         'absDir'             => t3lib_extMgm::extPath($_EXTKEY).'icons/',
00092         'relDir'             => t3lib_extMgm::extRelPath($_EXTKEY).'icons/',
00093         'forceFileExtension' => 'gif',  // Force to look for PNG alternatives...
00094 #       'scaleFactor'        => 2/3,    // Scaling factor, default is 1
00095         'iconSizeWidth'      => 16,
00096         'iconSizeHeight'     => 16,
00097     );
00098 
00099         // Changing icon for filemounts, needs to be done here as overwriting the original icon would also change the filelist tree's root icon
00100     $TCA['sys_filemounts']['ctrl']['iconfile'] = '_icon_ftp_2.gif';
00101 
00102         // Adding flags to sys_language
00103     t3lib_div::loadTCA('sys_language');
00104     $TCA['sys_language']['ctrl']['typeicon_column'] = 'flag';
00105     $TCA['sys_language']['ctrl']['typeicon_classes'] = array(
00106         'default' => 'mimetypes-x-sys_language',
00107         'mask'  => 'flags-###TYPE###'
00108     );
00109     $flagNames = array(
00110         'multiple', 'ad', 'ae', 'af', 'ag', 'ai', 'al', 'am', 'an', 'ao', 'ar', 'as', 'at', 'au', 'aw', 'ax', 'az',
00111         'ba', 'bb', 'bd', 'be', 'bf', 'bg', 'bh', 'bi', 'bj', 'bm', 'bn', 'bo', 'br', 'bs', 'bt', 'bv', 'bw', 'by', 'bz',
00112         'ca', 'catalonia', 'cc', 'cd', 'cf', 'cg', 'ch', 'ci', 'ck', 'cl', 'cm', 'cn', 'co', 'cr', 'cs', 'cu', 'cv', 'cx', 'cy', 'cz',
00113         'de', 'dj', 'dk', 'dm', 'do', 'dz',
00114         'ec', 'ee', 'eg', 'eh', 'england', 'er', 'es', 'et', 'europeanunion',
00115         'fam', 'fi', 'fj', 'fk', 'fm', 'fo', 'fr',
00116         'ga', 'gb', 'gd', 'ge', 'gf', 'gh', 'gi', 'gl', 'gm', 'gn', 'gp', 'gq', 'gr', 'gs', 'gt', 'gu', 'gw', 'gy',
00117         'hk', 'hm', 'hn', 'hr', 'ht', 'hu',
00118         'id', 'ie', 'il', 'in', 'io', 'iq', 'ir', 'is', 'it',
00119         'jm', 'jo', 'jp',
00120         'ke', 'kg', 'kh', 'ki', 'km', 'kn', 'kp', 'kr', 'kw', 'ky', 'kz',
00121         'la', 'lb', 'lc', 'li', 'lk', 'lr', 'ls', 'lt', 'lu', 'lv', 'ly',
00122         'ma', 'mc', 'md', 'me', 'mg', 'mh', 'mk', 'ml', 'mm', 'mn', 'mo', 'mp', 'mq', 'mr', 'ms', 'mt', 'mu', 'mv', 'mw', 'mx', 'my', 'mz',
00123         'na', 'nc', 'ne', 'nf', 'ng', 'ni', 'nl', 'no', 'np', 'nr', 'nu', 'nz',
00124         'om',
00125         'pa', 'pe', 'pf', 'pg', 'ph', 'pk', 'pl', 'pm', 'pn', 'pr', 'ps', 'pt', 'pw', 'py',
00126         'qa', 'qc',
00127         're', 'ro', 'rs', 'ru', 'rw',
00128         'sa', 'sb', 'sc', 'scotland', 'sd', 'se', 'sg', 'sh', 'si', 'sj', 'sk', 'sl', 'sm', 'sn', 'so', 'sr', 'st', 'sv', 'sy', 'sz',
00129         'tc', 'td', 'tf', 'tg', 'th', 'tj', 'tk', 'tl', 'tm', 'tn', 'to', 'tr', 'tt', 'tv', 'tw', 'tz',
00130         'ua', 'ug', 'um', 'us', 'uy', 'uz',
00131         'va', 'vc', 've', 'vg', 'vi', 'vn', 'vu',
00132         'wales', 'wf', 'ws',
00133         'ye', 'yt',
00134         'za', 'zm', 'zw'
00135     );
00136     foreach ($flagNames as $flagName) {
00137         $TCA['sys_language']['columns']['flag']['config']['items'][] = array($flagName, $flagName, 'EXT:t3skin/images/flags/'. $flagName . '.png');
00138     }
00139 
00140         // Manual setting up of alternative icons. This is mainly for module icons which has a special prefix:
00141     $TBE_STYLES['skinImg'] = array_merge($presetSkinImgs, array (
00142         'gfx/ol/blank.gif'                         => array('clear.gif','width="18" height="16"'),
00143         'MOD:web/website.gif'                      => array($temp_eP.'icons/module_web.gif','width="24" height="24"'),
00144         'MOD:web_layout/layout.gif'                => array($temp_eP.'icons/module_web_layout.gif','width="24" height="24"'),
00145         'MOD:web_view/view.gif'                    => array($temp_eP.'icons/module_web_view.png','width="24" height="24"'),
00146         'MOD:web_list/list.gif'                    => array($temp_eP.'icons/module_web_list.gif','width="24" height="24"'),
00147         'MOD:web_info/info.gif'                    => array($temp_eP.'icons/module_web_info.png','width="24" height="24"'),
00148         'MOD:web_perm/perm.gif'                    => array($temp_eP.'icons/module_web_perms.png','width="24" height="24"'),
00149         'MOD:web_func/func.gif'                    => array($temp_eP.'icons/module_web_func.png','width="24" height="24"'),
00150         'MOD:web_ts/ts1.gif'                       => array($temp_eP.'icons/module_web_ts.gif','width="24" height="24"'),
00151         'MOD:web_modules/modules.gif'              => array($temp_eP.'icons/module_web_modules.gif','width="24" height="24"'),
00152         'MOD:web_txversionM1/cm_icon.gif'          => array($temp_eP.'icons/module_web_version.gif','width="24" height="24"'),
00153         'MOD:file/file.gif'                        => array($temp_eP.'icons/module_file.gif','width="22" height="24"'),
00154         'MOD:file_list/list.gif'                   => array($temp_eP.'icons/module_file_list.gif','width="22" height="24"'),
00155         'MOD:file_images/images.gif'               => array($temp_eP.'icons/module_file_images.gif','width="22" height="22"'),
00156         'MOD:user/user.gif'                        => array($temp_eP.'icons/module_user.gif','width="22" height="22"'),
00157         'MOD:user_task/task.gif'                   => array($temp_eP.'icons/module_user_taskcenter.gif','width="22" height="22"'),
00158         'MOD:user_setup/setup.gif'                 => array($temp_eP.'icons/module_user_setup.gif','width="22" height="22"'),
00159         'MOD:user_doc/document.gif'                => array($temp_eP.'icons/module_doc.gif','width="22" height="22"'),
00160         'MOD:user_ws/sys_workspace.gif'            => array($temp_eP.'icons/module_user_ws.gif','width="22" height="22"'),
00161         'MOD:tools/tool.gif'                       => array($temp_eP.'icons/module_tools.gif','width="25" height="24"'),
00162         'MOD:tools_beuser/beuser.gif'              => array($temp_eP.'icons/module_tools_user.gif','width="24" height="24"'),
00163         'MOD:tools_em/em.gif'                      => array($temp_eP.'icons/module_tools_em.png','width="24" height="24"'),
00164         'MOD:tools_em/install.gif'                 => array($temp_eP.'icons/module_tools_em.gif','width="24" height="24"'),
00165         'MOD:tools_dbint/db.gif'                   => array($temp_eP.'icons/module_tools_dbint.gif','width="25" height="24"'),
00166         'MOD:tools_config/config.gif'              => array($temp_eP.'icons/module_tools_config.gif','width="24" height="24"'),
00167         'MOD:tools_install/install.gif'            => array($temp_eP.'icons/module_tools_install.gif','width="24" height="24"'),
00168         'MOD:tools_log/log.gif'                    => array($temp_eP.'icons/module_tools_log.gif','width="24" height="24"'),
00169         'MOD:tools_txphpmyadmin/thirdparty_db.gif' => array($temp_eP.'icons/module_tools_phpmyadmin.gif','width="24" height="24"'),
00170         'MOD:tools_isearch/isearch.gif'            => array($temp_eP.'icons/module_tools_isearch.gif','width="24" height="24"'),
00171         'MOD:help/help.gif'                        => array($temp_eP.'icons/module_help.gif','width="23" height="24"'),
00172         'MOD:help_about/info.gif'                  => array($temp_eP.'icons/module_help_about.gif','width="25" height="24"'),
00173         'MOD:help_aboutmodules/aboutmodules.gif'   => array($temp_eP.'icons/module_help_aboutmodules.gif','width="24" height="24"'),
00174         'MOD:help_cshmanual/about.gif'         => array($temp_eP.'icons/module_help_cshmanual.gif','width="25" height="24"'),
00175         'MOD:help_txtsconfighelpM1/moduleicon.gif' => array($temp_eP.'icons/module_help_ts.gif','width="25" height="24"'),
00176     ));
00177 
00178         // Logo at login screen
00179     $TBE_STYLES['logo_login'] = $temp_eP . 'images/login/typo3logo-white-greyback.gif';
00180 
00181         // extJS theme
00182     $TBE_STYLES['extJS']['theme'] =  $temp_eP . 'extjs/xtheme-t3skin.css';
00183 
00184     // Adding HTML template for login screen
00185     $TBE_STYLES['htmlTemplates']['templates/login.html'] = 'sysext/t3skin/templates/login.html';
00186 
00187     $GLOBALS['TYPO3_CONF_VARS']['typo3/backend.php']['additionalBackendItems'][] = t3lib_extMgm::extPath('t3skin').'registerIe6Stylesheet.php';
00188 
00189     $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/template.php']['preHeaderRenderHook'][] = t3lib_extMgm::extPath('t3skin').'pngfix/class.tx_templatehook.php:tx_templatehook->registerPngFix';
00190 
00191     $GLOBALS['TBE_STYLES']['stylesheets']['admPanel'] = t3lib_extMgm::siteRelPath('t3skin') . 'stylesheets/standalone/admin_panel.css';
00192 
00193     foreach ($flagNames as $flagName) {
00194         t3lib_SpriteManager::addIconSprite(
00195             array(
00196                 'flags-' . $flagName,
00197                 'flags-' . $flagName . '-overlay',
00198             )
00199         );
00200     }
00201     unset($flagNames, $flagName);
00202 
00203 }
00204 
00205 ?>