Convert Recent Posts Widget to HuffPost Style with Thumbnail

Topics: ASP.NET 2.0, Controls
Jun 2, 2011 at 9:08 PM

I would like to modify the RecentPost widget to look like this - Go to http://www.huffingtonpost.com and in the sidebar is the "Most Popular on Huffpost".

To make this happen I assume several things need to be done:

1. Add a field on the add_entry.aspx - allows the user to add photo of thumbnail. Add the necessary get , set code.

2. Add a column to the table in the database, dbo.be_Posts called something like RecentPostThumbs

3. Make layout adjustments in the code to compensate for the space of the thumbnail and also drop each post text to a line which wraps to 2 lines

4. Did I miss anything?

Any help would be awesome,

HelloJonnyOh

Coordinator
Jun 2, 2011 at 9:46 PM

I'd look at this widget first. If it doesn't feet your needs, at least you can see how it does similar things.

Jun 2, 2011 at 10:29 PM

How do I install this widget? It has multiple folders: "_rels" "content" and "package".

Jun 3, 2011 at 10:41 AM

Hello Jonny,

I understand that you need images in your post widget. I have created multi purpose post widget (AllInOnePostWidget) to achieve functionality. Please follow this link and let me know if you need something else.

Note: This widget fetch first image from your post and create thumbnail of it.

Coordinator
Jun 3, 2011 at 3:09 PM
HelloJonnyOh wrote:

How do I install this widget? It has multiple folders: "_rels" "content" and "package".

content = your blog's root.

Jun 3, 2011 at 4:07 PM

I get this error on line 244 in AllInOnePosts/widgets.ascx.cs:

c:\inetpub\wwwroot\blog.myretvi.com\widgets\AllInOnePosts\postdisplay.ascx(66): error CS0246: The type or namespace name 'Post' could not be found (are you missing a using directive or an assembly reference?)

This is what i have at the top of the page:

 

namespace Widgets.AllInOnePosts

{ 

 

using System;

using System.Collections.Generic;

using System.Collections.Specialized;

using System.Globalization;

using System.Text;

using System.Web;

using System.Web.UI;

using System.Linq;

using App_Code.Controls;

using BlogEngine.Core;

using Resources;

using BlogEngine.Core.Web.Controls;  

using BlogEngine.Core.Web.Extensions;

Jun 4, 2011 at 5:49 AM

which blog engine version you are using ?

This control is made for BE 2.0 or higher versions. The error which you are getting for Post, which is the default class available in blogengine Core.

Jun 6, 2011 at 7:33 PM
Edited Jun 6, 2011 at 7:50 PM

I am using BE 2.0 with SQL Database. I actually tried on another one of my live blogs running xmldataprovider and it worked fine. Is there an issue perhaps with the BE 2.0 running sqldatasource?

 I get this error:

 

error CS0246: The type or namespace name 'Post' could not be found (are you missing a using directive or an assembly reference?)

Jun 7, 2011 at 3:13 PM

I am using BE 2.0 with SQL Database. I actually tried on another one of my live blogs running xmldataprovider and it worked fine. Is there an issue perhaps with the BE 2.0 running sqldatasource?

 I get this error:

 

 

 

error CS0246: The type or namespace name 'Post' could not be found (are you missing a using directive or an assembly reference?)

Jun 7, 2011 at 6:27 PM

Sorry didnt looked it earlier.

I will check now and will get back to you.

Thanks for telling us.

Jun 7, 2011 at 7:31 PM

Thanks so much. I will await your word.

Jun 7, 2011 at 7:46 PM

I have updated the code and uploaded it on the same post. Please download the latest version.

Follow this post link

In your case you just need to update the file "widgets\AllInOnePosts\postdisplay.ascx".

Let me know if problem still persist.

Thanks,

http://www.blogenginewall.com