Academy

Heard about DrupalEasy Academy Career Training? Learn more about our 10-week quickstart Drupal Career Starter Program.

New Podcast

Posted Wednesday, May 8 at 9:38 am
Bob Kepford (kepford) from The Weekly Drop joins Andrew Riley, Ted Bowman, and Mike Anello to talk about how Bob mines nuggets of Drupal goodness from the weekly Drupal firehose. Other topics discussed include Panopoly, open-source project statistics, the impending Google Reader apocalypse, Open Atrium 2.x, and a bunch of other mostly Drupal-related topics.
Download Podcast 105
DrupalEasy_ep105_20130508.mp3
Syndicate content

Survey

Interested in learning more about Drupal, but can't find the training you're looking for? Help us help you by letting us know what workshops interest you. Take this short survey to let us know!

Newsletter

Stay up-to-date on DrupalEasy workshops and other events. On average, we send about one newsletter per month.

Testimonial

Mike is a great teacher!

Who are we?

DrupalEasy is the collective expertise of Ryan Price and Michael Anello, who joined forces to provide training and consulting services worldwide. Read all about them and what they can do.

What is Drupal?

Drupal is a free, super-powerful content management system for sites that require information posting and collection, including blogs, forums, videos, photos, and databases of information. We think it is the best platform available. Here's why...

Why Drupal?

More and more savvy organizations are going with Drupal for content management, and its no mystery why. It’s free, flexible, and easy to maintain for small or large volume sites. Learn more...

Current Posts

DrupalEasy Podcast 60: Sussudio

Screencasts, cultivation grants, configuration management, and Batman are just some of the Drupal topics that Ryan Price, Mike Anello, and special guest Johan Falk discuss on episode 60 of the DrupalEasy Podcast.

Five Stories

  1. Johan Falk from NodeOne.se is a prolific Drupal screencaster - having created over 70 free screencasts (feed) on advanced configuration (Views, Page Manager, Flag, Rules, etc...) as well has his most recent on-going series on module development. Ryan and Mike talk to Johan about his method for creating screencasts and teaching Drupal. Johan is also the author of two Drupal books (both in Swedish, one of which is currently being translated to English). Johan’s username is Itangalo on Drupal.org.
  2. Drupal Community Cultivation Grants is a new program from the Drupal Association that aims to provide money to local user groups and individuals with creative ideas for building the Drupal community. 
  3. A Configuration Management Sprint recently took place prior to DrupalCamp Colorado. 
  4. The Drupal Event Organizing Guide aims to help aspiring Drupal event organizers. 
  5. DrupalCon London sessions announced and Batman!

Picks of the Week  

Sponsor

WebEnabled.com

Site of the Week

The Quarrel iOS game web site - If you'd like your site highlighted, please submit it at http://DrupalEasy.com/siteoftheweek.

Follow us on Twitter

If you'd like to leave us a voicemail, call 321-441-3964. Please keep in mind that we might play your voicemail during one of our future podcasts. Feel free to call in with suggestions, rants, questions, or medicinal advice for Andrew. If you'd rather just send us an email, please use our contact page at http://DrupalEasy.com/contact

No votes yet

Beginning Drupal Module Development or How I Wrote the Cacheflusher Module (Part 1)

Average: 4.8 (8 votes)

This guest post was written by Ben Hosmer, a Drupal user new to module development as well as an active member of the Florida Drupal user community. He often blogs about Drupal related topics at radarearth.com

For the past five or six months, I've been itching to write a Drupal module. It seems to me to be the final step in attaining that Drupal nirvana, and you gain instant street cred as well at the monthly meet-ups. I've heard it also can up your certified to rock score too, since you get commits added to your history.

Thinking back to my early days learning Drupal, the mythical, magical, modules were those things you didn't mess with. You downloaded them, installed them, and usually they worked. The module developers were the big kids on the playground. The seniors in high school, so to speak. But, because of Drupal's awesome community, they weren't the bullies.

