Added feature #8668: Configurable labels for formatblock items in htmlArea RTE
authorStanislas Rolland <typo3@sjbr.ca>
Tue, 2 Sep 2008 02:30:28 +0000 (02:30 +0000)
committerStanislas Rolland <typo3@sjbr.ca>
Tue, 2 Sep 2008 02:30:28 +0000 (02:30 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@4050 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/rtehtmlarea/ChangeLog
typo3/sysext/rtehtmlarea/doc/manual.sxw
typo3/sysext/rtehtmlarea/extensions/BlockElements/class.tx_rtehtmlarea_blockelements.php

index 476eb98..fb58d62 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2008-09-01  Stanislas Rolland  <typo3@sjbr.ca>
 
        * Fixed bug #9261: Indentation set with div section in htmlArea RTE is not rendered correctly in FE
+       * Added feature #8668: Configurable labels for formatblock items in htmlArea RTE
 
 2008-09-01  Dmitry Dulepov  <dmitry@typo3.org>
 
index ee58969..07abb59 100644 (file)
@@ -1,3 +1,7 @@
+2008-09-01  Stanislas Rolland  <typo3@sjbr.ca>
+
+       * Added feature #8668: Configurable labels for formatblock items in htmlArea RTE
+
 2008-08-30  Stanislas Rolland  <typo3@sjbr.ca>
 
        * Fixed bug #9255: External URLs cannot be set in RTEhtmlarea anymore
index ff23fa9..a0f9c70 100644 (file)
Binary files a/typo3/sysext/rtehtmlarea/doc/manual.sxw and b/typo3/sysext/rtehtmlarea/doc/manual.sxw differ
index 8e061f0..f8a5482 100644 (file)
@@ -132,12 +132,22 @@ class tx_rtehtmlarea_blockelements extends tx_rtehtmlareaapi {
                                // Localizing the options
                        $blockElementsOptions = array();
                        if ($this->htmlAreaRTE->cleanList($this->thisConfig['hidePStyleItems']) != '*') {
+                               $labels = array();
+                               if (is_array($this->thisConfig['buttons.'])
+                                               && is_array($this->thisConfig['buttons.']['formatblock.'])
+                                               && is_array($this->thisConfig['buttons.']['formatblock.']['items.'])) {
+                                       $labels = $this->thisConfig['buttons.']['formatblock.']['items.'];
+                               }
                                foreach ($blockElementsOrder as $item) {
                                        if ($this->htmlAreaRTE->is_FE()) {
                                                $blockElementsOptions[$item] = $TSFE->getLLL($this->defaultBlockElements[$item],$this->LOCAL_LANG);
                                        } else {
                                                $blockElementsOptions[$item] = $LANG->getLL($this->defaultBlockElements[$item]);
                                        }
+                                       // Getting custom labels
+                                       if (is_array($labels[$item.'.']) && $labels[$item.'.']['label']) {
+                                               $blockElementsOptions[$item] = $this->htmlAreaRTE->getPageConfigLabel($labels[$item.'.']['label'], 0);
+                                       }
                                        $blockElementsOptions[$item] = (($prefixLabelWithTag && $item != 'none')?($item . ' - '):'') . $blockElementsOptions[$item] . (($postfixLabelWithTag && $item != 'none')?(' - ' . $item):'');
                                }
                        }