This is the blog of Gerd Riesselmann, a freelance software developer from Cologne, Germany. This site contains articles about software development and user interface design in general and object oriented programming in special, covering a set of programming languages from C++ and C# to PHP and Javascript. Additionally, you'll find code snippets and modules for Drupal, the open source content management system powering this site.


Email Ihr Blogs, Laden Ihre Leserschaft Auf

Uh-oh... The guys over at FeedBlitz are trying to provide a translated front page for German users like me. And obey rule 1 of translation business: Do never - repeat: never! - rely on translations done by machines.

Would you trust a service that promises to "Email their Blogs, upload your readership"?

Focus first Form field with jQuery

I somehow like the jQuery JavaScript library. Have a look at the jQuery code for the Zebra-Table-Showdown: Ain't this a beauty?

However, when it comes to focusing the first (visible) field on a form, things are not that elegant. I got it working, though. Here's my current attempt:

Comment Spam: I'm sick of it - Drupal Version

I once wrote about how captchas helped me to get rid of WordPress comment spam. After the last - unfortunately quite successfull - spam attack on my now Drupal-powered web site, I decided to implement the same approach. Simple spoken, captchas are a kind of challenges that should ensure a real human is submitting a form, not a machine. Here are my experiences.

Page Redesign III

A year has passesd since the last redesign, so it's time for a new look. I tried to make it look "serious" this time - opposite to the jelly beans colored company site of mine... That's why the site mainly relies on shades of brown - besides of course the title of this blog dictates variations of green and brown.

I hesistated the idea to place the Swamp Thing cartoon character in the bottom left of this page.

Wordpress, mod_rewrite and 403: Access Denied

If Permalinks are enabled in WordPress 2.0 or higher, the following code usually is generated to be placed in a .htaccess file:

<IfModule mod_rewrite.c>
RewriteEngine Off
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule  . /index.php [L]
</IfModule>

It happened to me, however, that as soon as this .htaccess was active, the server returned an error code of 403: Access Denied. In this case, just comment out or remove the lines <IfModule mod_rewrite.c> and </IfModule>:

#<IfModule mod_rewrite.c>
RewriteEngine Off
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule  . /index.php [L]
#</IfModule>

This worked for me.

PS: If you get an error of 500: Server Error, this probably means that mod_rewrite is not enabled on your server. Ask you provider to enable it.

Visual C++.NET 2003 and Broken Managed Assemblies

This is some really annoying bug in Visual Studio .NET 2003 (SP 1), took me two hours of my life: If the intermediate directory is set to something like ".obj/$(ConfigurationName)", the Assembly created will be broken, since it "does not contain a CLI header" - so the error message. It seems something is going completly wrong during compilation, since the dll is only 3 to 4 kB in size. If you omit the leading dot and set the intermediate directory to "obj/$(ConfigurationName)", it works.

Related nodes updated for Drupal 4.7

The Drupal related nodes code snippet has been updated to work with Drupal 4.7.

std::clock(), threading, and Linux

I had a strange experience with the boost::timer class the other day, since it never elapsed within a certain thread. As it turns out, this was because std::clock() itself doesn't tick but returns the same value over and over again - a value that probably indicates the time the tread was started. The solution is rather simple: I implemented the boost::timer interface based upon boost::xtime from the boost threading library like this:

TotalFeeds Module supports Drupal 4.7

The Drupal TotalFeeds Module has been updated to work with Drupal 4.7. Additionally, two patches provided by Daniel Ellison have been incorporated. The module now supports feeds for all comments, and the dc:creator tag. You can download it here. The version for Drupal 4.6 is still available here.

Sorry for beeing down

Unfortunately and to my disgrace, this site was down quite a while. I apologize for this.

Reason was my former provider blocked my domain, since he was suspecting this site to send spam. I checked the data and the logfiles but couldn't find anything like this. What I found, however, was a massive spam attack on the comment forms. The spam module installed didn't handle this spam correctly, since it contained mainly political slogans pro Hisbollah and contra Isreal - but none of the usual porn, poker or pills. This spam attack in turn lead to an extraordinary amount of mails beeing send from this site to - well - me. I guess these mails were accidentely interpreted as beeing spam.