Drupal Video Tutorials

Video Title Description Topics
Drupal 7 Commerce Module Tutorial 3 - Creating Product Attributes

In this 3rd Drupal video tutorial in the 10 part series on the Commerce module, I show you how we can create product attributes such as color and size. Then with the Drupal Commerce Product Attributes module, I show you how we can alter the default cart view to display the attributes on the cart form and allow users to edit their chosen product attributes.

Commerce
Drupal Commerce Module Tutorial 2: Setting Up Product Catalog Displays

In the 2nd Drupal video tutorial of this 10 part series on the Commerce module, I show you how you can create a product display catalog. We walk through 2 different ways of doing this, with the recommended approach being the second method I demonstrate. Both will rely upon the Views module so if you aren't familiar with Views, I highly recommend you take a look at my Drupal tutorial series on Views.

Commerce
Drupal Commerce Module Tutorial 1: Setting up Product Types, Products and Product Displays

In the first drupal video tutorial on the commerce module, we start by downloading and enabling required modules, walking through their set up and jumping into creating products.

To do so, we first take a technical detour to discuss what makes the commerce module different from other Drupal e-commerce solutions, specifically it's reliance on entities and how that helps us. From there, we walk through creating a product type for pictures we'll be selling on our site, we then create a product image to sell and finally create a product display for customers to see. We conclude by adding our product to our cart and completing our order process which does not include payments just yet.

Commerce
Drupal 7 Module Development Tutorial #11 - Using Template_Preprocess to Change the Flag Link

In the final video tutorial of this series on Drupal 7 module development, I show you how we can disable the link for our flap application depending on how the site administrator has configured the module which we covered in tutorial 10. In doing so, I introduce you to template_preprocess functions which allow us to modify changes made by the flag module before content is actually output.

Module Development
Drupal 7 Module Development Tutorial #10 - Drupal's Hook_Form_Alter and Variable_Set

In the 10th tutorial of this 10 part video tutorial series, I show you how we can use Drupal's hook_form_alter to create some custom flag settings for our module. Specifically, we want to allow administrators to disable flags once an application has been approved. To do so, we need to add some settings to our configuration page.

Originally, I was just going to show you how to do this with the Flag API, however, I decided to record an 11th video tutorial and take some time to show you how you could achieve similar results using Drupal's function variable_get and variable_set if you didn't have the Flag API. 

In the final video tutorial, I show you how we change the flag link.

Module Development
Drupal 7 Module Development Tutorial #9: Creating Permissions with Hook_Permission

In the 9th video tutorial of this 10 part Drupal video tutorial series, I show you how we can create permissions for our module and ensure only administrators can access our flag application admin form. To do so, we first implement hook_permission and then update our hook_menu implementation to pass in our permission name.

In the final tutorial, we'll finish our module off by finalizing the behaviour of our flag once it has been approved.

Module Development
Drupal 7 Module Development Tutorial #8: Drupal Form Submit and Validate Functions

In this 8th Drupal video tutorial, I show you how to create submit and validate functions to handle users submitting forms. Specifically, we use the default submit function created by Drupal to prep our information and pass it off to a function which updates the database. We then log a watchdog message so administrators know applications were reviewed. 

Lastly, we create a validate function to double check the information received from the form submission to ensure we don't get incorrect values. In doing so, I show you how to set errors on specific form elements. It's important to remember that validate functions are called before submit functions.

Module Development
Drupal 7 Module Development Tutorial #7 - Theming Tables with Drupal's Form API

In the 7th drupal video tutorial of this 10 part series, I show you how we can use Drupal's form api to create a table with check boxes and administer our flag applications. Using the form api, we create a tableselect element, check box form element and submit button. In doing so, I also show you the l function and briefing discuss Drupal theme functions.

Module Development
Drupal 7 Module Development Tutorial #6 - Querying the Database with DB_SELECT

In this six drupal video tutorial, I show you how we can get information from the database using db_select. To do so, we need to build a query using the Drupal database API. We do so by starting with a simple db_select call, followed by joining our tables. Then we add our fields, order our results and finish it all off by extending the query to use a pager.

Module Development
Drupal 7 Module Development Tutorial #5 - Creating Paths with Hook_menu

In the 5 tutorial of this 10 part series on Drupal module development, I show you how we can create administration pages using hook_menu in Drupal. Continuing from tutorial #4, we can now add flag applications to the database but need to be able to access them. Using api.drupal.org and the node module, I show you how we can write our function to return an administration page.

