Please, explain me, is there any way to have different sized thumbnails on different instances of EvoGallery?
Thanks!
Please, give me another advise: is there possible to get width and height of the picture through placeholders?
//Start modification to use width and height placeholders, Mark Hamstra, June 30, 2010
$imgsize = getimagesize($modx->config['base_path'] . $this->config['galleriesUrl'] . $row['content_id'] . '/' . $row['filename']);
$item_phx->setPHxVariable('width',$imgsize[0]);
$item_phx->setPHxVariable('height',$imgsize[1]);
//End modification while ($row = $modx->fetchRow($result))
{
$item_phx = new PHxParser();
foreach ($row as $name => $value)
$item_phx->setPHxVariable($name, $value);
//Start modification to use width and height placeholders, Mark Hamstra, June 30, 2010
$imgsize = getimagesize($modx->config['base_path'] . $this->config['galleriesUrl'] . $row['content_id'] . '/' . $row['filename']);
$item_phx->setPHxVariable('width',$imgsize[0]);
$item_phx->setPHxVariable('height',$imgsize[1]);
//End modification
$item_phx->setPHxVariable('images_dir', $this->config['galleriesUrl'] . $row['content_id'] . '/');
$item_phx->setPHxVariable('thumbs_dir', $this->config['galleriesUrl'] . $row['content_id'] . '/thumbs/');
if(!empty($item_tpl_first) && $count == 1){
$items .= $item_phx->Parse($item_tpl_first);
} else if(!empty($item_tpl_last) && $count == $recordCount){
$items .= $item_phx->Parse($item_tpl_last);
} else if(!empty($item_tpl_alt) && $count % $this->config['itemAltNum'] == 0){
$items .= $item_phx->Parse($item_tpl_alt);
} else {
$items .= $item_phx->Parse($item_tpl);
}
$count++;
}
As a sidenote: I updated the EvoGallery Docs today with the placeholders available in the different types (for what I could find by sniffing the code).
<img src="[+filename:phpthumb=`&h=100&w=100&zc=1&q=95#[+images_dir+]`+]" .....
<img title="vue de : blbla" alt="Accueil bla bla" src="/assets/snippets/phpthumb/phpThumb.php?src=snap-image.jpg&h=100&w=100&zc=1&q=95#/assets/galleries/1/">