I second Fred. Making a module is always a good idea. The code gets compiled before whereas in case of block, only while execution does the code get loaded from db and then is compiled and executed. I think the php accelerators like eaccelerator and stuff will not be able to cache the op code from the code which is saved in db.
On Wed, Jan 19, 2011 at 4:31 AM, Fred Jones fredthejonester@gmail.comwrote:
In general tho mate, this is bad practice. Put it in code somewhere, not in a block. (like page.tpl.php or node.tpl.php).
But where? And how can I have it displayed where I want, like blocks? I'm quite new to drupal...
Make a module and use:
http://api.drupal.org/api/drupal/developer--hooks--core.php/function/hook_bl...
Google for how to make your first custom Drupal module
HTH
[ Drupal support list | http://lists.drupal.org/ ]