Page 1 of 1

[SOLVED] How to run a php script? Should it be packed as a module?

Posted: Sat Jan 02, 2010 5:24 pm
by docman
Hi, I may seem really naive, but still I am having difficulty in getting the ocncept of including a PHP script into a modele. Is my understanding correct that if I want to run a PHP script, first I have to create a mudule around it?

Questions:

1. I looked at the modules XML files. It is way to complex for this simple task.
2. I then looked at the UserDefinedTags, a likekely candidate.
3. I included my little image rotator script clipping at the top and bottom of it.
4. Included the my UDT as a module

            {cms_module module="rotator"}

in the template
5. Ran the page. Nothing obvious happened.

Thanks for your help in advance.

Re: How to run a php script? Should it be packed as a module?

Posted: Sat Jan 02, 2010 5:34 pm
by Peciura
2. I then looked at the UserDefinedTags, a likekely candidate.
If your UDT is named as "rotator" and there are no mandatory parameters, simply call it

Code: Select all

{rotator}
in page or template.
I think you missed some things from UDT documentation http://wiki.cmsmadesimple.org/index.php ... fined_Tags

Re: How to run a php script? Should it be packed as a module?

Posted: Sat Jan 02, 2010 5:54 pm
by docman
Splendid! Calling it as {rotator} made it work.

Thanks.