You say block with php-script is bad idea, module is preferred solution.<br>Unfortunatelly writing modules goes far beyond my capabilities (i&#39;m quite<br>new to drupal, and what is even worse, to php too). <br><br>But what about creating block with iframe which calls this script within?<br>
Would it be better solution, than block with php-code? I could even move<br>that script completely away, to different web-vhost (on the same physical<br>server). In such a case, if that script fails, it should not crash the whole<br>
web-page, only that frame, I think...<br><br>That php-script works, when I call it directly. It does not need mysql,<br>only its own subdirectory structure, with files. I just want to include it<br>on my web-page, but rewriting it to module would take me at least<br>
a few months...<br><br>Jarry<br><br><div class="gmail_quote">On Wed, Jan 19, 2011 at 8:40 AM, Mukesh Agarwal <span dir="ltr">&lt;<a href="mailto:mukesh.agarwal17@gmail.com">mukesh.agarwal17@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">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. <div>
<div></div><div class="h5"><br><div class="gmail_quote">On Wed, Jan 19, 2011 at 4:31 AM, Fred Jones <span dir="ltr">&lt;<a href="mailto:fredthejonester@gmail.com" target="_blank">fredthejonester@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div>&gt;&gt; In general tho mate, this is bad practice.  Put it in code somewhere,<br>
&gt;&gt; not in a block. (like page.tpl.php or node.tpl.php).<br>
&gt;<br>
&gt; But where? And how can I have it displayed where I want,<br>
&gt; like blocks? I&#39;m quite new to drupal...<br>
<br>
</div>Make a module and use:<br>
<a href="http://api.drupal.org/api/drupal/developer--hooks--core.php/function/hook_block/6" target="_blank">http://api.drupal.org/api/drupal/developer--hooks--core.php/function/hook_block/6</a><br>
<br></blockquote></div></div></div></blockquote></div><br>