well, I thought making a template *for* a custom module is what I was doing. I tried the same code in the .tpl file in the control panel, and tiki seemed to comment out the PHP that was in it. When the page loads, there's a stray '> in the rendering of it.
Can you write JS and PHP there? Or just HTML?