Two weeks ago Telligent published the second beta of their upcoming new product Graffiti. It is a simple lightweight content management system. And by simple I don't mean lame. Far from it! It is simple in the sense of easy deployment, management, and publishing.
Additionally it's easy to extend. Keyvan, who I got to know and appreciate while working on the Community Server Modules, already wrote several extensions for Graffiti. To wrap up all his addons and provide a simple installation experience he started the Graffiti Extras project on CodePlex. And he was kind enough to accept me as a contributor.
So here it is, my first extension for Graffiti. In fact, I was inspired by Danny Douglass' Social Bookmarks extension for BlogEngine.NET. It enables you to link your posts to some of the most popular social bookmarking sites. The image to the right depicts an exemplary post with the extension rendered below.
Implementation
The Sharing extension is implemented as a so called chalk. Think of chalks as of macros. How to write your own chalk is well-documented, so I won't describe how I implemented the Sharing extension. If you want to have a look at the sources, go to the GraffitiExtras project on CodePlex and either download them or browse them online.
Installation
To install the Sharing chalk (and all other extensions provided in Graffiti Extras) download the attached ZIP File. This archive contains two root folders: in the bin folder you can find the GraffitiExtras.dll which you must drop into the bin folder of your Graffiti installation. The second folder, sharing-images, contains two flavors of icons in different sizes (16x16, 24x24, 32x32, and 48x48) for several social bookmarking sites (original icons are provided by FastIcon). Either copy that folder entirely or only the desired flavor/sizes somewhere to the Graffiti web folder.
Usage
To add the sharing extension to your posts, you just have to add a single line to your theme file:
$sharing.Write($post, "<image folder>")
Replace image folder with the path to the desired images. E.g. if you have copied the entire sharing-images folder to the root of your web application, and you want to see the round images with a size of 16x16, you would add following line:
$sharing.Write($post, "/sharing-images/circle/16x16/")
By default the different images are separated by a non-breaking space ( ) but you can change that with the optional third parameter:
$sharing.Write($post, "<image folder>", " | ")
A couple of days ago Jan Welker launched a new German .NET related community site, .NET-Forum.de. I didn't expect the developsphere to require just another site, but there are already 51 users registered, even though the site wasn't advertised anywhere except the dotnet-snippets.de newsletter.
Jan set up Community Server 2007.1 to drive the site (Did you know that .NET related non-profit communities may receive a free license?) I try to support Jan whenever he experiences issues with CS or has a configuration question. So for me it's an appreciated opportunity to get to learn CS's forum capabilities (Till now I only used the blogging part.)
I wish Jan success, and maybe this post will lead some more people to his site.
Most you will probably know about Extension Method introduced with C# 3.0. If not, I strongly recommend to read ScottGu's explanation.
Anyway, a couple of days ago Brad Wilson posted an experiment:
What I wasn't sure was whether or not you could call these extension methods
when you have a null instance of the object, since they're instance methods. The
C++ guy in me said "sure, that should be legal", and the C# guy in me said "it's
probably illegal, and that's too bad". Amazingly, the C++ guy in me won!
This code executes perfectly:
using System;
public static class MyExtensions {
public static bool IsNull(this object @object) {
return @object == null;
}
}
public class MainClass {
public static void Main() {
object obj1 = new object();
Console.WriteLine(obj1.IsNull());
object obj2 = null;
Console.WriteLine(obj2.IsNull());
}
}
When you run it, it prints out "False" and "True". Excellent!
When I read that I immediatley thought of another application. I guess all my readers are familiar with String.IsNullOrEmpty which was introduced with .NET 2.0. So I asked myself if you can make IsNullOrEmpty a parameterless extension method:
using System;
public static class MyExtensions
{
public static bool IsNullOrEmpty(this String s)
{
return String.IsNullOrEmpty(s);
}
}
public class MainClass
{
public static void Main()
{
string s1 = "Hello world";
Console.WriteLine(s1.IsNullOrEmpty());
string s2 = null;
Console.WriteLine(s2.IsNullOrEmpty());
}
}
Again, it prints out False and True. And in my opinion this syntactic sugar looks much more elegant than the ordinary String.IsNullOrEmpty(s2).
If only C# would support extension properties...
After more than 8 years I´ll leave my current employer Cycos by the end of this year. Starting 1/1/08 I'll work as a Senior Software Developer at Proximity (international website.)
Cycos is my first employer, I started here right after university in 1999. Originally I didn't plan to stay that long here but 5 years at maximum. However, because the work was so diversified and the working atmosphere so prolific, I stayed some years longer.
E.g. I was delegated to Munich and San Jose (CA) for several month each, and they paid me the attendances and expenses for both PDC´03 and ´05 in LA. In other words, I can´t accuse myself of being inflexible or inmobil. And it was always fun working at Cycos. I´ll be contended if the working atmosphere at my new job is half as prolific as I got to know it in the past.
However, after 8 years it´s time for a change. Most of my time at Cycos I wrote proprietary software, mainly clients for computer telephony integration. In contrast, at Proximity I will leverage Microsoft products such as MOSS and BizTalk, i.e. areas I don´t have a clue about where I can gain experience. But don´t get me wrong, I´m really looking forward for the new job.
And I´m not only changing the employer, but the town as well. I´ll move to Hamburg, which is 500 km away from Würselen/Aachen (for my American friends: that´s about 310 miles). Therefore the search of a new domicile has my highest priority at the moment. I have 18 paid leave days left, and I want to complete my relocation this year. So this blog will stay quite silent the next few weeks. But stay tuned, I´ll keep you informed.
Now Germany has its own Mix conference, though here Microsoft calls it Xtopia. It will cover Silverlight, WPF, the Expression suite, and much more. It will take place in Berlin from 10th to 12th of October (if you include the post-conference on Friday).
I'll go to Berlin tomorrow already, and stay until Saturday. My Hotel is the Quality Hotel & Suites Berlin City East. If you want to join me for a beer or two, drop me a line or call me at +49 (173) 285 21 81. Lars, I'm expecting your call.
Today I upgraded Firefox to 2.0.7, which fixes a flaw in the QuickTime plugin. However, after the upgrade Firefox didn't load any of the extensions I have installed
Fortunately I found this thread in the support forum. Simply delete extensions.ini, extensions.cache, and extensions.rdf from your profile folder. On its next start Firefox will scan for installed extansions and regenerate these files.
I hope this post will be indexed properly so you can find this information faster than me.
If you have tried to leave a comment on my site in the last two days, you may have noticed that they weren’t accepted. Here is why:
Because the rate of incoming spam decreased dramatically after I implemented the Honeypot CAPTCHA on this site, I wondered if I could really give that solution the credit. Therefore I entered a comment myself to check it. And what happened? Nothing! Instead, that small red asterisk appeared next to the comment field, indicating that nothing was entered. WTF? I did enter some text! Garbage, I admit, but at least a few characters. Then I remembered that I switched the identifiers of the regular comment text box and the honeypot box. Then I had a sneaking suspicion, and I quickly checked post.aspx. My apprehension proved true: I have forgotten to point the RequiredFieldValidor to the other identifier! So as long as you didn't fill in the hidden honeypot, you couldn't post your comment. How stupid is that? The ironic side of the story is, that only comment spammers were able to cross that barrier, just to get marked as spam instantly afterwards.
Anyway, it’s fixed by now, and your comments are welcome (again)!
A few days ago Phil Haack wrote about Honeypot Captcha:
At the same time, spam bots tend to ignore CSS. For example, if you
use CSS to hide a form field (especially via CSS in a separate file),
they have a really hard time knowing that the field is not supposed to
be visible.
To exploit this, you can create a honeypot form field that should be left blank and
then use CSS to hide it from human users, but not bots. When the form
is submitted, you check to make sure the value of that form field is
blank.
A great idea, which didn’t occur to me before. And Phil wasn’t even the first one with that idea.
I
added a “regular” captcha control to my site some time ago, but removed
it again after a couple of days. Why burden the innocent commentor?
He’s not the problem. The comment spammers are.
So I took the idea of the honeypot and leveraged Community Server’s spam filtering capabilities.
First, I replaced the original Community Server’s WeblogPostCommentForm with my own version by simply copying it to my own assembly. (If you
build CS from the SDK, you can also just edit the existing one.)
- Added the private member
private TextBox HoneyPot;
- Added the property HoneyPotTextBoxId, which references the actual TextBox in the form:
public string HoneyPotTextBoxId
{
get { return ((string)ViewState["HoneyPotTextBoxId"]) ?? string.Empty; }
set { ViewState["HoneyPotTextBoxId"] = value; }
}
- Added following lines to the method AttachChildControls:
HoneyPot = WeblogControlUtility.Instance().FindControl(this, HoneyPotTextBoxId) as TextBox;
StringBuilder sb = new StringBuilder();
sb.AppendLine("\n<script type=\"text/javascript\">");
sb.AppendLine("document.getElementById(\"" + HoneyPot.ClientID + "\").style.display = \"none\";");
sb.AppendLine("</script>");
CSControlUtility.Instance().RegisterStartupScript(HoneyPot,typeof (TextBox), "honeypot", sb.ToString(), false);
You see that the honeypot field is hidden dynamically via
JavaScript. No CSS is giving a hint to the spammer that the control
will not be visible. Instead, as soon as the page is loaded, the textbox will be hidden programmatically.
- Added following lines in Submit_Click right before WeblogPosts.Add is called:
if (!string.IsNullOrEmpty(HoneyPot.Text))
{
EventLogs.Info("Spammer entered \"" + HoneyPot.Text + "\" in the honey pot", "Spam Rules", 0);
c.SetExtendedAttribute("GotchaInMyHoneyPot", "trapped");
}
So whenever the honeypot textbox is filled in, the comment gets an extended attribute named GotchaInMyHoneyPot.
Now this new form must be used on the actual page. There’s only one
page (per theme), which allows visitors to leave comments, which is post.aspx. Unfortunately, this must be done for every theme.
So open post.aspx and replace the original WeblogPostCommentForm with our new one, add the HoneyPotTextBoxId attribute to the form, and add the textbox. Don’t forget to use the same id for the textbox (this example uses tbBody, which shouldn’t ring a bell for the spammer.) Here’s the modified form declaration from the PaperClip theme:
<tfr:HoneyPotWeblogPostCommentForm runat="server" ValidationGroup="CreateCommentForm"
MessageTextBoxId="tbComment"
NameTextBoxId="tbName"
RememberCheckboxId="chkRemember"
SubjectTextBoxId="tbTitle"
SubmitButtonId="btnSubmit"
UrlTextBoxId="tbUrl"
ControlIdsToHideFromRegisteredUsers="RememberWrapper"
HoneyPotTextBoxId="tbBody"
>
<SuccessActions>
<CSControl:GoToModifiedUrlAction runat="server" QueryStringModification="CommentPosted=true" TargetLocationModification="commentmessage" />
</SuccessActions>
<FormTemplate>
<fieldset id="commentform">
<legend><CSControl:ResourceControl runat="server" ResourceName="Weblog_CommentForm_WhatDoYouThink" id="rc_think"/></legend>
<p />
<div><CSControl:FormLabel runat="server" ResourceName="Title" LabelForId="tbTitle" /> <em>(<CSControl:ResourceControl runat="server" ResourceName="Required"/>)</em><asp:RequiredFieldValidator runat="server" ErrorMessage="*" ControlToValidate="tbTitle" ValidationGroup="CreateCommentForm" /></div>
<div><asp:TextBox id="tbTitle" runat="server" CssClass="smallbox" ValidationGroup="CreateCommentForm" /></div>
<p />
<div id="NameTitle" runat="server"><CSControl:FormLabel LabelForId="tbName" runat="server" ResourceName="Weblog_CommentForm_Name" /> <em>(<CSControl:ResourceControl runat="server" ResourceName="Required" />)</em><asp:RequiredFieldValidator runat="server" ErrorMessage="*" ControlToValidate="tbName" ValidationGroup="CreateCommentForm" /></div>
<div id="NameDesc" runat="server"><asp:TextBox id="tbName" runat="server" CssClass="smallbox" ValidationGroup="CreateCommentForm" /></div>
<p />
<div><CSControl:FormLabel runat="server" LabelForId="tbUrl" ResourceName="Weblog_CommentForm_YourUrl" /> <em>(<CSControl:ResourceControl runat="server" ResourceName="Optional" /></em>)</div>
<div><asp:TextBox id="tbUrl" runat="server" CssClass="smallbox" ValidationGroup="CreateCommentForm" /></div>
<%-- the honeybot textbox --%>
<asp:TextBox id="tbBody" runat="server" CssClass="smallbox" ValidationGroup="CreateCommentForm" />
<p />
<div><CSControl:FormLabel LabelForId="tbComment" runat="server" ResourceName="Weblog_CommentForm_Comments" /> <em>(<CSControl:ResourceControl runat="server" ResourceName="Required" />)</em><asp:RequiredFieldValidator runat="server" ErrorMessage="*" ControlToValidate="tbComment" ValidationGroup="CreateCommentForm" /></div>
<div><asp:TextBox id="tbComment" runat="server" Rows="5" Columns="25" TextMode="MultiLine" ValidationGroup="CreateCommentForm" /></div>
<asp:PlaceHolder runat="server" id="RememberWrapper">
<p />
<div><asp:CheckBox id="chkRemember" runat="server" Text="Remember Me?" ValidationGroup="CreateCommentForm"></asp:CheckBox></div>
</asp:PlaceHolder>
<p />
<asp:Button id="btnSubmit" runat="server" Text="Submit" ValidationGroup="CreateCommentForm"></asp:Button>
</fieldset>
</FormTemplate>
</tfr:HoneyPotWeblogPostCommentForm>
But that´s only the first half. Now whenever
the honeypot field is filled with some text the comment will have an
extended attribute GotchaInMyHoneyPot.
The second step is to give the comment “spam points”, which is done by a CS spam rule. Keyvan Nayyeri published a complete tutorial how to write your own spam rules, so I won’t get into details. Here’s the complete code for the new rule:
public class HoneyPotRule : BlogSpamRule
{
private static readonly Guid _ruleId = new Guid("57E216D4-D100-468d-BB37-1B7A0A103CEF");
private const int _defaultPoints = 10;
public override ArrayList GetAvailableSettings()
{
ArrayList list = new ArrayList();
list.Add(new RuleSetting(_ruleId, "points", "Points", _defaultPoints.ToString()));
return list;
}
public override int CalculateSpamScore(WeblogPost weblogPost, CSPostEventArgs e)
{
if (weblogPost.BlogPostType == BlogPostType.Comment)
{
if (!String.IsNullOrEmpty(weblogPost.GetExtendedAttribute("GotchaInMyHoneyPot")))
{
EventLogs.Info("A spammer fell for the honey pot", "Spam Rules", 0);
return Globals.SafeInt(GetSettingValue("points"), _defaultPoints);
}
}
return base.CalculateSpamScore(weblogPost, e);
}
public override string Name
{
get { return "HoneyPot"; }
}
public override string Description
{
get { return "HoneyPot description"; }
}
public override Guid RuleID
{
get { return _ruleId; }
}
}
I’m running this solution for a couple of days now on my site, and it works pretty well. It’s amazing how many spam bots fill each and every textbox they can find. But I admit that a lot of steps are involved in my solution, there’s lot of programming required. However, I decided against publishing an all-inclusive package, because I’d like to add this solution to next release of either the CSMVP CSModules or Community Server Stuff. So either follow my instructions above, wait for an official release, or leverage Phil’s honeypot control which is part of the Subkismet project (not released yet too, but you can already get the sources.)
In my nrw07 talk I promised that I would publish my slides. Originally they´re German, so I translated them first (no, it did not take me two weeks to translate them
). Here they are:
CustomizingCommunityServer - en.pptx
Last Friday the nrw07 took place in Wuppertal, the biggest community
conference in North Rhine-Westphalia. About 100 attendees including
the 22 speakers! The Diebels brewery contributes a couple of beer
crates, and Subway served lots of sandwiches for lunch.
And I was deflowered twice on that day.
First, it was my very first talk! I gave a Community Server
presentation a couple of month ago at our local .NET UserGroup, and
the other guys suggested that I should repeat that at the nrw07.
Unfortunately, I didn´t object enough.
When I sat in the hotel lobby with some other speakers the night
before nrw07, I started getting nervous, but they managed to calm me
down (or was it the beers we had?). The next day was fine, my talk was one of the first. It ran pretty well (as far as I am
concerned). Of course we experienced the usual technical difficulties
such as a projector, whose picture was twice as large as the screen and not resizable. Although I got the second largest room in the facility,
there were only 7 attendees. Seems to me as Community Server is not of
interest for everyone. The good thing about that is that those folks
already knew CS, so I didn´t have to start at square one, but instead
dive right into the technical stuff. The time flew, I ran over about
10 minutes and had still enough material for another hour. Nevertheless my talk can not have been that bad because the audience asked the right questions afterwards. I hopethink that´s a good sign.
My second premiere happened later that night, when Craig Murphy
interviewed me for a podcast (not aired yet). At that point in time I
already had a couple of beers, so it went quite smooth. It´s
self-evident that we talked much about Community Server. Because I
mentioned Twitter in my talk, Craig took me up on that, and somehow we
drifted into social networking, a topic I´m quite interested in. Even
when the podcast was over, we continued the discussion.
To sum it up, it was a great event, where I met many smart people.
Many thanks to the orga team, Stephan Oetzel and Daniel Fisher!
And now that I lost my virginity, I´m looking forward to give a talk
again next year (assumed they let me on stage ever again)
Here are some other speakers and attendees blogging about nrw07:
I met some more nice guys, who didn´t blog about this event. Nevertheless I´d like to send them my regards because we had such a good time and talks: Andreas Hoffmann, Christian Schütz, Mischa Hüschen, Pascal Kremmers, Constantin Klein, Marcel Gnoth, and Marcel Franke. Sorry if I forgot one, there were so many faces new to me. When you see me next time, just stop by and treat me to a beer...
Update: Craig uploaded a video he took in the Gaming Lounge. HP placed several laptops so we could play some tracks of NFS:Most Wanted and NSF:Carbon:

