01. Bắt đầu

Yêu cầu kỹ năng của người đọc: có kiến thức về PHP, HTML, CSS, Javascript, MySQL, đã biết cách sử dụng Drupal.

Trước khi bắt tay vào việc xây dựng một module dựa trên drupal framework. Bạn nên tuân thủ chuẩn lập trình của cộng đồng người dùng drupal.

Các hàm trong module của bạn phải được đặt tên dạng {tên_module}_{móc}. Drupal sẽ gọi đến các hàm này để lấy các nội dung cụ thể.

Trong bài viết này, chúng ta sẽ đi xây dựng một module có tên là 'thanhkinh'. Bạn hãy tạo ở thư mục 'modules' một thư mục có tên 'thanhkinh' và trong thư mục vừa tạo, bạn tạo 2 files trống, một là 'thanhkinh.info' và một là 'thanhkinh.module'.

Quá trình phát triển module, bạn nên sử dụng một IDE nào đó, Eclipse rất tốt. IBM có bài hướng dẫn sử dụng Eclipse rất hay, nếu chưa rành Eclipse thì bạn nên ngự lãm. và hình như Lullabot.com cũng bon chon với một podcast entry.

Xin xem tiếp bài viết tiếp theo: "Báo cho Drupal biết module của bạn".

:-)

Thế Hồng,

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <sup> <br> <p> <h3>
  • Lines and paragraphs break automatically.
  • Link to content with [[some text]], where "some text" is the title of existing content or the title of a new piece of content to create. You can also link text to a different title by using [[link to this title|show this text]]. Link to outside URLs with [[http://www.example.com|some text]], or even [[http://www.example.com]].
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. The supported tag styles are: <foo>, [foo]. PHP source code can also be enclosed in <?php ... ?> or <% ... %>.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.