drupal 7 by angela “webchick” byron
TRANSCRIPT
![Page 1: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/1.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 1/131
Angela “webchick” ByronDrupalcon Paris
September 2, 2009
Drupal 7
Tuesday, September 15, 2009
![Page 2: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/2.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 2/131
About Me• Started Drupal in 2005 as
Google Summer of Codestudent
• Obsessed with everythingDrupal (especially gettingnew people involved!)
• Using Drupal co-author,
Drupal Association boardmember, Drupal 7 co-maintainer
• Work at Lullabot doing
Drupal consulting andeducationTuesday, September 15, 2009
![Page 3: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/3.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 3/131
Agenda
•Talk about how much Drupal 7 is going torock your face off.
• Talk about how YOU can help get Drupal 7out the door so we can start building even
more awesome sites!
Tuesday, September 15, 2009
![Page 4: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/4.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 4/131
What’s newin Drupal 7? ?
Tuesday, September 15, 2009
![Page 5: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/5.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 5/131
Changes forend-users
and clients
Tuesday, September 15, 2009
![Page 6: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/6.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 6/131
Usability improvements
http://drupalusability.org/
Tuesday, September 15, 2009
![Page 7: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/7.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 7/131
Password checker
Drupal 6
Drupal 7
Tuesday, September 15, 2009
![Page 8: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/8.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 8/131
Text format selectorDrupal 6
Drupal 7
Tuesday, September 15, 2009
![Page 9: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/9.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 9/131
Vertical tabsDrupal 6
Drupal 7
Tuesday, September 15, 2009
![Page 10: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/10.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 10/131
Permission screen
Tuesday, September 15, 2009
![Page 11: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/11.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 11/131
Default front pageDrupal 6
Drupal 7
Tuesday, September 15, 2009
![Page 12: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/12.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 12/131
Default/Minimal Profile
Tuesday, September 15, 2009
![Page 13: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/13.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 13/131
Default profile
Tuesday, September 15, 2009
![Page 14: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/14.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 14/131
D7UX
http://www.d7ux.org/Tuesday, September 15, 2009
![Page 15: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/15.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 15/131
New Information
Architecture• New IA separates administrative tasks into
“contexts”:
• I’m dealing with content.
• I’m building out site structure.
• I’m changing my site’s appearance.• I’m managing the people who come to
my site.
• I’m configuring modules and settings.Tuesday, September 15, 2009
![Page 16: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/16.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 16/131
Drupal 4.x IA
Tuesday, September 15, 2009
![Page 17: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/17.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 17/131
Drupal 4.x IA
Tuesday, September 15, 2009
![Page 18: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/18.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 18/131
Drupal 5 & 6 IA
(this list goes on forever...)Tuesday, September 15, 2009
![Page 19: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/19.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 19/131
Drupal 5 & 6 IA
(this list goes on forever...)Tuesday, September 15, 2009
![Page 20: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/20.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 20/131
Drupal 5 & 6 IA
(this list goes on forever...)Tuesday, September 15, 2009
![Page 21: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/21.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 21/131
Drupal 5 & 6 IA
(this list goes on forever...)Tuesday, September 15, 2009
![Page 22: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/22.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 22/131
Drupal 7 IA
Tuesday, September 15, 2009
![Page 23: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/23.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 23/131
Drupal 7 IA
Tuesday, September 15, 2009
![Page 24: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/24.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 24/131
Toolbar
New IA along the top
Shortcut bar for role-specific frequentlyaccessed items along the bottom
User account-relatedstuff easily accessible
needsyourhelp!
Tuesday, September 15, 2009
![Page 25: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/25.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 25/131
Admin Theme: “Seven”
Tuesday, September 15, 2009
![Page 26: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/26.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 26/131
Overlaysneedsyour
help!
Tuesday, September 15, 2009
![Page 27: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/27.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 27/131
Edit in placeneedsyourhelp!
Tuesday, September 15, 2009
![Page 28: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/28.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 28/131
Changes for
site builders
Tuesday, September 15, 2009
![Page 29: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/29.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 29/131
5.2
5.0
8.3
New Minimum
Re uirements
Tuesday, September 15, 2009
![Page 30: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/30.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 30/131
Timezone and Country
su ort
Tuesday, September 15, 2009
![Page 31: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/31.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 31/131
Users can cancel own
accounts
Tuesday, September 15, 2009
![Page 32: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/32.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 32/131
Mix and Match Public
and Private files
Tuesday, September 15, 2009
![Page 33: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/33.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 33/131
Internationalization
• New translation interface
•Search module supports language-awaresearches
• Fields are translatable
• Support for message contexts (msgctxt) tomake translation of short words like “View”much easier.
Tuesday, September 15, 2009
![Page 34: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/34.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 34/131
Native Image Handlingneedsyourhelp!
Tuesday, September 15, 2009
![Page 35: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/35.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 35/131
Native image handling
Tuesday, September 15, 2009
![Page 36: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/36.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 36/131
Security
• Prompted for e-mail notifications of securityupdates upon installation.
• PHP filter module now global “kill-switch” for“enter some PHP here” functionality.
•Cron.php requires key in URL to be run.
• New permission for running site updates.
• Limit login attempts, better flood control.
• Stronger, pluggable password hashing algorithm.Tuesday, September 15, 2009
![Page 37: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/37.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 37/131
#smallcore
• Modules removed:
• Blog API
• Ping
• Throttle
• Upload
• Block module madeoptional
• Access rules removed
• Minimum # of words inBody removed
• User-selectable themesremoved
• Related terms, andtaxonomy +, URL
arguments removed
• Comment displayoptions removed
Tuesday, September 15, 2009
![Page 38: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/38.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 38/131
#largecore
• Contributed modulesmoved to core:
• Admin Role
• Feed API (some of it,anyway...)
• FileField
• Image
• ImageAPI
• ImageCache
• ImageField (soon...?)
• Install Profile API(some of it, anyway...)
• Poormanscron
• Token
Tuesday, September 15, 2009
![Page 39: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/39.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 39/131
#largecore
• Contributed modulesmoved to core:
• Admin Role
• Feed API (some of it,anyway...)
• FileField
• Image
• ImageAPI
• ImageCache
• ImageField (soon...?)
• Install Profile API(some of it, anyway...)
• Poormanscron
• Token
• Oh, yeah. And...
Tuesday, September 15, 2009
![Page 40: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/40.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 40/131
CCK!OMG!
Tuesday, September 15, 2009
![Page 41: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/41.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 41/131
Field Types in Core
• Boolean
• Decimal/Float/Integer
• File
• List
• Text/Textarea
• Taxonomy term
• Node Body
Tuesday, September 15, 2009
![Page 42: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/42.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 42/131
Fields be applied to
Tuesday, September 15, 2009
![Page 43: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/43.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 43/131
![Page 44: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/44.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 44/131
Fields be applied to
• Nodes (duh)
• Users (bye, Content Profile)
Tuesday, September 15, 2009
![Page 45: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/45.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 45/131
Fields be applied to
• Nodes (duh)
• Users (bye, Content Profile)• Comments (bye, Node Comment and
Comment Upload)
Tuesday, September 15, 2009
![Page 46: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/46.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 46/131
Fields be applied to
• Nodes (duh)
• Users (bye, Content Profile)• Comments (bye, Node Comment and
Comment Upload)
• Taxonomy terms (bye, Taxonomy Image)
Tuesday, September 15, 2009
![Page 47: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/47.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 47/131
Fields be applied to
• Nodes (duh)
•Users (bye, Content Profile)
• Comments (bye, Node Comment andComment Upload)
• Taxonomy terms (bye, Taxonomy Image)
• ...and that’s just in core! :)
Tuesday, September 15, 2009
![Page 48: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/48.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 48/131
Changes fordesigners and
front-enddevelopers
Tuesday, September 15, 2009
![Page 49: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/49.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 49/131
All butt-ugly, table-
based themes removedfrom core!
Tuesday, September 15, 2009
![Page 50: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/50.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 50/131
![Page 51: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/51.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 51/131
Re-vamped *.tpl.php
Tuesday, September 15, 2009
![Page 52: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/52.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 52/131
Re-vamped *.tpl.php
Tuesday, September 15, 2009
![Page 53: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/53.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 53/131
Re-vamped *.tpl.php
Tuesday, September 15, 2009
![Page 54: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/54.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 54/131
Re-vamped *.tpl.php
• Re-engineered XHTML structure to facilitate
CSS-only design.
Tuesday, September 15, 2009
![Page 55: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/55.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 55/131
Re-vamped *.tpl.php
• Re-engineered XHTML structure to facilitate
CSS-only design.• Standard, semantic class/ID names (.section,
#navigation, etc.)
Tuesday, September 15, 2009
![Page 56: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/56.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 56/131
Re-vamped *.tpl.php
• Re-engineered XHTML structure to facilitate
CSS-only design.• Standard, semantic class/ID names (.section,
#navigation, etc.)
• Improved consistency throughout.
Tuesday, September 15, 2009
![Page 57: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/57.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 57/131
Re-vamped *.tpl.php
• Re-engineered XHTML structure to facilitate
CSS-only design.• Standard, semantic class/ID names (.section,
#navigation, etc.)
• Improved consistency throughout.
• Enables designers to create beautiful, CSS-only themes without touching PHP.
Tuesday, September 15, 2009
![Page 58: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/58.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 58/131
And to show it off...
Tuesday, September 15, 2009
![Page 59: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/59.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 59/131
Stark: “Naked” Drupal
Tuesday, September 15, 2009
G l th i f
![Page 60: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/60.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 60/131
Granular theming of
content
• $content is a big string of XHTML.
• Fine-grained control over where *one* part
of content goes means being responsiblefor *all* parts of content. Securitynightmare.
• Comments are smooshed in here, too.
Drupal 6
Tuesday, September 15, 2009
Drupal 7
![Page 61: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/61.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 61/131
• $content is now an array of pageproperties that keeps track of what’s been
printed so far.
• Selectively hide parts until you’re ready toprint them where YOU want.
Drupal 7
...
Tuesday, September 15, 2009
![Page 62: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/62.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 62/131
Other awesomeness
• You can now preprocess theme functionsas well as template files
• Human-readable block IDs (block-user-online vs. block-user-3)
•Template-specific classes now compressed
into one $classes string, and also availableas $classes_array for raw values
• RDFa support
Tuesday, September 15, 2009
J S i t
![Page 63: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/63.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 63/131
JavaScript
im rovements• jQuery 1.3
• jQuery Forms 2.2
• jQuery UI 1.7
• drupal_add_library() for adding related JS/CSS files
• New CTools AJAX framework in core
• Can use jQuery alongside other JS
frameworks (Prototype, etc.)Tuesday, September 15, 2009
d l dd j / ()
![Page 64: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/64.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 64/131
drupal_add_js/css()
im rovements• Now pass in $options rather than 500
function arguments
• Uses actual weighting rather than awkward‘core’ vs. ‘module’ vs. ‘theme’ types.
•Add external files to the page.
• Alter CSS/JS array
Tuesday, September 15, 2009
![Page 65: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/65.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 65/131
Changes forcoders
01110111 01101001 0110110001101100 00100000 01100011 0110111101100100 01100101 00100000 0111000001101000 01110000 00100000 0110011001101111 01110010 00100000 0110011001101111 01101111 01100100
Tuesday, September 15, 2009
![Page 66: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/66.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 66/131
Warning:
Things are about toget... geeky.
Tuesday, September 15, 2009
m a n n /
![Page 67: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/67.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 67/131
h t t p : / / w w w . fl i c
k r . c o m / p h o t o s / s e b
a s t i a n_
b e r g m
Tuesday, September 15, 2009
![Page 68: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/68.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 68/131
SimpleTest
Tuesday, September 15, 2009
![Page 69: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/69.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 69/131
SimpleTest
Tuesday, September 15, 2009
![Page 70: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/70.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 70/131
SimpleTest
Tuesday, September 15, 2009
![Page 71: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/71.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 71/131
SimpleTest
Tuesday, September 15, 2009
![Page 72: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/72.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 72/131
SimpleTest
• Writing tests causes you to really think through a problem, and helps flesh outobscure bugs.
Tuesday, September 15, 2009
![Page 73: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/73.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 73/131
SimpleTest
• Writing tests causes you to really think through a problem, and helps flesh outobscure bugs.
• Know instantly if your changes break something; freedom to refactor wildly.
Tuesday, September 15, 2009
![Page 74: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/74.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 74/131
![Page 75: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/75.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 75/131
SimpleTest
• Writing tests causes you to really think through a problem, and helps flesh outobscure bugs.
• Know instantly if your changes break something; freedom to refactor wildly.
• Submit a test with your bug fix, it’ll stayfixed forever.
• Over 75% test coverage!
Tuesday, September 15, 2009
![Page 76: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/76.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 76/131
![Page 77: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/77.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 77/131
testing.drupal.org
Tuesday, September 15, 2009
![Page 78: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/78.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 78/131
![Page 79: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/79.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 79/131
testing.drupal.org
Tuesday, September 15, 2009
![Page 80: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/80.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 80/131
testing.drupal.org
• “Patch (code needs review)” and “Patch(reviewed & tested by community)”statuses can now be trusted.
Tuesday, September 15, 2009
![Page 81: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/81.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 81/131
testing.drupal.org
• “Patch (code needs review)” and “Patch(reviewed & tested by community)”statuses can now be trusted.
• Reviewers no longer getting carpal tunnelclicking through all the basic stuff.
Tuesday, September 15, 2009
![Page 82: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/82.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 82/131
testing.drupal.org
• “Patch (code needs review)” and “Patch(reviewed & tested by community)”statuses can now be trusted.
• Reviewers no longer getting carpal tunnelclicking through all the basic stuff.
• Running the full test suite takes a longtime; let a computer do it for you!
Tuesday, September 15, 2009
![Page 83: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/83.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 83/131
testing.drupal.org
• “Patch (code needs review)” and “Patch(reviewed & tested by community)”statuses can now be trusted.
• Reviewers no longer getting carpal tunnelclicking through all the basic stuff.
• Running the full test suite takes a longtime; let a computer do it for you!
• Notifies author within 24 hours if patch no
longer applies or breaks tests.Tuesday, September 15, 2009
![Page 84: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/84.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 84/131
Tuesday, September 15, 2009
![Page 85: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/85.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 85/131
Database The next geNERATION
Tuesday, September 15, 2009
The who in the what
![Page 86: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/86.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 86/131
The who in the what
now?• Database abstraction layer utilizing PHP’s Data
Objects (PDO)
• Theoretical support for any database PHPsupports; mysql, sqlite, and pgsql drivers in D7.
• Support for master/slave replication, transactions,multi-insert queries, delayed inserts, and otherfeatures.
• Summary: Everything that ever sucked about ourDB abstraction layer is now fixed. ;)
Tuesday, September 15, 2009
![Page 87: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/87.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 87/131
Static Select Queries
$node = db_query('SELECT nid, title FROM {node} WHERE
type = :type AND nid = :nid', array(':type' => $type,
':nid' => $nid))->fetchObject();
Drupal 6:
Drupal 7:
$result = db_query("SELECT nid, title FROM {node} WHERE
type = '%s' AND nid = %d", array($type, $nid));$node = db_fetch_object($result);
Tuesday, September 15, 2009
Dynamic Select
![Page 88: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/88.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 88/131
Dynamic Select
QueriesDrupal 6:
$result = pager_query(db_rewrite_sql('SELECT n.nid FROM {node} n
WHERE n.promote = 1 AND n.status = 1 ORDER BY n.sticky DESC,
n.created DESC'), variable_get('default_nodes_main', 10));
Drupal 7:$select = db_select('node', 'n')
->fields('n', array('nid'))
->condition('promote', 1)->condition('status', 1)
->orderBy('sticky', 'DESC')
->orderBy('created', 'DESC')
->extend('PagerDefault')
->limit(variable_get('default_nodes_main', 10))
->addTag('node_access');Tuesday, September 15, 2009
![Page 89: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/89.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 89/131
Other Queries
$nid = db_insert('node')
->fields(array('title', 'uid'))
->values(array(
'title' => 'Example',
'uid' => 1,
))
->execute();
$num_updated = db_update('node')
->fields(array(
'uid' => 5,
'status' => 1,))
->condition('created', REQUEST_TIME - 3600, '>=')
->execute();
Insert
Update
Delete$num_deleted = db_delete('node')
->condition('nid', 5)
->execute();
Tuesday, September 15, 2009
![Page 90: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/90.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 90/131
hook_query_alter()
function hook_db_rewrite_sql($query, $primary_table, $primary_field, $args) {
switch ($primary_field) { case 'nid':
$return = array();
if ($primary_table != 'n') { $return['join'] = "LEFT JOIN {node} n ON $primary_table.nid = n.nid";
}
$return['where'] = 'created >' . time() - 3600; return $return;
break;}
function hook_query_alter(&$query) {
if ($query->hasTag(‘node_access’)) {$query->condition(‘created’, time() - 3600, ‘>’);
}
}
Drupal 6:
Drupal 7:
Tuesday, September 15, 2009
F ld API
![Page 91: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/91.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 91/131
Field API
h t t p : / / w w
w . fl
i c k r . c o m / p h o t o
s / p i p e r /
Tuesday, September 15, 2009
Ab F ld API
![Page 92: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/92.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 92/131
About Field API
• No longer node-specific: can attach fieldsto users, potentially other objects.
• Declare any entity in Drupal as “fieldable”
• Swappable storage back-ends (currently,SQL but potentially web services, etc.)
• Supports translatable content.
needsyourhelp!
Tuesday, September 15, 2009
O
![Page 93: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/93.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 93/131
Bundles
name = Articletype = node
name = Usertype = user
Fields
name = subtitletype = text
name = phototype = image
FieldinstancesArticle subtitlewidget = text area
Article photowidget = file upload
User photowidget = file upload
Group of fieldsthat together make up
an entity
Base types
A field attachedto a particular bundle
Overview
Tuesday, September 15, 2009
O
![Page 94: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/94.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 94/131
Overview
Field:
How data is storedin database
Widget:How field is presentedon add/edit
Formatter:
How field ispresented on view
Tuesday, September 15, 2009
Fil St o
s / b u n n y /
![Page 95: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/95.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 95/131
File System h t t p : / / fl i c k r . c o m / p h o t
Tuesday, September 15, 2009
Fil API i
![Page 96: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/96.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 96/131
File API improvements
• Files are now first-class objects
• hook_file_load(), hook_file_save(),hook_file_move(), etc.
• Files are managed automatically; no need to
deal with {files} table yourself
• hook_file_url_alter() for CDN support
Tuesday, September 15, 2009
Stream Wrapper
![Page 97: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/97.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 97/131
Stream Wrapper
Support• Rather than referencing files by path, younow reference them by URI:schema://file/path/file.ext
• Allows you to change location of filesdirectory without a DB update.
• public://, private://, temp:// supported incore.
• Contrib can also create s3://, flickr://, etc.
Tuesday, September 15, 2009
I API
![Page 98: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/98.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 98/131
Image API
• Image toolkits now implemented asmodules, rather than .inc files that usersneed to copy over.
• Supports image manipulation effects: scale,crop, resize, rotate...
• Can combine these into “image styles” thatcan be applied to any image (user pictures,file uploads...)
Tuesday, September 15, 2009
r o m c c h s 0 8 /
![Page 99: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/99.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 99/131
Performance
h t t p : / / fl i c k r . c o m / p h
o t o s / t h a t g u y f r
Tuesday, September 15, 2009
R i
![Page 100: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/100.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 100/131
Registry
Tuesday, September 15, 2009
R i
![Page 101: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/101.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 101/131
Registry
Tuesday, September 15, 2009
R i
![Page 102: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/102.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 102/131
Registry
• Auto-parses and caches list of all functions,classes, and interfaces in all files
Tuesday, September 15, 2009
R i t
![Page 103: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/103.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 103/131
Registry
• Auto-parses and caches list of all functions,classes, and interfaces in all files
• Facilitates faster hook calls; only loopthrough modules that implement a hook
Tuesday, September 15, 2009
R i t
![Page 104: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/104.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 104/131
Registry
• Auto-parses and caches list of all functions,classes, and interfaces in all files
• Facilitates faster hook calls; only loopthrough modules that implement a hook
• Allows more fine-grained break-up of code(ex: all “info” functions inmodule.registry.inc)
Tuesday, September 15, 2009
R i t
![Page 105: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/105.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 105/131
Registry
• Auto-parses and caches list of all functions,classes, and interfaces in all files
• Facilitates faster hook calls; only loopthrough modules that implement a hook
• Allows more fine-grained break-up of code(ex: all “info” functions inmodule.registry.inc)
Tuesday, September 15, 2009
Cl i t
![Page 106: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/106.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 106/131
Class registry
• Auto-parses and caches list of all classesand interfaces in all files
• Allows you to do:
• ...from anywhere• Need to register all files in .info:
files[] = example.modulefiles[] = example.install
Tuesday, September 15, 2009
M lti l d! $ i
![Page 107: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/107.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 107/131
Multi-load! $queries--;
• node_load_multiple()
• file_load_multiple()
• taxonomy_term_load_multiple()
• taxonomy_vocabulary_load_multiple()
• user_load_multiple()
Tuesday, September 15, 2009
Faster, more scalable
![Page 108: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/108.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 108/131
,
Dru al• Proxy and reverse-proxy support: serveanon page requests entirely via proxy
• Tons of micro-optimizations caught byXDebug profiling
• Smarter look-ahead system for grabbing
path aliases
• InnoDB default storage system
• CDN support for files
needsyour
help!
Tuesday, September 15, 2009
H k d API o t o s / y a b a n j i /
![Page 109: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/109.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 109/131
Hooks and APIs
h t t p : / / fl i c k r . c o m / p h o
Tuesday, September 15, 2009
Ne H ks in D7
![Page 110: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/110.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 110/131
New Hooks in D7
• hook_modules_X(): installed, enabled,disabled, uninstalled
•hook_taxonomy_term_X(): load, insert,update, delete
• hook_taxonomy_vocabulary_X(): load,insert, update, delete
• hook_aggregator_X(): fetch, parse, process,remove
•hook_user_role_X(): delete, update, insert
Tuesday, September 15, 2009
No more $op
![Page 111: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/111.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 111/131
No more $op
• hook_nodeapi(), hook_user(),hook_block(), etc. are no longer “mega”
hooks:
• hook_node_load(), hook_node_update()
• hook_user_register(), hook_user_login()
• hook_block_list(), hook_block_view()
• hook_form_FORM_ID_alter()
works in6!
Tuesday, September 15, 2009
$page object
![Page 112: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/112.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 112/131
$page object
$page['left']['blocks']['user-navigation']['#block'] = (block
object);$page['content']['message']['#markup'] = 'Welcome to a big list of
nodes.';
$page['content']['nodes'] = (array of node objects keyed by node ID);
$page['content']['pager']['#markup'] = (HTML markup of pager);
$page['footer']['blocks']['system-powered-by']['#block'] = (block
object);
Tuesday, September 15, 2009
hook page alter()The most unholy hook of all...
![Page 113: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/113.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 113/131
hook_page_alter()
Tuesday, September 15, 2009
hook page alter()The most unholy hook of all...
![Page 114: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/114.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 114/131
hook_page_alter()
Tuesday, September 15, 2009
hook page alter()The most unholy hook of all...
![Page 115: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/115.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 115/131
hook_page_alter()
http://webchick.net/node/60Tuesday, September 15, 2009
Oh hai APIs!
![Page 116: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/116.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 116/131
Oh hai, APIs!
• Roles/Permissions API
• Filter/Format API
• Centralized static caching mechanism
• Locking framework
• Job queue
Tuesday, September 15, 2009
Node Access
![Page 117: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/117.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 117/131
Improvements• “administer nodes” and “bypass nodeaccess” two separate permissions
• Alter hook_node_grants andhook_node_access_records
• Node access applies to unpublished nodes
• hook_node_access() allows modules toinfluence access on nodes defined by othermodules
Tuesday, September 15, 2009
Install Profiles
![Page 118: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/118.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 118/131
Tuesday, September 15, 2009
Install Profiles
![Page 119: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/119.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 119/131
Drupal 6
Tuesday, September 15, 2009
Install Profiles
![Page 120: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/120.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 120/131
Drupal 6
default.profile
Tuesday, September 15, 2009
Install Profiles
![Page 121: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/121.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 121/131
Drupal 6 Drupal 7
default.profile
Tuesday, September 15, 2009
Install Profiles
![Page 122: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/122.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 122/131
Drupal 6
default.info
default.install
default.profile
Drupal 7
default.profile
Tuesday, September 15, 2009
Get the full list of
![Page 123: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/123.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 123/131
f
changes• CHANGELOG.txt
• http://drupal.org/update/modules/6/7
• http://drupal.org/update/theme/6/7
• http://drupal.org/project/coder
Tuesday, September 15, 2009
Let’s hear it for Drupal 7!
![Page 124: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/124.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 124/131
Tuesday, September 15, 2009
![Page 125: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/125.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 125/131
Nearly 500 contributors to Drupal 7 so far
Tuesday, September 15, 2009
Team Drupal 7(some of)
![Page 126: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/126.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 126/131
Team Drupal 7
Tuesday, September 15, 2009
Team Drupal 7(some of)
![Page 127: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/127.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 127/131
Team Drupal 7
Tuesday, September 15, 2009
HowYOU can help!
![Page 128: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/128.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 128/131
How YOU can help!
• Mark non-critical issuesas non-critical
• Write automated tests
• Fix bugs
• Hold local bug-fixsprints
• Help with critical freeze-extension issues
•Test and review patches
• Port modules andthemes to D7 to fleshout API issues
• Help with Codermodule
• Fix user-facing strings
• Update documentation
• Come to the sprint onSaturday! :)
Tuesday, September 15, 2009
#D7CX
![Page 129: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/129.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 129/131
#D7CX
http://cyrve.com/d7cx
Take the pledge.
Tuesday, September 15, 2009
Go find out more!
![Page 130: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/130.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 130/131
Go find out more!Sept 2 Sept 3
Sept 4
13:40 - 14:30: Explore the glory of Drupal 7'simproved render and theming systemsMoshe Weitzman
16:10 - 17:00:
Taxonomy Everywhere: D7 CoreOverhaul and the Expanding ContribUniverseBenjamin Melançon
17:15 - 18:00: Intro to the Field API for ModuleDevelopersBarry Jaspan
11:20 - 12:10: The state of RDF in Drupal 7Stephane Corlosquet
11:20 - 12:10: Image module in core: it's<strike>almost</strike> real!Nate Haug
11:20 - 12:10:
Introduction to testing withDrupal: SimpleTest
Jimmy Berry
Tuesday, September 15, 2009
![Page 131: Drupal 7 by Angela “webchick” Byron](https://reader030.vdocument.in/reader030/viewer/2022021201/577d248e1a28ab4e1e9cbe27/html5/thumbnails/131.jpg)
8/3/2019 Drupal 7 by Angela “webchick” Byron
http://slidepdf.com/reader/full/drupal-7-by-angela-webchick-byron 131/131