[TYPO3-dev] FEuser resize image dynamically

Siddhesh siddesh.savant at lelesys.com
Wed Dec 1 05:00:33 CET 2010


On Tuesday 30 November 2010 05:32 PM, Mathias Schreiber [wmdb] wrote:
> Am 30.11.10 12:11, schrieb Siddhesh:
>> Hello list,
>> I am developing a small extension.Let me Explain what does it does.
>> I have a list of users which are displayed in list View.
>> When the user clicks on one of the row in list view its Detail View
>> appers.In Detail view i have 4 fields
>> 1)Image of user
>> 2)Name
>> 3)Official function
>> 3)country
>>
>> Now let me explain me my problem
>> I have created the image object and had displayed the image with fixed
>> height and width
>>
>> $cObjType = $this->conf['detailpicture'];
>> $conf = $this->conf['detailpicture.'];
>> $cObj = t3lib_div::makeInstance('tslib_cObj');
>> $cObj->start($row, '_NO_TABLE');
>
> First off:
> As long as you are within an extension context, cObj is already there.
> So something like this will work:
> $img = $this->cObj->IMAGE($imgConf);
>
> TS would look like this:
> imgConf = IMAGE
> imgConf.file =
> imgConf.file.width = 125
>
> In PHP you simply override the path to the file with:
> $this->conf['imgConf.']['file'] = 'uploads/pics/' . $row['image'];
>
> If you need two image sizes, simply do something like this:
>
> TS:
> imgConfBig < imgConf
> imgConfBig.file.width = 250
>
> Render accordingly.
>
> cheers
> Mathias
>
Thanks Mathias,
  As this was my first development.Your idea helped for me.I had one 
more question for u.IF i want some thing like this

For every record admin must have the provision to decide for its height 
and width of the image??then how can i ove ahead




More information about the TYPO3-dev mailing list