Help writing a module
Posted: Tue Jul 24, 2007 5:37 pm
Greetings,
I'm struggling at getting my module do pretty much anything. I've followed the module howto, looked at the skeleton module and looked at several existing modules. I understand the pieces needed to create the module and I've created a module that installs/uninstalls without errors but I cannot get it to do anything beyond that, even display a simple hello world message. The pieces of CMSms are just not fitting together for me so I'm looking for a bit of help. I am not an OO programmer by trade nor education and I'm a PHP novice. However, I have extensive experience with ASP/VB COM as well as a few now dead Mainframe programming languages. So I'm not completely clueless but I'm struggling nonetheless.
Here is what I want my module to do:
This module will be processing a form post and using the frontenduser module to autologon a user.
Anyone care to help me out?
I'm struggling at getting my module do pretty much anything. I've followed the module howto, looked at the skeleton module and looked at several existing modules. I understand the pieces needed to create the module and I've created a module that installs/uninstalls without errors but I cannot get it to do anything beyond that, even display a simple hello world message. The pieces of CMSms are just not fitting together for me so I'm looking for a bit of help. I am not an OO programmer by trade nor education and I'm a PHP novice. However, I have extensive experience with ASP/VB COM as well as a few now dead Mainframe programming languages. So I'm not completely clueless but I'm struggling nonetheless.
Here is what I want my module to do:
This module will be processing a form post and using the frontenduser module to autologon a user.
- Check to see if the page was called by for post. I can do this with standard php, is there anything beyond that for CMSms. Display a happy user oriented error message if the page was access directly without a post
- Extract the form fields into local variables
- using one of the form fields, call the frontenduser module and log the user on
- If the login failed (no account) then call the frontenduser module and create an account. Then Call the frontenduser module and log the user on
- Extract a session variable that holds a URL (CMSms page) and redirect the logged in user to that page
- for debug purposes, I'd like to be able to echo things back to the page
- no database tables are needed for this module nor any admin functions
Anyone care to help me out?