Bringing .Text v.96 further

.Text Comments

Almost one year ago I upgraded my .Text blog to .96. I blogged about it several times, my last post was about adding the rel="nofollow" attribute to links in comments.

Since then I've got several requests how to get the .96 sources and upgrade. One of them was Dave Burke. Yesterday he published the entire upgrade process. (Thanks, Dave, now I can forward all request to you ūüėČ ) BTW, he has done awesome improvements to .Text.

Today, I've got another request by Dennis van der Stelt. First, we talked about how I could provide him with my code base. But then I've got another idea. But first some points which lead me to it.

  • Since last summer Scott, the creator of .Text, works for Telligent, and now .Text¬†is¬†bundled with¬†nGallery and ASP.NET Forums¬†in Community Server. They are working¬†on version 1, currently beta 3 is published. I haven't tried CS yet, but I'm not sure whether I like it. I only want a simple blog engine, not a full bloated server.
  • There are many lone warriors like¬†Dave, Bob Roudebush, Chrissy LeMaire, or Dan Bartel, who have done minor or major tweaks to .Text, such as a solution against comment spam¬†or a webcam panel.
  • I don't know, how these others handle their .Text engine, but whenever I see an interesting improvement I try to adopt it in my code base. Currently, I'm incorporating Chrissy's anti-spam solution into my blog. I'm a developer and I love to code. But I¬†believe there are other bloggers who would like to use all these .Text improvements (at least a newer version of FreeTextBox like Dan did), but either don't want to mess with the code, or just don't know what sources are ūüėČ

Therefore, I thought about bringing the knowledge and dev power together. We could build and publish a new .Text release, .97 or whatever. I hope Scott or some others don't feel offended, because that's not my intention. As I said, I haven't tried CS yet, so I don't know neither how much of .Text is left in CS, what features are already implemented, and how difficult it is to incorporate mentioned "tweaks" into it.

So what do you think about it?

But maybe I'm completely on the wrong track, and Community Server it better than I fear ūüėČ

Add rel="nofollow" to .Text comments

Internet, .Text Comments

Today Google, Yahoo, MSN Search, and other search operators announced their support of the rel="nofollow" attribute for <a href="..." /> tags. Adding this attribute indicates the search crawlers, that the specific links should not contribute to the linked site's page rank. This might help fighting comment spam, since overwhelming blogs with comments containing links to any pharmaceutical site won't increase their search rank.

Whether this will help to fight comment spam or not, time will show. Anyway, I've written a small plug-in for .Text, which adds the mentioned attribute to all links in comments.

Some time ago Scott Watermasysk has described who to add custom entry handlers to .Text v.96. According to these instructions, my entry handler looks as follows:

public class NoFollowFormatHandler : IEntryFactoryHandler
{
    public NoFollowFormatHandler()
    {}
    public void Configure()
    {}
    public void Process(Entry entry)
    {
        entry.Body = ReformatLinks(entry.Body);
    }
    private string ReformatLinks(string text)
    {
        return text.Replace(
            "<a target=\"_new\" href=\"",
            "<a target=\"_new\" rel=\"nofollow\" href=\"");
    }
}

Afterwards, you have to add this handler to the event handler configuration section in your web.config, in fact after the default handler:

<EntryHandlers>
    <EntryHandler
        type="Dottext.Framework.EntryHandling.CommentFormatHandler, Dottext.Framework"
        postType="Comment" processAction="Insert" processState="PreCommit"
        isAsync="false" />
    <EntryHandler
        type="Dottext.NoFollow.NoFollowFormatHandler, Dottext.NoFollow"
        postType="Comment" processAction="Insert" processState="PreCommit"
        isAsync="false" />
    <EntryHandler
        type="Dottext.Framework.EntryHandling.CommentDeliveryHandler, Dottext.Framework"
        postType="Comment" processAction="Insert" processState="PostCommit"
        isAsync="true" />
    ...

That's it. You may either download the source code, or just get the compiled assembly and copy it to your bin folder. Add the handler in the web.config, and all links in new comments will have the rel="nofollow" attribute.

Be aware, that this solution targets .Text v.96 only. V.95 does not have entry handlers, so please don't bother me with asking for a .95 version.

Broken Start Menu

Tips 'n Tricks Comments

Broken Start Menu

Every now and then my start menu is broken. I.e. the left area normally showing last used applications is black, and sub menus for items such as "All Programs", "Administrative Tools" do not open.

Google led me to this forum thread, where they blame the Logitech Webcam Software, so I've uninstalled this. I hope this will help...