Jan 31

StockQuotesOne of the new exciting features of the next version of BlogEngine.NET 1.4 is the widget framework. Widgets are similar to existing components, except that widgets can be dynamically added, configured and positioned on blog pages. And unlike components, widgets can be added without modifying the existing theme!

This means that users can download and install new widgets simply by copying them to the widgets sub-directory. And once installed, widgets can then be added and configured from the blog web page. Widgets can also be arranged on the web page simply by dragging and-dropping them to their new location.

Mads Kristensen released "proof-of-concept" code and a video earlier this month and I decided to learn how to write my own widget by putting one together that can display a configurable list of current stock quotes.

For this widget, the Yahoo! Financial quote service is used to pull 15 to 20 minute delayed stock quote information. As far as I understand, this is a free service that anyone can use. However, use at your own risk.

To use this widget you must first download and install the latest BlogEngine.NET source code from CodePlex. After which, download the zip file below and unzip it into the widgets directory.

Next, open the web site and sign in as the administrator. Find the widget control that allows you to add widgets to the page. From there, select "StockQuotes" and click the "Add" button.

 AddStockQuote

This will add a new widget called "New Widget" to the web page. Find it and click on the "Edit" link. This will bring up the configuration page for the widget. Hopefully in the future, new widgets will be intelligently named.

NewWidget

From here you can add new stock quotes to the widgets simply by entering their stock symbol and clicking the "Add stock quotes" button. Stock quotes can also be removed by clicking the "Delete" link next to the stock symbol.

SetQuotes

To save all the additions and deletions, if any, click the "Save" button.

That's it! Go ahead and try it yourself. If you encounter any problems or issues, please let me know.

Download: StockQuotesWidget.zip (4.28 kb)

Related posts

Comments

Raf

Posted on Monday, 4 February 2008 19:35

Hi, your widget don't function...
Can I view an example of use?!

Al Nyveldt

Posted on Tuesday, 5 February 2008 00:04

I'm excited to see someone creating 1.4 widgets already. Very cool. I look forward to trying it out sometime soon.

Phil

Posted on Tuesday, 5 February 2008 02:26

@Ref,

Can you be more specific by "don't function"? Did you get an error message?

Add comment


 

  Country flag

[b][/b] - [i][/i] - [u][/u]- [quote][/quote]



Live preview

Posted on Sunday, 11 May 2008 11:53