SlideShare uma empresa Scribd logo
1 de 44
Baixar para ler offline
Drupal:
Under the Hood
What is Drupal?

1. Content Management System
2. Content Management Framework
3. Community
Content Management
      System
file
                  uploads
               revisions menus
          security user profiles
   blocks performance modules search
  engine-friendly urls user manage-
 ment administration panels localization error
reporting rss taxonomy blogging comments
forums multi-site    installations event
 logging community authoring ajax search
  free tagging feed aggregation contact
    form help system roles and per-
            missions statistics
                 tracking polls
1200+ Contributed
    Modules
Community
Doubles in size each
                     release




source: http://acko.net/blog/drupal-org-explosion-and-trends   source: http://buytaert.net/drupal-site-statistics
Statistics
• 840+ code contributors
• 160+ local user groups
• 430+ attendees at Drupalcon Barcelona
• 200,000+ users on drupal.org
• 3 million+ lines of code (core+contrib)
• 52 SoC mentors for 20 students
• 100,000+ downloads/month
Content Management
    Framework
xml-rpc
                file api jquery
       database abstraction layer form
     api file api session management node
    system url routing theme system string
  handling filter system content versioning
installation profiles access control trans-
    latable output user system caching
 date/time handling unicode support mail
    handling image manipulation installation
     system hook system menu system
        module system user authentication
           themable output
What’s under the hood?
Core
•   Lightweight framework
                            Drupal Core

•   Library of common         Content        User
                                                          Forms API
                            Management    Management
    functions
                               Install      Theming

•
                                                          Localization
    Allows Drupal to          Profiles       Layer

    bootstrap and serve a
    request
                                   Library of Common Functions

•   What you get when you
    download Drupal
Modules
                                  Drupal Core
                                    Content        User
                                                                Forms API

•
                                  Management    Management
    How Drupal is extended
                                     Install      Theming
                                                                Localization

•
                                    Profiles       Layer
    Lean and mean and
    versatile

•
                                         Library of Common Functions
    Inversion of control design
    pattern
                                  Modules

•                                   Actions/                     Content
    Drupal exposes hooks                         Ecommerce
                                   Workflows                   Creation Kit

    for modules
                                                   Organic
                                     Views
                                                   Groups
                                                                         Custom
                                                                         Module
INSTALL.txt    index.php    themes




 install.php   update.php   modules




    sites      xmlrpc.php   includes
drupal_bootstrap()
•   DRUPAL_BOOTSTRAP_CONFIGURATION

•   DRUPAL_BOOTSTRAP_EARLY_PAGE_CACHE

•   DRUPAL_BOOTSTRAP_DATABASE

•   DRUPAL_BOOTSTRAP_ACCESS

•   DRUPAL_BOOTSTRAP_SESSION

•   DRUPAL_BOOTSTRAP_LATE_PAGE_CACHE

•   DRUPAL_BOOTSTRAP_PATH

•   DRUPAL_BOOTSTRAP_FULL
menu system
Yes
     Is site                         Return
    offline?                     MENU_SITE_OFFLINE


         No


Get menu array



                          Is callback      No
Parse $path from                                    Trim last '/' from
                          defined for
   $_GET['q']                                            $path
                            $path?




                                           No
                         Does callback                    Return
                         function exist?             MENU_NOT_FOUND




                         User allowed
                                           No              Return
                         to access this
                                                     MENU_ACCESS_DENIED
                             item?




                     Marshall parameters
                     from URL and item's             Call callback
                      callback arguments
Hooks
Hooks are PHP functions
with Drupal-specific names
How Drupal Finds Hooks

/**
  * Determine whether a module implements a hook.
  *
  * @param $module
  *    The name of the module (without the .module extension).
  * @param $hook
  *    The name of the hook (e.g. quot;helpquot; or quot;menuquot;).
  */
function module_hook($module, $hook) {
    return function_exists($module .'_'. $hook);
}
Naming Hooks

Module    Hook   Function name
pants     user   pants_user()

pants     menu   pants_menu()
pants     perm   pants_perm()
Hook Overview

                               hook_user()




  comment_user()    locale_user()        node_user()   mymodule_user()




comment.module     locale.module         node.module   mymodule.module
FormAPI
FormAPI

• Form elements are PHP arrays so you can
  programmatically manipulate any form
