Making things clearer

.Text Comments

Hell, I've got lots of feedback about my previous post. Some commented in the blog, others send me private mails. Many questions arised. Therefore, I think I have to make my point clearer.

First of all, I don't want to publish my own release of .Text. I'm not the owner of .Text. That's Scott. He did an awesome job, and I don't want to take credits of it. I love coding, and I love to learn. And I've learnt alot from the excellent architecture of .Text.

The intention of my post was more that there are many developers who did really cool changes to .Text. Let's call them mods (the changes, not the developers). Many of them have changed major parts of the code base, so they are not compatible anymore. It's not easy anymore for one to adopt changes made by another one.

On the other hand, many bloggers are using the binary release of .Text. They are no developers, they don't want to make any changes to sources, they just want to use the binaries.

My original idea was to bring all of them together. Making it more easy to exchange mods for the developers, and giving non-developers the chance to benefit from the mods. (Someone already mailed me that he gets paid for customizing .Text, so he's not very responsive about the latter 😉 )

That's what I tried to express.

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.