[TYPO3-dev] Feature 10560 element browser title length is hardcoded

Steffen Kamper info at sk-typo3.de
Fri Feb 27 11:21:44 CET 2009


Hi Sebastian,

you should check the value first. New BE user won't have this var filled 
which leads to real problems, so do a check before

$cropLength = isset($GLOBALS['BE_USER']->uc['titleLen']) ? 
$GLOBALS['BE_USER']->uc['titleLen'] : $this->fixedL;

And one extra: the browser is used 4 times in core, rte comes with 3 own 
ones, which has to be checked and changed too.
DAM comes with an extra one too, so they should be informed.

RTE:
mod3/class.tx_rtehtmlarea_browse_links.php
mod3/class.tx_rtehtmlarea_dam_browse_links.php (?)
mod4/class.tx_rtehtmlarea_select_image.php

vg Steffen


Sebastian Gebhard schrieb:
> Francois Suter schrieb:
>> Hi,
>>
>> I see you are following up nicely ;-)
>>
>>> I thought about using it.
>>> But normally the element browser in the popup is much smaller than 
>>> the list module in the full-screen backend. I think you should make a 
>>> difference between them.
>>
>> I don't agree. This setting was used originally only for the page 
>> tree, which is in a frame even narrower than the element browser pop 
>> up. So I think it's fine to use it in the element browser too. And we 
>> must avoid adding too many preferences.
>>
>> And the element browser can be resized anyway.
>>
>> Cheers
>>
> I see, maybe you two are right.
> 
> Is this a valid patch? (This is the first one i created)
> 
> Index: typo3/class.browse_links.php
> ===================================================================
> --- typo3/class.browse_links.php    2009-02-27 10:57:03.000000000 +0100
> +++ typo3/class.browse_links.php    2009-02-27 10:48:20.000000000 +0100
> @@ -215,7 +215,7 @@
>          if (!$code) {
>              $code = 
> '<i>['.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.no_title',1).']</i>'; 
> 
>          } else {
> -            $code = 
> htmlspecialchars(t3lib_div::fixed_lgd_cs($code,$this->fixedL));
> +            $code = 
> htmlspecialchars(t3lib_div::fixed_lgd_cs($code,$GLOBALS['BE_USER']->uc['titleLen'])); 
> 
>          }
> 
>          $title = t3lib_BEfunc::getRecordTitle($table,$row,FALSE,TRUE);




More information about the TYPO3-dev mailing list