Insertion of php code in html code of an article

This forum is for general questions about extensions for Joomla! version 1.5.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
pfaniel
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Wed Jan 05, 2011 3:23 pm
Location: Bruxelles
Contact:

Insertion of php code in html code of an article

Postby pfaniel » Fri Jan 27, 2012 5:05 pm

Hello

This is the first time I post a question in a forum. So I am still in its infancy. Also, I'm not a crack of Joomla!, PHP and many others.

I am looking for how to insert a php function in the html code of Joomla article.

A concrete example of my problem: When I insert <p><?php echo "This is a test";?></p> in the html code of an article, the string changes into
<p>
<!--?php echo "This is a test";?--></p>

In other words, the editor changes the php statement into an html comment.

Is there a way to solve this problem? If so, I would most appreciate a help for it ?

Thank you in advance for the help

Pierre Faniel

jhcorsair
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Sat Aug 07, 2010 12:03 pm
Location: East Coast US
Contact:

Re: Insertion of php code in html code of an article

Postby jhcorsair » Fri Jan 27, 2012 5:24 pm

Use the JCE Editor: http://www.joomlacontenteditor.net/
Besides a whole bunch of functionality, you can configure it to allow code.

joomlawebsitesbyjim.com

luis23045
Joomla! Explorer
Joomla! Explorer
Posts: 459
Joined: Mon Mar 09, 2009 9:54 am
Location: Dallas, TX
Contact:

Re: Insertion of php code in html code of an article

Postby luis23045 » Thu Mar 08, 2012 11:41 pm

This is what I normally do to insert not too complex PHP code inside the articles.

First install this extension: http://extensions.joomla.org/extensions ... ntent/4470

Then Enable it inside the Plugin Manager.

If you click inside the Plugin you can go to Parameters and set everything like I do on the Picture 1 below.

Then finally I disable the Editor TinyMCE inside the Global Configurations and I use the Articles without any Editor at all.

I work in plain code display.

Finally after all that I start pasting whatever needed PHP Code.
You do not have the required permissions to view the files attached to this post.
http://cmsteachings.com - Joomla Tips & Tutorials
http://ubrainmedia.com - My Joomla Company
My Joomla Advice is my personal experience. It does not means I am right or wrong. It just means that I work with Joomla in my own way and it works for me.


Return to “Extensions for Joomla! 1.5”

Who is online

Users browsing this forum: No registered users and 9 guests