Where can I get the PHP Module for Joomla?
Visit the
PHP Module Project Page for download details.
What does the PHP Module do?
It allows you to place any PHP, HTML, JavaScript and CSS code in a module position. It is based on the HTML Module, with the added benefit of allowing PHP.
Do I have to wrap the PHP code in special tags?
No, you can use the regular PHP tags directly. eg:
<?php phpinfo(); ?>
Can I use predefined Joomla variables?
Yes, but you first have to declare them as globals. eg:
<?php
global $mainframe;
?>
Can I include PHP files?
Yes, but make sure you use the full path to the PHP files. It's just easier.
Example: Joomla 1.0
<?php
global $mainframe;
include($mainrame->getCfg('absolute_path').'/modules/mod_php/includes/my_php_file.php');
?>
Example: Joomla 1.5
include(JPATH_ROOT.'/modules/mod_php/includes/my_php_file.php');
Can I use more than one Joomla PHP Module on a page?
Yes, just copy the module using the built in Joomla Module Copy feature.