In the next tutorial, I'll show you how to query the database to get the applications and return them in a themed table with a pager - Exciting!

Module Development
Drupal 7 Module Development Tutorial #4 - Inserting Data Into and Deleting Data From Our Database

In this 4th video tutorial on Drupal 7 module development, I show you how we can insert data into and delete data from our database. To do so, we first call the hook hook_flag_flag from the flag module and use the Devel module to look inside the variables passed to the function. From there, we are able to grab the data we need and using the database api, insert our data into the database. 

Following similar steps, we conclude the tutorial by deleting the data from the database when a node is unflagged.

Module Development
Drupal 7 Module Development Tutorial #3 - Creating Tables with Hook_Schema

In the third of ten Drupal video tutorials on custom module development, I show you how to create a custom database table that is automatically created when you install your module and deleted when you uninstall your module. To do so, we create a new file for our module, a .info file and call the function hook_schema. Additionally, I also show you how the Schema module can make our lives easier by providing the table description for our file.

Module Development
Drupal 7 Module Development Tutorial #2 - Creating a Default Flag with the Flag API

In the second of ten Drupal video tutorials on custom module development, we begin by taking a look at the Flag API as we will be relying heavily on the Flag module for our custom work. In doing so, we call a flag hook which creates a default flag, flag application. Using the Flag UI, we are able to create the flag, get the associated code and update our .module file so that when our module is installed, it automatically creates the default flag application.

Module Development
Drupal 7 Module Development Tutorial #1 - Setting Up Our Project and Writing our .Info File

In the first Drupal video tutorial of this ten part series, I show you the module we will be creating, the Flag Application module. From there, we head over to Drupal.org to get the Flag and Devel modules. Lastly, we create the two files that all modules require, the .info and .module files. This tutorial concludes with us writing the .info file for our module and enabling the module on our site.

Module Development
Introduction to PHP for Drupal Tutorial #10: PHP Objects

In the tenth and final video tutorial of this series, I introduce you to PHP objects. Specifically, we look at what a class is in PHP, how we define a class, how we create class variables, what the keywords private and public mean and how we can create class methods. This tutorial is meant to be a high level introduction to PHP objects to give you a basic understanding of what they are, why they are used and how you can interact with them.

PHP
Introduction to PHP for Drupal Tutorial #9: PHP Functions Continued

In this 9th PHP video tutorial, I show you how we can use functions from a separate file to make our code a little cleaner. Here, we create a form which allows users to enter a position and name to add to a starting player lineup. Using the session variable to retain the players entered, we pass the session and post variables to our functions which look at whether the post variable was filled out, whether the form was reset, and finally update the roster. We also use a custom function to print out our lineups which also relies on two foreach loops in case we have multiple lineups.

PHP
Introduction to PHP for Drupal Tutorial #8: PHP Functions

In this 8th PHP tutorial, I walk you through PHP functions. I show you the syntax for creating your own functions, explain why you should create functions, look at passing variables into functions, defining default values for variables passed to functions, how to return values from functions and lastly, how variables can be passed in by reference.

PHP
Introduction to PHP for Drupal Tutorial #7: PHP Loops

In this 7th PHP tutorial, I walk you through loops in PHP, specifically the for, while, do while and for each loops. In doing so, I show you some common errors when working with loops and flag some things you'll find common to Drupal module code. We conclude the tutorial with a quick look at break and continue statements.

PHP
Introduction to PHP for Drupal Tutorial #5: Nesting IF and Switch Statements

In this PHP video tutorial, we continue where we left off in #4 and look at nesting IF statements. I show you how we can check for one condition and if it is true, then check for more conditions. From there, we change things up and look at Switch statements. These essentially provide the same functionality as If / Else If statements but can look cleaner and easier to read. Finally, we conclude the tutorial by looking at short form IF statements. This should only really be used for very simple IF evaluations.

PHP
PHP for Drupal Tutorial #4: Conditional IF Statements

In the fourth introduction to PHP tutorial of this series, I walk you through PHP If statements which allow us to add some dynamic complexity to our scripts. In doing so, we use an if statement to selectively print a message to a user but these can obviously get very complex. In short, an if statement is provided something to evaluate, which if true, executes some block of code. We conclude by looking at a statement which is a little more complex and reacts to input provided by a user via an HTML form.

PHP

Pages

Subscribe to Drupal Video Tutorials