The CacheFlusher isn't my first module. I got my feet wet updating the Apture Module to Drupal 7, with some guidance from @ultimike (Mike Anello). Yeah, he is certifiied to rock a 7.

I learned a few things while I was updating the Apture Module, that made it a bit easier to write my own module from scratch.

What you need

First of all, you don't necessarily need to be a PHP guru to write a module. In fact, I am very far from it. You will need some basic, general understanding of programming flow though. I had dabbled in python before, and have been learning some PHP along the way too, but it definitely is not a pre-requisite. You just need a basic understanding of what code does.

You will need three things to write a module:

  1. A Drupal Installation
  2. A Text-Editor
  3. An internet connection (For references to the API)

You can set up a development environment on your local computer using WAMP if you are running windows, or MAMP if you are on the MAC. Linux folks, you most likely already have everything you need. Just make sure you are running PHP5.

Check out these getting started guides to help you get WAMP or MAMP if you don't already:

MAMP: http://www.mamp.info/en/documentation/index.html

WAMP: http://www.wampserver.com/en/

For an even easier setup with no installation, go to webenabled.com and sign up for a free account, although transferring files back and forth for testing might become tedious.

There are numerous text-editors available. A lot are free. Your operating system probably includes one. TextWrangler is my personal favorite for the mac, but you really need to try different ones to decide which one you really like. Windows users can use Notepad++. Some offer syntax and code completion as well as a lot of other nifty features.

Let's get started

The Modules Directory

First, if you have installed any contributed modules before, and you have ever peeked inside your sites/all/modules directory, you will see that there are a bunch of other directories with names like “views”, “mollom” and “colorbox”. These folders contain the code for each contributed module installed on your site. You will also notice that the names generally coincide with the name of the module. This is important, as we will soon learn.

Open one of the folders and look inside. I will promise you that you will see at least two files there along with possibly a README. One has a .info extension and the other has a .module extension, preceded by the exact same name of the parent directory.

The sites/all/modules folder

This is how Drupal keeps track of the contributed modules available when you visit admin/modules

