Rendering Comments in Radio

I was wondering how my Radio Userland weblog would look if comments were rendered onto the page. And since the only way to get rid of temptation is to yield to it, I put together a trial implementation.

This proof of concept retrieves the manually created comments sub-table for this post from the Radio object database and creates the corresponding text for inclusion on the rendered page. A real implementation would retrieve comment data from the comment server and store that data in the appropriate comment sub-table.

I have some issues with the results. The comments are rendered on all pages (main index, monthly archive and daily). I would like for the comments to only be rendered to the daily pages and for the index and monthly archive pages comment links to reference the rendered comments on the daily page. Unfortunately, I don’t have a good plan to achieve that.

PS: I know that the counter in the comments link doesn’t match the number of comments on the page. Just another detail to be worked out.