[TYPO3-dev] Hooks to add information to BE-login form
Steffen Kamper
info at sk-typo3.de
Thu Jan 14 18:59:06 CET 2010
Hi,
take this as test or basic.
vg Steffen
Index: typo3/index.php
===================================================================
--- typo3/index.php (revision 6751)
+++ typo3/index.php (working copy)
@@ -557,9 +557,17 @@
*/
function makeLoginNews() {
$newsContent = '';
+ $alreadyRendered = FALSE;
+ // Call hooks
+ if
(is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/index.php']['makeLoginNewsHook']))
{
+ foreach
($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/index.php']['makeLoginNewsHook']
as $function) {
+ $newsContent .= t3lib_div::callUserFunction($function,
$alreadyRendered, $this);
+ }
+ }
+
// Traverse news array IF there are records in it:
- if (is_array($GLOBALS['TYPO3_CONF_VARS']['BE']['loginNews']) &&
count($GLOBALS['TYPO3_CONF_VARS']['BE']['loginNews'])) {
+ if (!$alreadyRendered &&
is_array($GLOBALS['TYPO3_CONF_VARS']['BE']['loginNews']) &&
count($GLOBALS['TYPO3_CONF_VARS']['BE']['loginNews'])) {
// get the main news template, and replace the subpart after
looped through
$newsContent =
t3lib_parsehtml::getSubpart($GLOBALS['TBE_TEMPLATE']->moduleTemplate,
'###LOGIN_NEWS###');
vg Steffen
More information about the TYPO3-dev
mailing list