/** * contenttoolbar_init * * It adds to $CFG the contenttoolbar_icons property * * @uses $CFG * @uses $function */ function contenttoolbar_init() { global $CFG, $function; $CFG->contenttoolbar_icons = false; $CFG->allowobjectembed = true; require_once dirname(__FILE__) . "/lib/contenttoolbar_functions.php"; // Content toolbar $function["display:content:toolbar"][] = $CFG->dirroot . "mod/contenttoolbar/lib/contenttoolbar_init.php"; // Weblog text processing $function["video:text:process"][] = $CFG->dirroot . "mod/contenttoolbar/lib/contenttoolbar_text_processing.php"; if ($CFG->allowobjectembed) { adjust_allowed_tags(); // Adding widgets $CFG->widgets->list[] = array('name' => __gettext("Video widget"), 'description' => __gettext("Displays a video of your choice."), 'type' => "contenttoolbar::video"); } // Addding the external video button $options = array('options' => 'width=400,height=300,left=20,top=20,scrollbars=yes,resizable=yes', 'name' => 'mediapopup', 'url' => $CFG->wwwroot . "mod/contenttoolbar/contenttoolbar_video_wizard.php"); add_content_tool_button("mediapopup", __gettext("Add External video"), "image.png", "v", $options); }
switch ($CFG->apacheloguser) { case 3: $logname = $apachelog_username; break; case 2: $logname = $apachelog_name; break; case 1: default: $logname = $apachelog_userid; break; } apache_note('MOODLEUSER', $logname); } // Adjust ALLOWED_TAGS adjust_allowed_tags(); // Use a custom script replacement if one exists if (!empty($CFG->customscripts)) { if (($customscript = custom_script_path()) !== false) { require $customscript; } } // in the first case, ip in allowed list will be performed first // for example, client IP is 192.168.1.1 // 192.168 subnet is an entry in allowed list // 192.168.1.1 is banned in blocked list // This ip will be banned finally if (!empty($CFG->allowbeforeblock)) { // allowed list processed before blocked list? if (!empty($CFG->allowedip)) { if (!remoteip_in_list($CFG->allowedip)) {