By IbnKuldun on
Hi Guys, I've just developed my first Module which I shall be releasing soon. However being new to Drupal I just wanted to ask you for some help, which I have searched around for but cannot as yet solve.
My Module has several configuration options, which are currently done by an admin. I want any authenticated user to be able to configure those options (a pulldown menu and a couple of radio boxes) for themselves by putting a form in their user profile. How can I go about doing this?
I think i have to use hook_user() but not sure how, and neither can I find a simple enough example of a module which I can look at. Any idea on what I have to do?
Comments
I'm going to give this a
I'm going to give this a shot since nobody's replied. I'm new so the best I can do is make a suggestion and point you in the right place (plus I still haven't used 6.x).
Still, I'm working with menus right now so...
I think you have to use hook_menu() to create the menu items and create callbacks that point back to your module. If you don't already have the Pro Dev book, I'd highly recommend it. I think I would have jumped out the window by now without it. I think there's a new version coming out: http://www.apress.com/book/search?searchterm=drupal&act=search&submit.x=...
I downloaded the first edition in PDF form.
Anyway, there's this, too:
http://drupal.org/node/122262
and of course
http://api.drupal.org/api/group/menu/5
Thanks
Thanks for your help. The book was certainly useful. I see the method you are suggesting but it isn't what i was looking for exactly.
I have however managed to find a solution. I used the contact module to do what i wanted to. Essentially i used the hook_user function to create a form, and the rest was really hacked from that contact module.
Cheers