Codekarate Content

By shane
Thu, 2012-10-04 23:22
6 comments
Daily Dose of Drupal Episode #22

Continued from the last episode of the Daily Dose of Drupal, this episode continues Drupal 7 module development work with the Database API to pull data from the database and display it on a page.

In this episode you will learn:

  • How to pull data from the Drupal database using the Drupal 7 db_query function
  • How to use db_select and the Database API's dynamic query building to pull data from the database
  • How to display data using a theme function to output data as a table
By shane
Wed, 2012-10-03 13:42
11 comments
Daily Dose of Drupal Episode #21

This episode works off the the previous episode to create a custom Drupal 7 form using the Drupal Form API, and then looks at how to submit data from the Drupal form into a Drupal database table.

In this episode you will learn:

  • How to use hook_menu, hook_permission, and drupal_get_form to create a custom Drupal form page
  • How to create a custom Drupal 7 form using the Drupal Form API
  • How to add a validation function to the Drupal 7 form
  • How to add a submit function the Drupal 7 form
By shane
Tue, 2012-10-02 13:10
4 comments
Daily Dose of Drupal Episode #20

In this example we create a new Drupal 7 module with the purpose of creating a database table inside our Drupal 7 module. We look at hook_schema and the Drupal Schema API to create a new database table.

In this episode you will learn:

  • How to create a Drupal 7 module with an .install file
  • What hook_install, hook_uninstall, and other various installation hooks do inside your .install file
  • How to implement hook_schema in your Drupal 7 module
  • How to use the Schema API for create Drupal database tables
By shane
Mon, 2012-10-01 23:54
8 comments
Daily Dose of Drupal Episode #19

This continues on the module we started last time and shows how to implement hook_cron to run periodic tasks on your Drupal website. Also goes over hook_mail and the drupal_mail function for creating and sending email messages within your Drupal 7 module.

In this episode you will learn:

  • How to implement hook_cron in a Drupal 7 module
  • How to implement hook_mail to set up email messages in your Drupal 7 module
  • How to trigger the sending of email in a Drupal 7 module with the drupal_mail function
By shane
Fri, 2012-09-28 13:02
5 comments
Daily Dose of Drupal Episode #18

Learn how to create an administration form inside a Drupal module. In this episode we work with the Drupal 7 Form API to build out an administration section for a brand new module. This new module (called cronmonitor) will be completed in the next Daily Dose of Drupal episode (number 19).

In this episode you will learn:

  • How to build a Drupal administration form inside a Drupal 7 module
  • How to set the configure option inside your modules .info file
  • How to implement hook_menu and hook_permission to create an administration page
By shane
Thu, 2012-09-27 23:50
2 comments
Daily Dose of Drupal Episode #17

In this episode we continue learning about Drupal 7 module development by looking at creating menu items with hook_menu() and creating permissions with hook_permission().

In this episode you will learn:

  • How to implement hook_menu() in you Drupal 7 module to create a new page on your Drupal site
  • How to implement hook_permission() in your Drupal 7 module to provide access control to your newly created page
By shane
Wed, 2012-09-26 23:16
0 comments
Daily Dose of Drupal Episode #16

In this episode you will learn the very basics of Drupal 7 module development. From the info file, Drupal hooks, and the module file, this is a crash course to get you started.

In this episode you will learn:

  • How to create a very simple Drupal 7 module
  • How to create a Drupal 7 module .info file
  • How to create the main .module file
  • The importance of Drupal hooks and how they can be used to interact with the Drupal API
  • How to create a custom block inside your created Drupal 7 module using hook_block_info() and hook_block_view()