By r00tk1ll on
I am in need of some direction, I want to convert some of my code into a drupal module, specifically how do I insert custom tables and tie the data in them to existing drupal users? I hope it makes sense where I am going with this.
Thanks
Comments
For starters, there's Module
For starters, there's Module developer's guide
If you prefer print, there are two books to get you going
- Pro Drupal Development
- Learning Drupal 6 Module Development: A practical tutorial for creating your first Drupal 6 modules with PHP
I think there's a place where you can buy these that kicks back 10% to drupal.org as well (that's an Amazon link I gave).
Yosemite Explorer - hiking and climbing in Yosemite (drupal)
BTW, Pro Drupal Development
BTW, Pro Drupal Development has two editions. 1st ed is for D5 and 2nd ed is for D6
Yosemite Explorer - hiking and climbing in Yosemite (drupal)
I have been looking through
I have been looking through the handbook and the link you sent, I just cant seem to find what I'm looking for. I basically want to create a new table for use with an existing drupal 6.9 system, and then create another unique field to the user table (a random id that I create upon sign up). Do you know of any example scripts similar to this, or a point in the right direction without having to buy any print?
Thanks
Well, you can build a module
Well, you can build a module that has an install/uninstall schema that lets you add/remove a column from the user table. Then you would need to hook into the user registration.
You might, however, have a look at some of the modules like Content Profile or Auto Assign Role and build a module based off one of those. Like you could add a content field as Content Profile does, but tweak it to make the field hidden and generate your random id based off a timestamp hash or something like that.
Other than that, I have no idea. BTW, why do you need a random ID for each user when every user already has an id?
Basically because I need to
Basically because I need to assign everyone a random id with a fixed length of 10 digits