• Chain validator and submitter routines
• Theme overrides - down to the element!
• Built-in security
Form Example
$form['user_name'] = array(
   '#title' => t('Your Name'),
   '#type' => 'textfield',
   '#description' => t('Please enter your name.'),
);

$form['submit'] = array(
   '#type' => 'submit',
   '#value' => t('Submit')
);
Security

• Verifies that $_POST values have
  corresponding $form elements
• Form rendering sanitized for potential XSS
• $form[‘token’] used to prevent CSRF
hook_form_alter
drupal_execute()
Theme System
Theme System
PHPTemplate Files

   •   page.tpl.php
   •   node.tpl.php
   •   block.tpl.php
   •   comment.tpl.php
   •   box.tpl.php
theme('breadcrumb')




                      theme-name_breadcrumb()




                      theme-engine_breadcrumb()




                         theme_breadcrumb()




     The first
  function found
    gets called.
theme('page')




                   garland_page()




                 phptemplate_page()




                   theme_page()




   The first
function found
  gets called.
Creating New Template Files
template.php
function mytheme_breadcrumb($breadcrumb) {
  if (!empty($breadcrumb)) {
    return '<span class=quot;breadcrumbquot;>'. implode(' * ', $breadcrumb) .'</span>';
  }
}


new template.php
function mytheme_breadcrumb($breadcrumb) {
  if (!empty($breadcrumb)) {
    $variables = array('breadcrumb' =>   implode(' * ', $breadcrumb));
    return _phptemplate_callback('breadcrumb', $variables);
  }
}


breadcrumb.tpl.php
<span class=quot;breadcrumbquot;><?php print $breadcrumb ?></span>
ultimate control
http://greenpeace.co.uk/
http://theonion.com/
http://musicbox.sonybmg.com/
http://43folders.com/
http://lifetimetv.com/
http://flex.org/showcase
http://help.yahoo.com/
http://ubuntu.com/
Thanks... Questions?

James Walker
http://walkah.net/

Lullabot
james@lullabot.com

Mais conteúdo relacionado

Mais procurados

Drupal Development
Drupal DevelopmentDrupal Development
Drupal DevelopmentJeff Eaton
 
Ruby on Rails : RESTful 和 Ajax
Ruby on Rails : RESTful 和 AjaxRuby on Rails : RESTful 和 Ajax
Ruby on Rails : RESTful 和 AjaxWen-Tien Chang
 
Building and managing java projects with maven part-III
Building and managing java projects with maven part-IIIBuilding and managing java projects with maven part-III
Building and managing java projects with maven part-IIIprinceirfancivil
 
WordPress Plugin development
WordPress Plugin developmentWordPress Plugin development
WordPress Plugin developmentMostafa Soufi
 
Routing 1, Season 1
Routing 1, Season 1Routing 1, Season 1
Routing 1, Season 1RORLAB
 
[Srijan Wednesday Webinars] Routing in Drupal 8: Decoupling hook_menu
[Srijan Wednesday Webinars] Routing in Drupal 8: Decoupling hook_menu[Srijan Wednesday Webinars] Routing in Drupal 8: Decoupling hook_menu
[Srijan Wednesday Webinars] Routing in Drupal 8: Decoupling hook_menuSrijan Technologies
 
Concert spring 2011_presentation_1
Concert spring 2011_presentation_1Concert spring 2011_presentation_1
Concert spring 2011_presentation_1mskmoorthy
 
Becoming A Drupal Master Builder
Becoming A Drupal Master BuilderBecoming A Drupal Master Builder
Becoming A Drupal Master BuilderPhilip Norton
 
深入淺出 MVC
深入淺出 MVC深入淺出 MVC
深入淺出 MVCJace Ju
 

Mais procurados (20)

Drupal Development
Drupal DevelopmentDrupal Development
Drupal Development
 
Javabeans .pdf
Javabeans .pdfJavabeans .pdf
Javabeans .pdf
 
Maven in Mule
Maven in MuleMaven in Mule
Maven in Mule
 
Ruby on Rails : RESTful 和 Ajax
Ruby on Rails : RESTful 和 AjaxRuby on Rails : RESTful 和 Ajax
Ruby on Rails : RESTful 和 Ajax
 
Building and managing java projects with maven part-III
Building and managing java projects with maven part-IIIBuilding and managing java projects with maven part-III
Building and managing java projects with maven part-III
 
