added a link to typo3.org/community and a list of the authors from installed extensio...
[Packages/TYPO3.CMS.git] / typo3 / mod / help / about / index.php
1 <?php
2 /***************************************************************
3 * Copyright notice
4 *
5 * (c) 1999-2005 Kasper Skaarhoj (kasperYYYY@typo3.com)
6 * All rights reserved
7 *
8 * This script is part of the TYPO3 project. The TYPO3 project is
9 * free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * The GNU General Public License can be found at
15 * http://www.gnu.org/copyleft/gpl.html.
16 * A copy is found in the textfile GPL.txt and important notices to the license
17 * from the author is found in LICENSE.txt distributed with these scripts.
18 *
19 *
20 * This script is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * This copyright notice MUST APPEAR in all copies of the script!
26 ***************************************************************/
27 /**
28 * Module: About
29 * This document shows some standard-information for TYPO3 CMS: About-text, version number and so on.
30 *
31 * $Id$
32 * Revised for TYPO3 3.6 November/2003 by Kasper Skaarhoj
33 * XHTML compliant
34 *
35 * @todo This module could use a major overhaul in general.
36 * @author Kasper Skaarhoj <kasperYYYY@typo3.com>
37 */
38 /**
39 * [CLASS/FUNCTION INDEX of SCRIPT]
40 *
41 *
42 *
43 * 73: class SC_mod_help_about_index
44 * 91: function main()
45 * 125: function printContent()
46 *
47 * TOTAL FUNCTIONS: 2
48 * (This index is automatically created/updated by the extension "extdeveval")
49 *
50 */
51
52 unset($MCONF);
53 require ('conf.php');
54 require ($BACK_PATH.'init.php');
55 require ($BACK_PATH.'template.php');
56 $LANG->includeLLFile('EXT:lang/locallang_mod_help_about.xml');
57 $BE_USER->modAccess($MCONF,1);
58
59
60
61
62
63
64
65
66 /**
67 * Script Class for the Help > About module
68 *
69 * @author Kasper Skaarhoj <kasperYYYY@typo3.com>
70 * @package TYPO3
71 * @subpackage core
72 */
73 class SC_mod_help_about_index {
74
75 // Internal, dynamic:
76 var $MCONF=array();
77 var $MOD_MENU=array();
78 var $MOD_SETTINGS=array();
79 var $content;
80
81
82
83
84 /**
85 * Main function, producing the module output.
86 * In this case, the module output is a very simple screen telling the version of TYPO3 and that's basically it...
87 * The content is set in the internal variable $this->content
88 *
89 * @return void
90 */
91 function main() {
92 global $TBE_TEMPLATE,$LANG,$BACK_PATH;
93
94 $this->MCONF = $GLOBALS['MCONF'];
95
96 // **************************
97 // Main
98 // **************************
99 #$TBE_TEMPLATE->bgColor = '#cccccc';
100 $TBE_TEMPLATE->backPath = $GLOBALS['BACK_PATH'];
101 $TBE_TEMPLATE->docType = 'xhtml_trans';
102 $this->content.= $TBE_TEMPLATE->startPage('About');
103
104 $minorText = sprintf($LANG->getLL('minor'), 'TYPO3 Ver. '.htmlspecialchars(TYPO3_version).', Copyright &copy; '.htmlspecialchars(TYPO3_copyright_year), 'Kasper Sk&aring;rh&oslash;j');
105
106 $content='
107 <div id="typo3-mod-help-about-index-php-outer">
108 <img src="'.$BACK_PATH.'gfx/typo3logo.gif" width="123" height="34" vspace="10" alt="TYPO3 logo" />
109 <div class="typo3-mod-help-about-index-php-inner">
110 <h2>TYPO3 Information</h2>
111 <h3>'.$LANG->getLL('welcome',1).'</h3>
112 <p>'.$minorText.'</p>
113 </div>
114
115 <div class="typo3-mod-help-about-index-php-inner">
116 <h2>Community Credits</h2>
117 <p>Visit <a href="http://typo3.org/community/">typo3.org/community</a> if you want to know why TYPO3 rocks.</p>
118 </div>
119
120 <div class="typo3-mod-help-about-index-php-inner">
121 <h2>Extension Authors</h2>
122 <p>This is a list of the people who contributed to the extensions you\'re using in your installation.</p>
123 <p><br />'.$this->getExtensionAuthors().'</p>
124 </div>
125 </div>
126 ';
127 $this->content.= $content;
128 $this->content.= $TBE_TEMPLATE->endPage();
129 }
130
131 /**
132 * Outputting the accumulated content to screen
133 *
134 * @return void
135 */
136 function printContent() {
137 echo $this->content;
138 }
139
140 /**
141 * gets the author names from the installed extensions
142 *
143 * @return string list of extensions authors and their e-mail
144 */
145 function getExtensionAuthors() {
146 $content = '<table border="0" cellspacing="2" cellpadding="1"><tr><th>Extension</th><th>Author</th></tr>';
147
148 $loadedExtensions = $GLOBALS['TYPO3_LOADED_EXT'];
149 foreach ($loadedExtensions as $extensionKey => $extension) {
150 if (is_array($extension) && $extension['type'] != 'S') {
151 $emconfPath = PATH_site.$extension['siteRelPath'].'ext_emconf.php';
152 include($emconfPath);
153
154 $emconf = $EM_CONF['']; // ext key is not set when loading the ext_emconf.php directly
155
156 $content.= '<tr><td>'.$emconf['title'].' ('.$extensionKey.')</td>'.
157 '<td><a href="mailto:'.$emconf['author_email'].'?subject='.rawurlencode('Thanks for your '.$emconf['title'].' extension').'">'.$emconf['author'].'</a></td></tr>';
158 }
159 }
160
161 $content.= '</table>';
162
163 return $content;
164 }
165 }
166
167 // Include extension?
168 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/mod/help/about/index.php']) {
169 include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/mod/help/about/index.php']);
170 }
171
172
173
174
175
176
177
178
179
180
181
182
183 // Make instance:
184 $SOBE = t3lib_div::makeInstance('SC_mod_help_about_index');
185 $SOBE->main();
186 $SOBE->printContent();
187 ?>