Author Topic: Droplet Modul Parameter FIX  (Read 1676 times)

Offline KonTrax

  • Posts: 21
  • Gender: Male
    • KonTraxNET
Droplet Modul Parameter FIX
« on: May 03, 2009, 11:42:16 PM »
I've found a small unpractical flaw in the original Droplet script.

If you use two droplets with the same parameter variables on the same site, the secound one will not use default values for its optional parameters. I've fixed this with this small fix by unsetting the parameter variables after use.

WARNING! This is not a fully tested method so try it out on a test version of your WB system before utilizing it.!

If you would like to utilize this fix all you have to do is two small copy pase in the droplet core file (/modules/droplets/droplets.php)

Paste this into line 28
Code: [Select]
                           //////////////////////////////////////////////////////
                            // Fix by KonTrax at KonTraxNET
                            // Droplet parameter variables fix dropp one
                            if(!isset($cleanDropI) || empty($cleanDropI)){$cleanDropI=0;}
                            $cleanDropVars[$cleanDropI]=$parameterTemp[0];
                            $cleanDropI++;

Paste this into line 51
Code: [Select]
                           //////////////////////////////////////////////////////
                            // Droplet parameter variables fix dropp two
                            foreach ($cleanDropVars as $cleanDropII) {
                                if(isset($cleanDropVars)){
                                    unset($parameter[$cleanDropII]);
                                }
                            }
Once you go Droplets you never go back

 

postern-length