Maven II
Maven IIMaven II
Maven II
 
Puppet quick start guide
Puppet quick start guidePuppet quick start guide
Puppet quick start guide
 
Jsp Notes
Jsp NotesJsp Notes
Jsp Notes
 
Maven
MavenMaven
Maven
 
Maven
MavenMaven
Maven
 
Java beans
Java beansJava beans
Java beans
 
WordPress Plugin development
WordPress Plugin developmentWordPress Plugin development
WordPress Plugin development
 
Beans presentation
Beans presentationBeans presentation
Beans presentation
 
Routing 1, Season 1
Routing 1, Season 1Routing 1, Season 1
Routing 1, Season 1
 
[Srijan Wednesday Webinars] Routing in Drupal 8: Decoupling hook_menu
[Srijan Wednesday Webinars] Routing in Drupal 8: Decoupling hook_menu[Srijan Wednesday Webinars] Routing in Drupal 8: Decoupling hook_menu
[Srijan Wednesday Webinars] Routing in Drupal 8: Decoupling hook_menu
 
Concert spring 2011_presentation_1
Concert spring 2011_presentation_1Concert spring 2011_presentation_1
Concert spring 2011_presentation_1
 
Javabeans
JavabeansJavabeans
Javabeans
 
Becoming A Drupal Master Builder
Becoming A Drupal Master BuilderBecoming A Drupal Master Builder
Becoming A Drupal Master Builder
 
Unit iv
Unit ivUnit iv
Unit iv
 
深入淺出 MVC
深入淺出 MVC深入淺出 MVC
深入淺出 MVC
 

Destaque

结绳技巧.pdf
结绳技巧.pdf结绳技巧.pdf
结绳技巧.pdftestt
 
Program Service Current Events
Program Service Current EventsProgram Service Current Events
Program Service Current Eventsjjdavison
 
israel endeavor
israel endeavorisrael endeavor
israel endeavorravitcet
 
A miña vida e ese tipo de cousas...
A miña vida e ese tipo de cousas...A miña vida e ese tipo de cousas...
A miña vida e ese tipo de cousas...fon_256
 
israel endeavor
israel endeavorisrael endeavor
israel endeavorravitcet
 
Israel Endeavor
Israel EndeavorIsrael Endeavor
Israel Endeavorravitcet
 

Destaque (7)

结绳技巧.pdf
结绳技巧.pdf结绳技巧.pdf
结绳技巧.pdf
 
Program Service Current Events
Program Service Current EventsProgram Service Current Events
Program Service Current Events
 
israel endeavor
israel endeavorisrael endeavor
israel endeavor
 
A miña vida e ese tipo de cousas...
A miña vida e ese tipo de cousas...A miña vida e ese tipo de cousas...
A miña vida e ese tipo de cousas...
 
Adan y Eva
Adan y EvaAdan y Eva
Adan y Eva
 
israel endeavor
israel endeavorisrael endeavor
israel endeavor
 
Israel Endeavor
Israel EndeavorIsrael Endeavor
Israel Endeavor
 

Semelhante a 2007 Fsoss Drupal Under The Hood

Drupal Camp Porto - Developing with Drupal: First Steps
Drupal Camp Porto - Developing with Drupal: First StepsDrupal Camp Porto - Developing with Drupal: First Steps
Drupal Camp Porto - Developing with Drupal: First StepsLuís Carneiro
 
Domas monkus drupal module development
Domas monkus drupal module developmentDomas monkus drupal module development
Domas monkus drupal module developmentDomas Monkus
 
Валентин Мацвейко та Владислав Мойсеєнко — D8: Migrate Yourself: code->module...
Валентин Мацвейко та Владислав Мойсеєнко — D8: Migrate Yourself: code->module...Валентин Мацвейко та Владислав Мойсеєнко — D8: Migrate Yourself: code->module...
Валентин Мацвейко та Владислав Мойсеєнко — D8: Migrate Yourself: code->module...LEDC 2016
 
Migrate yourself. code -> module -> mind
Migrate yourself. code -> module -> mindMigrate yourself. code -> module -> mind
Migrate yourself. code -> module -> mindValentine Matsveiko
 
Drupal 7 Theming - Behind the scenes
Drupal 7 Theming - Behind the scenes Drupal 7 Theming - Behind the scenes
Drupal 7 Theming - Behind the scenes ramakesavan
 
