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

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
docman
Forum Members
Forum Members
Posts: 103
Joined: Sat Oct 10, 2009 4:25 pm

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

Post 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.
Last edited by docman on Tue Jan 05, 2010 10:39 pm, edited 1 time in total.
Peciura

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

Post 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
docman
Forum Members
Forum Members
Posts: 103
Joined: Sat Oct 10, 2009 4:25 pm

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

Post by docman »

Splendid! Calling it as {rotator} made it work.

Thanks.
Post Reply

Return to “CMSMS Core”