Scott on Writing

Musings on technical writing...

Enhancing Your .Text Blog - Allowing Readers to Rate Blog Entries

One of the things I really like about .Text is just how easy it is to customize and enhance it. Of course, the complete source is available, so you can customize to your heart's content, but I'm talking about customizing it without modifying the source and recompiling. I've had past blog entries about customizing and digging into .Text (see Giving .Text a Calendar View and Analyzing your .Text Blog), and wanted to share my latest enhancement here on ScottOnWriting.NET: the ability for readers to rate a blog entry and leave feedback on why they made their rating (just like how MSDN's online articles have a “Rate this feedback“ section at the end of each article). The end result, you'll agree, looks pretty much just like Microsoft's rating interface, save that mine only allows you to rate from 1 to 5 instead of 1 to 9. It uses cookies to do a half-assed effort at ensuring that folks only rate a blog entry once.

If you're interested in adding this rating User Control to your .Text blog, I'll have the source for the User Control and an article discussing it on 4Guys sometime next week. What is cool about .Text (at least .Text 0.94, the version I'm using) is that the page layouts are specified in User Controls themselves (in the /Skins/skinName/Controls/ directory). This means that I could, with just a quick edit in Notepad, adjust the main page so that after each blog entry in addition to the Feedback (xxx) link, there's also a Rate Entry link, which will take you directly to the interface to link the blog entry.

The natural extension to this would be to allow users to read / view the most popular (and perhaps least liked) posts...

(The Rate Entry option is only available by visiting the ScottOnWriting.NET Web site directly. I guess I could attempt to embed the necessary HTML into the RSS feed, but I doubt I'll do that, since for that (I believe), I will need to edit the .Text source and recompile/redeploy.)

posted on Thursday, April 15, 2004 4:12 PM

Feedback

# Votare i blog post pi 4/16/2004 8:18 AM Alberto Falossi's Blog (Italiano)

# re: Panopticon Central's greatest hits 4/16/2004 11:42 PM Panopticon Central

# Follow-Up to Allowing Readers to Rate Blog Entries 4/19/2004 12:27 PM Scott on Writing

# Enhancing Your .Text Blog - Allowing Readers to Rate Blog Entries 4/23/2004 12:10 PM you've been HAACKED

# Enhancing Your .Text Blog - Allowing Readers to Rate Blog Entries 4/23/2004 12:12 PM you've been HAACKED

# The Highest Rated Entries 4/30/2004 11:54 AM Scott on Writing

# re: Enhancing Your .Text Blog - Allowing Readers to Rate Blog Entries 5/5/2004 9:30 PM Peter Provost

Since you are targeting .TEXT, you could use this to get the ContentID and then you wouldn't have to make any changes to the rest of the .TEXT codebase.

public int ContentID
{
get
{
string filePath = Request.Url.Segments[ Request.Url.Segments.Length - 1 ];
string contentIdString = filePath.Split('.')[0];
return Int32.Parse( contentIdString );
}
}

# Let Users Rate Your .Text Posts 5/29/2004 8:02 PM RoudyBob.NET

# Comment Spam Script Gone Awry 3/6/2005 9:59 PM Scott on Writing

# Giving a CAPTCHA a Whirl 7/11/2006 6:21 PM Community Blogs

Comment spam is evil. I've been getting on the tune of 25-50 comment spams per day the past several weeks.

Title:  
Name:  
Url:
Protected by Clearscreen.SharpHIPEnter the code you see:
Comments   

My Links

Ads Via DevMavens

Archives

Post Categories

 

I am a Microsoft MVP for ASP.NET.
I am an ASPInsider.
<July 2009>
SMTWTFS
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678

Comment Stats

DayTotal% of Total
Sunday 2046.9%
Monday 42314.3%
Tuesday 50116.9%
Wednesday 54518.4%
Thursday 57219.3%
Friday 53618.1%
Saturday 1856.2%
Total 2966100.0%

Hour1Total% of Total
12:00 AM 752.5%
1:00 AM 802.7%
2:00 AM 672.3%
3:00 AM 812.7%
4:00 AM 642.2%
5:00 AM 1234.1%
6:00 AM 1153.9%
7:00 AM 1755.9%
8:00 AM 1876.3%
9:00 AM 1565.3%
10:00 AM 1866.3%
11:00 AM 1926.5%
12:00 PM 1996.7%
1:00 PM 1846.2%
2:00 PM 1675.6%
3:00 PM 1344.5%
4:00 PM 1153.9%
5:00 PM 1063.6%
6:00 PM 993.3%
7:00 PM 1063.6%
8:00 PM 903.0%
9:00 PM 842.8%
10:00 PM 893.0%
11:00 PM 923.1%
Total 2966100.0%

Comments by Blog Entry Date/Time

Day Entry MadeAvg.Total
Sunday 4.91157
Monday 4.92379
Tuesday 4.21471
Wednesday 7.42668
Thursday 6.53666
Friday 5.17450
Saturday 4.73175
Total 5.522966

Hour1 Entry MadeAvg.Total
12:00 AM 5.2937
1:00 AM 1.002
5:00 AM 0.000
7:00 AM 4.0048
8:00 AM 4.29133
9:00 AM 6.04290
10:00 AM 5.83274
11:00 AM 4.36192
12:00 PM 6.44348
1:00 PM 3.14132
2:00 PM 5.04227
3:00 PM 7.97303
4:00 PM 3.8199
5:00 PM 6.00168
6:00 PM 4.56114
7:00 PM 8.95188
8:00 PM 8.58163
9:00 PM 5.00115
10:00 PM 6.31101
11:00 PM 4.5732
Total 5.522966

Learn More About Comment Stats
1 - All times GMT -8...


Blog Stats

Favorite Web Sites

My Books

My MSDN Articles