Intro To Mvc Development In Php
Intro To Mvc Development In PhpIntro To Mvc Development In Php
Intro To Mvc Development In Phpfunkatron
 
Staging Drupal: Change Management Strategies for Drupal
Staging Drupal: Change Management Strategies for DrupalStaging Drupal: Change Management Strategies for Drupal
Staging Drupal: Change Management Strategies for DrupalErich Beyrent
 
Staging Drupal: Change Management Strategies for Drupal
Staging Drupal: Change Management Strategies for DrupalStaging Drupal: Change Management Strategies for Drupal
Staging Drupal: Change Management Strategies for DrupalErich Beyrent
 
Drupal 8, Where Did the Code Go? From Info Hook to Plugin
Drupal 8, Where Did the Code Go? From Info Hook to PluginDrupal 8, Where Did the Code Go? From Info Hook to Plugin
Drupal 8, Where Did the Code Go? From Info Hook to PluginAcquia
 
Staying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHPStaying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHPOscar Merida
 
Content-Driven Web Applications with Magnolia CMS and Ruby on Rails
Content-Driven Web Applications with Magnolia CMS and Ruby on RailsContent-Driven Web Applications with Magnolia CMS and Ruby on Rails
Content-Driven Web Applications with Magnolia CMS and Ruby on Railsbkraft
 
Drupal 8 - Core and API Changes
Drupal 8 - Core and API ChangesDrupal 8 - Core and API Changes
Drupal 8 - Core and API ChangesShabir Ahmad
 
MidwestPHP 2016 - Adventures in Laravel 5
MidwestPHP 2016 - Adventures in Laravel 5 MidwestPHP 2016 - Adventures in Laravel 5
MidwestPHP 2016 - Adventures in Laravel 5 Joe Ferguson
 
symfony on action - WebTech 207
symfony on action - WebTech 207symfony on action - WebTech 207
symfony on action - WebTech 207patter
 

Semelhante a 2007 Fsoss Drupal Under The Hood (20)

Drupal Camp Porto - Developing with Drupal: First Steps
Drupal Camp Porto - Developing with Drupal: First StepsDrupal Camp Porto - Developing with Drupal: First Steps
Drupal Camp Porto - Developing with Drupal: First Steps
 
Domas monkus drupal module development
Domas monkus drupal module developmentDomas monkus drupal module development
Domas monkus drupal module development
 
Валентин Мацвейко та Владислав Мойсеєнко — D8: Migrate Yourself: code->module...
Валентин Мацвейко та Владислав Мойсеєнко — D8: Migrate Yourself: code->module...Валентин Мацвейко та Владислав Мойсеєнко — D8: Migrate Yourself: code->module...
Валентин Мацвейко та Владислав Мойсеєнко — D8: Migrate Yourself: code->module...
 
Migrate yourself. code -> module -> mind
Migrate yourself. code -> module -> mindMigrate yourself. code -> module -> mind
Migrate yourself. code -> module -> mind
 
Overview Of Drupal
Overview Of DrupalOverview Of Drupal
Overview Of Drupal
 
Overview Of Drupal
Overview Of DrupalOverview Of Drupal
Overview Of Drupal
 
Drupal 7 Theming - Behind the scenes
Drupal 7 Theming - Behind the scenes Drupal 7 Theming - Behind the scenes
Drupal 7 Theming - Behind the scenes
 
Intro To Mvc Development In Php
Intro To Mvc Development In PhpIntro To Mvc Development In Php
Intro To Mvc Development In Php
 
Staging Drupal: Change Management Strategies for Drupal
Staging Drupal: Change Management Strategies for DrupalStaging Drupal: Change Management Strategies for Drupal
Staging Drupal: Change Management Strategies for Drupal
 
Staging Drupal: Change Management Strategies for Drupal
Staging Drupal: Change Management Strategies for DrupalStaging Drupal: Change Management Strategies for Drupal
Staging Drupal: Change Management Strategies for Drupal
 
Drupal 8, Where Did the Code Go? From Info Hook to Plugin
Drupal 8, Where Did the Code Go? From Info Hook to PluginDrupal 8, Where Did the Code Go? From Info Hook to Plugin
Drupal 8, Where Did the Code Go? From Info Hook to Plugin
 
Django Vs Rails
Django Vs RailsDjango Vs Rails
Django Vs Rails
 
