[PHP] Using stand-alone PHP scripts with Drupal

2011-08-24 Thread Geoff Shang

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.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Using stand-alone PHP scripts with Drupal

2011-08-24 Thread Florian Lemaitre

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 : 
developm...@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.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php