Book Image

Drupal 7 Development by Example Beginner's Guide

By : Kurt Madel
Book Image

Drupal 7 Development by Example Beginner's Guide

By: Kurt Madel

Overview of this book

<p>Drupal is a powerful PHP content management system that allows you to build a wide variety of websites. By combining the power of HTML5, JavaScript, and CSS, you can develop and customize a fully-functional, world-class website. This book also covers some important changes from Drupal 6 to version 7, so even experienced Drupal users will find this straightforward guide useful.</p> <p>Drupal 7 Development by Example Beginner's Guide has numerous code examples that will not only introduce new Drupal 7 development concepts, but will give you the skills needed to build a world-class Drupal website. By following the development of a recipe-sharing, e-commerce site, you will quickly and easily get your own Drupal site up and running.</p> <p>Starting from a solid Drupal 7development environment, this book will show you how to extend Drupal with front-end code using Ajax, jQuery, and server side PHP. In addition to learning how to integrate HTML5, the book will cover responsive web design, and cutting edge CSS3. Using the example of an e-commerce and social networking site, this book will develop your Drupal programming skills so that you will be capable of developing advanced code good enough to be shared with the Drupal community.</p>
Table of Contents (19 chapters)
Drupal 7 Development by Example Beginner's Guide
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Time for action – creating a custom Drush command to install the jQuery Cycle plugin


Now, let's learn how you can integrate Drush with a Drupal module to make certain install tasks easier.

  1. In Aptana Studio, create a new folder named drush in the d7dev/sites/all/modules/views_slideshow folder.

  2. Next, copy the colorbox.drush.inc file from the modules/colorbox folder to the drush folder we just created, and rename it to views_slideshow.drush.inc.

  3. Open the views_slideshow.drush.inc file in Aptana Studio, and modify the first eleven lines so they look as follows:

    <?php
    
    /**
     * @file
     *   drush integration for views_slideshow.
     */
    
    /**
     * The jQuery Cycle plugin URI.
     */
    define('JQUERY_CYCLE_DOWNLOAD_URI', 'https://github.com/downloads/malsup/cycle/jquery.cycle.all.latest.js');

    We are updating some of the comments to reflect that this is for the Views Slideshow module, and changing the name of the constant and location for downloading the jQuery Cycle plugin.

  4. Next, we are going to rename the hook_drush_command...