Create an admin setting that allows the adminstrator to change the mouse over color. Thanks floridave
This commit is contained in:
parent
2b75fef32f
commit
f6f80b4adc
@ -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'"))
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user