Page 1 of 1

Module Maker

Posted: Fri May 05, 2006 4:02 pm
by Dr.CSS
ok i tried to make a module not being a coder it might have been a dumb idea,, thought it was going to do it all by itself, see now it makes a stub
i've got the .php but it has a bunch of function DoAction($action, $id, $params, $return_id=-1)
guess i need to learn PHP as i have no idea how to fill these in, where to go to read how to on PHP?

  mark

Re: Module Maker

Posted: Sat May 06, 2006 1:56 pm
by calguy1000
Yeah, the Markdown module asks you a bunch of questions, but then still just gives you a stub as it doesn't really know what type of module you want to create, makes sense eh.

The DoAction stuff is where you put your actual code.  If you look at HitCounter, or other small modules you should see exactly how things work.  Essentially there's two actions in DoAction that are used by cms. "default" for the front end,, and "defaultadmin" for the back end.  Any other actions you need to code yourself.

The php manuals are all on php.net though that's a little tough to figure out.  there are lots of php tutorials around to get you started.