Project

General

Profile

Actions

Feature #15808

closed

imgResource doesn't support stdWrap on minW and minH

Added by Peter Niederlag over 18 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Communication
Target version:
-
Start date:
2006-03-11
Due date:
% Done:

0%

Estimated time:
PHP Version:
4.3
Tags:
Complexity:
Sprint Focus:

Description

I have the width and height for an img_resource stored in a register.
In my case I have to use the minW and minH properties of the img_resource to
scale my image.
But unfortunatelly just these two properties are NOT of data type "pixel /
stdWrap" but just of type "pixel".
Seems I can't find any way to get my values from the register into these
properties.

Funny enough, similar properties of img_resource are of data type "pixel /
stdWrap", like the properties width, height, and even maxW and maxH.
I have tested all of these and can easily transfer my values from the
register to the property.
Just the two props minW and minH refuse cooperation (which is understandable
concerning that they are only of type "pixel").

Any workaround for this?!? Any idea why these two props are not of data type
"pixel / stdWrap"?!?
Thanks for your help! It is much appreciated (and very neccesary!).

(issue imported from #M2830)


Files

class.tslib_content.diff (2.17 KB) class.tslib_content.diff Administrator Admin, 2006-03-11 11:05
Kachelung.png (81.9 KB) Kachelung.png Administrator Admin, 2006-03-12 16:41
Actions #1

Updated by Peter Niederlag over 18 years ago

attached pacth should cleanly apply against rc1 and fix the problem. Please test.

Actions #2

Updated by J¶rg Wagner over 18 years ago

I patched against beta3 (manually adjusting the line counts) and it works like a charm. Concerning the elementary level of this change I am sure it will work on RC1 too.

Nevertheless I will upgrade to RC1 within the next days and will post here again.

Many thanks. This is VERY helpful !

Actions #3

Updated by J¶rg Wagner over 18 years ago

Well, I just dropped into the next similar restriction:
GIFBUILDER's maxWidth property is of data type "pixels" instead of "pixels /
stdWrap" (while e.g. GIFBUILDER.backColor on the other hand is "GraphicColor / stdWrap"). I need to restrict the length of a GIFBUILDER image to a dynamic value, and there is no way to do that.

The fact that some of the TS object props allow for stdWrap properties and others do not seems to be absolutely arbitrary and it will pose more and more problems as tiled TemplaVoila designs are a quickly spreading concept.

As an example I have attached a screenshot ...
(Kachelung.png - http://bugs.typo3.org/file_download.php?file_id=1211&type=bug )
...of a TV based Typo3 design that completely abandons the concept of column based design in favour of a tile based approach. TV can handle such concepts quite well meanwhile.
In my example all tiles are based on one universal FCE that allows for a very elegant handling of the tiles. It allows to create tiles with different widths and heights, background colors and background images.

But when you try to put this concept to work in Typo3, TS lets you run into one dead end after the other, because it is often not possible to fill in dynamic size and color attributes for various elements that are needed for these tiles.
In times of column based design this was acceptable, as most of the props (widths, heights, colors,...) needed for GIFBUILDER and other objects in the columns had fixed values. But meanwhile this is changing rapidly, as my example demonstrates.

The bottomline is that I humbly ask why not ALL basic TS data types allow to obtain their values from stdWrap props. This would allow for a lot more flexibility with dynamic designs like the one I attached. It would also make the whole TS syntax more consistend (I currently spend a lot of time in TSref just to find out which props allow for which kind of manipulation - there is just no systematic principle to that).

Regarding how small the change was that Peter had to place to make minW and minH stdWrappable, wouldn't it be a good solution to standardize all of the TS data types to allow to be stdWrapped?!?

Or do I overlook any considerations that would limit this approach (like performance issues)?

Actions #4

Updated by J¶rg Wagner over 18 years ago

As expected Peter's patch also works on RC1 !

Actions #5

Updated by Thomas Hempel almost 18 years ago

@Peter: Can you please take care of this and write an RFC to the corelist? If you don't have the time I will do it.

Greets,
Thomas

Actions #6

Updated by Volker Graubaum over 17 years ago

can you please do it?

Actions #7

Updated by Oliver Hader about 17 years ago

Committed to SVN Trunk (rev. 2479) - dropped for TYPO3_4-1.

Actions

Also available in: Atom PDF