From f6f80b4adcab2e2903d84bb730ad36b5433a8a00 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Thu, 17 Jun 2010 14:39:25 -0700 Subject: [PATCH] Create an admin setting that allows the adminstrator to change the mouse over color. Thanks floridave --- modules/tag_cloud/controllers/admin_tag_cloud.php | 5 +++++ modules/tag_cloud/helpers/tag_cloud_block.php | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/tag_cloud/controllers/admin_tag_cloud.php b/modules/tag_cloud/controllers/admin_tag_cloud.php index 4c00238f..777b9b7c 100644 --- a/modules/tag_cloud/controllers/admin_tag_cloud.php +++ b/modules/tag_cloud/controllers/admin_tag_cloud.php @@ -43,6 +43,7 @@ class Admin_Tag_Cloud_Controller extends Admin_Controller { } if ($valid) { module::set_var("tag_cloud", "tagcolor", $options->tagcolor->value); + module::set_var("tag_cloud", "mouseover", $options->mouseover->value); module::set_var("tag_cloud", "background_color", $options->background_color->value); module::set_var("tag_cloud", "transparent", $options->transparent->value); module::set_var("tag_cloud", "speed", $options->speed->value); @@ -67,6 +68,10 @@ class Admin_Tag_Cloud_Controller extends Admin_Controller { ->value(module::get_var("tag_cloud", "tagcolor", "0x333333")) ->error_message("not_valid", t("The color value must be specified as '0xhhhhhh'")) ->rules("required|length[8]"); + $group->input("mouseover") ->label(t("Tag mouseover color")) + ->value(module::get_var("tag_cloud", "mouseover", "0x000000")) + ->error_message("not_valid", t("The color value must be specified as '0xhhhhhh'")) + ->rules("required|length[8]"); $group->input("background_color")->label(t("Background color")) ->value(module::get_var("tag_cloud", "background_color", "0xffffff")) ->error_message("not_valid", t("The color value must be specified as '0xhhhhhh'")) diff --git a/modules/tag_cloud/helpers/tag_cloud_block.php b/modules/tag_cloud/helpers/tag_cloud_block.php index 5145a2a7..073056ed 100644 --- a/modules/tag_cloud/helpers/tag_cloud_block.php +++ b/modules/tag_cloud/helpers/tag_cloud_block.php @@ -28,7 +28,7 @@ class tag_cloud_block { switch ($block_id) { case "tag_cloud_site": $options = array(); - foreach (array("tagcolor", "background_color", "transparent", "speed", "distribution") + foreach (array("tagcolor", "background_color", "mouseover", "transparent", "speed", "distribution") as $option) { $value = module::get_var("tag_cloud", $option, null); if (!empty($value)) { @@ -36,6 +36,9 @@ class tag_cloud_block { case "tagcolor": $options["tcolor"] = $value; break; + case "mouseover": + $options["hicolor"] = $value; + break; case "background_color": $options["bgColor"] = $value; break;