[TYPO3-core] RFC: re-introducing CaptionSplit for the sake of backwards compatibility

Kasper Skårhøj kasper2006 at typo3.com
Wed Apr 19 15:25:22 CEST 2006


Hi Guys,

I think that is a good idea. It shows that we can actually listen to  
the demand of people and secondly we can use it to argue that people  
should get involved in testing and objecting earlier than after a  
release if they want to avoid similar problems next time.

- kasper



On Apr 12, 2006, at 21:26 , Ingmar Schlecht wrote:

> Hi guys,
>
> people have complained about 4.0 totally breaking backwards
> compatibility by dropping the captionSplit feature. Ernesto has thus
> written a patch to re-introduced it. Thanks a lot for that!
>
> Stucki and me have talked about this, and we have agreed that we must
> make captionSplit work again in 4.0.1.
>
> Branches: HEAD, TYPO3_4-0
>
> cheers,
> Ingmar
>
> diff -Nur typo3_src-4.0/typo3/sysext/cms/tslib/ 
> class.tslib_content.php typo3_src-4.0-captionSplit/typo3/sysext/cms/ 
> tslib/class.tslib_content.php
> --- typo3_src-4.0/typo3/sysext/cms/tslib/class.tslib_content.php	 
> 2006-04-07 02:18:29.000000000 +0200
> +++ typo3_src-4.0-captionSplit/typo3/sysext/cms/tslib/ 
> class.tslib_content.php	2006-04-12 12:50:52.422439500 +0200
> @@ -754,9 +754,19 @@
>
>  				// initialisation
>  			$caption='';
> +			$captionArray = array();
>  			if (!$conf['captionSplit'] && !$conf['imageTextSplit'] &&  
> is_array($conf['caption.']))	{
>  				$caption = $this->stdWrap($this->cObjGet($conf['caption.'],  
> 'caption.'),$conf['caption.']);	// global caption, no splitting
>  			}
> +			if ($conf['captionSplit'] && $conf['captionSplit.']['cObject'])	{
> +				$legacyCaptionSplit = 1;
> +				$capSplit = $this->stdWrap($conf['captionSplit.']['token'],  
> $conf['captionSplit.']['token.']);
> +				if (!$capSplit) {$capSplit=chr(10);}
> +				$captionArray = explode($capSplit, $this->cObjGetSingle($conf 
> ['captionSplit.']['cObject'], $conf['captionSplit.']['cObject.'],  
> 'captionSplit.cObject'));
> +				while (list($ca_key, $ca_val) = each($captionArray))	{
> +					$captionArray[$ca_key] = $this->stdWrap(trim($captionArray 
> [$ca_key]), $conf['captionSplit.']['stdWrap.']);
> +				}
> +			}
>
>  			$tablecode='';
>  			$position=$this->stdWrap($conf['textPos'],$conf['textPos.']);
> @@ -1044,7 +1054,9 @@
>  							if ($rowspacing && $noRows && $a) {		// Puts distance  
> between the images IF "noRows" is set and this is the first  
> iteration of the loop
>  								$tablecode.= '<img src="'.$GLOBALS['TSFE']- 
> >absRefPrefix.'clear.gif" width="1" height="'.$rowspacing.'" alt=""  
> title="" /><br />';
>  							}
> -							if ($conf['captionSplit'] || $conf['imageTextSplit'])	{
> +							if ($legacyCaptionSplit)	{
> +								$thisCaption = $captionArray[$imgIndex];
> +							} else if ($conf['captionSplit'] || $conf['imageTextSplit'])	{
>  								$thisCaption = $this->stdWrap($this->cObjGet($conf 
> ['caption.'], 'caption.'), $conf['caption.']);
>  							}
>  							$imageHTML = $imgsTag[$imgIndex].'<br />';
> _______________________________________________
> TYPO3-team-core mailing list
> TYPO3-team-core at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-team-core


- kasper

"A contribution a day keeps the fork away"
-------------------------------
kasper2006 at typo3.com | +45 20 999 115 | skype: kasperskaarhoej |  
gizmo: kasper_typo3





More information about the TYPO3-team-core mailing list