Documentation TYPO3 par Ameos |
00001 <?php 00002 /*************************************************************** 00003 * Copyright notice 00004 * 00005 * (c) 1999-2004 Kasper Skaarhoj (kasper@typo3.com) 00006 * (c) 2004-2006 Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca> 00007 * All rights reserved 00008 * 00009 * This script is part of the TYPO3 project. The TYPO3 project is 00010 * free software; you can redistribute it and/or modify 00011 * it under the terms of the GNU General Public License as published by 00012 * the Free Software Foundation; either version 2 of the License, or 00013 * (at your option) any later version. 00014 * 00015 * The GNU General Public License can be found at 00016 * http://www.gnu.org/copyleft/gpl.html. 00017 * A copy is found in the textfile GPL.txt and important notices to the license 00018 * from the author is found in LICENSE.txt distributed with these scripts. 00019 * 00020 * 00021 * This script is distributed in the hope that it will be useful, 00022 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00023 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00024 * GNU General Public License for more details. 00025 * 00026 * This copyright notice MUST APPEAR in all copies of the script! 00027 ***************************************************************/ 00037 error_reporting (E_ALL ^ E_NOTICE); 00038 unset($MCONF); 00039 require('conf.php'); 00040 require($BACK_PATH.'init.php'); 00041 require($BACK_PATH.'template.php'); 00042 require_once('class.tx_rtehtmlarea_select_image.php'); 00043 $LANG->includeLLFile('EXT:lang/locallang_browse_links.xml'); 00044 $LANG->includeLLFile('EXT:rtehtmlarea/mod4/locallang.xml'); 00045 $LANG->includeLLFile('EXT:rtehtmlarea/htmlarea/locallang_dialogs.xml'); 00046 00054 class tx_rtehtmlarea_SC_select_image { 00055 var $mode; 00056 var $button = 'image'; 00057 00063 function main() { 00064 global $BE_USER, $SOBE; 00065 00066 00067 $this->mode = t3lib_div::_GP('mode'); 00068 if (!$this->mode) { 00069 $this->mode = 'rte'; 00070 } 00071 00072 $this->content = ''; 00073 00074 // render type by user func 00075 $browserRendered = false; 00076 if (is_array ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/browse_links.php']['browserRendering'])) { 00077 foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/browse_links.php']['browserRendering'] as $classRef) { 00078 $browserRenderObj = t3lib_div::getUserObj($classRef); 00079 if(is_object($browserRenderObj) && method_exists($browserRenderObj, 'isValid') && method_exists($browserRenderObj, 'render')) { 00080 if ($browserRenderObj->isValid($this->mode, $this)) { 00081 $this->content .= $browserRenderObj->render($this->mode, $this); 00082 $browserRendered = true; 00083 break; 00084 } 00085 } 00086 } 00087 } 00088 00089 // if type was not rendered use default rendering functions 00090 if(!$browserRendered) { 00091 00092 $SOBE->browser = t3lib_div::makeInstance('tx_rtehtmlarea_select_image'); 00093 $SOBE->browser->init(); 00094 00095 $modData = $BE_USER->getModuleData('select_image.php','ses'); 00096 list($modData, $store) = $SOBE->browser->processSessionData($modData); 00097 $BE_USER->pushModuleData('select_image.php',$modData); 00098 00099 $this->content = $SOBE->browser->main_rte(); 00100 } 00101 } 00102 00108 function printContent() { 00109 echo $this->content; 00110 } 00111 00112 } 00113 00114 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/rtehtmlarea/mod4/select_image.php']) { 00115 include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/rtehtmlarea/mod4/select_image.php']); 00116 } 00117 00118 // Make instance: 00119 $SOBE = t3lib_div::makeInstance('tx_rtehtmlarea_SC_select_image'); 00120 $SOBE->main(); 00121 $SOBE->printContent(); 00122 00123 ?>