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.
<March 2010>
SMTWTFS
28123456
78910111213
14151617181920
21222324252627
28293031123
45678910

Comment Stats

DayTotal% of Total
Sunday 2056.8%
Monday 42514.1%
Tuesday 51917.2%
Wednesday 55518.4%
Thursday 58019.2%
Friday 54718.1%
Saturday 1886.2%
Total 3019100.0%

Hour1Total% of Total
12:00 AM 782.6%
1:00 AM 812.7%
2:00 AM 682.3%
3:00 AM 822.7%
4:00 AM 692.3%
5:00 AM 1264.2%
6:00 AM 1183.9%
7:00 AM 1816.0%
8:00 AM 1926.4%
9:00 AM 1585.2%
10:00 AM 1886.2%
11:00 AM 1936.4%
12:00 PM 2016.7%
1:00 PM 1846.1%
2:00 PM 1695.6%
3:00 PM 1354.5%
4:00 PM 1153.8%
5:00 PM 1073.5%
6:00 PM 1013.3%
7:00 PM 1073.5%
8:00 PM 923.0%
9:00 PM 882.9%
10:00 PM 913.0%
11:00 PM 953.1%
Total 3019100.0%

Comments by Blog Entry Date/Time

Day Entry MadeAvg.Total
Sunday 4.97159
Monday 4.80384
Tuesday 4.04477
Wednesday 7.39680
Thursday 6.26676
Friday 5.07466
Saturday 4.78177
Total 5.403019

Hour1 Entry MadeAvg.Total
12:00 AM 5.2937
1:00 AM 1.002
5:00 AM 0.000
7:00 AM 3.8550
8:00 AM 3.72134
9:00 AM 6.06297
10:00 AM 5.63276
11:00 AM 4.22194
12:00 PM 6.16351
1:00 PM 3.09133
2:00 PM 4.89230
3:00 PM 7.64321
4:00 PM 4.00108
5:00 PM 6.07170
6:00 PM 4.64116
7:00 PM 8.95188
8:00 PM 8.63164
9:00 PM 5.00115
10:00 PM 6.31101
11:00 PM 4.5732
Total 5.403019

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


Blog Stats

Favorite Web Sites

My Books

My MSDN Articles