Hello All,
This might be very easy question for some of you, I want to display database values into the php block How I can do this? Can I user normal php coding same in drupal block OR I need to any extra steps for it.
Thanks & Regards, Nikhil Kala http://www.nikhilkala.com http://www.brainyquote.com/quotes/authors/a/arnold_schwarzenegger.html
Nikhil,
In Drupal 6 you need to turn on the ability to use PHP inline by turning on that module in the core/optional section of the module list page.
Then you need to allow that imput format for a particular role. However, you don't need to do that part if you just want user/1 to be able to add php code.
You add a custom block and click the php radio under imput format.
Remember it is possible to crash your whole site with a php error. Make sure you back up your database before putting php in a block.
Shai
On Fri, Apr 17, 2009 at 2:05 PM, Nikhil Kala nikhilrkale@gmail.com wrote:
Hello All,
This might be very easy question for some of you, I want to display database values into the php block How I can do this? Can I user normal php coding same in drupal block OR I need to any extra steps for it.
Thanks & Regards, Nikhil Kala http://www.nikhilkala.com http://www.brainyquote.com/quotes/authors/a/arnold_schwarzenegger.html
-- [ Drupal support list | http://lists.drupal.org/ ]
On Sun, Apr 19, 2009 at 11:46 PM, Shai Gluskin shai@content2zero.comwrote:
Nikhil,
In Drupal 6 you need to turn on the ability to use PHP inline by turning on that module in the core/optional section of the module list page.
Then you need to allow that imput format for a particular role. However, you don't need to do that part if you just want user/1 to be able to add php code.
You add a custom block and click the php radio under imput format.
bleh :P it is not a good practice to do.
It is not recommended to use PHP code in blocks it my break your site, create a new module, write hook_block function and use it.