Droplet not getting the variables from commandline

foonji


pcwacht

Hmm?

      $filename = '';
      $folder = '';

sets the variables wich you need back to empty...

Try leaving them out!

John
[url="http://www.ictwacht.nl"]http://www.ictwacht.nl[/url] = Dutch ICT info
[url="http://www.pcwacht.nl"]http://www.pcwacht.nl[/url] = My first
both still work in progress, since years.....

foonji


I've put together some php to get an image and extract IPTC info for the img alt to display with fancy box when it opens the image.

however I'm having problems with droplets. the script works fine on its own page, but can't get it going with droplets correctly.

Through droplets it's missing the two essential variables that are needed which are passed on through the command to call the droplet... any ideas what may be going on?

Commandline: [[imgCaption?folder=test&filename=test.jpg]]


$filename = '';
$folder = '';
$dir = '/media/blog/' . $folder . '/' . $filename;
$class = 'group';

$size = getimagesize($dir, $info);

if(isset($info['APP13']))
{
    $iptc = iptcparse($info['APP13']);
    $caption = $iptc["2#120"][0];
}
else {
$caption = $filename;
}

return '<a class="' . $class . '" href="' . $dir . '"><img src="' . $dir . '" alt="' .$caption . '"></a>
';