I set this function in my template to check, if droplet and action is defined or not
function found_droplets($functionName) {
global $database;
if(file_exists(WB_PATH.'/modules/droplets/tool.php')) {
$get_settings = $database->query("SELECT * FROM `".TABLE_PREFIX."mod_droplets` WHERE name = '$functionName'");
if ($get_settings->numRows() > 0) {
return true;
} else {
return false;
}
} return false;
}
A droplet to set a box with rounded corners. JQUERY needed
GLOBAL $wb, $database;
$returnvalue=' ';
if(isset($id)) {
ob_start();
page_content($id);
$content=ob_get_contents();
ob_end_clean();
if(!empty($content)) {
if(!isset($width)) { $width= '100%'; }
if(!isset($fillcolor)) { $fillcolor='#eee'; }
if(!isset($border)) { $border='2px solid #000'; }
if(!isset($corner)) { $corner = '10'; }
if(!isset($padding)) {$padding= '5'; }
$returnvalue =
'<div class="rounded {'.$corner.'px no-webkit}" style="background-color:'.$fillcolor.'; border: '.$border.'; padding:'.$padding.'px">';
$returnvalue.=$content;
$returnvalue.= "</div>";
}
}
return $returnvalue;