Discussion Board Archives with Rails

A couple of years ago I moved the discussion boards on Sarah Masen‘s website over from a rather nasty tangle of PHP and HTML that I had chosen for its threading view, to the considerably more flexible Phorum. Phorum has been serving us well, but a number of regular posters have lately been reminding me that the move left our archives from the old software inaccessible.

I had always intended to put together a quick collection of scripts to allow access to those archives, possibly with some searching, but the prospect of getting it all together with the appropriate threading and the legacy database had put me off. That was before I read about Rails’ acts_as_tree option.

Using acts_as_tree and SearchGenerator, putting the app together required little more than a few commands to change some database field names, writing a few lines of glue code, and getting the templates together.

Loading up the threads (some of them quite lengthy) proved a slow process, but since the content is never likely to change, a few page caches and a little tweaking to the pagination links have the whole thing effectively becoming a big static site that I can change very rapidly.

You can find the end result at www.sarahmasen.com/oldboards/

Tags: , , , ,

Comments are closed.