www.julianstricker.com - Home

User login

julianstricker's tweets

  • last.fm now runs great on my HTC Hero :-) 1 week 6 days ago
  • @splattne Kingston ssdNOW V+ SNVP325-S2 2 weeks 6 days ago
  • Mein Acer 8942G bootet dank neuer SSD in nur 9 Sekunden 2 weeks 6 days ago
  • Buzz lebt!!! 4 weeks 5 hours ago
  • mein Acer Aspire 8942G ist angekommen :-) 6 weeks 2 days ago

New version of jsThumbnailPlugin released

Today i have released version 1.1.0 of the jsThumbnailPlugin for the Symfony framework. It contains a important bugfix for Symfony 1.1 and a new feature.

I fixed a bug with the sfFileCache object: In version 1.0 the sfFileCache wants a string as $file_cache_dir parameter, but version 1.1 wants a Array containing the parameters:

Symfony 1.0: $cache = new sfFileCache($file_cache_dir);
Symfony 1.1: $cache = new sfFileCache(Array('cache_dir'=>$file_cache_dir));

The problem was to find out which version of Symfony is running. I solved the problem by checking if the function "setFileLocking" exists. This function exists only in version 1.0 of Symfony:

if (method_exists('sfFileCache', 'setFileLocking')){ //symfony 1.0
$cache = new sfFileCache($file_cache_dir);
}else{ //symfony 1.1
$cache = new sfFileCache(array('cache_dir' => $file_cache_dir));
}

jsThumbnailPlugin 1.1.0 accepts a new parameter "mode". This parameter can be set to "normal", "crop" or "stretch".
normal: Sets the image to the maximum height or width, without changing the width/height proportion;
crop: The image will be cropped exactly to the given height and width without changing the width/height proportion;
stretch: Sets the image to the maximum height or width, the width/height proportion changes.


follow me on Twitter

Certificates

php5-zce-logo-new

www.julianstricker.com feeds