smallroomsoftware.com

Typo trouble.

Posted on September 26, 2006

Okay, every so often I become wreckless enough to update typo (the software that runs this blog). This either works quite well or I have to spend an entire day trying to coax is back from the dead. Today I had the latter experience, only this time, after getting it running, I decided to fix something else. I decided to make my css layout super-robust (it always blows up on Internet Explorer) using Shaun Inman's absolute positioning technique. Everything is working nicely, Safari, great, Firefox, looking good. Boot up parallels to test on IE Win - it doesn't work at all! In fact it's gone gone quite crazy, completely screwed up and no amount of tweaking seems to help. So I have given up for the day (it annoys me when I have waste time on this kind of stuff). I've reverted to one of the built-in themes while I rebuild my own from scratch.

Using bbclone with typo

Posted on January 19, 2006

I've used the bbclone stats package for a while now and it pretty much does exactly what I want. It is, however, pretty much geared towards PHP driven websites or static HTML sites. Getting it working nicely with typo (or any other rails app for that matter) seems to be a little trickier. The hacky (and probably temporary) solution I've come up with involves a hidden iframe on every typo generated page that links to the PHP script below:

<?php
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s")
       . " GMT");
header("Cache-Control: no-store, no-cache, "
       ."must-revalidate");
header("Cache-Control: post-check=0, pre-check=0",
       false);
header("Pragma: no-cache");

define("_BBC_PAGE_NAME", $_GET['page']);
define("_BBCLONE_DIR", "/full/path/to/bbclone/dir/");
define("COUNTER", _BBCLONE_DIR."mark_page.php");
if (is_readable(COUNTER)) include_once(COUNTER);
?>

The markup for the iframe looks like this and is added to the bottom of the default.rhtml file in your current theme:

1
2
<iframe frameborder="0" scrolling="no" width="0" height="0" src="/bbclone_hit.php?page=<%=h params %>">
</iframe>

Passing <%=h params %> as the page name is, I admit, pretty lame - I'll fix that later. At least I can now see some stats!

First Post!

Posted on January 15, 2006

Well, after some oohing and ahhing I have decided to use typo for my blog. It was a toss-up between WordPress and typo. WordPress is certainly a more mature system than typo and has more features. Indeed, it is more of a complete CMS, but I am interested to see how things go with typo. It certainly fits in with my current Rails obsession!

I must say, installing any rails app on a production server can be a little tricky. I think it has something to do with fast-cgi, but whenever I try to deploy an application manually, it doesn't work and doesn't work for about 10 minutes then all of a sudden works. Even killing the fastcgi processes doesn't seem to spare me this 'dead' period. My experience with SwitchTower has been quite different - seems to redeploy fine. I know SwitchTower has includes tasks that negotiate with the fastcgi processes but I haven't looked closely at what they do...

Hosting by site5.com