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...

Deprecated, reprecated, and prepcreatedcated

Development Comments

Sounds good to me.  Let's see:

Features that are in the standard, and have never been deprecated, are precated.

Features that have been deprecated, but aren't any more, are reprecated.

Features that aren't in the standard, but are (more or less) guaranteed to be in a future standard (the library TR, for example), are preprecated.

I like this group.  Not only can we invent new features for C++, we can invent them for English as well:-).

I'd suggest adding a couple more:

Features that nobody wants in the standard are antiprecated. Example: the comefrom statement.

Features that are of limited usefulness (in spite of a very long implementation time) but did make it in the standard shall be called placated. Example: <censored>.

The upcoming proposal to add multithreading to the standard is prepcreatedcated (the result of two threads writing "precated" concurrently).

Andrei

[Andrei Alexandrescu in comp.lang.c++.moderated]