UPDATE 2: The guys at ZYB has offered to keep the beer flowing in the jungle room at their expense.
UPDATE 1: Sign-up is closed. There is room for no more. I'm looking forward to meeting you all.
Here is the latest info on the geek dinner. The geek dinner will take place 7pm at:
Chico’s Cantina
Borgergade 2
1300 København K
We have our own table in the jungle room which is a very nice place and as far as I know, each table in the jungle room comes with its own draft beer tab.
The people signed up so far are:
-
Jeppe Rørbæk (Microsoft)
-
Niels Hartvig (Umbraco)
-
Daniel Frost (ActiveDeveloper)
-
Mads Kristensen (astronaut at NASA)
-
Nikolaj Winnes (former Microsoft. Currently ??)
-
Martin Høst Normark (Traceworks)
-
Ole Højriis Kristensen (ZYB)
-
Morten Jokumsen (DotNet Forum)
-
Thomas Martinsen (MicroMax)
-
Martin Esmann (Microsoft)
-
Jakob Reimers (ZYB)
-
Marius Slyzius(Scimore)
-
Tony Fonager (chart.dk, netcoders.dk)
-
Jimmi Bram Nielsen (Traceworks)
If your name is not on the list, please contact me ASAP. There is room for one more. Last call for signing up is this Friday. If a lot more sign up, then I need to find a new restaurant.
I wrote a little extension for BlogEngine.NET 1.2 that parses BBCode for use in the comments. BBCode allows you to write square bracket syntax to format your text. It’s smart because it gives more power to the people commenting and it gives you total control over the HTML output because BBCode is not HTML – the parsing takes place server side when the comment is served and not when it is saved.
So, when you write a comment you can now use these few BBCode tags. More will come when I find out which ones make most sense.
Bold
[b]some text[/b]
Italic
[i]some text[/i]
Cite
[cite]some text[/cite]
You can easily add new tags your self by adding a single line in the extension. Also, if you want to be able to write BBCode syntax in your posts, you can easily do that by adding a single line to the constructor of the extension. Just type in this line:
Post.Serving += new EventHandler<ServingEventArgs>(Post_CommentServing);
Safety first
A BBCode parser is not as straight forward to write as you might expect. It’s not just a matter of replacing [b] with <strong> since that can lead to trouble. Let’s say someone writes this comment:
It’s a [b]lovely weather today.
If we just replace [b] with <strong> then the entire page will become bold since the tag is never closed. That means a wrong formatted comment can turn your entire website into something very ugly.
Instead we need to make sure that all BBCode tags are closed before we parse them. This extension will parse all the correctly closed BBCode tags even though there is a malformed tag in the same comment. It simply ignores the malformed tag and moves on and thereby doesn’t screw with the design of the site.
Implementation
Download the BBCode.cs file below and paste it into the /App_Code/Extensions/ folder of your BlogEngine.NET 1.2 installation.
BBCode.zip (721 bytes)