Any tips for a beginning module developer?

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
User avatar
micahgodbolt
Forum Members
Forum Members
Posts: 149
Joined: Thu Jul 29, 2010 11:09 pm
Location: Portland, OR

Any tips for a beginning module developer?

Post by micahgodbolt »

I'm currently trying to spend a bit of time each day learning php (lynda.com and w3schools) and becoming more familiar with cmsms module setup.

So far I have read through the first 4 chapters of the development cookbook. I've installed the skeleton module, looked how the xxx.module.php and other files are set up, and created a stub using the Module Maker.

So now I'm wondering where to go next. I'm pretty good at reverse engineering things, so is there a simple module I can install and then pick apart/modify to see how things work? Is there a tutorial for a simple module I can create myself? Books, blogs, videos? Where did you all start?
Wishbone
Power Poster
Power Poster
Posts: 1368
Joined: Tue Dec 23, 2008 8:39 pm

Re: Any tips for a beginning module developer?

Post by Wishbone »

I used to use News as my guide as to general file and code structure, but now use CGBlog, as there are many routines it uses from CGExtensions that make life easier.

I also poke around the core if I see something I like and want to be in my module. For example, one one of my sites, in one of my modules, I have a section where the web master can select a target page for some reason or another.. I liked how, when editing a page, how you can choose a parent through a dropdown.. I went to duplicate the code, and found that there was a subroutine that generates this dropdown.

There are many ways to do things, and there are often pre-built functions just for that if you poke hard enough.. Spend some time looking through the API.
Post Reply

Return to “Developers Discussion”