A template_hook is just for adding html into a template. You would actually want to use the plugin system to put in the database call and then spit the output into the $template_hook.
If you are just starting out, I'd recommended looking through the mods and finding one that is kinda like what you want (that adds something to the postbit) and looking at the code for that product.
|