本文整理汇总了PHP中module::clear_all_vars方法的典型用法代码示例。如果您正苦于以下问题:PHP module::clear_all_vars方法的具体用法?PHP module::clear_all_vars怎么用?PHP module::clear_all_vars使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类module
的用法示例。
在下文中一共展示了module::clear_all_vars方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: uninstall
static function uninstall()
{
// deactivate
module::deactivate("image_optimizer");
// delete vars from database
module::clear_all_vars("image_optimizer");
}
示例2: clear_all_module_parameters_test
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"));
}
示例3: uninstall
static function uninstall()
{
module::clear_all_vars("tag_cloud_html5");
}
示例4: install
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();
}
示例5: reset_theme
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");
}
示例6: uninstall
static function uninstall()
{
Database::instance()->query("DROP TABLE IF EXISTS {pending_users};");
// added Shad Laws, v2
module::clear_all_vars("registration");
}