[support] php-code in block is not executed...

Mukesh Agarwal mukesh.agarwal17 at gmail.com
Wed Jan 19 07:40:53 UTC 2011


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 at gmail.com>wrote:

> >> 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_block/6
>
> Google for how to make your first custom Drupal module
>
> HTH
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>



-- 
Cheers,
Mukesh Agarwal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20110119/411603ea/attachment.html 


More information about the support mailing list