static function uninstall() { // deactivate module::deactivate("image_optimizer"); // delete vars from database module::clear_all_vars("image_optimizer"); }
public function clear_all_module_parameters_test() { module::set_var("Var_Test", "Parameter1", "original value"); module::set_var("Var_Test", "Parameter2", "original value"); module::clear_all_vars("Var_Test"); $this->assert_equal(null, module::get_var("Var_Test", "Parameter1")); $this->assert_equal(null, module::get_var("Var_Test", "Parameter2")); }
static function uninstall() { module::clear_all_vars("tag_cloud_html5"); }
static function uninstall() { module::clear_all_vars("movie_tools"); }
static function uninstall() { // Delete vars from database module::clear_all_vars("pdf"); }
static function install() { /** UNTIL RELEASED LET'S CLEAN UP EVERYTHING **/ $clearit = ""; if ($clearit) { Database::instance()->query("DROP TABLE IF EXISTS ratables;"); Database::instance()->query("DROP TABLE IF EXISTS ratings;"); module::clear_all_vars("ratings"); dir::unlink(VARPATH . "modules/ratings"); } /** ---------------------------------------- **/ $dbvarpath = VARPATH . "modules/ratings"; if (!is_dir($dbvarpath)) { @mkdir($dbvarpath); } module::set_version("ratings", 20); $iconset = url::file("modules/ratings/vendor/img/stars.png"); $iconset = preg_replace("/\\/index\\.php/", "", $iconset); if (!module::get_var("ratings", "iconset")) { module::set_var("ratings", "iconset", $iconset); } if (!module::get_var("ratings", "imageword")) { module::set_var("ratings", "imageword", "star"); } if (!module::get_var("ratings", "votestring")) { module::set_var("ratings", "votestring", "vote"); } if (!module::get_var("ratings", "castyourvotestring")) { module::set_var("ratings", "castyourvotestring", "Click on a star to cast your vote:"); } if (!module::get_var("ratings", "showinsidebar")) { module::set_var("ratings", "showinsidebar", "1"); } if (!module::get_var("ratings", "showunderphoto")) { module::set_var("ratings", "showunderphoto", "0"); } if (!module::get_var("ratings", "bgcolor")) { module::set_var("ratings", "bgcolor", "#FFFFFF"); } if (!module::get_var("ratings", "fillcolor")) { module::set_var("ratings", "fillcolor", "#FF0000"); } if (!module::get_var("ratings", "hovercolor")) { module::set_var("ratings", "hovercolor", "#FFA800"); } if (!module::get_var("ratings", "votedcolor")) { module::set_var("ratings", "votedcolor", "#0069FF"); } if (!module::get_var("ratings", "textcolor")) { module::set_var("ratings", "textcolor", "#000000"); } if (!module::get_var("ratings", "regonly")) { module::set_var("ratings", "regonly", "0"); } /** * Can we have duplicate weights for the modules? * may want to adjust this and copy moduleorder module for reordering... */ // get comment block weight, so we can adjust ratings weight - see below $commentweight = db::build()->select("weight")->from("modules")->where("name", "=", "comment")->execute()->current(); // set ratings weight to one below comments so we can display right // under the photo $newratingsweight = $commentweight->weight - 1; db::build()->update("modules")->set("weight", $newratingsweight)->where("name", "=", "ratings")->execute(); }
protected function reset_theme() { // Default core theme settings module::set_var("gallery", "page_size", 50); module::set_var("gallery", "resize_size", 640); module::set_var("gallery", "thumb_size", 200); module::set_var("gallery", "header_text", ""); module::set_var("gallery", "footer_text", ""); module::set_var("gallery", "show_credits", FALSE); module::clear_all_vars("th_pear4gallery3"); module::clear_var("th_pear4gallery3", "hide_logo"); }
static function uninstall() { Database::instance()->query("DROP TABLE IF EXISTS {pending_users};"); // added Shad Laws, v2 module::clear_all_vars("registration"); }