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 Modul Parameter FIX
  • Print
Pages: [1]   Go Down

Author Topic: Droplet Modul Parameter FIX  (Read 4418 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]);
                                }
                            }
Logged
Once you go Droplets you never go back

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Droplets & Snippets »
  • Droplet Modul Parameter FIX
 

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