You would have to remove Read/Write groups when shown to regular users, and you would need to show headers and footers, and you need a where part in the query that selects the board. It would probably be easiest to create a new public version of the script and copy the parts that are needed.
You need to keep in mind that before there were two queries per board + one extra to read all boards. With my addition, there are four extra queries per board, making a total of 6 queries per board + one extra. I haven't checked how much impact this has on the database, but you should keep it in mind when letting regular users run it. OTOH, the script will probably not be used anywhere near as many times as ubbthreads.php, which is probably still more complex.