WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Droplets & Snippets »
  • Droplet not getting the variables from commandline
  • Print
Pages: [1]   Go Down

Author Topic: Droplet not getting the variables from commandline  (Read 4718 times)

foonji

  • Guest
Droplet not getting the variables from commandline
« on: March 26, 2010, 12:52:52 PM »

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]]

Code: [Select]
$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>
';
Logged

Offline pcwacht

  • Posts: 2923
  • Gender: Male
    • Dutch ICT info
Re: Droplet not getting the variables from commandline
« Reply #1 on: March 26, 2010, 03:00:48 PM »
Hmm?

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

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

Try leaving them out!

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

foonji

  • Guest
Re: Droplet not getting the variables from commandline
« Reply #2 on: March 26, 2010, 11:52:08 PM »
Ok thanks!! That solved it.
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Droplets & Snippets »
  • Droplet not getting the variables from commandline
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2