improvement for configurability

1 view
Skip to first unread message

Peter Klein

unread,
Jun 14, 2009, 5:39:57 AM6/14/09
to typo3-ti...@googlegroups.com


With the normal RTE (HTMLArea), it's possible to have different RTE configs depending on the DB table.
So you can have one set of buttons/options on the tt_content RTE, and another button/option set for RTE's in tables like tt_news.

But it's not possible to narrow down the config to the columns in tt_content (neither iusing old-style colPos, or templaVoila)
So here's a place where we can improve usability compared to HTMLArea ;)

I added a small test function to "class.tx_tinymce_rte_base.php", which returns the position of the RTE as an array like this (only 0 & 1 is returned if TV is not installed):

  0 => tt_content
  1 => tt_content_colPos0
  2 => tt_content_field_centercolumn
  3 => tt_content_field_fceleft

3) The content element I'm editing in this example is located inside an FCE with the fieldname "field_fceleft"
2) The FCE is then located inside the main TV template in the column with fieldname "field_centercolumn"
1) The CE's are using colPos0 (Default if TV is used)
0) And it's part of the tt_content table.

With that we can 1st check if a special config is available for "3", if not we check if there's one for "2" and so on.
If no special configs are found, the default is used.

Any comments, suggestions, before I try implementing  it?

--
Peter

Peter Klein

unread,
Jun 14, 2009, 5:33:43 PM6/14/09
to typo3-ti...@googlegroups.com

Working patch is now available at Forge.
http://forge.typo3.org/issues/show/3666

--
Peter
winmail.dat

Peter Klein

unread,
Jun 16, 2009, 3:29:43 PM6/16/09
to typo3-ti...@googlegroups.com

An idea for more config improvement.

Supposed you have a site with 2 FE languages. Default is English, but 2nd Arabic.
For that you might want to have different RTE configs, depending on the FE languages, so that you can have Arabic fonts available + Right-2-Left writing etc.

So maybe we should add a lang keyword to the new config addon?
We just have to move the line:

$config = $this->init($thisConfig, $parentObject->RTEcounter);

a couple lines down, so that the $row['ISOcode'] var have been set. Then we have the lang code. ;)

--
Peter

winmail.dat
Reply all
Reply to author
Forward
0 new messages