Welcome, Guest
Username: Password: Remember me

TOPIC: Images - Not supported

Images - Not supported 13 Jan 2012 06:22 #960

  • hvus
  • hvus's Avatar
  • Offline
  • New Member
  • Posts: 2
  • Karma: 0
Sorry if this is a wrong Category. I need to ask if this generated code is ok..

<?php echo JDom::_('html.fly.file', array(
'dataKey' => 'my_file',
'dataObject' => $row,
'width' => '200px',
'height' => '200px',
'attrs' => array('format:jpg'),
'indirect' => true,
'root' => '/images/flags/'
));

Because it shows on the browser as not supported.

Thank you!

hvus
The administrator has disabled public write access.

Images - Not supported 13 Jan 2012 10:48 #964

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
width and height doesn't need 'px' at the end, but it should work too.

root => better to use markers [DIR_xxxx]

You can add markers in the classes/file.php
Or you can change the default path in your generated component's properties.


Are you sure to reformat thumb in JPG ? It is not the best.


NOT SUPPORTED ?
If the image is not supported, it is because you changed the thumb size.
In order to protect agaist malicious scripts, you must add in the classes/image.php, your new size : '200x200'
You change it in a constant at the top of the class file.

That's all.


Hope it helps.
Coding is now a piece of cake
The administrator has disabled public write access.
Time to create page: 0.078 seconds

Get Started