Extensions
Calendar Extensions
Calendar extensions are added in the extension script “ext_calendar.inc”.
Extend Quick Search
The search criteria in the left column can be extended with a separate function. In the example, a form element ‘myname’ is added
$GLOBALS["gLmbExt"]["calSearchMenu"][$gtabid] = 'myFunction';
function myFunction(){
echo "mysearchfield: <input type='text' name='myname'>";
}
Expand Menu
Extensions in the calendar menus. The rules are the same as for the menu extensions. This example extends the Tools menu.
function MyExt_MenuCalExtras($gtabid,$formid,&$gresult){
pop_menu2("menuItemText",null,null,null,"cursor:pointer", "alert('hallo')");
}
if(!$gLmbExt["menuCalExtras"][52]){
$gLmbExt["menuCalExtras"][52] = "MyExt_MenuCalExtras";
}
Holidays
You can format any number of days as a whole. Useful for example to highlight holidays. Each day is added as a $tresult array in the extension script “ext_calendar.inc”.
$bzm = 0;
$color = null;
$tresult[$bzm]["id"] = 0;
$tresult[$bzm]["title"] = 'Ostern';
$tresult[$bzm]["start"] = '2014-04-20';
$tresult[$bzm]["color"] = '#00aaaa';
$tresult[$bzm]["background"] = "linear-gradient(to bottom, ".$GLOBALS['farbschema']['WEB13']." 20%, #00aaaa)";
$tresult[$bzm]["holiday"] = 1;
$bzm++;