• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
5 Important Tools for Drupal Development
 

5 Important Tools for Drupal Development

on

  • 12,523 views

 

Statistics

Views

Total Views
12,523
Views on SlideShare
12,024
Embed Views
499

Actions

Likes
11
Downloads
145
Comments
0

4 Embeds 499

http://www.drupalhawaii.com 277
http://drupalhawaii.com 214
http://drupalhawaii.prod.acquia-sites.com 7
https://twitter.com 1

Accessibility

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • modules
  • Is familiar; it looks and acts like api.drupal.org
  • -Includes reference to contrib modules: Functions & methods, Source code -Includes many modules for D5, D6, D7, & D8
  • -User permissions control what user roles can use it -Admins intended role
  • -Hunting for the correct links and 4 page loads in the first example -A faster approach in the second -Allows you to get around a lot faster as an admin and perform everyday tasks
  • Small amount of shell experience Willingness to learn
  • -Information available online and inside README.txt in drush module -As well as many example use cases
  • -Can do this for many different drupal sites -Advanced setups can have different site aliases and site profiles to load different configurations for each specific Drupal install
  • -tip of the iceberg here -ways to quickly install brand new sites in 1 line of code that takes seconds -easily sync development sites to production sites
  • -Firebug for Drupal themeing. -Due to erratic behavior do not enable only for developing. -Turn on and off with drush makes it quick and easy!
  • -Drupal theme is built from many theming functions and templates we can call theming hooks. -Can be confusing to know what function in source is responsible for theme -this is where http://drupal.org/node/173880
  • -Drupal theme is built from many theming functions and templates we can call theming hooks. -Can be confusing to know what function in source is responsible for theme -this is where
  • -click on the link to template source for easy “Copy + Paste” as a base for new template -use candidate template files as naming reference for saving in theme directory -
  • -click on the link to template source for easy “Copy + Paste” as a base for new template -use candidate template files as naming reference for saving in theme directory -

