Index: typo3/sysext/about/ext_emconf.php =================================================================== --- typo3/sysext/about/ext_emconf.php (revision 10342) +++ typo3/sysext/about/ext_emconf.php (revision ) @@ -3,7 +3,7 @@ ######################################################################## # Extension Manager/Repository config file for ext "about". # -# Auto generated 26-01-2011 20:08 +# Auto generated 23-02-2011 18:44 # # Manual updates: # Only the data in the array - everything else is removed by next @@ -33,8 +33,8 @@ 'author_company' => 'Curby Soft Multimedia', 'CGLcompliance' => '', 'CGLcompliance_note' => '', - 'version' => '1.0.0', - '_md5_values_when_last_written' => 'a:6:{s:12:"ext_icon.gif";s:4:"f3ab";s:14:"ext_tables.php";s:4:"57f3";s:13:"mod/clear.gif";s:4:"cc11";s:12:"mod/conf.php";s:4:"f523";s:13:"mod/index.php";s:4:"5569";s:12:"mod/info.gif";s:4:"2723";}', + 'version' => '1.1.0', + '_md5_values_when_last_written' => 'a:8:{s:16:"ext_autoload.php";s:4:"5a89";s:12:"ext_icon.gif";s:4:"f3ab";s:14:"ext_tables.php";s:4:"57f3";s:48:"interfaces/interface.tx_about_customsections.php";s:4:"3f4a";s:13:"mod/clear.gif";s:4:"cc11";s:12:"mod/conf.php";s:4:"f523";s:13:"mod/index.php";s:4:"9a1d";s:12:"mod/info.gif";s:4:"2723";}', 'constraints' => array( 'depends' => array( 'php' => '5.1.0-0.0.0', Index: typo3/sysext/about/interfaces/interface.tx_about_customsections.php =================================================================== --- typo3/sysext/about/interfaces/interface.tx_about_customsections.php (revision ) +++ typo3/sysext/about/interfaces/interface.tx_about_customsections.php (revision ) @@ -0,0 +1,41 @@ + + * All rights reserved + * + * This script is part of the TYPO3 project. The TYPO3 project is + * free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * The GNU General Public License can be found at + * http://www.gnu.org/copyleft/gpl.html. + * A copy is found in the textfile GPL.txt and important notices to the license + * from the author is found in LICENSE.txt distributed with these scripts. + * + * + * This script is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * This copyright notice MUST APPEAR in all copies of the script! + ***************************************************************/ + + +interface tx_about_customSections { + + /** + * Adds custom sections to the about module + * + * @abstract + * @param array $sections + * @return void + */ + public function addSection(array &$sections); +} + +?> \ No newline at end of file Index: typo3/sysext/lang/locallang_mod_help_about.xml =================================================================== --- typo3/sysext/lang/locallang_mod_help_about.xml (revision 10593) +++ typo3/sysext/lang/locallang_mod_help_about.xml (revision ) @@ -25,6 +25,8 @@ + + Index: typo3/sysext/about/ext_autoload.php =================================================================== --- typo3/sysext/about/ext_autoload.php (revision ) +++ typo3/sysext/about/ext_autoload.php (revision ) @@ -0,0 +1,13 @@ + $extensionPath . '/interfaces/interface.tx_about_customsections.php', +); + +?> \ No newline at end of file Index: typo3/sysext/about/mod/index.php =================================================================== --- typo3/sysext/about/mod/index.php (revision 10593) +++ typo3/sysext/about/mod/index.php (revision ) @@ -41,8 +41,8 @@ * * * 73: class SC_mod_help_about_index - * 91: function main() + * 91: function main() - * 125: function printContent() + * 125: function printContent() * * TOTAL FUNCTIONS: 2 * (This index is automatically created/updated by the extension "extdeveval") @@ -51,129 +51,259 @@ unset($MCONF); require ('conf.php'); -require ($BACK_PATH.'init.php'); +require ($BACK_PATH . 'init.php'); -require ($BACK_PATH.'template.php'); +require ($BACK_PATH . 'template.php'); $LANG->includeLLFile('EXT:lang/locallang_mod_help_about.xml'); -$BE_USER->modAccess($MCONF,1); +$BE_USER->modAccess($MCONF, 1); - - - - - - /** * Script Class for the Help > About module * * @author Kasper Skårhøj + * @author Steffen Kamper * @package TYPO3 * @subpackage core */ class SC_mod_help_about_index { // Internal, dynamic: - var $MCONF=array(); - var $MOD_MENU=array(); - var $MOD_SETTINGS=array(); - var $content; + /** + * @var array + */ + public $MCONF = array(); + /** + * @var array + */ + public $MOD_MENU = array(); + /** + * @var array + */ + public $MOD_SETTINGS = array(); + /** + * @var string + */ + protected $content = ''; /** + * @var array + */ + protected $sections = array(); + + + /** * Main function, producing the module output. * In this case, the module output is a very simple screen telling the version of TYPO3 and that's basically it... * The content is set in the internal variable $this->content * * @return void */ - function main() { - global $TBE_TEMPLATE,$LANG,$BACK_PATH; + public function main() { $this->MCONF = $GLOBALS['MCONF']; // ************************** // Main // ************************** - #$TBE_TEMPLATE->bgColor = '#cccccc'; - $TBE_TEMPLATE->backPath = $GLOBALS['BACK_PATH']; - $minorText = sprintf($LANG->getLL('minor'), 'TYPO3 Ver. '.htmlspecialchars(TYPO3_version).', Copyright © '.htmlspecialchars(TYPO3_copyright_year), 'Kasper Skårhøj'); + $content = $this->renderSections(); + + // Renders the module page + $this->content = $GLOBALS['TBE_TEMPLATE']->render( + $GLOBALS['LANG']->getLL('title', TRUE), + $content + ); + } + + + /** + * Renders main sections + * + * @return string $content + */ + public function renderSections() { + $this->sections = array(); + + $this->renderAboutTypo3(); + $this->renderDonation(); + $this->renderCommunityCredits(); + $this->renderCoreteamCredits(); + $this->render3rdPartyCredits(); + $this->renderExtensionAuthors(); + $this->renderCustomSections(); + + // compile content + $content = '
+ ' . implode('', $this->sections) . ' +
'; + + return $content; + } + + /** + * Outputs the accumulated content to screen + * + * @return void + */ + public function printContent() { + echo $this->content; + } + + /** + * Renders TYPO3 logo and TYPO3 description + * + * @return void + */ + protected function renderAboutTypo3() { + $minorText = sprintf($GLOBALS['LANG']->getLL('minor'), 'TYPO3 Ver. ' . htmlspecialchars(TYPO3_version) . ', Copyright © ' . htmlspecialchars(TYPO3_copyright_year), 'Kasper Skårhøj'); - $content=' + $content = ' -
- + -
+
-

