Cycling, macintosh, natural history and life in Singapore - Archives
Mon 21 Nov 2005
Adding Haloscan comments to Samizdat
Category : mac and the internet
The original 29 Jul 2005 entry did not work - step 5 was missing; my apologies to anyone who might have been stumped by the earlier instruction like I was..
Samizdat is a phposxom-modified blog engine by Bernard Teo that I use for this blog and three others in the sidebar. It's been modified a little from the original by macaddicts Seng Aik (individual date stamping of posts)., Bernard (archive now lists categories; RSS images fixed).
In June 2005 I scratched my head, and added Haloscan comments, thanks to Richard Newman's script. It strips the permalink to provide a unique identifier for Haloscan to work. However, the strip_ext function he used generated an error but thankfully the net has lots of php help pages and I sorted that out.
So if you use Samizdat, here are the steps for adding Haloscan comments. Note that line numbers are relative.
1. Sign up for a Haloscan account.
2. Choose the mannual installation. In Step 1, Haloscan provides you with a code to copy and paste "anywhere between your HEAD tags in your page." Add this acccordingly to default.php file in the defaultTemplate folder.
3. Open the journal.php file. You will need to add four batches of code which you can download here.
4. Immediately after the start of "# HTML FUNCTIONS" (line 355), add these lines (357 - 361):
5. Add this function to line 370. It strips the ".txt" extension out of the filename, leaving a unique identifier:
6. After the insertion of a permalink line (about line 380), add this script (lines 381-384):
8. In the function rss story, add lines 425-428:
If you provide a link to the feed in the default.php file, others to subscribe to the feed to (see link to "comments rss" near top of this page).
Haloscan allows you to modify the comments template, edit or delete comments etc., and a pro account does even more. Now you have the power of Haloscan comments incorporated into the Samizdat blog.