SlideShare uma empresa Scribd logo
1 de 27
Baixar para ler offline
2011-06-15
              Web Treff / DUG KölnBonn
         „Webseiten und Web-Applikationen mit
                       Drupal 7“

                    drupal-6.x-–drupal-7.x –
                    „Scratching the surface“


drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
whoami


    Florian Latzel
     ●   @fl3a




drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
whoami


    Florian Latzel
     ●   @fl3a → flEa




drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
whoami


    Florian Latzel
     ●   @fl3a → flea




drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
whoami


    Florian Latzel
     ●   @fl3a → floh




drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
drupal­7.x




                                             ?

drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
cat drupal­6.x­­drupal­7.x

 ●   Birdseye
 ●   Navigation / Menus
 ●   Modules
 ●   Simpletest
 ●   Fields
 ●   API
 ●   DBTNG
 ●   Theming

drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
Birdseye


   Size drupal-6.x (decompresed)
    ●   8.5M




drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
Birdseye


   Size drupal-7.x (decompressed)
    ●   22M




drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
Birdseye

                          4d3
   diff [1]               < blogapi
                          8a8,9
                          > contextual
                          > dashboard
                          9a11,13
                          > field
                          > field_ui
                          > file
                          12a17
                          > image
                          16a22
                          > overlay
                          19d24
                          < ping
                          21a27
                          > rdf
                          23a30,31
                          > shortcut
                          > simpletest
                          28c36
                          < throttle
                          ---
                          > toolbar
                          33d40
                          < upload
drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
Navigation / Menus


   Where the f*ck is … ?




drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
modules


   Some modules (and functionality) moved into core [2]
    ●   node/8
    ●   Adminrole
    ●   Poormanscron
    ●   Token
    ●   Vertical Tabs
    ●   ImageAPI, ImageCache,
    ●   RDF
    ●   ...

drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
modules


   JavaScript should be compatible with other
   libraries than jQuery [3] [4]

   ((function ($) {

       Drupal.behaviors.exampleModule = {
          attach: function (context, settings) {
            $('.example', context).click(function () {
              $(this).next('ul').toggle('show');
            });
          }
       };

   }(jQuery));
drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
simpletest


  find drupal-7.x -type d -name tests
    ./themes/tests
    ./modules/update/tests
    ./modules/node/tests
    ./modules/filter/tests
    ./modules/openid/tests
    ./modules/locale/tests
    ./modules/simpletest/tests
    ./modules/file/tests
    ./modules/user/tests
    ./modules/field/modules/list/tests
    ./modules/field/tests
    ./modules/rdf/tests
    ./modules/block/tests
    ./modules/search/tests
    ./modules/image/tests
    ./modules/trigger/tests
    ./modules/aggregator/tests
    ./modules/translation/tests

drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
simpletest


   Unit tests – Best tested drupal [5]:
    ●   Module [6]
    ●   Library [7]




drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
Fields


   Goodbye CCK – hello fields!




drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
Fields


   tree -d drupal-7.x/modules/field
    drupal-7.x/modules/field
    |-- modules
    |   |-- field_sql_storage
    |   |-- list
    |   |   `-- tests
    |   |-- number
    |   |-- options
    |   `-- text
    |-- tests
    `-- theme
    ●   + drupal-7.x/modules/image/image.field.inc
    ●   + drupal-7.x/modules/file/file.field.inc
    ●   - userreference, - nodereference [8]


drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
API


   API Changes (some of them) [9]
    ●   Block module now optional
    ●   db_rewrite_sql() replaced with
        hook_query_alter()
    ●   New user_cancel API
    ●   jQuery UI (1.7) was added into core
    ●   hook_perm() renamed to hook_permission()
    ●   Module .info files can have configure line
    ●   ...

drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
DBTNG


   Database Layer: The Next Generation




drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
DBTNG


   drupal-6.x:
   $query = “SELECT linkpath, weight
   FROM {menu_links} l
   WHERE l.'menu_name = 'menu-clone-main-menu'
   ORDER BY weight ASC“;
   $result = db_query(query);
   ...




drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
DBTNG


   drupal-7.x
   $query = db_select('menu_links', 'l')
       ->fields('l', array('link_path', 'weight'))
       ->condition('l.menu_name', 'menu-clone-main-menu')
       ->orderBy('l.weight', 'ASC');
   $result = $query->execute();
   ...




drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
Theming

    ●   API Changes
    ●   Anatomy of theme
    ●   Naming of template files
    ●   Template variables
    ●   ...




drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
Theming


   API Changes, Theming (some of them) [10]
    ●   Primary and secondary links are now Main and
        Secondary menu
    ●   New html.tpl.php files
        → drupal-7.x/modules/system/html.tpl.php
    ●   Content region is now mandatory, main page
        content became a block
    ●   $closure becomes $page_bottom, new
        $page_top and hidden regions
    ●   ...

drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
Theming


   Anatomy of a theme
   themes/
   `-- mytheme
       |-- css
       |   `-- style.css
       |-- img
       |   |-- slider_links.png
       |   `-- slider_rechts.png
       |-- screenshot.png
       |-- scripts
       |   `-- core.js
       |-- template.php
       |-- templates
       |   |-- html.tpl.php
       |   |-- node--wassergebiet.tpl.php
       |   |-- page.tpl.php
       |   |-- views-slideshow-controls-text-next.tpl.php
       |   |-- views-slideshow-controls-text-pause.tpl.php
       |   |-- views-slideshow-controls-text-previous.tpl.php
       |   `-- views-slideshow.tpl.php
       `-- mytheme.info
drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
Theming


   drupal-6.x template variables
    ●   print $header
    ●   print $content;
    ●   print $footer;
    ●   ...




drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
Theming


   drupal-7.x template variables
    ●   render($page['header']);
    ●   render($page['content']);
    ●   render($page['footer']);
    ●   ...




drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
cat /usr/src


   Appendix
   [1] diff on ls -A1 drupal-6.x/modules and drupal-7.x/modules
   [2] http://www.unleashedmind.com/node/52
   [3] http://drupal.org/update/modules/6/7#javascript_compatibility
   [4] http://drupal.org/node/756722
   [5] http://qa.drupal.org/
   [6] http://drupal.org/project/simpletest
   [7] http://simpletest.sourceforge.net/
   [8] http://drupal.org/project/references
   [9] http://drupal.org/update/modules/6/7
   [10] http://drupal.org/update/themes/6/7

drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  

Mais conteúdo relacionado

Mais procurados

Linked Data Publishing with Drupal (SWIB13 workshop)
Linked Data Publishing with Drupal (SWIB13 workshop)Linked Data Publishing with Drupal (SWIB13 workshop)
Linked Data Publishing with Drupal (SWIB13 workshop)
Joachim Neubert
 
Drush Aegir & Drush, Drupal Roadshow Austria
Drush Aegir & Drush, Drupal Roadshow AustriaDrush Aegir & Drush, Drupal Roadshow Austria
Drush Aegir & Drush, Drupal Roadshow Austria
Iztok Smolic
 

Mais procurados (13)

Drupal Developer Days Keynote
Drupal Developer Days KeynoteDrupal Developer Days Keynote
Drupal Developer Days Keynote
 
2014 hadoop wrocław jug
2014 hadoop   wrocław jug2014 hadoop   wrocław jug
2014 hadoop wrocław jug
 
Migrating data to drupal 8
Migrating data to drupal 8Migrating data to drupal 8
Migrating data to drupal 8
 
Improving your Drupal 8 development workflow DrupalCampLA
Improving your Drupal 8 development workflow DrupalCampLAImproving your Drupal 8 development workflow DrupalCampLA
Improving your Drupal 8 development workflow DrupalCampLA
 
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016
 
History of Drupal
History of DrupalHistory of Drupal
History of Drupal
 
Convert modules from 6.x to 7.x
Convert modules from 6.x to 7.xConvert modules from 6.x to 7.x
Convert modules from 6.x to 7.x
 
Linked Data Publishing with Drupal (SWIB13 workshop)
Linked Data Publishing with Drupal (SWIB13 workshop)Linked Data Publishing with Drupal (SWIB13 workshop)
Linked Data Publishing with Drupal (SWIB13 workshop)
 
Doing Drupal: Quick Start Deployments via Distributions
Doing Drupal: Quick Start Deployments via DistributionsDoing Drupal: Quick Start Deployments via Distributions
Doing Drupal: Quick Start Deployments via Distributions
 
Drush Aegir & Drush, Drupal Roadshow Austria
Drush Aegir & Drush, Drupal Roadshow AustriaDrush Aegir & Drush, Drupal Roadshow Austria
Drush Aegir & Drush, Drupal Roadshow Austria
 
Oleksandr Medvediev - Content delivery tools in Drupal 8.
Oleksandr Medvediev - Content delivery tools in Drupal 8.Oleksandr Medvediev - Content delivery tools in Drupal 8.
Oleksandr Medvediev - Content delivery tools in Drupal 8.
 
Drupal course hengl
Drupal course henglDrupal course hengl
Drupal course hengl
 
Open event (Drupalcamp Sunderland 2015)
Open event (Drupalcamp Sunderland 2015)Open event (Drupalcamp Sunderland 2015)
Open event (Drupalcamp Sunderland 2015)
 

Semelhante a Drupal 6.x, Drupal 7.x -- Scratching the surface

Drupal 8: What's new? Anton Shubkin
Drupal 8: What's new? Anton ShubkinDrupal 8: What's new? Anton Shubkin
Drupal 8: What's new? Anton Shubkin
ADCI Solutions
 
Automating Drupal Development: Makefiles, features and beyond
Automating Drupal Development: Makefiles, features and beyondAutomating Drupal Development: Makefiles, features and beyond
Automating Drupal Development: Makefiles, features and beyond
Nuvole
 

Semelhante a Drupal 6.x, Drupal 7.x -- Scratching the surface (20)

Drupal 8: What's new? Anton Shubkin
Drupal 8: What's new? Anton ShubkinDrupal 8: What's new? Anton Shubkin
Drupal 8: What's new? Anton Shubkin
 
Drupal 8 what to wait from
Drupal 8   what to wait fromDrupal 8   what to wait from
Drupal 8 what to wait from
 
#D8CX: Upgrade your modules to Drupal 8 (Part 1 and 2)
#D8CX: Upgrade your modules to Drupal 8 (Part 1 and 2)#D8CX: Upgrade your modules to Drupal 8 (Part 1 and 2)
#D8CX: Upgrade your modules to Drupal 8 (Part 1 and 2)
 
#D8 cx: upgrade your modules to drupal 8
#D8 cx: upgrade your modules to drupal 8 #D8 cx: upgrade your modules to drupal 8
#D8 cx: upgrade your modules to drupal 8
 
Developing a Joomla 3.x Component using RAD/FOF - Joomladay UK 2014
Developing a Joomla 3.x Component using RAD/FOF - Joomladay UK 2014Developing a Joomla 3.x Component using RAD/FOF - Joomladay UK 2014
Developing a Joomla 3.x Component using RAD/FOF - Joomladay UK 2014
 
Don’t fight with windmills. Upgrade path tool from OpenY distro - Igor Karpil...
Don’t fight with windmills. Upgrade path tool from OpenY distro - Igor Karpil...Don’t fight with windmills. Upgrade path tool from OpenY distro - Igor Karpil...
Don’t fight with windmills. Upgrade path tool from OpenY distro - Igor Karpil...
 
Drupal 8 improvements for developer productivity php symfony and more
Drupal 8 improvements for developer productivity  php symfony and moreDrupal 8 improvements for developer productivity  php symfony and more
Drupal 8 improvements for developer productivity php symfony and more
 
Drupal Efficiency
Drupal EfficiencyDrupal Efficiency
Drupal Efficiency
 
Offline-First Mobile Web Apps with PouchDB, IBM Cloudant, and IBM Bluemix
Offline-First Mobile Web Apps with PouchDB, IBM Cloudant, and IBM BluemixOffline-First Mobile Web Apps with PouchDB, IBM Cloudant, and IBM Bluemix
Offline-First Mobile Web Apps with PouchDB, IBM Cloudant, and IBM Bluemix
 
Automating Your Workflow with Gulp.js - php[world] 2016
Automating Your Workflow with Gulp.js - php[world] 2016Automating Your Workflow with Gulp.js - php[world] 2016
Automating Your Workflow with Gulp.js - php[world] 2016
 
Automating Drupal Development: Makefiles, features and beyond
Automating Drupal Development: Makefiles, features and beyondAutomating Drupal Development: Makefiles, features and beyond
Automating Drupal Development: Makefiles, features and beyond
 
Ditching jQuery Madison
Ditching jQuery MadisonDitching jQuery Madison
Ditching jQuery Madison
 
Drupal contrib module maintaining
Drupal contrib module maintainingDrupal contrib module maintaining
Drupal contrib module maintaining
 
Tech Talk: DevOps at LeanIX @ Startup Camp Berlin
Tech Talk: DevOps at LeanIX @ Startup Camp BerlinTech Talk: DevOps at LeanIX @ Startup Camp Berlin
Tech Talk: DevOps at LeanIX @ Startup Camp Berlin
 
Drupal Overview For Techies
Drupal Overview For TechiesDrupal Overview For Techies
Drupal Overview For Techies
 
Developing a Joomla 3.x Component using RAD FOF- Part 2: Front-end + demo - J...
Developing a Joomla 3.x Component using RAD FOF- Part 2: Front-end + demo - J...Developing a Joomla 3.x Component using RAD FOF- Part 2: Front-end + demo - J...
Developing a Joomla 3.x Component using RAD FOF- Part 2: Front-end + demo - J...
 
Multi-mania: Hacking your way through website issues with F12 devtools
Multi-mania: Hacking your way through website issues with F12 devtoolsMulti-mania: Hacking your way through website issues with F12 devtools
Multi-mania: Hacking your way through website issues with F12 devtools
 
Architecting The Future - WeRise Women in Technology
Architecting The Future - WeRise Women in TechnologyArchitecting The Future - WeRise Women in Technology
Architecting The Future - WeRise Women in Technology
 
Getting startedwith noir-clojureexchange-2011
Getting startedwith noir-clojureexchange-2011Getting startedwith noir-clojureexchange-2011
Getting startedwith noir-clojureexchange-2011
 
Top 8 Improvements in Drupal 8
Top 8 Improvements in Drupal 8Top 8 Improvements in Drupal 8
Top 8 Improvements in Drupal 8
 

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 

Drupal 6.x, Drupal 7.x -- Scratching the surface

  • 1. 2011-06-15 Web Treff / DUG KölnBonn „Webseiten und Web-Applikationen mit Drupal 7“ drupal-6.x-–drupal-7.x – „Scratching the surface“ drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
  • 2. whoami Florian Latzel ● @fl3a drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
  • 3. whoami Florian Latzel ● @fl3a → flEa drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
  • 4. whoami Florian Latzel ● @fl3a → flea drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
  • 5. whoami Florian Latzel ● @fl3a → floh drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
  • 6. drupal­7.x ? drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
  • 7. cat drupal­6.x­­drupal­7.x ● Birdseye ● Navigation / Menus ● Modules ● Simpletest ● Fields ● API ● DBTNG ● Theming drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
  • 8. Birdseye Size drupal-6.x (decompresed) ● 8.5M drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
  • 9. Birdseye Size drupal-7.x (decompressed) ● 22M drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
  • 10. Birdseye 4d3 diff [1] < blogapi 8a8,9 > contextual > dashboard 9a11,13 > field > field_ui > file 12a17 > image 16a22 > overlay 19d24 < ping 21a27 > rdf 23a30,31 > shortcut > simpletest 28c36 < throttle --- > toolbar 33d40 < upload drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
  • 11. Navigation / Menus Where the f*ck is … ? drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
  • 12. modules Some modules (and functionality) moved into core [2] ● node/8 ● Adminrole ● Poormanscron ● Token ● Vertical Tabs ● ImageAPI, ImageCache, ● RDF ● ... drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
  • 13. modules JavaScript should be compatible with other libraries than jQuery [3] [4] ((function ($) { Drupal.behaviors.exampleModule = { attach: function (context, settings) { $('.example', context).click(function () { $(this).next('ul').toggle('show'); }); } }; }(jQuery)); drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
  • 14. simpletest find drupal-7.x -type d -name tests ./themes/tests ./modules/update/tests ./modules/node/tests ./modules/filter/tests ./modules/openid/tests ./modules/locale/tests ./modules/simpletest/tests ./modules/file/tests ./modules/user/tests ./modules/field/modules/list/tests ./modules/field/tests ./modules/rdf/tests ./modules/block/tests ./modules/search/tests ./modules/image/tests ./modules/trigger/tests ./modules/aggregator/tests ./modules/translation/tests drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
  • 15. simpletest Unit tests – Best tested drupal [5]: ● Module [6] ● Library [7] drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
  • 16. Fields Goodbye CCK – hello fields! drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
  • 17. Fields tree -d drupal-7.x/modules/field drupal-7.x/modules/field |-- modules | |-- field_sql_storage | |-- list | | `-- tests | |-- number | |-- options | `-- text |-- tests `-- theme ● + drupal-7.x/modules/image/image.field.inc ● + drupal-7.x/modules/file/file.field.inc ● - userreference, - nodereference [8] drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
  • 18. API API Changes (some of them) [9] ● Block module now optional ● db_rewrite_sql() replaced with hook_query_alter() ● New user_cancel API ● jQuery UI (1.7) was added into core ● hook_perm() renamed to hook_permission() ● Module .info files can have configure line ● ... drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
  • 19. DBTNG Database Layer: The Next Generation drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
  • 20. DBTNG drupal-6.x: $query = “SELECT linkpath, weight FROM {menu_links} l WHERE l.'menu_name = 'menu-clone-main-menu' ORDER BY weight ASC“; $result = db_query(query); ... drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
  • 21. DBTNG drupal-7.x $query = db_select('menu_links', 'l') ->fields('l', array('link_path', 'weight')) ->condition('l.menu_name', 'menu-clone-main-menu') ->orderBy('l.weight', 'ASC'); $result = $query->execute(); ... drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
  • 22. Theming ● API Changes ● Anatomy of theme ● Naming of template files ● Template variables ● ... drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
  • 23. Theming API Changes, Theming (some of them) [10] ● Primary and secondary links are now Main and Secondary menu ● New html.tpl.php files → drupal-7.x/modules/system/html.tpl.php ● Content region is now mandatory, main page content became a block ● $closure becomes $page_bottom, new $page_top and hidden regions ● ... drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
  • 24. Theming Anatomy of a theme themes/ `-- mytheme |-- css | `-- style.css |-- img | |-- slider_links.png | `-- slider_rechts.png |-- screenshot.png |-- scripts | `-- core.js |-- template.php |-- templates | |-- html.tpl.php | |-- node--wassergebiet.tpl.php | |-- page.tpl.php | |-- views-slideshow-controls-text-next.tpl.php | |-- views-slideshow-controls-text-pause.tpl.php | |-- views-slideshow-controls-text-previous.tpl.php | `-- views-slideshow.tpl.php `-- mytheme.info drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
  • 25. Theming drupal-6.x template variables ● print $header ● print $content; ● print $footer; ● ... drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
  • 26. Theming drupal-7.x template variables ● render($page['header']); ● render($page['content']); ● render($page['footer']); ● ... drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel  
  • 27. cat /usr/src Appendix [1] diff on ls -A1 drupal-6.x/modules and drupal-7.x/modules [2] http://www.unleashedmind.com/node/52 [3] http://drupal.org/update/modules/6/7#javascript_compatibility [4] http://drupal.org/node/756722 [5] http://qa.drupal.org/ [6] http://drupal.org/project/simpletest [7] http://simpletest.sourceforge.net/ [8] http://drupal.org/project/references [9] http://drupal.org/update/modules/6/7 [10] http://drupal.org/update/themes/6/7 drupal­6.x­­drupal­7.x – „Scratching the surface“|Web Treff Köln|2011­06­15|Florian Latzel