Presentation
PresentationPresentation
Presentation
 
Staying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHPStaying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHP
 
Content-Driven Web Applications with Magnolia CMS and Ruby on Rails
Content-Driven Web Applications with Magnolia CMS and Ruby on RailsContent-Driven Web Applications with Magnolia CMS and Ruby on Rails
Content-Driven Web Applications with Magnolia CMS and Ruby on Rails
 
Drupal 8 - Core and API Changes
Drupal 8 - Core and API ChangesDrupal 8 - Core and API Changes
Drupal 8 - Core and API Changes
 
Drupal 8 Hooks
Drupal 8 HooksDrupal 8 Hooks
Drupal 8 Hooks
 
MidwestPHP 2016 - Adventures in Laravel 5
MidwestPHP 2016 - Adventures in Laravel 5 MidwestPHP 2016 - Adventures in Laravel 5
MidwestPHP 2016 - Adventures in Laravel 5
 
Anatomy of a reusable module
Anatomy of a reusable moduleAnatomy of a reusable module
Anatomy of a reusable module
 
symfony on action - WebTech 207
symfony on action - WebTech 207symfony on action - WebTech 207
symfony on action - WebTech 207
 

Mais de James Walker

Salmon Protocol - OpenWebTO
Salmon Protocol - OpenWebTOSalmon Protocol - OpenWebTO
Salmon Protocol - OpenWebTOJames Walker
 
Federating the Social Web
Federating the Social WebFederating the Social Web
Federating the Social WebJames Walker
 
Keeping Drupal Connected
Keeping Drupal ConnectedKeeping Drupal Connected
Keeping Drupal ConnectedJames Walker
 
Your Blog is Your Social Network
Your Blog is Your Social NetworkYour Blog is Your Social Network
Your Blog is Your Social NetworkJames Walker
 
OpenID DrupalCon 2009
OpenID DrupalCon 2009OpenID DrupalCon 2009
OpenID DrupalCon 2009James Walker
 
Openid Drupalcon 2008
Openid Drupalcon 2008Openid Drupalcon 2008
Openid Drupalcon 2008James Walker
 
2007 Barcelona Drupalcon Image handling
2007 Barcelona Drupalcon Image handling2007 Barcelona Drupalcon Image handling
2007 Barcelona Drupalcon Image handlingJames Walker
 

Mais de James Walker (12)

living drupal
living drupalliving drupal
living drupal
 
Drupal & Mobile
Drupal & MobileDrupal & Mobile
Drupal & Mobile
 
Salmon Protocol - OpenWebTO
Salmon Protocol - OpenWebTOSalmon Protocol - OpenWebTO
Salmon Protocol - OpenWebTO
 
Federating the Social Web
Federating the Social WebFederating the Social Web
Federating the Social Web
 
Keeping Drupal Connected
Keeping Drupal ConnectedKeeping Drupal Connected
Keeping Drupal Connected
 
OpenWeb Discovery
OpenWeb DiscoveryOpenWeb Discovery
OpenWeb Discovery
 
Using Drupal
Using DrupalUsing Drupal
Using Drupal
 
Your Blog is Your Social Network
Your Blog is Your Social NetworkYour Blog is Your Social Network
Your Blog is Your Social Network
 
Why I Hate Drupal
Why I Hate DrupalWhy I Hate Drupal
Why I Hate Drupal
 
OpenID DrupalCon 2009
OpenID DrupalCon 2009OpenID DrupalCon 2009
OpenID DrupalCon 2009
 
Openid Drupalcon 2008
Openid Drupalcon 2008Openid Drupalcon 2008
Openid Drupalcon 2008
 
2007 Barcelona Drupalcon Image handling
2007 Barcelona Drupalcon Image handling2007 Barcelona Drupalcon Image handling
2007 Barcelona Drupalcon Image handling
 

Último

/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In.../:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...lizamodels9
 
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...lizamodels9
 
2024 Numerator Consumer Study of Cannabis Usage
2024 Numerator Consumer Study of Cannabis Usage2024 Numerator Consumer Study of Cannabis Usage
2024 Numerator Consumer Study of Cannabis UsageNeil Kimberley
 
Annual General Meeting Presentation Slides
Annual General Meeting Presentation SlidesAnnual General Meeting Presentation Slides
Annual General Meeting Presentation SlidesKeppelCorporation
 
