The Joomla! Extensions Directory ™



DirectPHP Plugin

DirectPHP - a plugin that allows direct embedding of PHP commands right inside Joomla content page!

Available for all Joomla versions: Joomla 1.0.x, native 1.5.x, 1.6.x, 1.7.x, 2.5.x and 3.0.x!

VIP: Don't forget to set the Filter Type to "No Filtering" so that you can enter PHP codes in a Joomla 1.6/1.7/2.5/3.0 articles.

Latest Update
=============
v3.0 (for Joomla 3.0)
Released March 21, 2013

v2.5 (for Joomla 2.5)
Released January 25, 2012

v1.7 (for Joomla 1.7)
Released October 10, 2011

Native version of DirectPHP for Joomla 1.7!

Latest version: 1.6 (for Joomla 1.6)
Released Feb 21, 2011
Native version of DirectPHP for Joomla 1.6!

Latest version: 1.06 (for Joomla 1.0) and 1.56 (for Joomla 1.5).
Added one more parameter "Using No Editor". If you're not using any editor when editing content articles, select 'yes' for this parameter. This will allow you to freely use any HTML tags (such as or ).

Latest version: 1.05 (for Joomla 1.0) and 1.55 (for Joomla 1.5).
Main update: Thanks to Salvatore who informed me about some "mysterious" double-byte characters that get inserted into the DirectPHP code by the content editor of some of the non-English Joomla. These double-byte characters will cause error when processing the PHP commands with eval. Have fixed this in this version.

Latest version: 1.04 (for Joomla 1.0) and 1.54 (for Joomla 1.5).
Main update: now works with PHP4!

Background
==========

Like many other PHP programmers who use Joomla, all I wanted is a simple wish: the ability to include PHP in Joomla content page.

I did some research. Looks like currently the best plugin out there with good user feedback is Jumi. I tried. It works. But something is still missing. The problem I have with Jumi is that it only allows you to call or include another .php file. It doesn't allow you to include PHP commands right inside the content page.

What this means is that to run some PHP commands, you have to put them in an intermediate PHP file. You have to have this intermediate file even if all you want is to display the current date and time with "echo date('Y-m-d H:i:s')"! Imagine having hundreds of dynamic content pages. The intermediate files accumulate more and more and become difficult to maintain.

This is the reason I developed DirectPHP - a plugin that allows direct embedding of PHP commands right inside Joomla content page!

Key Features
============

* You can write direct PHP statements right inside the content page using the standard the standard php construct.

* You can freely intermix static contents with php commands.

* You can edit the php code right inside the default TinyMCE WYSIWYG Editor!

* You can easily serve different contents for registered and non-registered members.

* You can use 'include' or 'require' to load in your favorite PHP library and call any of the functions inside the library.

* Ability to bloc

Report Extension

 

 

2013-03-29
Reviews: 3
I was looking for a replacement for Sourcerer as the plugin kept showing up in Joomla's error log and it was quite expensive for the Pro version. After downloading this, enabling the plugin, I was able to add the PHP date field to Footer (as in Copyright 2013). It also lets you encode forms so you can have a newsletter signup form for say constant contact. Haven't tested it on JS (for google adsense) but I don't think it will be an issue.

Just be sure to insert your code by clicking the HTML editor button (in TinyMCE and JCE) and placing it there. Click save and Voila! Great plugin, great support, and it's free!
2012-12-12
Reviews: 2
Fantastic! I had embedded PHP working in seconds without any need for configuration. Just remember to enable the plugin after upload / install.
2012-10-30
Reviews: 3
Worked perfectly for my needs (using php date code inside a module). Plugin installed with no fuss. I enabled it and my php code worked instantly.
2012-08-03
Reviews: 23
Just bought you a beer, mate! Really happy to have this valuable extension for free.

For anybody looking for a quick, easy and working solution to code php etc. directly into modules, content or anywhere else... you found it!

No fuss, no guessing, just plain working.
2012-08-02
Reviews: 6
Had to add some code to the header of a single page for a google experiment and this nifty plugin did the trick! had always used Jumi in the past but was having trouble getting it to parse under 2.5.6 - DirectPHP worked outta the box!
2012-07-19
Reviews: 1
This was a life saver!!!! So awesome, Thank you!! :0)
2012-04-04
Reviews: 10
Works very easy. Like!
2012-02-14
Reviews: 2
Very nice little plugin. Install, activate, write code... voilà

just great
2012-02-08
Reviews: 1
I love configuration. I love opening a huge extension and having all sorts of problems getting it to work. This extension is nothing like that. I installed it. Didn't get any errors. Enabled the plugin. And here is the false advertising part. It says "content"... CONTENT! It doesn't say you can use it in content articles AND modules, but it works even in Yoo Zoo. No hassle, no configuration. Ridiculous. Takes all the fun out of using 3rd party extensions.
2011-10-15
Reviews: 4
working very nice for me. thanks a lot.
2011-09-29
Reviews: 4
I use this on an Intranet site to pull reports from MSSQL. It works perfectly!

Now, when will it work in 1.7? I successfully installed the 1.6 version, but TinyMCE just kept commenting out the code. Maybe I just didn't find the setting to not check code for TinyMCE?

Regardless, excellent plugin, thank you!
2011-03-27
Reviews: 1
Plugin works exactly as its supposed to. easy to setup & use. Adds a whole new level of functionality to a joomla installation. A must have if you desire to use your own php code without using an iframe wrapper.

thx for this great free extension
2010-11-30
Reviews: 5
Lovely, being able to add php code to a module....
Thanks!
2010-05-10
Reviews: 2
It could be a good Extension, BUT whenever you try to download it you'll be redirected to a file called packupdate_build107_2060.exe. And this file is a Trojan virus called FakeVimes!

So please correct your homepage and kkep an eve of your page (if it has been hijacked) or delete it (if you placed it there)!
2010-04-26
Reviews: 1
Just installed the plug-in, wrote my php in the article and it did what it was suppose to. Exactly what I expect from a plug-in.
2010-03-23
Reviews: 3
Well done! This extension helps to enhance the dynamic content.
2010-01-14
Reviews: 1
Like the developer said, I got tired of using extensions that only allowed me to pass php code using includes or using special tags. I wanted to type my code in and get it to work. This does exactly that. Type in your php code and it will work, unless you try to use some of the php commands that are blocked. But guess what, you can change that setting too!!!

Excellent job, this is a must to be included into any future joomla version.
2009-10-16
Reviews: 3
This plugin works period. I have tried several plugins that are higher rated/voted than this one, but if you want to add php to your articles this is it. The other extensions require too much attention to get functioning properly in my opinion. I just wanted to add some php code and not worry about configuring options/parameters and the like. Direct PHP is lean, fast, and it just works!

Thanks for this wonderful contribution.
2009-10-03
Reviews: 3
Very neat plugin and great support form author.
Ideal for php snippets and quick short php code insertions in articles.
2009-08-25
Reviews: 3
For quickly, effectively and simple placing php into our content, I don't think it can be matched. Also by using the tags (instead of some random combination) it makes my pages look a lot better on the backend as well.
Page 1 of 2