LicenseThis work is licensed under the Creative CommonsAttribution-NonCommercial-ShareAlike 3.0 UnportedLicense. To view a copy of this license, visithttp://creativecommons.org/licenses/by-nc-sa/3.0/ orsend a letter to Creative Commons, 444 CastroStreet, Suite 900, Mountain View, California, 94041,USA.Download: http://training.acquia.com/hellodrupal
What we’ll do todayINTRODUCTIONDownload: http://training.acquia.com/hellodrupal
What we’ll do todayDownload: http://training.acquia.com/hellodrupal
What we’ll do1. Short presentation 2. Quick demo 3. You try it Concepts and cases Download: http://training.acquia.com/hellodrupal
A useful tool• Sandbox for us today!• Good for collaboration.• Maintains the server. Updates the software• Implements improvements in Drupal• Provides support in the forums (free) and tickets (paid)
The Lego analogyhttps://twitter.com/#!/tom_eric/status/26847650412
Levels of customizationAttribution 2.0 Generic (CC BY 2.0) Attribution 2.0 Generic (CC BY 2.0)By Sirius™ By V&A Steamworkshttp://www.flickr.com/photos/sontranphotos/6305186977/ http://www.flickr.com/photos/32482342@N05/6232526245/
Components v KitsAttribution-NoDerivs 2.0 Generic (CC BY-ND 2.0) Attribution 2.0 Generic (CC BY 2.0)by JuditK By creative.paradoxhttp://www.flickr.com/photos/juditk/5879492679/ http://www.flickr.com/photos/edmands/2771878770/
Why choose Drupal1. Compared to other CMSs: • Highly conﬁgurable functionality and UX. • Extendable with API and custom themes.2. Compared to frameworks: • Time/effort saved with sub-systems. • Time/effort saves with distributions.3. A large ecosystem of service providers and specialists.4. Large and active community.
Customize client UXWorkbench Admin with Rubric theme
Sub-systems Featured News About Services Portfolio ContactContent Users Taxonomy CommentsContent title D. Schrute adventure Wow, cant Germany city breakwait to get dwight city break 8 Sept started. J. Halpert Spain sailing joe Me too! shopping 8 Sept text search
Active contribution drupal.orgData as of March 2012- Check Drupal.org for updates!
A growing community 50 150 750 1350 2250 4200 4751 3000 + 2005 2006 2007 2008 2009 2010 2011 2012Antwerp Vancouver Barcelona Boston DC & San & Chicago & Denver & Brussels & Sunnyvale & Szeged Paris Copenhagen London & Munich
Regional and niche http://tinyurl.com/localdrupal http://groups.drupal.org/events
Next DrupalCons Munich PortlandAugust 2012 May 2013
The ***P stack http://drupal.org/requirements Drupal is ﬂexible, but most tested on... Linux *, Apache *, MySQL *, PHP * works well with othersCreative Commons Attribution http://www.ﬂickr.com/photos/ftmeade/6134210742/ By Fort Meade
AdministrationNext we’ll look at the sub-systems in Drupal.
Integration• Existing and popular services? Likely there’s a module.• A proprietary service? There may not be an existing module.• Your unique data source or custom application will require scripting.
Drupal + Twitter1 Link to account2 Display feed & archive3 Tweet this button4 Login and tweet library.acquia.com/articles/drupal-integration-twitter
Drupal + Facebook developers.facebook.com/1 Just add a “Like” button docs/reference/plugins/like/2 Use Facebook for login drupal.org/project/fbconnect3 Develop FB applications drupal.org/project/fb
IntegrationThird party services Socialhttp://drupal.org/project/salesforce http://drupal.org/project/twitterhttp://drupal.org/project/adsense http://drupal.org/project/google_plusonehttp://drupal.org/project/site_verify http://drupal.org/project/mailchimphttp://drupal.org/project/acquia_connector http://drupal.org/project/fbhttp://drupal.org/project/opencalaishttp://drupal.org/project/alfresco Mappinghttp://drupal.org/project/millennium http://drupal.org/project/geoﬁeldMedia http://drupal.org/project/gmap http://drupal.org/project/geocoderhttp://drupal.org/project/media_youtube http://drupal.org/project/openlayershttp://drupal.org/project/media_vimeohttp://drupal.org/project/flickr http://drupal.org/project/locationhttp://drupal.org/project/media_flickr VisitJQuery librarieshttp://drupal.org/project/superﬁsh http://j.mp/3rdpartyDhttp://drupal.org/project/jcarousel for details on third party integrationhttp://drupal.org/project/addtoany
“Projects”• Module: Code that alters, extends or enhances Drupal’s base functionality.• Theme: Provides the look, feel, and UX for your site.• Distributions/Installation proﬁles: Packaged Drupal + Modules, themes and conﬁguration for a use-case
Can Drupal do X? This is the Title of the VideoSelect a date One morning, when Gregor Samsa woke from troubled dreams, he December 2011 found himself transformed... More...S M T W T F S30 1 2 3 4 5 6 16:9 URL 7 8 9 10 11 12 13 Embed14 15 16 17 18 19 2021 22 23 24 25 26 2728 29 30 31 1 2 3 0:00 / 4:59 Select TodaySlider Ratings 1 2 3Item Title 1 Item Title 2 Item Title 3 ItemSubtitle 1 Subtitle 2 Subtitle 3 Sub
ModulesSoftware to extend the functionality of Drupal. Here are some examples: Fivestar: A content rating system Webform: Submission form Flag: All purpose content marker
What is it really?Location in ﬁle hierarchy:Drupal core folder/sites/all/modules/
Clicking together• When choosing a module, consider:• Can you build with existing tools?• Build with Fields and Views? Puzzled By brad montgomery Attribution 2.0 Generic (CC BY 2.0)
More is less? • Generic components means additional modules.Attribution-NoDerivs 2.0 Generic (CC BY-ND 2.0) Attribution 2.0 Generic (CC BY 2.0)by JuditK By creative.paradoxhttp://www.flickr.com/photos/juditk/5879492679/ http://www.flickr.com/photos/edmands/2771878770/
Previous Create + display events Event module• More generic, ﬂexible solution. Drupal 7• Don’t duplicate effort. Create "event content type"• Standardize Content types administration. and Field (core)• Less dependence on Date ﬁeld custom code. + Display calendar or listing Calendar Views
Take a “maintenance ﬁrst” approach to project selectionhttp://www.mediacurrent.com/blog/drupal-maintenance-challenge-and-how-manage-it-part-2
Key indicators Reputation Reach CurrencyMaintainers other Community around Recent commitscontributions and module? (last 4 weeks)?involvement, Related modules? Recent release?IRC, word of (green/stable)mouth, appearance Number ofin case studies and installations? Issue queueblog posts. responsiveness Integrate with other and maintenance? modules?
Making a theme• A combination of conﬁguration and then customizing with code.• What theming in Drupal entails • We’ll take a closer look• What skills you need HTML Advanced CSS Advanced Drupal Site-building Intermediate PHP Beginner
Use machine namesbased on core template pattern custom templatenode.tpl.php node--type.tpl.php node--article.tpl.php
Theming Tips• Do not put SQL queries directly into the theme. Not OK. (Make a module).• Follow best practices for conﬁguring content, such as resizing images on the server, and not with CSS.• Do use Style Guide module to reveal the styles used by Drupal.
A closer look (optional)Custom coding inDrupal
Making a module• Conﬁgure ﬁrst and override.• Reduce duplicate effort!• Custom “glue” for sites.• Skills required: HTML Advanced CSS Intermediate Drupal Site-building Advanced PHP Advanced
End-user experience Products They use the product, application or site Functionality User testing happens hereBuilding components Get them involved early Platform Web Framework
Editor experience Products Trusted managers Moderate content, Functionality Alter layout, conﬁgure the siteBuilding components Make their experience better! Platform Don’t forget to user test with these folks! Web Framework
Site building - 80-90% Products Select, install and conﬁgure modules Functionality Conﬁgure themesBuilding components Conﬁgure: A survey A forum Platform A content type Display of content Web Framework
Custom coding 10-20% Products Developing modules CSS/HTML for theme Functionality Work with the platformBuilding components Identify “hooks” - Which events? Platform Integrate with other components, APIs Web Framework
An event based systemEvent (hooks)A node has just been added ✔A node is showing in an edit form ✔A node is being deletedA form is about to be displayedA user has logged in ✔A user page is about to be displayed ✔A comment has been added ✔ Drupal’s API api.drupal.org/api/drupal
What can you do?• Use or create hooks- a simple callback function called on speciﬁc events.• Check access control.• Access data, from within Drupal or other datasource.• Insert, update and delete data.• Generate blocks.• Display results, or expose data to Views.• Theme how results or outcomes appear.
Product v Framework• Where do I interact with Drupal’s hook system to make custom functionality?• Watch “Taming the Burrito” by Jeff Eaton j.mp/tamelayers
The drop is always moving.• Update: Is a minor change, 7.12 > 7.15• Upgrade: A major version 6.x > 7.x• “We can break peoples code, but not peoples data.” • Drupal is not backward compatible. • Data is maintained, upgrade paths available for Drupal core and popular modules.
Drupal upgrades• Both core updates and upgrades must be performed manually.
Upgrade process Research Make a backup Perform upgrade data disable non-core Prepare code replace new ﬁles update all core upgrade create a test sitelogin user/1 upgrade contribmaintenance mode http://drupal.org/node/570162
Caveats• A new version of a module does not mean upgrade path for data.• Sometimes old modules are not upgraded, but moved to a more popular solution.
Drupal is built by people Photos from code sprints By muir.ceardach http://www.ﬂickr.com/photos/ceardach Attribution 2.0 Generic (CC BY 2.0)
Open Source do·o·cra·cy /dōˈäkrəsē/ Noun Responsibilities and and rights granted to those people who do the work rather than elected ofﬁcials.http://www.communitywiki.org/DoOcracy
Meet a maintainerStella Power 2007 Founded in First module 2010 and Started in contributed. employsDrupal as a 5 people HOBBY! Now involved in on 19 projects On Drupal.org: stella http://drupal.org/user/66894
How you can help them: Provide clear bug reports/screenshots. Be respectful. Contribute what you can.Stella Power Jacob Singh Stella http://drupal.org/user/66894JacobSingh http://drupal.org/user/68912