Drupal 模块开发教程

发布于 2024-08-20 19:34:06 字数 106 浏览 4 评论 0原文

我想学习如何在 drupal-modules 中创建模块,这些模块可以与用户、数据库交互、分配权限、视图。

有没有涵盖这些内容的好的视频教程或简单的示例模块?

谢谢。

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

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

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

荒芜了季节 2024-08-27 19:34:06

我的建议是获取一份 Pro Drupal Development 并开始学习。我认为这本书是最好的一站式选择,为学习 Drupal 开发提供了一个易于理解且深入的起点。

如果您真的想在不购买书籍的情况下度过难关,我建议您查看 Lullabot 网站 获取任何免费内容他们可用的内容。

了解了初步背景知识后,Drupal api 页面应该会对您有所帮助。点击左上角的搜索框进行提前搜索,以查找有关 drupal 功能的详细信息。这将是一个很好的资源,可以帮助您了解 googletorp 列出的函数的更多背景信息。我同意 googletorp 的观点,即这些是一个很好的入门函数列表。

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.

折戟 2024-08-27 19:34:06

学习如何在Drupal中进行开发需要付出一些努力。您也许能够找到一些不错的视频,但只有当您亲自动手并开始编码时,您才能真正掌握这些视频。

这对你来说有多难,也很大程度上取决于你的背景。经验丰富的 PHP 开发人员不会发现使用 Drupal 进行开发有那么困难。

不过,您需要了解一些关键点。

  • 挂钩系统。这是 Drupal 进行 OOP 的方式。这个想法是,当其他模块想要做出反应的事件发生时,模块或 Drupal 核心可以定义并运行钩子。一个示例可以是用户的创建或节点的显示。要实现挂钩,您只需创建一个具有正确名称的函数即可。您需要将钩子名称中的“hook”替换为您的模块名称。
  • Drupal 有很多 API 函数,找到它们并学习如何使用它们需要时间。慢慢来,因为使用正确的 API 函数可以带来很大的不同。 Drupal 有一个不错的 API 站点

根据您的描述,您应该看看这些函数:

  • hook_user
  • hook_perms
  • hook_menu
  • db_query

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
红颜悴 2024-08-27 19:34:06

除了 googletorp 和 mike munroe 已经说过的内容之外,请查看 drupal.org 上的模块开发人员指南。在 api 站点上,查看文档齐全的示例模块

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.

小嗷兮 2024-08-27 19:34:06

我通过 CodeKarate 从初级到高级学习了 drupal。它是 Drupal 最好的网站之一。

http://www.codekarate.com

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

http://www.codekarate.com
海风掠过北极光 2024-08-27 19:34:06

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文