Flash Cumulus Tag-Cloud Widget

I've found a nice Flash-based Cumulus Tag-Cloud on http://www.themes4blogs.com/ and already replaced it with the built-in Tag-Cloud.

It's a nice Widget except of the border around the tag when you mouseover the tag. Except of this, the download version contains a small bug. You could change the settings and save and your tag cloud will look as expected. But when you open up the settings again, all initial settings are filled out. I've checked the source and found the problem: the saved settings are read out - but the value is never assigned to the controls.

The issue is easily solved when you just assign the values from the settings to the correct control.

Here is the original source of the edit.ascx.cs:

    protected override void OnLoad(EventArgs e)
    {
        StringDictionary settings = GetSettings();
        string minimumposts = "1";
        if (settings.ContainsKey("minimumposts"))
            minimumposts = settings["minimumposts"];

        string width = "300";
        if (settings.ContainsKey("width"))
            width = settings["width"];

        string height = "250";
        if (settings.ContainsKey("height"))
            height = settings["height"];

        string tagcolor = "ffffff";
        if (settings.ContainsKey("tagcolor"))
            tagcolor = settings["tagcolor"];

        string backcolor = "333333";
        if (settings.ContainsKey("backcolor"))
            backcolor = settings["backcolor"];

        bool transparent = false;
        if (settings.ContainsKey("transparent"))
            transparent = Convert.ToBoolean(settings["transparent"]);

        string rotation = "100";
        if (settings.ContainsKey("rotation"))
            rotation = settings["rotation"];

        bool distribute = true;
        if (settings.ContainsKey("distribute"))
            distribute = Convert.ToBoolean(settings["distribute"]);
    }

I've modified it in this way:

    protected override void OnLoad(EventArgs e)
    {
        StringDictionary settings = GetSettings();
        string minimumposts = "1";
        if (settings.ContainsKey("minimumposts"))
        {
            minimumposts = settings["minimumposts"];
            this.tbMinimum.Text = minimumposts;
        }

        string width = "300";
        if (settings.ContainsKey("width"))
        {
            width = settings["width"];
            this.tbWidth.Text = width;
        }

        string height = "250";
        if (settings.ContainsKey("height"))
        {
            height = settings["height"];
            this.tbHeight.Text = height;
        }

        string tagcolor = "ffffff";
        if (settings.ContainsKey("tagcolor"))
        {
            tagcolor = settings["tagcolor"];
            this.tbTagColor.Text = tagcolor;
        }

        string backcolor = "333333";
        if (settings.ContainsKey("backcolor"))
        {
            backcolor = settings["backcolor"];
            this.tbBackColor.Text = backcolor;
        }

        bool transparent = false;
        if (settings.ContainsKey("transparent"))
        {
            transparent = Convert.ToBoolean(settings["transparent"]);
            this.chkTransparent.Checked = transparent;
        }

        string rotation = "100";
        if (settings.ContainsKey("rotation"))
        {
            rotation = settings["rotation"];
            this.tbRotation.Text = rotation;
        }

        bool distribute = true;
        if (settings.ContainsKey("distribute"))
        {
            distribute = Convert.ToBoolean(settings["distribute"]);
            this.chkDistribute.Checked = distribute;
        }
    }

You can also download the file below if you want. Just replace the edit.ascx.cs file under ~/widgets/Cumulus

edit.ascx.cs (2.57 kb)

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading

About the author

Something about the author

Month List