|
TYPO3 API
SVNRelease
|
00001 <?php 00002 /*************************************************************** 00003 * Copyright notice 00004 * 00005 * (c) 1999-2011 Kasper Skårhøj (kasperYYYY@typo3.com) 00006 * All rights reserved 00007 * 00008 * This script is part of the TYPO3 project. The TYPO3 project is 00009 * free software; you can redistribute it and/or modify 00010 * it under the terms of the GNU General Public License as published by 00011 * the Free Software Foundation; either version 2 of the License, or 00012 * (at your option) any later version. 00013 * 00014 * The GNU General Public License can be found at 00015 * http://www.gnu.org/copyleft/gpl.html. 00016 * A copy is found in the textfile GPL.txt and important notices to the license 00017 * from the author is found in LICENSE.txt distributed with these scripts. 00018 * 00019 * 00020 * This script is distributed in the hope that it will be useful, 00021 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00022 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00023 * GNU General Public License for more details. 00024 * 00025 * This copyright notice MUST APPEAR in all copies of the script! 00026 ***************************************************************/ 00027 /** 00028 * Module: About 00029 * This document shows some standard-information for TYPO3 CMS: About-text, version number and so on. 00030 * 00031 * $Id: index.php 10652 2011-02-26 15:11:39Z steffenk $ 00032 * Revised for TYPO3 3.6 November/2003 by Kasper Skårhøj 00033 * XHTML compliant 00034 * 00035 * @author Kasper Skårhøj <kasperYYYY@typo3.com> 00036 * @author Steffen Kamper <steffen@typo3.org> 00037 * @package TYPO3 00038 */ 00039 /** 00040 * [CLASS/FUNCTION INDEX of SCRIPT] 00041 * 00042 * 00043 * 00044 * 73: class SC_mod_help_about_index 00045 * 91: function main() 00046 * 125: function printContent() 00047 * 00048 * TOTAL FUNCTIONS: 2 00049 * (This index is automatically created/updated by the extension "extdeveval") 00050 * 00051 */ 00052 00053 unset($MCONF); 00054 require ('conf.php'); 00055 require ($BACK_PATH . 'init.php'); 00056 require ($BACK_PATH . 'template.php'); 00057 $LANG->includeLLFile('EXT:lang/locallang_mod_help_about.xml'); 00058 $BE_USER->modAccess($MCONF, 1); 00059 00060 00061 /** 00062 * Script Class for the Help > About module 00063 * 00064 * @author Kasper Skårhøj <kasperYYYY@typo3.com> 00065 * @package TYPO3 00066 * @subpackage core 00067 */ 00068 class SC_mod_help_about_index { 00069 00070 // Internal, dynamic: 00071 /** 00072 * @var array 00073 */ 00074 public $MCONF = array(); 00075 00076 /** 00077 * @var array 00078 */ 00079 public $MOD_MENU = array(); 00080 00081 /** 00082 * @var array 00083 */ 00084 public $MOD_SETTINGS = array(); 00085 00086 /** 00087 * @var string 00088 */ 00089 protected $content = ''; 00090 00091 /** 00092 * @var array 00093 */ 00094 protected $sections = array(); 00095 00096 00097 /** 00098 * Main function, producing the module output. 00099 * In this case, the module output is a very simple screen telling the version of TYPO3 and that's basically it... 00100 * The content is set in the internal variable $this->content 00101 * 00102 * @return void 00103 */ 00104 function main() { 00105 00106 $this->MCONF = $GLOBALS['MCONF']; 00107 00108 // ************************** 00109 // Main 00110 // ************************** 00111 #$TBE_TEMPLATE->bgColor = '#cccccc'; 00112 $content = $this->renderSections(); 00113 00114 // Renders the module page 00115 $this->content = $GLOBALS['TBE_TEMPLATE']->render( 00116 $GLOBALS['LANG']->getLL('title', TRUE), 00117 $content 00118 ); 00119 } 00120 00121 /** 00122 * Renders main sections 00123 * 00124 * @return string $content 00125 */ 00126 public function renderSections() { 00127 $this->sections = array(); 00128 00129 $this->renderAboutTypo3(); 00130 $this->renderDonation(); 00131 $this->renderCommunityCredits(); 00132 $this->renderCoreteamCredits(); 00133 $this->render3rdPartyCredits(); 00134 $this->renderExtensionAuthors(); 00135 $this->renderCustomSections(); 00136 00137 // compile content 00138 $content = '<div id="typo3-mod-help-about-index-php-outer">' 00139 . implode('', $this->sections) . '</div>'; 00140 00141 return $content; 00142 } 00143 00144 /** 00145 * Outputs the accumulated content to screen 00146 * 00147 * @return void 00148 */ 00149 public function printContent() { 00150 echo $this->content; 00151 } 00152 00153 00154 protected function renderAboutTypo3() { 00155 $minorText = sprintf($GLOBALS['LANG']->getLL('minor'), 'TYPO3 Ver. ' . htmlspecialchars(TYPO3_version) . ', Copyright © ' . htmlspecialchars(TYPO3_copyright_year), 'Kasper Skårhøj'); 00156 $content = ' 00157 <img' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/typo3logo.gif', 'width="123" height="34"') . ' alt="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_help_about.xml:typo3_logo', true) . '" /> 00158 <div class="typo3-mod-help-about-index-php-inner"> 00159 <h2>' . $GLOBALS['LANG']->getLL('welcome', TRUE) . '</h2> 00160 <p>' . $minorText . '</p> 00161 </div>'; 00162 00163 $this->sections['about'] = $content; 00164 } 00165 00166 /** 00167 * Renders TYPO3 donation 00168 * 00169 * @return void 00170 */ 00171 protected function renderDonation() { 00172 $content = 00173 '<div class="typo3-mod-help-about-index-php-inner"> 00174 <h2>' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_help_about.xml:donation_header', TRUE) . '</h2> 00175 <p id="donation-description">' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_help_about.xml:donation_message') . '</p> 00176 <div class="donation-button"> 00177 <input type="button" id="donation-button" value="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_help_about.xml:donation_button') . '" 00178 onclick="window.open(\'' . TYPO3_URL_DONATE . '\');" /> 00179 </div> 00180 </div>'; 00181 00182 $this->sections['donation'] = $content; 00183 } 00184 00185 /** 00186 * Renders community credits 00187 * 00188 * @return void 00189 */ 00190 protected function renderCommunityCredits() { 00191 $content = ' 00192 <div class="typo3-mod-help-about-index-php-inner"> 00193 <h2>' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_help_about.xml:community_credits', TRUE) . '</h2> 00194 <p>' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_help_about.xml:information_detail') . '</p> 00195 </div>'; 00196 00197 $this->sections['community'] = $content; 00198 } 00199 00200 /** 00201 * Renders community credits 00202 * 00203 * @return void 00204 */ 00205 protected function render3rdPartyCredits() { 00206 $content = ' 00207 <div class="typo3-mod-help-about-index-php-inner"> 00208 <h2>' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_help_about.xml:external_libraries', true) . '</h2> 00209 <p>' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_help_about.xml:external_thanks', true) . '</p> 00210 <br /> 00211 <table border="0" cellspacing="2" cellpadding="1"> 00212 <tr><td width="280">Audio player Plugin</td><td><a href="http://www.1pixelout.net/code/audio-player-wordpress-plugin/" target="_blank">www.1pixelout.net</a></td></tr> 00213 <tr><td>CodeMirror</td><td><a href="http://codemirror.net/" target="_blank">codemirror.net</a></td></tr> 00214 <tr><td>ExtJS</td><td><a href="http://www.sencha.com/" target="_blank">www.sencha.com</a></td></tr> 00215 <tr><td>JSMin</td><td><a href="http://www.crockford.com" target="_blank">www.crockford.com</a></td></tr> 00216 <tr><td>Modernizr</td><td><a href="http://www.modernizr.com" target="_blank">www.modernizr.com</a></td></tr> 00217 <tr><td>Prototype JavaScript framework</td><td><a href="http://www.prototypejs.org/" target="_blank">www.prototypejs.org</a></td></tr> 00218 <tr><td>RemoveXSS</td><td><a href="http://quickwired.com/smallprojects/php_xss_filter_function.php" target="_blank">quickwired.com</a></td></tr> 00219 <tr><td>script.aculo.us</td><td><a href="http://script.aculo.us" target="_blank">script.aculo.us</a></td></tr> 00220 <tr><td>SWFUpload</td><td><a href="http://www.swfupload.org" target="_blank">www.swfupload.org</a></td></tr> 00221 <tr><td>Swift Mailer</td><td><a href="http://swiftmailer.org" target="_blank">swiftmailer.org</a></td></tr> 00222 </table> 00223 </div>'; 00224 00225 $this->sections['3rdparty'] = $content; 00226 } 00227 00228 /** 00229 * Renders core team credits 00230 * 00231 * @return void 00232 */ 00233 protected function renderCoreteamCredits() { 00234 $content = ' 00235 <div class="typo3-mod-help-about-index-php-inner"> 00236 <h2>' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_help_about.xml:coredevs', TRUE) . '</h2> 00237 <p>' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_help_about.xml:coredevs_detail') . '</p> 00238 </div>'; 00239 00240 $this->sections['coreteam'] = $content; 00241 } 00242 00243 /** 00244 * Renders custom sections 00245 * 00246 * @return void 00247 */ 00248 protected function renderCustomSections() { 00249 //hook for custom sections 00250 if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['about/index.php']['addSection'])) { 00251 foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['about/index.php']['addSection'] as $classRef) { 00252 $hookObject = t3lib_div::getUserObj($classRef); 00253 if (!($hookObject instanceof tx_about_customSections)) { 00254 throw new UnexpectedValueException('$hookObject must implement interface tx_about_customSections', 1298121573); 00255 } 00256 $hookObject->addSection($this->sections); 00257 } 00258 } 00259 } 00260 00261 /** 00262 * Renders extension authors credits 00263 * 00264 * @return void 00265 */ 00266 protected function renderExtensionAuthors() { 00267 $content = '<table border="0" cellspacing="2" cellpadding="1"><tr><th>' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_help_about.xml:extension', true) . '</th><th>' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_help_about.xml:extension_author', true) . '</th></tr>'; 00268 00269 $loadedExtensions = $GLOBALS['TYPO3_LOADED_EXT']; 00270 foreach ($loadedExtensions as $extensionKey => $extension) { 00271 if (is_array($extension) && $extension['type'] != 'S') { 00272 $emconfPath = PATH_site . $extension['siteRelPath'] . 'ext_emconf.php'; 00273 include($emconfPath); 00274 00275 $emconf = $EM_CONF['']; // ext key is not set when loading the ext_emconf.php directly 00276 00277 $content .= '<tr><td width="280">' . $emconf['title'] . ' (' . $extensionKey . ')</td>' . 00278 '<td><a href="mailto:' . $emconf['author_email'] . '?subject=' . rawurlencode('Thanks for your ' . $emconf['title'] . ' extension') . '">' . $emconf['author'] . '</a></td></tr>'; 00279 } 00280 } 00281 } 00282 00283 } 00284 00285 // Include extension? 00286 if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/mod/help/about/index.php'])) { 00287 include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/mod/help/about/index.php']); 00288 } 00289 00290 00291 // Make instance: 00292 $SOBE = t3lib_div::makeInstance('SC_mod_help_about_index'); 00293 $SOBE->main(); 00294 $SOBE->printContent(); 00295 ?>
1.8.0