Profiles in Drupal - Drupal Day Aveiro

131 views

Published on

Presentation by Luís Correia at Drupal Day Aveiro, Portugal. http://drupalday2016.drupal-pt.org

Published in: Internet
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
131
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Profiles in Drupal - Drupal Day Aveiro

  1. 1. PROFILES IN DRUPAL (Well, sort of…)
  2. 2. STAGE FRIGHT • Anxiety, fear […] by the requirement to perform in front of an audience • "Anxiety usually has physical symptoms that may include a racing heart, a dry mouth, a shaky voice, blushing, trembling, sweating, lightheadedness, and nausea".
  3. 3. http://marzeelabs.org We are a distributed company with main offices in Porto and Setúbal and virtual offices in London and Barcelona, but you can always find us all around Europe. We provide technical leadership in large complex projects that require more than just your usual tech implementation.We consult, follow up, code- review and assure the quality of the final product. MARZEE LABS
  4. 4. ARTE G.E.I.E. http://www.arte.tv ARTE is a public Franco-German TV network, a European channel, that promotes programming in the areas of culture and the arts.
  5. 5. http://marzeelabs.org/blog/2015-01-06-drupal-profiles All your custom code and modules, themes and libraries to be installed should be bundled as an installation profile, so your site can be installed over and over. If you haven't started organizing your sites as Drupal profiles, you probably should.
  6. 6. STEP 1 The .make file ; mzprofile.make projects[link][version] = 1.3 projects[link][subdir] = "contrib"
  7. 7. STEP 1 The .make file ; mzprofile.make projects[link][version] = 1.3 projects[link][subdir] = "contrib" ; Provide the original_url when loading the field. ; @see https://www.drupal.org/node/1475790#comment-7743415 projects[link][patch][] = "http://www.drupal.org/files/ 7.x-1.x-_link_sanitize-bandaid-1475790-16.diff"
  8. 8. STEP 1 The .make file ; mzprofile.make projects[link][download][type] = git projects[link][download][branch] = 7.x-1.x projects[link][download][revision] = 7dc306c projects[link][subdir] = "contrib"
  9. 9. STEP 2 The .info file name = mzprofile description = Install with common features for this awesome project pre-configured. core = 7.x dependencies[] = link
  10. 10. STEP 3 The .profile file <?php /** * Implements hook_form_FORM_ID_alter() for install_configure_form(). * * Allows the profile to alter the site configuration form. */ function mzprofile_form_install_configure_form_alter(&$form, $form_state) { // Pre-populate the site name with the server name. $form['site_information']['site_name']['#default_value'] = $_SERVER['SERVER_NAME']; // Set default login, password and all that stuff to make install even faster. $admin_mail = 'admin@example.org'; $form['site_information']['site_mail']['#default_value'] = $admin_mail; $form['admin_account']['account']['name']['#default_value'] = 'admin'; $form['admin_account']['account']['mail']['#default_value'] = $admin_mail; $form['update_notifications']['update_status_module']['#default_value'][1] = 0; $form['update_notifications']['update_status_module']['#default_value'][2] = 0; }
  11. 11. STEP 3.5 Drupal core ; drupal-org-core.make api = 2 core = 7.x projects[drupal][type] = core projects[drupal][version] = 7.31 ; Make profiles inherit from each other ; Allows to use MZ as a base profile including it's modules ; @see https://drupal.org/node/2067229 projects[drupal][patch][] = "http://drupal.org/files/ 2067229-2-inheritable-profiles.patch"
  12. 12. STEP 4 Drush it! FULL $ drush make profiles/mzprofile/mzprofile.make . NO-CORE $ drush make profiles/mzprofile/mzprofile.make —-no-core . JUST ONE MODULE (OR PROFILE) $ drush make profiles/mzprofile/mzprofile.make —- projects=link —-no-core .
  13. 13. BUT! Can it run Crysis?
  14. 14. 7 DRUPAL PLATFORMS • http://concert.arte.tv • http://cinema.arte.tv • http://creative.arte.tv • http://future.arte.tv • http://info.arte.tv • http://sites.arte.tv • http://www.theoperaplatform.eu
  15. 15. 1 PROFILE TO RULETHEM ALL name = alw description = Install with common features for the Arte Live Web core = 7.x ; Inherit Foundation base profile ; Needs a Drupal core patch (see foundation makefiles) ; ==================================================== base = foundation
  16. 16. PLEASE Think of the kittens…
  17. 17. And I approve this message 👍 Luís is our all rounder. He is experienced in PHP, JS, CSS and all in between. Has an extended knowledge of pop culture and always has an opinion about the topic at hand. MY NAME IS LUIS

×