General Guidelines for Drupal Development within the McGill University Web Management System
Unless otherwise specified, all development for McGill Drupal-based Web Management System must be contained in Drupal modules. McGill's primary theme will be used with all sites and should not be overridden by a sub-theme without a compelling reason that aligns with McGill IT strategy.
Unless otherwise specified, all externally developed Drupal modules must be compatible with the following:
- Drupal version 7.24
- PHP 5.4.15
- MySQL 5.1 (will be 5.2 shortly)
- jQuery version 1.7.1
- jQuery UI 1.8.11
- Apache web server
Modules must be developed under the following principles:
- Modules must adhere to Drupal coding standards, security standards and best practices as outlined here: http://drupal.org/node/360052.
- Modules must pass inspection by the most recent 7.x version of the Drupal coder module http://drupal.org/project/coder without any errors or warnings.
- Modules and any libraries that they depend on should be releasable under a GPL2 or similar license http://www.gnu.org/licenses/gpl-2.0.html.
- Modules should provide an extensible API where possible and applicable.
- Modules should override core functionality using Drupal's hook system. Core Drupal code must never be modified directly.
- Modules must be designed and tested to work with Drupal multisite.
- Modules must be thoroughly commented in confomity with Doxygen formatting conventions.
- Modules must not duplicate existing solutions already in use within McGill’s Drupal-based Web Management System.
- Use of Drupal's core PHP module is not allowed.
- All modules will be subject to review by McGill IT Services to ensure that they conform to the aforementioned standards.
- If any contributed modules are used that are not currently part of the McGill code base, they must meet all of the above guidelines and have a full (not dev, alpha, beta or rc) release.
All UI or theme layer elements should conform to the following standards:
- Themes must adhere to Drupal coding standards, security standards and best practices as outlined here: http://drupal.org/node/360052.
- Unless otherwise specified, all development must be done using the primary McGill Drupal theme.
- Wherever possible PHP logic must be placed in modules and removed from the theme layer.
- Drupal UI best practices http://drupal.org/node/501452
- XHTML 1.0 http://www.w3.org/TR/2002/REC-xhtml1-20020801/ with allowances made for backward compatible HTML 5 http://www.w3.org/TR/2010/WD-html5-20100304/
- CSS 2 http://www.w3.org/TR/2008/REC-CSS2-20080411/ with allowances made for backward compatible CSS 3 http://www.w3.org/TR/2001/WD-css3-roadmap-20010523/
- WAI http://www.w3.org/WAI/intro/accessibility.php WCAG2.0 http://www.w3.org/TR/WCAG20/ accessibility standards
- WAI http://www.w3.org/WAI/intro/accessibility.php ATAG1.0 http://www.w3.org/TR/ATAG10/ accessibility standards
- All tpl.php PHP should be limited to print functions and if/else statements. More complicated theme layer PHP should reside in template.php.
- jQuery or HTML5 solutions should be used in place of Adobe Flash wherever possible.
- Theme code must be thoroughly commented in confomity with Doxygen formatting conventions.
- Content must display properly in the following web browsers: IE7, IE8, IE9, IE10, Firefox, Chrome and Safari.
- Content must display in a similar or simplified manner on IOS or Android devices.