[TYPO3-dev] FEuser resize image dynamically

Siddhesh siddesh.savant at lelesys.com
Wed Dec 1 09:53:53 CET 2010


On Wednesday 01 December 2010 01:46 PM, Mathias Schreiber [wmdb] wrote:
> Am 01.12.10 05:00, schrieb Siddhesh:
>> 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
>
> You're welcome, glad I could help out.
>
>> For every record admin must have the provision to decide for its height
>> and width of the image??then how can i ove ahead
>
> In this case I'd add two fields to the record (or maybe one field for a
> syntax like 150x230, but experience has shown that editors don't get the
> idea).
>
> I try to get you a bit deeper into the PHP/TS connection.
> TS is nothing more than a syntax to describe PHP arrays.
> This means:
> plugin.tx_yourExtension.imgConf.file.width = 250
> will translate into:
> $this->conf['imgConf.']['file.']['width']
> in your extensions PHP code (note that the function main() from the
> kickstarter does $this->conf = $conf very early so that you have the TS
> available in all your functions).
>
> Also notice the dots at the end of each "key", this mostly causes
> trouble to new developers.
>
> So if you want to have it bulletproof I'd set defaults via TS and give
> the editor the chance to override these on a per-record basis.
>
> You don't want to force your editors in entring a value in the
> height/width fields.
>
> Then, back in PHP, where you get the actual row from the DB you could
> simply check if someone entered a value into the according fields and
> use these values to overwrite the defaults from TS.
>
> Beware:
> If both height and width are supplied, TYPO3 will hard-scale the image,
> so I suggest to use maxH and maxW to define the maximum allowed size of
> the image.
>
> I hope you have more fun with TYPO3 extension coding now.
>
> cheers
> Mathias
Hello Mathias,
  M so happy.I was so tense all these days.U really helped me to 
understnd ts.i got wat i have to do now..M really happy.

thanks a lot




More information about the TYPO3-dev mailing list