Well you misunderstand how the plugin system works. The part you talking about is merely for the outputted html you are formatting. Any php or variables defines are done as in normal php. You have no html output therefore no need to define the html output which is why I gave you the actual plugin contents to try.
I seethe issue and it is very easy to correct. You can edit the index.php file and move the two hook lines above the printheader statement.
Then it would work as seen here http://www.reeftalk.com/gallery