Oh. If you put it in its own php file then the file needs to start with "<?php" on the first line and end with "?>" on the last line. You also will need to include some other stuff. It would probably be best to look at an existing module php file to see what to do, or else make the code a plugin and use a template module. (Creating a plugin is pretty easy, if you've never done it before).
|