BlogEngine.NET Twitter Widgets Updated

by Donovan Olivier May 10, 2010 9:02PM

Displaying the date published in the blogger's local time has been bugging me because it's probably quite meaningless to most of the readers. A quick Google search showed a couple of ways to display relative time (i.e. ‘an hour ago’ instead of an absolute time). I picked Jeff Atwood's method for stackoverflow.com with a couple of minor modifications. The relative time is a setting which is off by default in case you liked things as they were. Here are the updated Twitter widgets, bundled together.

Imaginary.Widgets.7z (6.30 kb)

UPDATE June 9, 2010: Incorporated feedback from JP Hellemons to correct an encoding issue in the feed widget.

UPDATE March 11, 2011: Ruslan Tur updated the widgets for BE2.0, you can grab them from here.


Tags: , , ,

Blog

Comments

May 10, 2010 9:37PM #

rtur

Great job! Have a few suggestions to make it even better:
1. Add "archive" tab to the widget.
2. When switch to archive tab, show scrollable (paging?) list of old tweets.
3. Add search  button to archive tab so visitor can not only browse but also search archived twits.

Please spare me from making my own widget! ;)

rtur United States |

June 8, 2010 12:20PM #

jp hellemons

hello, i've found a small bug displaying the 'via' part of the tweets:
on line 172 of twitterfeed widget.ascx.cs
i replaced it by this:
string via = ext.GetReader().ReadInnerXml().Replace("\r\n", "").Trim();
        via = Server.HtmlDecode(via);
        via = via.Replace("<a ","<a target=\"_blank\" rel=\"nofollow\" ");
                ((Label)e.Item.FindControl("itemVia")).Text = "via " + via;

jp hellemons Netherlands |

June 9, 2010 3:24PM #

donovan

Thanks, will update it!

donovan South Africa |

October 13, 2010 7:30AM #

trackback

BlogEngine.NET Twitter Search Widget

BlogEngine.NET Twitter Search Widget

planetdonovan.com |

November 23, 2010 1:26AM #

brian

I'm no programming superstar by any means, but I can't get this to work.
Gives me the following errors:
CS0101: The namespace 'Imaginary' already contains a definition for 'DefaultValues'
Line 7:      using BlogEngine.Core;
Line 8:  
Line 9:      public static class DefaultValues
Line 10:     {
Line 11:         public const string DateFormat = "{0:dddd h:mmtt}";

Source File: d:\data\htdocs\criscam.com\new\blog\App_Code\Extensions\Imaginary.Shared.cs    Line: 9

brian United States |

November 23, 2010 9:48AM #

donovan

make sure that you don't have 2 copies of Imaginary.Shared.cs under your App_Code folder.

donovan United States |

December 14, 2010 8:30AM #

Larry Guayante

I get the following error when trying to build the website (Visual Studio 8 Express; BlogEngine RC 2.0)

The type or namespace name 'WidgetBase' could not be found (are you missing a using directive or an assembly reference?) C:\inetpub\wwwroot\MyBlog\widgets\TwitterFeed\widget.ascx.cs Line 30

I'm not a programmer so I need a little help. Thanks!

Larry Guayante United States |

December 14, 2010 5:00PM #

Flick

Thank you for sharing your work ! works weel for me Smile

Flick United States |

Comments are closed

The Perpetrator

perpetrator

Donovan Olivier

software developer, architect, husband, father, son, brother, uncle, nephew, sinistral, enquirer, skeptic, cynic, anarchist, contrarian, infidel, dissident, rebel, troublemaker, dissenter, renegade.

Noise

i know one shld look at beer studies undertaken by the institute of brewing & distillery with a critical eye, but... http://t.co/hOtxdgox
planetdonovan 4 hours ago

is there any way to ensure that the electronics you buy are manufactured by free range humans? http://t.co/smfg8lSg
planetdonovan 7 hours ago

@planetdonovan ha ha I thought the same when that guy hit him.
LBugnion 1 day ago

@jalpf @LBugnion it is hard, however, to see him getting beaten up... c'mon jack!
planetdonovan 1 day ago

#FF - @thisisinterval @greyholed @planetdonovan @Sonicsgate
adrianshannon 2 days ago

this is why most f1 cars are gonna look weird this year http://t.co/zoObHpUg
planetdonovan 3 days ago

new ferrari f2012 nose is freaky! http://t.co/kwBktVib
planetdonovan 3 days ago

random site of the day http://t.co/wZYZg0FI
planetdonovan 3 days ago

computing achievements http://t.co/JIsYZcjB (via @gizmodo)
planetdonovan 3 days ago

RT @LiveScience: Newfound Alien Planet is Best Candidate Yet to Support Life, Scientists Say http://t.co/BKx8ToBT
planetdonovan 3 days ago

well, this is bound to be controversial http://t.co/j724XCTP (via @carolynporco)
planetdonovan 3 days ago

opposing the death penalty seems to be the unpopular point of view in south africa.
planetdonovan 4 days ago

started my day with a colossal database screw up - things can only get better from here.
planetdonovan 5 days ago

conspiracy theory of the day http://t.co/qy14T7Xx (clues: "cancer industry", "medical mafia")
planetdonovan 6 days ago