' . $LANG->getLL('welcome', TRUE) . '

+

' . $GLOBALS['LANG']->getLL('welcome', TRUE) . '

-

'.$minorText.'

+

' . $minorText . '

-
+
'; -
+ $this->sections['about'] = $content; + } + + /** + * Renders TYPO3 donation + * + * @return void + */ + protected function renderDonation() { + $content = + '
-

' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_help_about.xml:donation_header', TRUE) . '

-

' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_help_about.xml:donation_message') . '

-
- -
+

' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_help_about.xml:donation_header', TRUE) . '

+

' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_help_about.xml:donation_message') . '

+
+ +
-
+
'; + $this->sections['donation'] = $content; + } + + /** + * Renders community credits + * + * @return void + */ + protected function renderCommunityCredits() { + $content = ' -
+
-

'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_help_about.xml:community_credits', true).'

+

' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_help_about.xml:community_credits', TRUE) . '

-

'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_help_about.xml:information_detail').'

+

' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_help_about.xml:information_detail') . '

-
+
'; + $this->sections['community'] = $content; + } + + /** + * Renders community credits + * + * @return void + */ + protected function render3rdPartyCredits() { + $content = ' -
+
-

' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_help_about.xml:coredevs', true) . '

+

' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_help_about.xml:external_libraries', true) . '

