6 Comments

Today, I finally deployed the new widget framework of BlogEngine.NEXT to my blog. It’s been under development for some months now, so it’s nice to see it in action for the first time on a live site.

For some time now, I’ve wanted to write new widgets but didn’t have any places to put them. Before now that is. The first thing that came to my mind was to write a Twitter widget displaying my last Twits. You can see the result on the side panel to the right. The widget just took about an hour to write.

The video

If you are interested in seeing how the Twitter widget works or to get a sneak peak of the widget framework, then here is a new video that explains the Twitter widget. If you watched the video displaying the early prototype of the widget framework, you might notice a lot of the changes and improvements we’ve done so far.

Download the video 

The code

If you run the latest and greatest build of BlogEngine.NET available from CodePlex, then you can add the Twitter widget to your own blog. Just download the zip file below, and put the Twitterfolder into your blog’s widget folder.

Twitter.zip (2,82 kb)

Comments

Comment by Jonx

Ha!

That was the missing piece that made the changeset I retrieved on sunday crash ;)

The twitter widget was declared in your widget.xml but the corresponding control was missing (twitter.ascx). Maybe you could add a check for control existance before trying to load a control?
This would avoid getting exceptions in case I remove widgets by hand.

Except of that... Very nice widget framework. Congratz.

Jonx

Comment by Leigh

Nice, I have been playing with the new widget system and knocked up a similar one to pull status updates from Facebook - my "updater" of choice.

One thing regarding widgets - what is the best way to style widgets? Having the user update their main theme css file seems to break the simplicity of the drag-drop install into the widget folder.

Comment by Abdul

nice one, but i a new to widgets, can u please help post a video tutorial or blog tutorial on designing widgets (the ones used on dropthings.com & yahoo rss feed page) from scratch or anything similar. thanks

Abdul

Comment by Taylor Brazelton

I keep getting this error!!
public override void LoadWidget()
Line 37: {
Line 38: StringDictionary settings = (StringDictionary)GetSettings(ObjectType.StringDictionary);
Line 39: hlTwitterAccount.NavigateUrl = settings["accounturl"];
Line 40: int.TryParse(settings["maxitems"], out MAX_ITEMS);

I am not sure why. any help would be great!!