Re: Using stand-alone PHP scripts with Drupal
| From: | Florian Lemaitre | Date: | Wed, 24 Aug 2011 10:45:31 +0000 |
| Subject: | Re: Using stand-alone PHP scripts with Drupal | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-314592@lists.php.net to get a copy of this message | ||
Le 24/08/2011 12:24, Geoff Shang a écrit :
Hi, I know this is probably more a Drupal question, but I'm guessing some here have probably had to deal with this. I've written some PHP code which works just fine on its own. Now someone wants to include it in their Drupal site, with the regular headers and footers for their site surrounding the output from my scripts. Is there an easy way to include the PHP in a page on their site? Not sure which version of Drupal they're running, trying to find out. Geoff. Hi Geoff,There's a mailing list for Drupal development questions : development@drupal.org It depends of your script. If it's just a set of functions that doesn't print directly to the screen but return elements that can be printing by another script it's ok. If that's the case, then you can create a custom module witch will include your code, define a block and output the result of your script in that block view. Then you create a Panel and include that block in the panel. (that's the proper way to do this, you might also find some freaking hacks that do that in a few lines) What does your code do exactly ? Sorry if I'm not clear. Florian.