The Joomla! Extensions Directory ™


IncludePHP Plugin

The first NATIVE 1.5 plugin (now available for Joomla 1.0) to execute php code within a content item! For security reasons, only administrators are allowed to include php code. All other authors will be ignored (and the php code displayed).

NOTE! Starting with 1.1, you can now include Javascript (either standalone, or remote file), and HTML (via a local server file only)! See the FAQ for more info!

Now, there's 2 versions! One for Joomla 1.0 (native to 1.0), and one for Joomla 1.5 (native to 1.5). Both support PHP Javascript and HTML! If there's something else you want, feel free to ask!

To Use
{php}code you want to execute;{/php}
{phpfile}/path/to/php/file.php{/phpfile}
{js}alert("Code you want to run");{/js}
{jsfile}http://www.mysite.com/myjsfile.js{/jsfile}
{htmlfile}/path/to/html/file.html{/htmlfile}

Version 1.1.1 fixes a minor bug with HTMLfile inclusion.

Report

2011-09-02
Reviews: 1
Great extension!

Is it possible to use this?
{phpfile}/auto.php?auto=54{/phpfile}
If I try standalone file, it is OK. When I try this in Joomla, it is not OK. What can I do wrong?
2010-10-22
Reviews: 1
This is an excellent plugin to embed simple PHP scripts or pre-written scripts into Joomla Articles. If you are experienced with PHP but unfamiliar with writing Joomla plugins or don't need to go through the hassle of writing a plugin for what should be a simple task achieved by a simple script, this plugin is for you.

Limitations:

The only problems with it are that the {php} echo 'Hello World';{/php} format did not seem to work.
2010-03-18
Reviews: 3
Without this plugin any joomla will be limited in the future.

Makes the thing.

One only thing: when my fails it becomes difficult to get to the error.
2009-09-08
Reviews: 10
I tried to place a php code following your example... I tried {php}direct code{/php} and {php}{/php}, but it didn't work... it's a waste of time.
2009-04-05
Reviews: 13
Simple & Effective! Perfect for giving a little extra control over your site articles.

I would like to see this work within modules, I don't think you can do that.

Note: Don't try making applications within Joomla. Joomla wasn't designed for components to be designed within articles.
2008-12-28
Reviews: 3
Comments in two languages. English after Portuguese.

I recommend. Tested and approved for Joomla 1.5.8. It has a small problem to generate PDF, PHP content is not included. PDF created appears in the tags of the plugin.
Print Layout OK.
All files must be in the PHP directory to install the Joomla.

Not tested for joomla 1.0.x
2008-09-02
Reviews: 3
This plugin is ok. It sucks at handling any in depth php because it does not play well with styles. If you want to write hello world then this plugin is for you. If your a real programmer who has an app you want to port into Joomla keep moving this thing is a joke.

The message boards are useless and they are scattered with little bits of help. Its a mess.
0 of 1 people found this review helpful
2008-08-15
Reviews: 1
Verry nice and helpfull plugin!
Just one thing, if i search on articles with php code inside them with the joomla search box the php code is displayed in the search results.
1 of 1 people found this review helpful
2008-02-09
Reviews: 1
Hello
this is a nice plugin, i agree it should be included natively in Joomla!

But, it's a pity we can't use {php}...{/php} in the description text of a section or a category ...

Also, it would be great if you stated the examples in the module admin interface
you know, the different possible uses of includePHP :
{php}code you want to execute;{/php}
{phpfile}/path/to/php/file.php{/phpfile}
{js}alert("Code you want to run");{/js}
{jsfile}http://www.mysite.com/myjsfile.js{/jsfile}
{htmlfile}/path/to/html/file.html{/htmlfile}

anyway, useful plugin !

cheers
anthony
0 of 1 people found this review helpful
2007-11-11
Reviews: 1
Perfect Plugin! I use it to include my older Scripts or for my little widgedts i wrote for Joomla.
0 of 1 people found this review helpful
2007-10-06
Reviews: 1
exactly what i was looking for, i wonder why this function is not included in joomla (probably because of security reasons...)
1 of 2 people found this review helpful
2007-08-30
Reviews: 1
This is easy to install, and works fine when I tested it with Joomla 1.5rc1. I agree with others who feel this feature should be added to Joomla's core.