Digital Transformation in the PLM domain - distrib.pdf
Digital Transformation in the PLM domain - distrib.pdfDigital Transformation in the PLM domain - distrib.pdf
Digital Transformation in the PLM domain - distrib.pdfJos Voskuil
 
8447779800, Low rate Call girls in Uttam Nagar Delhi NCR
8447779800, Low rate Call girls in Uttam Nagar Delhi NCR8447779800, Low rate Call girls in Uttam Nagar Delhi NCR
8447779800, Low rate Call girls in Uttam Nagar Delhi NCRashishs7044
 
Pitch Deck Teardown: Geodesic.Life's $500k Pre-seed deck
Pitch Deck Teardown: Geodesic.Life's $500k Pre-seed deckPitch Deck Teardown: Geodesic.Life's $500k Pre-seed deck
Pitch Deck Teardown: Geodesic.Life's $500k Pre-seed deckHajeJanKamps
 
Organizational Structure Running A Successful Business
Organizational Structure Running A Successful BusinessOrganizational Structure Running A Successful Business
Organizational Structure Running A Successful BusinessSeta Wicaksana
 
Youth Involvement in an Innovative Coconut Value Chain by Mwalimu Menza
Youth Involvement in an Innovative Coconut Value Chain by Mwalimu MenzaYouth Involvement in an Innovative Coconut Value Chain by Mwalimu Menza
Youth Involvement in an Innovative Coconut Value Chain by Mwalimu Menzaictsugar
 
Kenya’s Coconut Value Chain by Gatsby Africa
Kenya’s Coconut Value Chain by Gatsby AfricaKenya’s Coconut Value Chain by Gatsby Africa
Kenya’s Coconut Value Chain by Gatsby Africaictsugar
 
Innovation Conference 5th March 2024.pdf
Innovation Conference 5th March 2024.pdfInnovation Conference 5th March 2024.pdf
Innovation Conference 5th March 2024.pdfrichard876048
 
Flow Your Strategy at Flight Levels Day 2024
Flow Your Strategy at Flight Levels Day 2024Flow Your Strategy at Flight Levels Day 2024
Flow Your Strategy at Flight Levels Day 2024Kirill Klimov
 
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...lizamodels9
 
FULL ENJOY Call girls in Paharganj Delhi | 8377087607
FULL ENJOY Call girls in Paharganj Delhi | 8377087607FULL ENJOY Call girls in Paharganj Delhi | 8377087607
FULL ENJOY Call girls in Paharganj Delhi | 8377087607dollysharma2066
 
Call Us 📲8800102216📞 Call Girls In DLF City Gurgaon
Call Us 📲8800102216📞 Call Girls In DLF City GurgaonCall Us 📲8800102216📞 Call Girls In DLF City Gurgaon
Call Us 📲8800102216📞 Call Girls In DLF City Gurgaoncallgirls2057
 
APRIL2024_UKRAINE_xml_0000000000000 .pdf
APRIL2024_UKRAINE_xml_0000000000000 .pdfAPRIL2024_UKRAINE_xml_0000000000000 .pdf
APRIL2024_UKRAINE_xml_0000000000000 .pdfRbc Rbcua
 
Kenya Coconut Production Presentation by Dr. Lalith Perera
Kenya Coconut Production Presentation by Dr. Lalith PereraKenya Coconut Production Presentation by Dr. Lalith Perera
Kenya Coconut Production Presentation by Dr. Lalith Pereraictsugar
 
Islamabad Escorts | Call 03070433345 | Escort Service in Islamabad
Islamabad Escorts | Call 03070433345 | Escort Service in IslamabadIslamabad Escorts | Call 03070433345 | Escort Service in Islamabad
Islamabad Escorts | Call 03070433345 | Escort Service in IslamabadAyesha Khan
 

Último (20)

/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In.../:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...
 
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
 
2024 Numerator Consumer Study of Cannabis Usage
2024 Numerator Consumer Study of Cannabis Usage2024 Numerator Consumer Study of Cannabis Usage
2024 Numerator Consumer Study of Cannabis Usage
 
Annual General Meeting Presentation Slides
Annual General Meeting Presentation SlidesAnnual General Meeting Presentation Slides
Annual General Meeting Presentation Slides
 
Digital Transformation in the PLM domain - distrib.pdf
Digital Transformation in the PLM domain - distrib.pdfDigital Transformation in the PLM domain - distrib.pdf
Digital Transformation in the PLM domain - distrib.pdf
 