5 Important Tools for Drupal Development 5 Important Tools for Drupal Development Presentation Transcript

  • 5 Important Tools for Drupal Development July 14, 2011
  • 5 Important Tools for Drupal Development
    • Overview
    • A talk of 5 tools to aid you in developing, administering, and maintaining Drupal sites.
    • Goals
    • Spark an “ ah hah! ” moment
    • Introduce new ideas and techniques
    • Get you excited about Drupal
    ANTHOLOGYMARKETING.COM
  • DRUPALCONTRIB.ORG
    • TOOL #1
    ANTHOLOGYMARKETING.COM
  • Contrib is
    • how Drupal is extended and customized.
    • made up of 8292 modules today.
    • written by the community and shared under the same GNU Public License (GPL) as Drupal.
    • not shipped with Drupal core releases.
    • shaping future releases of Drupal.
    ANTHOLOGYMARKETING.COM
  • drupalcontrib.org
    • Search contrib modules
    ANTHOLOGYMARKETING.COM
  • Contrib API reference ANTHOLOGYMARKETING.COM
  • Add modules to documentation ANTHOLOGYMARKETING.COM
  • ADMINISTRATION MENU
    • TOOL #2
    ANTHOLOGYMARKETING.COM
  • A simple administrative interface
    • The menu is theme independent
    • CSS-based drop down style menu
    • Eliminates unnecessary page loads and clicks
    • For D6, D7
    ANTHOLOGYMARKETING.COM
  • A comparison
    • Create a new CCK field for a custom content type
    • Workflow #1 – without administration menu
    • Workflow #2 – with administration menu
    ANTHOLOGYMARKETING.COM
  • Workflow example #1
    • Click on Administer
    ANTHOLOGYMARKETING.COM
  • Workflow example #1
    • Click Content Types
    ANTHOLOGYMARKETING.COM
  • Workflow example #1
    • Click manage fields
    ANTHOLOGYMARKETING.COM
  • Workflow example #1
    • Find desired field row and click on configure
    ANTHOLOGYMARKETING.COM
  • Workflow example #2
    • Navigate the admin menu until you find the desired field and click on configure
    ANTHOLOGYMARKETING.COM
  • DRUSH
    • TOOL #3
    ANTHOLOGYMARKETING.COM
  • What is drush?
    • Dru pal + sh ell = Drush
    • Drush is a command line shell and scripting interface for installing, developing, and maintaining Drupal sites.
    • Intended Users
      • Developers
      • Admins
    ANTHOLOGYMARKETING.COM
  • Requirements
    • Server
    • CLI-mode capable PHP binary, PHP 5.2 or greater
    • Drupal 5.x-2.5 or later
    • SSH access
    ANTHOLOGYMARKETING.COM
  • Installation
    • Download (and extract):
    • ~ $ wget http://ftp.drupal.org/files/projects/drush-7.x-4.4.tar.gz
    ANTHOLOGYMARKETING.COM Make sure drush is executable: ~ $ chmod u+x /path/to/drush/drush Add Alias to ~/.bashrc: ~ $ alias drush= ‘ /path/to/drush/drush ’ Reload bash and type drush: ~ $ drush
  • Using Drush
    • Navigate to Drupal site folder:
    • ~ $ cd /path/to/drupal/web
    ANTHOLOGYMARKETING.COM Check site status: ~ $ drush status Drupal version : 6.22 Site URI : http://default Database driver : mysqli Database hostname : localhost Database username : drupaluser Database : Connected Drupal bootstrap : Successful etc…
  • Example use cases
    • Download (and extract) views module:
    • ~ $ drush dl views
    ANTHOLOGYMARKETING.COM Clear site cache: ~ $ drush cc Run cron: ~ $ drush cron Update core, enabled modules, and database: ~ $ drush up
  • DEVEL THEMER
    • TOOL #4
    ANTHOLOGYMARKETING.COM
  • Devel Themer
    • Theming tool
    • Depends on Devel
    • No current stable release due to erratic behaviors in less stable browsers
    • Turn on/off with drush
    • For D6, D7
    ANTHOLOGYMARKETING.COM
  • Drupal Theme ANTHOLOGYMARKETING.COM http://drupal.org/node/173880
  • Drupal Theme ANTHOLOGYMARKETING.COM http://drupal.org/node/173880
  • Devel Themer in action
    • Theme hierarchy
    • Template information
    • Link to template source file
    • Possible names of overriding template files
    ANTHOLOGYMARKETING.COM
  • Remember
    • Enable/Disable devel_themer with drush
    • After enabling, refresh your browser to load the themer
    • Check box turns themer on
    • Hover over elements on the page
    • Use suggested overrides and naming conventions
    • Clear cache and test theme
    ANTHOLOGYMARKETING.COM
  • DRUPAL FOR FIREBUG
    • TOOL #5
    ANTHOLOGYMARKETING.COM
  • Drupal for Firebug
    • Extends the Firefox browser plugin, Firebug
      • http://getfirebug.com/
    • Enhancing Drupal debugging through the browser console.
    • Provides insight into node, form, user objects
    • Works with Devel module to display SQL queries and execute PHP from the browser
    • Also works with Views if installed
    ANTHOLOGYMARKETING.COM
  • Installing Drupal for Firebug
    • Install Firebug
      • http://getfirebug.com/
    • Install Drupal for Firebug Add-on:
      • https://addons.mozilla.org/en-US/firefox/addon/drupal-for-firebug/
    • Install Drupal for Firebug module:
      • http://drupal.org/project/drupalforfirebug
    ANTHOLOGYMARKETING.COM
  • Viewing objects
    • Visualize the processing of objects
      • First the node is loaded
      • Then ready to be viewed
      • Then altered by modules
    ANTHOLOGYMARKETING.COM
  • Helping developers
    • Developers can write to firebug log!
    • Example use in custom module:
    ANTHOLOGYMARKETING.COM function firep($element, $title = NULL) http://jbenner.net/blog/drupal-for-firebug
  • Now available for Chrome!
    • Use your preferred developing browser!
    ANTHOLOGYMARKETING.COM
  • Resources
    • Drupal API Reference
    • Drupal core: http://api.drupal.org
    • Drupal contrib: http://drupalcontrib.org
    • Administration Menu
    • Project page: http://drupal.org/project/admin_menu
    • Demo: http://www.youtube.com/watch?v=3YgnIFi73QI
    ANTHOLOGYMARKETING.COM
  • Resources
    • Drush
    • Project page: http://drupal.org/project/drush
    • Home page: http://drush.ws
    • Installation: http://openspring.net/tip/how-to-install-drush-serverwide-in-less-than-one-minute
    • Devel Themer
    • Project page: http://drupal.org/project/devel_themer
    • Themable output: http://drupal.org/node/173880
    • Template preproccess: http://drupal.org/node/223430
    ANTHOLOGYMARKETING.COM
  • Resources
    • Drupal for Firebug
    • Firebug: http://getfirebug.com/
    • Firefox Add-on: https://addons.mozilla.org/en-US/firefox/addon/drupal-for-firebug/
    • Chrome Add-on: https://chrome.google.com/webstore/detail/imlijcpfmhmifofiihbofoamohkdbblc
    • Project page: http://drupal.org/project/drupalforfirebug
    • Review: http://jbenner.net/blog/drupal-for-firebug
    ANTHOLOGYMARKETING.COM
  • Questions? ANTHOLOGYMARKETING.COM