[support] bit of php code in a block - how?
Daniel
leva at az.isten.hu
Tue Apr 17 14:08:54 UTC 2007
Hi everyone!
I'm trying to put a little one-line date string on my site (eg.: 2007.
April 16 (Monday)). The most quick and easiest way I thought was to
create a new block (with admin/build/block) and put this code in it:
<?php
echo date("Y. F j. (l)");
?>
Then add this block to my site.
But when loading the page I just get the code displayed and not
executed. I have an Input format which allows PHP code and is available
to nobody (so I can use it only with uid==1), and I've added the block
content with this filter.
Can't see what is the problem :\
Please comment, thank you!
ps.: If there is a feature already in drupal which does this, that would
be even better :)
Daniel
More information about the support
mailing list