Newbie: How do I add php code to a new page (easy question)

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
outasight
New Member
New Member
Posts: 9
Joined: Mon May 12, 2008 6:23 am

Newbie: How do I add php code to a new page (easy question)

Post by outasight »

Folks,
      I'm new to php and new to cmsms; I have a simple question that I'm sure you all know the answer to.  After I create a page in cmsms, how do I add php code to it?  I've tried adding it in the "metadata" area of the "options" tab but that doesn't work.  So where do I add it ?

      Also, if anyone knows of a concise document where a question like this is addressed, please point me to it (along with info on how to use the debug output in cmsms).

thanks...
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm
Location: Comox Valley, BC

Re: Newbie: How do I add php code to a new page (easy question)

Post by Nullig »

Here is the info, from the documentation, on inserting code.

http://wiki.cmsmadesimple.org/index.php ... fined_Tags

Nullig
outasight
New Member
New Member
Posts: 9
Joined: Mon May 12, 2008 6:23 am

Re: Newbie: How do I add php code to a new page (easy question)

Post by outasight »

hmm...
    I'm working with a login application coded in php and trying to call a logout function (defined in the login applications code "function_name()" below) from a link in a page created in cmsms.  I tried putting the code below into a tag and then calling the tag from the page using {tagname} but it doesnt work ...here's what I put in the user defined tag:

echo '">Logout';

    ... but it doesn't work.  What's going on?
Pierre M.

Re: Newbie: How do I add php code to a new page (easy question)

Post by Pierre M. »

Hello,

beware when you allow $config['use_smarty_php_tags'] in config.php
You might prefer the Front End User (FEU) and Custom Content (CC) modules instead.

Pierre M.
Post Reply

Return to “Developers Discussion”