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

 

 

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: 2
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.
2009-06-13
Reviews: 3
SOrry, good extensions so far, but it does only work with Articles...
2008-12-26
Reviews: 7
Excellent module, gives your content a huge increase in flexibility. Thank you very much.
2008-07-29
Reviews: 2
I'm not going to tell anyone to use this mainly for the fact that it spat out errors anytime I tried to use a loop (yes these loops did work elsewhere).
2008-07-16
Reviews: 1
I can't imagine Joomla! without DirectPHP. It lets me put the code I want where I want! It's absoutely indespensible. It seems that including really long code blocks tends to cause errors, so I typically build a .php file and include it in my article rather than building an entire script in the article. I've used it in conjunction with custom content plugin to make menus appear for select users. I love it!!
2008-05-28
Reviews: 1
I would like to state here that the Direct PHP plugin is abssolutely a must have when you're on the quest to include scripts right into your content or anywhere that your template allows.

What you get is what the plugin says, and believe me www.kksou.com is worth paying a visit.
You'll be delighted not only to get visuals and detailed instructions to execute what you have to, but KKSOU is a guy that takes you on hands and drive you right to the perfect solution that fits your problem.

Also really interesting and valuable extensions and tools to let you get the most of your Joomla Powered site.

KUDOS to kksou.
2008-05-22
Reviews: 1
If you need to write conditional code, and know PHP, this plugin really helps out. You simply write the PHP code where you want it and the plugin does the rest.

Note that the plugin has some built-in security that disallows certain PHP activity (such as database queries) as a default. But you can modify the plugin settings to adapt this - see the author's site for details.

Plus, the author of this plugin has been super helpful in writing additional plugins to support this one.
2008-03-28
Reviews: 1
I have been using Joomla 1.5 with Jumi to embed custom php into my pages and I have been very happy with it.

However, the way this plugin allows you to easily specify content for different user groups (similar to the excellent MosIf plugin for Joomla 1.0) and the ability to edit the php code as simply as any Joomla article really makes life easy.

The author has been very fast to answer any questions so far also.
Page 2 of 2