Index: typo3/template.php
===================================================================
--- typo3/template.php (Revision 9109)
+++ typo3/template.php (Arbeitskopie)
@@ -2124,27 +2124,34 @@
$moduleBody = t3lib_parsehtml::substituteSubpart($moduleBody, $marker, $content);
}
+ // adding flash messages
if ($this->showFlashMessages) {
- // adding flash messages
$flashMessages = t3lib_FlashMessageQueue::renderFlashMessages();
if (!empty($flashMessages)) {
- $flashMessages = '
' . $flashMessages . '
';
+ $markerArray['FLASHMESSAGES'] = '' . $flashMessages . '
';
+
+ // if there is no dedicated marker for the messages present
+ // then force them to appear before the content
+ if (strpos($moduleBody, '###FLASHMESSAGES###') === FALSE) {
+ $moduleBody = str_replace(
+ '###CONTENT###',
+ '###FLASHMESSAGES######CONTENT###',
+ $moduleBody
+ );
+ }
}
+ }
- if (strstr($moduleBody, '###FLASHMESSAGES###')) {
- // either replace a dedicated marker for the messages if present
- $moduleBody = str_replace(
- '###FLASHMESSAGES###',
- $flashMessages,
- $moduleBody
- );
- } else {
- // or force them to appear before the content
- $moduleBody = str_replace(
- '###CONTENT###',
- $flashMessages . '###CONTENT###',
- $moduleBody
- );
+ // Hook for adding more markers/content to the page, like the version selector
+ if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/template.php']['moduleBodyPostProcess'])) {
+ $params = array(
+ 'moduleTemplate' => &$this->moduleTemplate,
+ 'moduleBody' => &$moduleBody,
+ 'markers' => &$markerArray,
+ 'pObj' => &$this
+ );
+ foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/template.php']['moduleBodyPostProcess'] as $funcRef) {
+ t3lib_div::callUserFunction($funcRef, $params, $this);
}
}