New BlogEngine.NET Widget: Stock Quotes

by Phil 31. January 2008 14:11

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 quote" 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)

Tags:

BlogEngine.NET

Comments

2/4/2008 7:35:48 PM #

Raf

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

Raf Italy

2/5/2008 12:04:27 AM #

Al Nyveldt

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

Al Nyveldt United States

2/5/2008 2:26:17 AM #

Phil

@Ref,

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

Phil United States

5/8/2008 8:50:55 PM #

Andre

Nice one. I´ll give it a try. Thanks

Andre Germany

6/19/2008 6:43:13 AM #

Bolsa de trabajo

Good info. thanks.

Bolsa de trabajo Mexico

9/3/2009 6:02:20 AM #

Phil


The BlogEngine team has changed how widgets are written since my original post. Unfortunately, I have not kept up myself on the changes and can't be much help at the moment.

But if you figure it out, please let me know.

Phil United States

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading



Powered by BlogEngine.NET 1.5.0.7
Theme by Mads Kristensen | Modified by Mooglegiant

Projects

Software Stack

Recent Comments

Comment RSS

Badges

Enhanced with Snapshots