8447779800, Low rate Call girls in Uttam Nagar Delhi NCR
8447779800, Low rate Call girls in Uttam Nagar Delhi NCR8447779800, Low rate Call girls in Uttam Nagar Delhi NCR
8447779800, Low rate Call girls in Uttam Nagar Delhi NCR
 
Japan IT Week 2024 Brochure by 47Billion (English)
Japan IT Week 2024 Brochure by 47Billion (English)Japan IT Week 2024 Brochure by 47Billion (English)
Japan IT Week 2024 Brochure by 47Billion (English)
 
Pitch Deck Teardown: Geodesic.Life's $500k Pre-seed deck
Pitch Deck Teardown: Geodesic.Life's $500k Pre-seed deckPitch Deck Teardown: Geodesic.Life's $500k Pre-seed deck
Pitch Deck Teardown: Geodesic.Life's $500k Pre-seed deck
 
Organizational Structure Running A Successful Business
Organizational Structure Running A Successful BusinessOrganizational Structure Running A Successful Business
Organizational Structure Running A Successful Business
 
Youth Involvement in an Innovative Coconut Value Chain by Mwalimu Menza
Youth Involvement in an Innovative Coconut Value Chain by Mwalimu MenzaYouth Involvement in an Innovative Coconut Value Chain by Mwalimu Menza
Youth Involvement in an Innovative Coconut Value Chain by Mwalimu Menza
 
Kenya’s Coconut Value Chain by Gatsby Africa
Kenya’s Coconut Value Chain by Gatsby AfricaKenya’s Coconut Value Chain by Gatsby Africa
Kenya’s Coconut Value Chain by Gatsby Africa
 
Innovation Conference 5th March 2024.pdf
Innovation Conference 5th March 2024.pdfInnovation Conference 5th March 2024.pdf
Innovation Conference 5th March 2024.pdf
 
Flow Your Strategy at Flight Levels Day 2024
Flow Your Strategy at Flight Levels Day 2024Flow Your Strategy at Flight Levels Day 2024
Flow Your Strategy at Flight Levels Day 2024
 
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
 
FULL ENJOY Call girls in Paharganj Delhi | 8377087607
FULL ENJOY Call girls in Paharganj Delhi | 8377087607FULL ENJOY Call girls in Paharganj Delhi | 8377087607
FULL ENJOY Call girls in Paharganj Delhi | 8377087607
 
Call Us 📲8800102216📞 Call Girls In DLF City Gurgaon
Call Us 📲8800102216📞 Call Girls In DLF City GurgaonCall Us 📲8800102216📞 Call Girls In DLF City Gurgaon
Call Us 📲8800102216📞 Call Girls In DLF City Gurgaon
 
APRIL2024_UKRAINE_xml_0000000000000 .pdf
APRIL2024_UKRAINE_xml_0000000000000 .pdfAPRIL2024_UKRAINE_xml_0000000000000 .pdf
APRIL2024_UKRAINE_xml_0000000000000 .pdf
 
Kenya Coconut Production Presentation by Dr. Lalith Perera
Kenya Coconut Production Presentation by Dr. Lalith PereraKenya Coconut Production Presentation by Dr. Lalith Perera
Kenya Coconut Production Presentation by Dr. Lalith Perera
 
Islamabad Escorts | Call 03070433345 | Escort Service in Islamabad
Islamabad Escorts | Call 03070433345 | Escort Service in IslamabadIslamabad Escorts | Call 03070433345 | Escort Service in Islamabad
Islamabad Escorts | Call 03070433345 | Escort Service in Islamabad
 
Corporate Profile 47Billion Information Technology
Corporate Profile 47Billion Information TechnologyCorporate Profile 47Billion Information Technology
Corporate Profile 47Billion Information Technology
 

