Wouldn't it be simpiler to just remove the part of the query that says WHERE (board_id='$board')
I still can't figure out why they put it there in the first place because there can't be a post with the same id on 2 different boards. :-/
So in otherwords using $board does nothing but clutter up the code for displaying topics. :-/
Anyway, great work I hate it when you can't find the topic you are looking for because it was moved.
[edit]I am not sure about this... but they "might" have done this so that they didn't have to code permission in display topic for the boards and categories... not positive on this... but it just hit me just now... after I had posted this.

[/edit]