Here are some things that I've done around the house that I've made available for download. As I build things, which may or may not be that often, I'll make them available here for download.
BlogEngine Extensions
The TopPosts.cs class performs in much the same way as Cristiano Fino's Top Commenters extension works, in fact it's based on his control and scaled down to simply provide a list of the top commented posts.
Implementation
- Place the TopPosts.cs file into your App_Code\Extensions folder
- Add the following to your site.master for the theme you are using:
<blog:TopPosts LastDays="0" MaxNumber="5" ID="TopPosts1" runat="server" />
Once you have done that, you will then get a list of the top commented posts. You can see it in action over to the right.
This is something I built for my own site that maybe another BlogEngine user might like. This will take your Top Dropper RSS feed from EntreCard and display the top number of entries you want. The feed is stored in the local datastore and retrieved from there until a certain number of hours pass. This is to cut down on cross server trips.
Implementation
- Place the class file into the App_Code\Controls folder
- Place the image file wherever you want to place the image, you'll refer to it via css
- Add the following to your theme's master page:
<blog:EntreCardTopDroppers
ID="EntreCardTopDroppers1"
runat="server"
FeedUrl="Insert your feed url here!"
UpdateHour="6"
WidgetTitle="Top Droppers"
WidgetTitleUrl="http://www.waynejohn.com"
rel=""
NumberOfItems="10"
target="_blank" />
FeedUrl: Your personal feed from EntreCard that contains the top droppers data.
UpdateHour: The number of hours to wait before the feed is refreshed.
WidgetTitle: The title of the control
WidgetTitleUrl: If supplied, will make the WidgetTitle a hyperlink that points to this supplied address
rel: Your friendly neighborhood nofollow tag?
NumberOfItems: The number of items to list
target: Provides the same value to all links target property
After setting all the properties and deploying, the first run will attempt to reach out and get the feed and then save it local. The duration of time to refresh this file is based on the saved files timestamp compared to the UpdateHour property.
You can also add the following to your CSS file to help speed things along.
/* EntreCard Top Droppers (td)*/
.tdDiv
{
width: 175px;background-color:Transparent;padding: 0 5 0 5;
margin-left: 10px;text-align: center;
}
.tdTitle
{
background-image:url(../../themes/yourtheme/images/topdropbg.png);
cursor: pointer; /* if used as a hyperlink */
color: #000;text-align:center;
}
.tdList {text-align:left;font-size: xx-small;}
.tdItem{margin: 0px 0px -5px 0px;}
How to find your Feed
You can find your Top Dropper feed from the EntreCard dashboard. When there, you'll see in the Quick Stats (last 30 days) area a link to more stats... Clicking through that, you'll find the Top card dropper report with a feed icon next to it. Grab that url and pop it in the FeedUrl property.
Support and Stuff
If you have any questions or need any help using any of these downloads, please feel free to contact me directly.