- a clumsy comment publishing option that forces users into a different interface (hosted by Blogger) and cannot be integrated into existing web pages;
- lack of Trackback function that can track discussion on a topic across the WWW;
- no category options for publishing different feeds into different categories for navigation and syndication (Update: The new version of Blogger incorporates Labels. See the Blogger Guide to Labels on this site for details.)
This 12-step article looks at how you can address the first problem by integrating comments into your blog using Blogkomm. It concentrates on integration with Blogger, but if you have experience with other blog software or comment integration tools please add your thoughts to this post. After all, I need to wear it in!
So let's get started! I stumbled across the possibility of integrating Blogkomm into Blogger when reading Anne Galloway, a fellow Canadian and PhD student in sociology. Like most Bloggers I am acutely aware when someone is using the same software as me and has some as yet undiscovered functionality available. I followed the link on her blog to Blogkomm, and so began the half-day installation journey documented here.
The WWW is full of stories of people's frustrations at trying to install an not comprehensively documented piece of open source code that promises so much if you could only get it to work. Installing Blogkomm can be a frustrating experience as the intrepid blogger looks to piece together resources from across the Internet with the eventual goal of integrating the commenting system into your blog. It is by no means the only commenting system out there for bloggers using software that doesn't deal well with comments but in the end it provided an elegant and effective solution for me. I have listed the steps I eventually took as contribution to future efforts to install and integrate comments into blogs.
- Visit http://www.blogkomm.com/index.php and try out the commenting system by posting a comment on any of developer Holger Kreis' postings. You can see a number in [square brackets] under each post indicating the number of comments. Click on this link to open up comments for that post. If there are no posts this will simply open up the comment authoring form embedded in each post. Also take a whirl around the admin-demo to get a sense for how you can manage and moderate comments (a nice feature of the latest release of Blogkomm offering some protection against comment spam)
- Click on download on the left navigation and follow a link to the appropriate blogkomm_2_3_final file (either .tar.gz or .zip) and 'open'. Unpacked the file includes a folder 'Blogkomm'. Rename this folder something else and upload to the root directory of your weblog (where your index page for your blog is located ... e.g. for me it is http://www.chrisbrauer.com/weblog/
- There are three useful pieces of support on the Blogkomm website. Open up two browser windows (file > new>window) and navigate to the "how-to" section and the .pdf document supporting Blogkomm 2.2. You will need to consult these documents regularly as you make your way through the install. Also useful if the the FAQ. Open a third window and point your browser to the set-up index page http://root_directory/blogkomm_directory/setup/index.php. Follow these steps that are well documented. You can also configure your setup through the conf file in blogkomm/module/conf on your server for those who don't want the wizard functionality. You should arrive at a point where you have a PHP "code snippet" that you are instructed to insert into your Blogger template.
- At this point you can either go into your Blogger settings and 'hide' comments or just let them appear where they normally would in your blog and when you are satisfied with the appearance of the new commenting system remove them. Also note that blogkomm will pick up the email address you have on file for your Blogger profile, NOT the one you have normally associated with your comments if you indicated that you wanted email notification when comments are posted on your site. So change your profile email address to the one you'd like to be notified on. Insert the PHP code snippet into your template in the location you want the [n] of comments to appear. Also insert the following code at the very top of your template:<?php
if (isset($rem)) {
setcookie ("blogKo_name", $comm_name,time()+1209600);
setcookie ("blogKo_mail", $comm_e_mail,time()+1209600);
setcookie ("blogKo_www", $comm_website,time()+1209600);
}
if (!isset($button)) {
$comm_name = $_COOKIE["blogKo_name"];
$comm_e_mail = $_COOKIE["blogKo_mail"];
$comm_website = $_COOKIE["blogKo_www"];
}
session_start();
?>
This will ensure your admin functions work. - First make sure that none of the stylesheet classes being used are already on your site. Copy the stylesheet data from the blogkomm.css file in the blogkomm directory you unpacked and paste it into the head of your Blogger template. This will ensure that the commenting functions will pick up the appropriate styles generated automatically by the script. Save your template
- Go into your Blogger settings and change the name of the index pages for your blog and your archive to a .php extension (eg if your blog is http://yoururl.com/index.html the new address will be http://yoururl.com/index.php). In archive you can change the name of your archive page (default is archive.html) to archive.php. This step will ensure that your PHP code will work on your blog pages to allow the commenting system to function. When you next publish your entire blog the index page will change to index.php and your archive directory pages (eg months/weeks) will also change. But making this change will not change the individual blog pages to .php extension. You do that in STEP 8. Now publish your entire blog. Don't worry about your existing comments as they are still stored and are not impacted by the implementation of Blogkomm.
- If everything is going according to plan you should see [n] underneath your blog postings. If you are using expandable post summaries on your blog front page like I do, you should see [n] under both the post intro and the full story.
- Now for a bit of the unglamorous slog. I'm sure there is a better way to do this step so don't hesitate to suggest but this is how I did it. In order to change the file names of past individual posts from .html to .php the only method I found that worked was to publish each individual post through your Blogger admin. It seems to be a common challenge but the solution proposed in that forum (to turn off archive and turn back on again) didn't work for me. Oh well, it doesn't actually take that long and it gives you a chance to review all your old posts. Once you have published each individually, publish your entire blog again and all the pages should now have a .php extension allowing comments to function on every page.
- This next step is even stinkier. I wasn't sure what to do about the fact that search engines had indexed all of my blog when the file extensions were .html, also links to my individual posts on other blogs and in forums were aimed at pages with a .html extension. If I left it with my pages being overwriten with .php extensions those links would not work. So I created a quick and dirty redirect page. (Click on this link and hit stop on your browser to view source of my redirect page. Just save the file and change the urls to point to your pages by opening it in a text/html editor) I copied the page as the file names of all my individual posts and added .html extensions. So now in each of my archive directories are a filename.php and a filename.html that redirects to filename.php. When search engines visit or someone clicks on links to .html pages they are redirected to the appropriate .php page. It also helps by not losing any Google PageRank your pages might have. But this took about an hour and was a real pain in the ass. It is also helpful to copy the file into all of your directories as archive directories do not automatically generate index pages allowing access to your file structures online. A common redirect file called index.html can be uploaded into every directory (including your renamed Blogkomm directory) to shift users back to the home page of your blog. If you don't do that this or this can happen.
- To transfer over my old comments I again did it manually by turning comments on in Blogger settings and republishing my entire blog. This led to me being able to see the old comments and the new comment submission form at the same time and transfer over existing comments. Again an opportunity to review blog postings if you haven't had enough of yourself already.
- You can make changes to how the comment form and output appear in your blog by adjusting the content of the appropriate style classes in the HEAD of your Blogger template. These are well commented in the code for you to make changes and you can fiddle with div.blogkbox to control the look of the comment form, and div.blogkcomments for control of the look of the comment output. If you are linking to the stylesheet (eg. link href="/weblog/blogkomm/blogkomm.css" type="text/css" rel="stylesheet") you need to make changes in the blogkomm.css file.
- Optional is to go into your blogger template and insert the code snippet generated from setup/index.php for adding recent comments to your sidebar. You can configure the number of comments and teaser in module/recent_comments_sidebar.php. You can make changes to the style with the style class div.blogkcommentsrecent.
You can decide for yourself whether it is worth your while to integrate the commenting system into your blog. When I installed Blogkomm to my satisfaction I found it to be a big improvement on the default comments. It is so encouraging that one developer can create something of so much use to everyone. It is really our job as users to provide the supporting noise to help with many succesful Blogkomm implementations.
Please comment if you have any tips regarding Blogkomm, commenting software, or further Blogger extensions.
See: Other web tips in New Media Notes on the Chris Brauer Media Project



