Insert PHP & xHTML in my page

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
pj074
New Member
New Member
Posts: 2
Joined: Mon Nov 17, 2008 12:40 am

Insert PHP & xHTML in my page

Post by pj074 »

Howdy ,i recently found this CMS and i think it's a cool tool ,but i am a coder and i want to include PHP routines in the pages.
I want to include an xHTML form + a PHP routine for my form. How can i do ?
Thanx a lot
PJ
mel
Forum Members
Forum Members
Posts: 147
Joined: Mon Dec 11, 2006 11:53 pm

Re: Insert PHP & xHTML in my page

Post by mel »

Je crois que vous trouverez toutes les réponses ici : http://wiki.cmsmadesimple.org/index.php/Developers_FAQ
Bonne chance.
Version 1.6-MLE
NaN

Re: Insert PHP & xHTML in my page

Post by NaN »

Hi pj.

The easy way:
I would create a user defined tag (UDT - in adminpanel: Extensions->User defined Tags)
Click "add".
Name your tag whatever you want (notice: alphanumeric chars only).
Insert your php script (notice: no opening and closing tags needed).
Catch the query/post vars for the vars of your form will have.
Process whatever you want to do with that vars.
Create the form with echo <form ... ; etc. and refer in the action attribute to index.php.
Save the tag.

In your template / content insert the UDT like {your_tag_name}.
That should be all.

The most recent way by non-coders:
Use the modules Formbuilder and Formbrowser.

The difficult way (by coders):
Create an own module.
Check out the skeleton module to figure out how to use the cmsms api to create modules.

Hope that helps.
Regards NaN.
Post Reply

Return to “Developers Discussion”