If you plan on sharing your modules with the rest of the world, (really why wouldn't you), go set up git on drupal.org using the Git Instructions as your guide.

The .info File

After following the instructions, cd into your new module directory. You should see a .info file with your repository name already there. Drupal does this for you when you create your sandbox, and you just cloned it into your directory.

The Modules Directory

Open that .info file. This is kind of the table of contents for your module and contains some standard entries that every module should have.

What you will see is: name = yourmodulesname

This tells Drupal what the name of your module is. This is also where the information contained in the module overview page at admin/modules comes from.

We should add a few things before we are done here. Hit enter and start a new line.

Add description = a description about what your module does.

The .info File

This creates the description for your module on the module overview page.

Our next entry will tell Drupal where to categorize our module. When you view the module overview page at admin/modules you will see some headings for subcategories like “Core”, “Services”, and “Taxonomy”. This helps to keep your modules organized.

The Modules Overview Page

Add a new line and type package = administration

The last entry we will need is important so that Drupal knows what version of Drupal this module was created for.

Add core = 7.x

This tells Drupal that your module is for Drupal 7.

If you plan on sharing your module, don't add a “version” entry. Drupal will automatically do this for you when it is packaged.

Make a new line, and add your final entry, files[] = yourmoudlename.module

This directs Drupal to your actual module code so that it can run.

Save your .info file.

What the .info File will Finally Look Like

Here is what the final version of the CacheFlusher module's .info file looks like:

name = CacheFlusher
description = Adds a quick way to flush your cache with a button on the admin toolbar.
package = "Administration"
core = 7.x

files[] = cacheflusher.module

If you start up your Drupal installation and go to admin/modules, you will see a new entry for your module on the module administration page. It won't actually do anything yet though.

The .module File

Next, you need to add your .module file. This is where all of the work gets done.

What are Drupal Modules?

Drupal modules are basically a series of functions, with a majority of them being function calls to Drupal functions. The documentation for every function available to Drupal can be found at api.drupal.org. This is your resource for finding out what each function does and how to use it.

As a newcomer, I found it to be lacking in examples. Sometimes it can be impossible to figure out what the function actually does. So, instead of complaining in a comment, I added some examples to the API entries.

 

After my frustration, I discovered the Examples Project that provides an excellent group of modules that do just what the project name implies--provide example modules for developers that give working code examples of what some of the popular functions actually do. It is an excellent resource and you should add it to your bookmarks toolbar because you will probably refer to it quite often.

 

You may find it very helpful to find a module that is very simple, and look through the code. If you are adding a menu entry for example, find a module that does the same thing and look through the .module file. 

 

Often you might find .inc files. These point to additional code that wasn't included in the .module file. These will be noted in the .module file though with a filename.inc. This references those additional files.

 

Another good resource is your Drupal installation itself. By browsing to the core modules folder found at /modules, you can search for the function you are looking for by using spotlight if you are using a mac, or search for windows or locate from your nix terminal.

 

This can often shed some light on the function or at least reveal what function to implement to perform a certain task.

Now that you have your .info file and your directory. You are ready to create your .module file and spin some code up.

View Your Module in Action

You can actually now got to your Modules page through your Drupal interface, and see the new entry for your module:

The Modules Administration Page

The second part of this article will go through the creation of your actual .module file.

Trackback URL for this post:

http://drupaleasy.com/trackback/442

Announcing the Drupal Event Organizing Guide, Version 2

No votes yet

Over the past few months since DrupalCon Chicago, I've spent some time working with other members (bhosmer, greggles, coltrane, christefano, lisarex, marguerite) of the community in reorganizing and rewriting the first version of the Drupal Camp Organizing Guide. Along with a new title (signifying the inclusion of other types of events such as sprints, summits, and hackfests), the guide is greatly enhanced with a lot of new information.

The goal of the effort is to provide a mechanism for experienced event organizers to transfer knowledge to other (both new and experienced) event organizers. By sharing lessons learned, pain points can be minimized, and organizing processes can be made more efficient.

The new Drupal Event Organizing Guide is now more than 12,000 words, with 24 sections including committees, budget, volunteers, web site, t-shirts, marketing, and case studies.

The guide is a living document - it is a wiki page - with plenty of opportunities for fellow Drupal event organizers to easily contribute. Many sections have a bulletted "examples" list - where we're still looking for input. Specifically, we're looking for snippets or links that offer insights on:

  • How different user groups find enough volunteers to support their events
  • Approximate attendance of initial events in different geographic areas
  • Factors that should be taken into account when determining a date for the event
  • Types of venues where events have been held
  • Approximate sponsorship level of initial events in a geographic areas
    Marketing methods
  • Methods that groups use to organize themselves
  • Registration abandoment rates
  • How different camps organize session tracks
  • Links to sample budgets
  • Legal entity options
  • Sponsorship tiers
  • Sample sponsorship pitch letters
  • T-shirt size estimates
  • Methods for providing giveaways
  • Post-event survey samples
  • Case studies
  • Additional resources

Since it is a wiki page, any part of the document, not just these topics, can (and should) be updated by those who wish to share new information.

I'm hoping to get some feedback from experienced as well as potential Drupal event organizers about which sections need to be expanded or clarified as well as what we missed.

If you're an organizer with something to add - but too busy to edit the guide - feel free to contact me (please use the "Event Organizers" category) with the information you'd like to share and I'll get it integrated in the document.

Trackback URL for this post:

http://drupaleasy.com/trackback/441

DrupalEasy Podcast 59: Not Just Matt's Book

Join Ryan Price, Mike Anello and special guest Matt Butcher - one of the co-authors of "Drupal 7 Module Development" as they discuss the book, the growing complexity of Drupal code, new modules, DrupalCon 2013 (Go Canada!), and their picks of the week!

Five Stories

  1. Drupal 7 Module Development from Packt Publishing and Why Object-Oriented Programming is Bad for Drupal. Matt's personal blog is at http://technosophos.com
  2. Fast Tracking Drupal Bug Fixes and http://drupal.org/node/1050616
  3. Form Elements in Views (video) 
  4. DrupalCon North America Straw Poll and selection committee info.
  5. Aloha HTML5 WYSIWYG and Chx's blog post 

Picks of the Week

Sponsor

WebEnabled.com

Site of the Week

If you'd like your site highlighted, please submit it at http://DrupalEasy.com/siteoftheweek.

Follow us on twitter:

If you'd like to leave us a voicemail, call 321-441-3964. Please keep in mind that we might play your voicemail during one of our future podcasts. Feel free to call in with suggestions, rants, questions, or medicinal advice for Andrew. If you'd rather just send us an email, please use our contact page at http://DrupalEasy.com/contact

No votes yet

DrupalEasy Podcast 58: Comedy of Errors

On this week’s episode of the podcast, Ryan, Andrew, and Mike are joined by Barry Madore from Advantage Labs in Minneapolis, MN. They discuss DrupalCamps, a lightweight Payment module, Drupal 8 initiatives, as well as several other topics and their picks of the week!

Five Stories

Picks of the Week

Sponsor

Thanks to Webenabled for sponsoring this week's podcast. Create, develop, and deploy Drupal applications entirely on the Webenabled platform. 

Site of the Week

GalTime.com - sent in by Erik Olsen. If you'd like your site highlighted, please submit it at http://DrupalEasy.com/siteoftheweek.

Follow us on twitter:

If you'd like to leave us a voicemail, call 321-441-3964. Please keep in mind that we might play your voicemail during one of our future podcasts. Feel free to call in with suggestions, rants, questions, or medicinal advice for Andrew. If you'd rather just send us an email, please use our contact page at http://DrupalEasy.com/contact

Your rating: None Average: 4.3 (21 votes)

DrupalEasy Podcast 57: Dreece's Pieces

Drupal Rock Star Amitai (pronounced om-eee-tie - trust us, we checked) Burstein joins Ryan, Andrew, and Mike to talk about Organic Groups for Drupal 7, Acquia, Webchick, and mobile Drupal.

Five Stories

  1. Special Guest - Amitai Burstein - Organic Groups For Drupal 7 - Drupal.org username: Amitaibu - works for Gizra.com - CertifiedToRock rating of 7 - Amitai’s UN OG7 presentation
  2. Acquia has record 1st quarter - revenue up 300% compared to Q12010 - 700 customers - 109 employees - 40K+ DrupalGardens sites - 140 hosting (mainly enterprise) customers - opened European office in Oxford, UK - described themselves as, "Acquia, the enterprise guide to Drupal, today announced..."
  3. Angie Byron (Webchick) is going to work at Acquia
  4. Users Versus the Mobile blog post by John Albin Wilkins (JohnAlbin) - need to focus development on "device capabilities", not individual browsers - "The new 'mobile experiences' we should be delivering are the same experiences that we should already be delivering to all our users."
  5. #DM8UX - Drupal 8 Mobile User Experience (Initiative?)

Picks of the Week

Sponsor

Thanks to Webenabled for sponsoring this week's podcast. Create, develop, and deploy Drupal applications entirely on the Webenabled platform. 

Site of the Week

Möbler.se - sent in by Johan Falk from NodeOne.

If you'd like your site highlighted, please submit it at http://DrupalEasy.com/siteoftheweek.

Follow us on twitter:

Bonus: Find Waldo somewhere in this podcast notes (it might be linked to) and post in the comments where you found him. We don't have any prizes but perhaps we'll give the first person a shout out on the next podcast.

If you'd like to leave us a voicemail, call 321-441-3964. Please keep in mind that we might play your voicemail during one of our future podcasts. Feel free to call in with suggestions, rants, questions, or medicinal advice for Andrew. If you'd rather just send us an email, please use our contact page at http://DrupalEasy.com/contact

 

Your rating: None Average: 4.5 (2 votes)

DrupalEasy Podcast 56: Going Vertical

Sean Larkin, one of the maintainers of the Watershed Now Drupal distribution, joins Andrew, Ryan, and Mike in this week's podcast. Watershed Now is a highly targeted (vertical) distribution whose goal is to help conservation organizations get useful web sites up-and-running quickly. Sean talks about his background in various watershed projects, some of the features of the distribution, as well as the business model for this type of Drupal product. 

In addition to the interview with Sean, the group discusses Acquia's push for more usability, April Fools Day in the Drupal community, a potential competitor for Views, as well as a few other topics and their picks of the week!

Five Stories
Picks of the Week
Thanks to Webenabled for sponsoring this week's podcast. Create, develop, and deploy Drupal applications entirely on the Webenabled platform. 

Site of the Week
If you'd like your site highlighted, please submit it at http://DrupalEasy.com/siteoftheweek.
 

Follow us on twitter:

If you'd like to leave us a voicemail, call 321-441-3964. Please keep in mind that we might play your voicemail during one of our future podcasts. Feel free to call in with suggestions, rants, questions, or medicinal advice for Andrew. If you'd rather just send us an email, please use our contact page at http://DrupalEasy.com/contact

No votes yet

DrupalEasy Podcast 55: Ryan Talks (Sometimes)

Hey, hey, the gang's all here with our brief DrupalCon Wrapup, Drupal 8 initiatives on the horizon, a brand new Views 3 inside and out, a better issue queue for Drupal.org and a look at how the Drupal.org Sandbox projects are going.

5 Stories

  1. DrupalCon Chicago Wrapup - a few favorite sessions
    1. Mike - Drupal Commerce by Ryan Szrama
    2. Ryan - Render API in Drupal 7 by Franz Heinzmann
  2. Drupal 8 Announcement & Configuration Management in Drupal 8 Lead Selected
  3. Drupal.org Prairie Initiative (DX) and Leisa's Core Conversation from DrupalCon Chicago
  4. The New Views 3 UI and Views 3 API are awesome
  5. Drupal.org Sandbox Projects at One Month

DrupalEasy News

  1. Peachpit Article by Mike - Interview with Tom Geller
  2. DrupalCon Chicago video interviews on DrupalEasy.com

Thanks to WebEnabled Instant Development Platform for sponsoring this week's podcast. Create, develop, and deploy Drupal applications entirely on the Webenabled platform.

Picks of the Week

Site of the Week

http://drupaldistrowatch.com/

If you'd like your site highlighted, please submit it at http://DrupalEasy.com/siteoftheweek.

Follow us on twitter:

If you'd like to leave us a voicemail, call 321-441-3964. Please keep in
mind that we might play your voicemail during one of our future
podcasts. Feel free to call in with suggestions, rants, questions, or
D&D challenges for Andrew. If you'd rather just send us an email,
please use our contact page at http://DrupalEasy.com/contact

No votes yet

Ed Sussman demos Buzzr 2.0 at DrupalCon Chicago

In this video, Ed Sussman, CEO of Buzzr.com tells us a bit about their usability layer on top of Drupal, and gives us a demonstration of three new features: a live theme editor using Sweaver, twitter integration with a new auto-tweet feature, and a feature he calls QuickStarts, to give you a complete site instantly, complete with a theme and content, which you can then customize.

For more videos from DrupalCon Chicago, visit DrupalEasy's video page.

Heather James on BoFs and Drupal Training at DrupalCon Chicago

In this video, Heather James talks about Training and Professionalism as it relates to the future of Drupal, following a comment by Dries that Drupal needs more professionalism.

For more videos from DrupalCon Chicago, visit DrupalEasy's video page.