Notes From James
Home | About | Find Stuff | Download
Thingamablog Commenting   James - Sunday, October 15, 2006, 10:45 pm

Ok, here's what to do to add PHP comments to Thingamablog.

Download this code and put the two files into the 'web files' directory.

Modify the 'add_comment.php' file to your e-mail address, if you want e-mail notification.

To our styles-site.css (or whatever your CSS file is called), add .comment_sender and .comment_body to the style sheet for whatever look and feel that you want to have.

For each of the templates, add the following code whever you want to have commenting:

<?php$article="<$EntryID$>";$base='.';include 'comments.php'; ?>

Note that Thingamablog puts the files in different subdirectories, so you will have to modify the $base and include lines to '..' and '../comments.php' in some cases to get the comments to work correctly for some pages. This is because all the comments are stored in the main blog directory (as are the scripts), but the web pages can be stored elsewhere. It is probably best to use relative pathnames (../.., etc) rather than absolute paths in case you want to move your blog in the future.

Note that I am not a PHP guru, so this code is probably not the most secure. However, it works for me. However, I don't have enough traffic to get blog spam (yet).

[Coverville Idol Update]  [Pasties 101 (Updated)]