开发者

Module development tutorial in Drupal

I'd like to learn how to create modules in drupal- modules which can interact with the 开发者_JS百科user, database, assign permissions, views.

Is there any good video tutorial or a simple sample module which covers these things?

Thanks.


My suggestion would be to pick up a copy of Pro Drupal Development and start working your way through. I think that book is the best one stop option for providing an easy to follow, yet in depth start for learning Drupal development.

If you really wanted to get by without purchasing a book, I would suggest checking out the Lullabot site for whatever free content they have available.

After an initial background, the Drupal api pages should be helpful for you, . Hit the search box in the upper left hand corner for type ahead search to find detailed info on drupal functions. This would be a great resource for getting some more background on the functions googletorp listed. I agree with googletorp that those are a good list of functions to get started with.


It requires some effort to learn how to develop in Drupal. You might be able to find some good videos, but you will only really master this when you get your hands dirty and start coding.

How hard this will be for you, is also highly dependent on your background. A seasoned PHP developer wont find it that difficult to develop with Drupal.

There are some key points that you need to understand though.

  • The hook system. This is Drupal's way to do OOP. The idea is that modules or Drupal core can define and run hooks when an event happen that other modules want to react to. An example could be the creation of a user or the display of a node. To implement a hook, you simply create a function with the correct name. You need replace the "hook" in the name of the hook with your module name.
  • Drupal has a lot of API functions and it takes time to find them and learn how to use them. Take your time, as using the right API functions can make a big difference. Drupal has a nice API site

From your description you should take a look at these functions:

  • hook_user
  • hook_perms
  • hook_menu
  • db_query


In addition to what googletorp and mike munroe already said, check out the module developers guide on drupal.org. On the api site, check out the well documented example modules.


I have learnt drupal from beginner to advanced with CodeKarate. its one of the best website for drupal.

http://www.codekarate.com


There is a very good, easy to follow tutorial on developing JQuery/Javascript modules on Drupal. Check it out as well.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