+

' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_help_about.xml:external_thanks', true) . '

+
+ + + + + + + + + + + +
Audio player Pluginwww.1pixelout.net
CodeMirrorcodemirror.net
ExtJSwww.sencha.com
JSMinwww.crockford.com
Modernizrwww.modernizr.com
Prototype JavaScript frameworkwww.prototypejs.org
RemoveXSSquickwired.com
script.aculo.usscript.aculo.us
SWFUploadwww.swfupload.org
Swift Mailerswiftmailer.org
+
'; + + $this->sections['3rdparty'] = $content; + } + + /** + * Renders core team credits + * + * @return void + */ + protected function renderCoreteamCredits() { + $content = ' +
+

' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_help_about.xml:coredevs', TRUE) . '

-

' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_help_about.xml:coredevs_detail') . '

+

' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_help_about.xml:coredevs_detail') . '

-
+
'; + $this->sections['coreteam'] = $content; + } + + /** + * Renders extension authors credits + * + * @return void + */ + protected function renderExtensionAuthors() { + $content = ' -
+
-

'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_help_about.xml:extension_authors', true).'

-

'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_help_about.xml:extension_list_info', true).'

+

' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_help_about.xml:extension_authors', TRUE) . '

+

' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_help_about.xml:extension_list_info', TRUE) . '

-
'.$this->getExtensionAuthors().' +
' . $this->getExtensionAuthors() . ' -
-
- '; +
'; - // Renders the module page - $this->content = $TBE_TEMPLATE->render( - 'About', - $content - ); + $this->sections['authors'] = $content; } /** - * Outputting the accumulated content to screen + * Renders custom sections * - * @return void + * @return void */ - function printContent() { - echo $this->content; + protected function renderCustomSections() { + //hook for custom sections + if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['about/index.php']['addSection'])) { + foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['about/index.php']['addSection'] as $classRef) { + $hookObject = t3lib_div::getUserObj($classRef); + if (!($hookObject instanceof tx_about_customSections)) { + throw new UnexpectedValueException('$hookObject must implement interface tx_about_customSections', 1298121573); - } + } + $hookObject->addSection($this->sections); + } + } + } + /** - * gets the author names from the installed extensions + * Gets the author names from the installed extensions * * @return string list of extensions authors and their e-mail */ - function getExtensionAuthors() { + protected function getExtensionAuthors() { - $content = ''; + $content = '
'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_help_about.xml:extension', true).''.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_help_about.xml:extension_author', true).'
'; $loadedExtensions = $GLOBALS['TYPO3_LOADED_EXT']; foreach ($loadedExtensions as $extensionKey => $extension) { if (is_array($extension) && $extension['type'] != 'S') { - $emconfPath = PATH_site.$extension['siteRelPath'].'ext_emconf.php'; + $emconfPath = PATH_site . $extension['siteRelPath'] . 'ext_emconf.php'; include($emconfPath); $emconf = $EM_CONF['']; // ext key is not set when loading the ext_emconf.php directly - $content.= ''. + $content .= '' . - ''; + ''; } } - $content.= '
' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_help_about.xml:extension', true) . '' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_help_about.xml:extension_author', true) . '
'.$emconf['title'].' ('.$extensionKey.')
' . $emconf['title'] . ' (' . $extensionKey . ')'.$emconf['author'].'
' . $emconf['author'] . '
'; + $content .= ''; return $content; } @@ -185,18 +315,8 @@ } - - - - - - - - - - // Make instance: $SOBE = t3lib_div::makeInstance('SC_mod_help_about_index'); $SOBE->main(); $SOBE->printContent(); -?> +?> \ No newline at end of file