2007 Fsoss Drupal Under The Hood

  • 2. What is Drupal? 1. Content Management System 2. Content Management Framework 3. Community
  • 4. file uploads revisions menus security user profiles blocks performance modules search engine-friendly urls user manage- ment administration panels localization error reporting rss taxonomy blogging comments forums multi-site installations event logging community authoring ajax search free tagging feed aggregation contact form help system roles and per- missions statistics tracking polls
  • 7. Doubles in size each release source: http://acko.net/blog/drupal-org-explosion-and-trends source: http://buytaert.net/drupal-site-statistics
  • 8. Statistics • 840+ code contributors • 160+ local user groups • 430+ attendees at Drupalcon Barcelona • 200,000+ users on drupal.org • 3 million+ lines of code (core+contrib) • 52 SoC mentors for 20 students • 100,000+ downloads/month
  • 10. xml-rpc file api jquery database abstraction layer form api file api session management node system url routing theme system string handling filter system content versioning installation profiles access control trans- latable output user system caching date/time handling unicode support mail handling image manipulation installation system hook system menu system module system user authentication themable output
  • 12. Core • Lightweight framework Drupal Core • Library of common Content User Forms API Management Management functions Install Theming • Localization Allows Drupal to Profiles Layer bootstrap and serve a request Library of Common Functions • What you get when you download Drupal
  • 13. Modules Drupal Core Content User Forms API • Management Management How Drupal is extended Install Theming Localization • Profiles Layer Lean and mean and versatile • Library of Common Functions Inversion of control design pattern Modules • Actions/ Content Drupal exposes hooks Ecommerce Workflows Creation Kit for modules Organic Views Groups Custom Module
  • 14. INSTALL.txt index.php themes install.php update.php modules sites xmlrpc.php includes
  • 15. drupal_bootstrap() • DRUPAL_BOOTSTRAP_CONFIGURATION • DRUPAL_BOOTSTRAP_EARLY_PAGE_CACHE • DRUPAL_BOOTSTRAP_DATABASE • DRUPAL_BOOTSTRAP_ACCESS • DRUPAL_BOOTSTRAP_SESSION • DRUPAL_BOOTSTRAP_LATE_PAGE_CACHE • DRUPAL_BOOTSTRAP_PATH • DRUPAL_BOOTSTRAP_FULL
  • 17. Yes Is site Return offline? MENU_SITE_OFFLINE No Get menu array Is callback No Parse $path from Trim last '/' from defined for $_GET['q'] $path $path? No Does callback Return function exist? MENU_NOT_FOUND User allowed No Return to access this MENU_ACCESS_DENIED item? Marshall parameters from URL and item's Call callback callback arguments
  • 18. Hooks
  • 19. Hooks are PHP functions with Drupal-specific names
  • 20. How Drupal Finds Hooks /** * Determine whether a module implements a hook. * * @param $module * The name of the module (without the .module extension). * @param $hook * The name of the hook (e.g. quot;helpquot; or quot;menuquot;). */ function module_hook($module, $hook) { return function_exists($module .'_'. $hook); }
  • 21. Naming Hooks Module Hook Function name pants user pants_user() pants menu pants_menu() pants perm pants_perm()
  • 22. Hook Overview hook_user() comment_user() locale_user() node_user() mymodule_user() comment.module locale.module node.module mymodule.module
  • 24. FormAPI • Form elements are PHP arrays so you can programmatically manipulate any form • Chain validator and submitter routines • Theme overrides - down to the element! • Built-in security
  • 25. Form Example $form['user_name'] = array( '#title' => t('Your Name'), '#type' => 'textfield', '#description' => t('Please enter your name.'), ); $form['submit'] = array( '#type' => 'submit', '#value' => t('Submit') );
  • 26. Security • Verifies that $_POST values have corresponding $form elements • Form rendering sanitized for potential XSS • $form[‘token’] used to prevent CSRF
  • 31. PHPTemplate Files • page.tpl.php • node.tpl.php • block.tpl.php • comment.tpl.php • box.tpl.php
  • 32. theme('breadcrumb') theme-name_breadcrumb() theme-engine_breadcrumb() theme_breadcrumb() The first function found gets called.
  • 33. theme('page') garland_page() phptemplate_page() theme_page() The first function found gets called.
  • 34. Creating New Template Files template.php function mytheme_breadcrumb($breadcrumb) { if (!empty($breadcrumb)) { return '<span class=quot;breadcrumbquot;>'. implode(' * ', $breadcrumb) .'</span>'; } } new template.php function mytheme_breadcrumb($breadcrumb) { if (!empty($breadcrumb)) { $variables = array('breadcrumb' => implode(' * ', $breadcrumb)); return _phptemplate_callback('breadcrumb', $variables); } } breadcrumb.tpl.php <span class=quot;breadcrumbquot;><?php print $breadcrumb ?></span>