Index: typo3/sysext/cms/tslib/class.tslib_pibase.php =================================================================== --- typo3/sysext/cms/tslib/class.tslib_pibase.php (revision 8607) +++ typo3/sysext/cms/tslib/class.tslib_pibase.php (working copy) @@ -801,32 +801,37 @@ /** * Wraps the input string in a
tag with the class attribute set to the prefixId. - * All content returned from your plugins should be returned through this function so all content from your plugin is encapsulated in a
-tag nicely identifying the content of your plugin. + * All content returned from your plugins should be returned through this function so all + * content from your plugin is encapsulated in a
-tag nicely identifying the content of your plugin. * - * @param string HTML content to wrap in the div-tags with the "main class" of the plugin - * @return string HTML content wrapped, ready to return to the parent object. + * The wrap can be disabled for all plugins using: + * # config.disableWrapInBaseClass = 1 + * The wrap can be disabled for all plugins with empty content using: + * # config.pi_disableWrapInBaseClass = ifEmpty + * + * The wrap can be disabled for a specific plugin using: + * # plugin.tx_example_pi1.disablePrefixComment = 1 + * The wrap can be disabled for a specific plugin with empty content using: + * # plugin.tx_example_pi1.pi_disablePrefixComment = ifEmpty + * + * @param string $content HTML content to wrap in the div-tags with the "main class" of the plugin + * @return string HTML content wrapped, ready to return to the parent object. */ - function pi_wrapInBaseClass($str) { - $content = '
- '.$str.' -
- '; - - if(!$GLOBALS['TSFE']->config['config']['disablePrefixComment']) { - $content = ' - - - - '.$content.' - - - '; + function pi_wrapInBaseClass($content) { + $isDisableWrap = $GLOBALS['TSFE']->config['config']['disableWrapInBaseClass'] == 1 || + $this->conf['pi_disableWrapInBaseClass'] == 1; + $isDisableWrapIfEmpty = $GLOBALS['TSFE']->config['config']['disableWrapInBaseClass'] == 'ifEmpty' + || $this->conf['pi_disableWrapInBaseClass'] == 'ifEmpty'; + $isDisablePrefixComment = $GLOBALS['TSFE']->config['config']['disablePrefixComment'] + || $this->conf['pi_disablePrefixComment'] == 1; + if (!$isDisableWrap && (!$isDisableWrapIfEmpty || $content)) { + $classname = str_replace('_', '-', $this->prefixId); + $content = $this->cObj->wrap($content, '
|
'); } - + if(!$isDisablePrefixComment) { + $comment = 'Content of extension "' . $this->extKey . '", plugin "' . $this->prefixId . '"'; + $content = $this->cObj->wrap($content, '|'); + } return $content; } @@ -1396,4 +1401,4 @@ // NO extension of class - does not make sense here. -?> \ No newline at end of file +?> \ No newline at end of file