JetBrains released ReSharper 3.0:
ReSharper 3.0 is finally out and it’s better than ever. C#, VB.NET, XML, XAML or
ASP.NET - we got it all for you right here!
You simply owe it to yourself
to test-drive this baby and learn a whole new way to code in Visual
Studio!
Get the dirty low-down on ReSharper 3.0 at New
Features or use one of the links below:
Grab a free 30-day evaluation of ReSharper at http://www.jetbrains.com/resharper/download/index.html
Some weeks ago I posted a CC.NET task which pushes build results to a blog using the MetaWeblogAPI. This might be a feasable solution for projects which sources aren’t updated that often. Otherwise that blog would be really cluttered, and you won’t be able to keep track of all the build results.
Several month ago a new social networking site started called Twitter. It offers a kind of micro-blogging service, allowing its users to send text-only stati, up to 140 characters long. Whenever you update your status, it is delivered instantly to other users who have put you to their “friends” list. Though you can receive the updates of your friends via an RSS feed, it is more common to either use Twitter’s website or a desktop client such as TeleTwitter. Additionally, Twitter offers a RESTful API.
Therefore it was pretty obvious to write a CC.NET task which announces new build results on Twitter. The project manager creates a special Twitter account and configures CC.NET to post build results as updates for that user. The developers then just have to add that user to their friend list, and will get the announcements in the Twitter front-end of their choice.
The attached ZIP file contains both the sources and the compiled assembly, which you have to dump into CC.NET’s server directory. The configuration of the task is pretty easy, just specify the user and the password of the Twitter account.
<publishers>
...
<twitter>
<user>username</user>
<password>password</password>
</twitter>
...
Yesterday a new version of the CSMVPs CSModules package was released. Except the new LinkManager (which enables you to add customizable attributes to links in your posts automatically) it´s mainly a technical refresh targeting CommunityServer 2007 (SP1).
Read the full announcement is available on the CS MVP site.
Some time ago I wrote a blog publisher for CruiseControl.NET, but didn't manage to blog about it. In fact, it totally slipped my mind. However, my machine behaves more and more weird lately, so I started to clean up the hard disks and back up all my data. So today it happened that I stumbled over my old blog publisher and finally posted it here.
Background: CruiseControl.NET (CC.NET) is a continuous integration server for .NET. Publishers are tasks that are executed by CC.NET after a build is done, and are primarily used to report the build results, e.g. by sending emails.
There are instructions on how to write your own publisher available, so I created one which posts the build results to a blog. It stood to reason to access the blog using MetaWeblog API. Fortunately, Charles Cook wrote the XML-RPC.NET library, so my publisher degenerated to a simple gateway 
The installation is simple: just drop the assemblies from the ZIP file to the server folder of CC.NET and restart the server. CC.NET uses a fixed naming scheme to find all extensions, that's why the assembly has that weird name ccnet.BlogPublisher.plugin.
The minimal configuration just takes details required to access a particular blog:
<publishers>
...
<blog>
<url><a href="http://localhost/MetaWeblog" class="linkification-ext" title="Linkification: http://localhost/MetaWeblog">http://localhost/MetaWeblog</a> url</url>
<blog>blog</blog>
<username>username</username>
<password>password</password>
</blog>
With this configuration the publisher uses the default XSL files to transform the build results before posting them. But if you want to change the content of the blog post, you can specify which XSL files sould be used. Additionally you can specify categories for the post:
<publishers>
...
<blog>
<url><a href="http://localhost/MetaWeblog" class="linkification-ext" title="Linkification: http://localhost/MetaWeblog">http://localhost/MetaWeblog</a> url</url>
<blog>blog</blog>
<username>username</username>
<password>password</password>
<categories>
<category>category 1</category>
<category>category 2</category>
</categories>
<xslFiles>
<xslFile>xsl\header.xsl</xslFile>
<xslFile>xsl\modifications.xsl</xslFile>
<xslFile>xsl\msbuild2ccnet.xsl</xslFile>
</xslFiles>
</blog>
The assembly is built with .NET 2.0, but it shouldn't be too difficult to change that. I even put the .NET 1.1 version of XML-RPC.NET into the ZIP file.
Brendan Tompkins released CAPTCHA for CommunityServer 2007:
I'm happy to announce that CodeBetter.Com is carrying on the legacy of CAPTCHA
for Community
Server. CAPTCHA for CS2007 is the next generation of CS Guru Dave
Burke's most excellent CAPTCHA control for
Community Server 2.1. This
version is implemented as a Control Adapter which allows CAPTCHA to be added
to Community Server site-wide without touching any ASPX or ASCX markup code.
You
can get the dll and source code here.
The installation is pretty easy since Brendan leverages the same technique as I did for my CS2007 coComment support: by using ControlAdapters not a single page or control must be touched.
In the past I always hesitated to use CAPTCHA on my blog because it´s an additional obstacle a commenter must overcome. Adding this hurdle seemed like a capitulation. But because spam has taken the upper hand over all comments I get, and CAPTCHAs are commonly used everywhere so the regular visitor is used to them, I´ll give it try and add Brendan´s CAPTCHA to my blog.
Mark August 24th 2007 in your calendar. On that date we (Just Community e.V.) stage nrw07, the largest community event 2007 in North Rhine-Westphalia.
This year it will take place in Die Börse in Wuppertal.
List of Speaker and agenda are not finished yet, but we'll promise it will be a top-class conference.
Don't miss it!
Every day you can learn something new. Today it was Scott who taught me ControlAdapters after he read my post about coComment with CommunityServer 2007. You know, ControlAdapters are not only good for tweaking CSS.
My original solution was a replacement for the WeblogPostCommentForm, i.e. for every blog theme you had to edit its post.aspx, register my new control and replace the original control.
ControlAdapters however give you the power to inject your code into any desired existing control. In a central file you specify which controls you want to customize, and that's it. No editing of any pages or controls is required.
So I took the chance and transformed my custom comment form into a ControlAdapter. In fact, it's as easy as writing a control. Here's the simplified code, just in case you're interested:
public class WeblogPostCommentFormAdapter : ControlAdapter
{
protected override void OnPreRender(EventArgs e)
{
base.OnPreRender(e);
WeblogPostCommentForm commentForm = base.Control as WeblogPostCommentForm;
if (commentForm != null)
{
string coCommentScript = GetCoCommentScript(commentForm);
if (!String.IsNullOrEmpty(coCommentScript))
CSControlUtility.Instance().RegisterStartupScript(base.Control,
typeof (WeblogPostCommentForm), "cocomment", coCommentScript, false);
}
}
private static string GetCoCommentScript(WeblogPostCommentForm commentForm)
{
// just boring stuff which creates the javascript code to make coComment happy
}
}
Just drop the attached assembly to your ~/bin folder and add following line to the controlAdapters section in ~/App_Browsers/default.browser:
<adapter controlType="CommunityServer.Blogs.Controls.WeblogPostCommentForm"
adapterType="ThomasFreudenberg.CS2007.WeblogPostCommentFormAdapter, ThomasFreudenberg.CS2007" />
That's all, without further editing of any files1 coComment support is enabled for all blog themes automagically.
1 unless of course if you're already using the assembly I published yesterday; in this case revert all changes done to your post.aspx'
If you are one of my two regular readers, you may have noticed that I published many posts regarding coComment. In fact, I published instructions to integrate coComment in original CommunityServer and CS2.1SP1 (for CS2.0 and CS2.1 Keyvan was faster than me
)
(if you think I write so much about coComment is because I love it so much, you totally missed the point of my blog)
Anyway, if you follow the old instructions you'll see that there's bunch of script code you have to add to your blog theme. Unfortunately, that solution does not work anymore with CS 2007, because the controls in the comment form are wrapped in a new Chameleon control. I did not see a chance to access the ids of the contained controls and continue the old solution with my limited ASP.NET knowledge.
Instead, I developed another solution. I simply inherited a new control from WeblogPostCommentForm, where I have all access to the contained elements. And up to now I didn't know how easy it is to add some script in your code to be added to the rendered HTML
Long story short, here's my solution for coComment support in CS2007:
- Drop the attached ThomasFreudenberg.CS2007.dll into your ~/bin folder.
- Open post.aspx of your desired blog theme
- Add following line right after the imports:
<%@ Register TagPrefix="TFr" Namespace="ThomasFreudenberg.CS2007"
Assembly="ThomasFreudenberg.CS2007" %>
- Replace <CSBlog:WeblogPostCommentForm … with <TFr:WeblogPostCommentForm …
- and </CSBlog:WeblogPostCommentForm> with </TFr:WeblogPostCommentForm>
In fact, for me as a non-web developer that approach seems much more natural to me than adding fancy instructions in the web control.
This site has been upgraded to CommunityServer 2007 (I guess visitors to my site do know CommunityServer, and they already read the
announcements.) Of all all CS MVPs, I am again late to the party
The upgrade was pretty easy. I spent about 2 hours on it, mainly because of my limited upload bandwidth. However, I had to create a new CS2007 package, because all the cool
extensions I used for my old installation are not yet released for
CS2007. But don´t worry, the CS MVPs are busy upgrading the CSMVP
CSModule package.
I started to create my own theme a couple of weeks ago, but because of lack of time and CSS experience, it’s not finished yet. Therefore my site still looks the same as before.
BTW, Starting with CS 2007 there´s a new distributable called “One-Click Install”. This package is a kinda XCOPY distribution, using Cassini and a file-based database. It's great for developers because you neither need to configure IIS nor the SQL Server.
Generally I limit my posts to programming stuff, but after I read Kathy Sierra’s Death threats against bloggers are NOT “protected speech” (why I cancelled my ETech presentations) I have to break my habit.
If you don't know Kathy, she’s one of my favorite bloggers. Her Creating Passionate Users should not only mandatory for UI developers, but gives insightful views on user experience every developer and manager should be aware of.
This sucks.
Update 1: Scoble stops blogging for one week, because he, as many others, feels with Kathy.
More Posts
Next page »