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

Insurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageInsurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageMatteo Carbone
 
Best Basmati Rice Manufacturers in India
Best Basmati Rice Manufacturers in IndiaBest Basmati Rice Manufacturers in India
Best Basmati Rice Manufacturers in IndiaShree Krishna Exports
 
Ensure the security of your HCL environment by applying the Zero Trust princi...
Ensure the security of your HCL environment by applying the Zero Trust princi...Ensure the security of your HCL environment by applying the Zero Trust princi...
Ensure the security of your HCL environment by applying the Zero Trust princi...Roland Driesen
 
Tech Startup Growth Hacking 101 - Basics on Growth Marketing
Tech Startup Growth Hacking 101  - Basics on Growth MarketingTech Startup Growth Hacking 101  - Basics on Growth Marketing
Tech Startup Growth Hacking 101 - Basics on Growth MarketingShawn Pang
 
VIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service Jamshedpur
VIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service JamshedpurVIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service Jamshedpur
VIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service JamshedpurSuhani Kapoor
 
A DAY IN THE LIFE OF A SALESMAN / WOMAN
A DAY IN THE LIFE OF A  SALESMAN / WOMANA DAY IN THE LIFE OF A  SALESMAN / WOMAN
A DAY IN THE LIFE OF A SALESMAN / WOMANIlamathiKannappan
 
9599632723 Top Call Girls in Delhi at your Door Step Available 24x7 Delhi
9599632723 Top Call Girls in Delhi at your Door Step Available 24x7 Delhi9599632723 Top Call Girls in Delhi at your Door Step Available 24x7 Delhi
9599632723 Top Call Girls in Delhi at your Door Step Available 24x7 DelhiCall Girls in Delhi
 
Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023Neil Kimberley
 
Pharma Works Profile of Karan Communications
Pharma Works Profile of Karan CommunicationsPharma Works Profile of Karan Communications
Pharma Works Profile of Karan Communicationskarancommunications
 
Progress Report - Oracle Database Analyst Summit
Progress  Report - Oracle Database Analyst SummitProgress  Report - Oracle Database Analyst Summit
Progress Report - Oracle Database Analyst SummitHolger Mueller
 
It will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 MayIt will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 MayNZSG
 
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...Any kyc Account
 
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...lizamodels9
 
VIP Call Girls In Saharaganj ( Lucknow ) 🔝 8923113531 🔝 Cash Payment (COD) 👒
VIP Call Girls In Saharaganj ( Lucknow  ) 🔝 8923113531 🔝  Cash Payment (COD) 👒VIP Call Girls In Saharaganj ( Lucknow  ) 🔝 8923113531 🔝  Cash Payment (COD) 👒
VIP Call Girls In Saharaganj ( Lucknow ) 🔝 8923113531 🔝 Cash Payment (COD) 👒anilsa9823
 
Call Girls in Gomti Nagar - 7388211116 - With room Service
Call Girls in Gomti Nagar - 7388211116  - With room ServiceCall Girls in Gomti Nagar - 7388211116  - With room Service
Call Girls in Gomti Nagar - 7388211116 - With room Servicediscovermytutordmt
 
Call Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine ServiceCall Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine Serviceritikaroy0888
 
Creating Low-Code Loan Applications using the Trisotech Mortgage Feature Set
Creating Low-Code Loan Applications using the Trisotech Mortgage Feature SetCreating Low-Code Loan Applications using the Trisotech Mortgage Feature Set
Creating Low-Code Loan Applications using the Trisotech Mortgage Feature SetDenis Gagné
 
Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...
Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...
Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...Lviv Startup Club
 

Último (20)

Insurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageInsurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usage
 
VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
 
Best Basmati Rice Manufacturers in India
Best Basmati Rice Manufacturers in IndiaBest Basmati Rice Manufacturers in India
Best Basmati Rice Manufacturers in India
 
Ensure the security of your HCL environment by applying the Zero Trust princi...
Ensure the security of your HCL environment by applying the Zero Trust princi...Ensure the security of your HCL environment by applying the Zero Trust princi...
Ensure the security of your HCL environment by applying the Zero Trust princi...
 
Tech Startup Growth Hacking 101 - Basics on Growth Marketing
Tech Startup Growth Hacking 101  - Basics on Growth MarketingTech Startup Growth Hacking 101  - Basics on Growth Marketing
Tech Startup Growth Hacking 101 - Basics on Growth Marketing
 
VIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service Jamshedpur
VIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service JamshedpurVIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service Jamshedpur
VIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service Jamshedpur
 
A DAY IN THE LIFE OF A SALESMAN / WOMAN
A DAY IN THE LIFE OF A  SALESMAN / WOMANA DAY IN THE LIFE OF A  SALESMAN / WOMAN
A DAY IN THE LIFE OF A SALESMAN / WOMAN
 
9599632723 Top Call Girls in Delhi at your Door Step Available 24x7 Delhi
9599632723 Top Call Girls in Delhi at your Door Step Available 24x7 Delhi9599632723 Top Call Girls in Delhi at your Door Step Available 24x7 Delhi
9599632723 Top Call Girls in Delhi at your Door Step Available 24x7 Delhi
 
Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023
 
Pharma Works Profile of Karan Communications
Pharma Works Profile of Karan CommunicationsPharma Works Profile of Karan Communications
Pharma Works Profile of Karan Communications
 
Progress Report - Oracle Database Analyst Summit
Progress  Report - Oracle Database Analyst SummitProgress  Report - Oracle Database Analyst Summit
Progress Report - Oracle Database Analyst Summit
 
It will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 MayIt will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 May
 
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
 
Nepali Escort Girl Kakori \ 9548273370 Indian Call Girls Service Lucknow ₹,9517
Nepali Escort Girl Kakori \ 9548273370 Indian Call Girls Service Lucknow ₹,9517Nepali Escort Girl Kakori \ 9548273370 Indian Call Girls Service Lucknow ₹,9517
Nepali Escort Girl Kakori \ 9548273370 Indian Call Girls Service Lucknow ₹,9517
 
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
 
VIP Call Girls In Saharaganj ( Lucknow ) 🔝 8923113531 🔝 Cash Payment (COD) 👒
VIP Call Girls In Saharaganj ( Lucknow  ) 🔝 8923113531 🔝  Cash Payment (COD) 👒VIP Call Girls In Saharaganj ( Lucknow  ) 🔝 8923113531 🔝  Cash Payment (COD) 👒
VIP Call Girls In Saharaganj ( Lucknow ) 🔝 8923113531 🔝 Cash Payment (COD) 👒
 
Call Girls in Gomti Nagar - 7388211116 - With room Service
Call Girls in Gomti Nagar - 7388211116  - With room ServiceCall Girls in Gomti Nagar - 7388211116  - With room Service
Call Girls in Gomti Nagar - 7388211116 - With room Service
 
Call Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine ServiceCall Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine Service
 
Creating Low-Code Loan Applications using the Trisotech Mortgage Feature Set
Creating Low-Code Loan Applications using the Trisotech Mortgage Feature SetCreating Low-Code Loan Applications using the Trisotech Mortgage Feature Set
Creating Low-Code Loan Applications using the Trisotech Mortgage Feature Set
 
Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...
Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...
Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...
 

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>