Module Development Tutorial?

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
Wishbone
Power Poster
Power Poster
Posts: 1368
Joined: Tue Dec 23, 2008 8:39 pm

Module Development Tutorial?

Post by Wishbone »

Hello.. I'm new to CMSMS and to this forum and would like to know more about developing my own modules. I already read the tutorial, which was fantastic, but brief. I've looked at the API as well, which has a lot of info, but is hard to understand without any context.

Does anyone know of any in-depth tutorial for module development?

I'm working on a re-design of my website (in progress), and just installed CMSMS as the back end. I'm working on a photo gallery module based off of A List Apart's "Magazine Layout" method.

Thanks,

Wayne
Last edited by Wishbone on Thu Dec 25, 2008 5:08 am, edited 1 time in total.
irish
Forum Members
Forum Members
Posts: 101
Joined: Tue Jun 03, 2008 2:31 pm

Re: Module Development Tutorial?

Post by irish »

Wishbone,

Have you installed the "ModuleMaker" module? if not, install it. From what I remember, you will need to install "Skeleton" module as well. Then go to Extensions > ModuleMaker in the admin section and follow the wizard to set up your gallery module.

Then you will need to set up the code for the frontend (action.default.php) and the backend (action.defaultadmin.php)
Duketown

Re: Module Development Tutorial?

Post by Duketown »

wishbone,

Module Skeleton is not really needed. ModuleMaker is a great start. Take special care by reading/learning from what is prepared in the News and the Uploads module. These two have a load of good starting points of preparing your own module.
Own module? Why? Why not spread what you make. You got CMSMS for free and a lot of the modules. Share what you make and feel the rush that there are so many others that use your build module (well ok, you only get to know the number of downloads).

Duketown
irish
Forum Members
Forum Members
Posts: 101
Joined: Tue Jun 03, 2008 2:31 pm

Re: Module Development Tutorial?

Post by irish »

Duketown,

I have a load of my own modules, but I have no idea how to go about sharing them. I have signed up on Forge and added a project but what now?
Duketown

Re: Module Development Tutorial?

Post by Duketown »

irish,

Nicest and most open would be to use svn. You will need to install this via http://tortoisesvn.net/. There is a learning curve here, but you allow to share the coding for other developers as well and maybe they will join and extend the module to newer levels.

Another method that is seen a number of times is the usage of xml/tar/zip files.
The advantage of xml files is that they will become available for other users via the ModuleManager module (so you can download and install quickly). To prepare an XML, select Extensions/Modules. On the right side of your module, you will see the button XML. Use it. Save the file locally. Go to the forge and login. Select the project for which the xml is intended. Select on the upper right Admin. Scroll down to locate File Packages. Add a release.
For other types of compressed files, you will be able to add the file to the just added release.

Once a release is added, this will be mentioned on the dev.cmsmadesimple.org page.

Hope this helps and I'm looking forward to the modules,

Duketown
irish
Forum Members
Forum Members
Posts: 101
Joined: Tue Jun 03, 2008 2:31 pm

Re: Module Development Tutorial?

Post by irish »

thanks Duketown, I already use SVN so shouldn't be too much of a learning curve there.

I just checked out 1.3.1, should I just add my module to it and then commit it. Is that how it works?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Module Development Tutorial?

Post by Dr.CSS »

The core, 1.5.* is not the thing you would be committing, you will right click on your module and commit it, as long as you have a forge space/registered module for it...
irish
Forum Members
Forum Members
Posts: 101
Joined: Tue Jun 03, 2008 2:31 pm

Re: Module Development Tutorial?

Post by irish »

I tried to checkout 1.5.1 and 1.5 but each time I got an error:

Error: URL 'http://svn.cmsmadesimple.org/svn/cmsmad ... anches/1.5' doesn't exist 

Do I need to make a branch of it first? if yes, how do I do that?

OR do I just get it from the trunk?

We really do need a tutorial for this. Once, I get through each of the steps here, I will write one.
irish
Forum Members
Forum Members
Posts: 101
Joined: Tue Jun 03, 2008 2:31 pm

Re: Module Development Tutorial?

Post by irish »

Wishbone, did you also see these tutorials?

http://wiki.cmsmadesimple.org/index.php ... pers_Guide
jce76350
Beta Tester
Beta Tester
Posts: 2079
Joined: Mon May 29, 2006 1:20 pm
Location: Rouen

Re: Module Development Tutorial?

Post by jce76350 »

Jean-Claude Etiemble MyPageFr
irish
Forum Members
Forum Members
Posts: 101
Joined: Tue Jun 03, 2008 2:31 pm

Re: Module Development Tutorial?

Post by irish »

jce76350, wouldn't the last SVN be 1.3.x?

I was able to download 1.3.1.

Or should I be downloading 1.2.x in order to add modules?
Last edited by irish on Fri Jan 09, 2009 4:31 pm, edited 1 time in total.
irish
Forum Members
Forum Members
Posts: 101
Joined: Tue Jun 03, 2008 2:31 pm

Re: Module Development Tutorial?

Post by irish »

I downloaded 1.2.x, added the module to it and tried to commit it. but it's asking for username and password, I tried the username and password I used for Forge but that doesn't work.

Anyone have any idea what username and password I should be using?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Module Development Tutorial?

Post by Dr.CSS »

It doesn't what ver. cmsms, but you really should use the latest ver. to make sure your module will work with it...

When you are doing a module and it is yours, you have commit access to it in the forge and you want to make changes to it then recommit it you right click the module forlder and commit it, not the whole CMS Made Simple install just your module...
irish
Forum Members
Forum Members
Posts: 101
Joined: Tue Jun 03, 2008 2:31 pm

Re: Module Development Tutorial?

Post by irish »

Mark,

Here is what I done so far, I checkout 1.2.x from SVN, I added my module to it. I then right-clicked on the module to add to SVN. Once added, I right-clicked to commit it, it is at this point it asks for username and password. I put in the username and password that I use to log into Forge, but it's not accepted.

Also, I registered my project to Forge, however, I haven't heard anything back yet. Am I suppossed to?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Module Development Tutorial?

Post by Dr.CSS »

Yes you/project have to be accepted to forge then you have commit access...

What was/is the name of module?...
Post Reply

Return to “Developers Discussion”