SlideShare uma empresa Scribd logo
1 de 15
Advanced Strongarm

Some tricks and tips on using the
      Strongarm Features
    enhancement module
Strongarm

The Strongarm module allows Drupal

Persistent Variables to be exported and

   imported via Features modules.
Drupal Persistent Variables

•   Set by variable_set(name, value)
•   Retrieved by variable_get(name, def)
•   Values stored in the Variables table
•   Used by most modules for simple settings
•   Modules use their own Name Space
    Prefix (e.g ant = Automatic Node Title)
A Case Study
Need:

         A Feature for User profiles based on Content Profile nodes types.

Requirements:

         - Two Content Profile node types: Contact Info (profile) and
           About Me (network_profile)
         - Pathauto module settings to automatically alias them under
           the /people URL
         - All users can create and edit their own profile info

Tools:

         Two Drupal sites (source / test )
         SQL Query Tool
         Devel module (variable editor)
         (optional) Editor for source code
Expected Outcome
Two Content Types with same setting:

       - Fields as defined
       - Workflow Default options set to publish but not front page
       - Comment settings the same
       - Content Profile option checked
       - Attachment settings

Pathauto Settings

       - Settings in URL Aliases -> Automated Alias Settings ->
         Node Paths match.

Authenticated User Role

       - Has permissions to “create profile content” and
         “create networking_profile content.
Features only
Create a New Feature:

  - In Edit Component -> Content types: node, add the two content types

  - In Edit Components -> Permissions, select the two permissions

  - In Edit Components -> Roles: user_role, select “authenticated user”

Outcome:

  - Node types and CCK fields get created
  - Permissions set in role
  - but the node type settings are not set. E.g.
    workflow, comments, attachments, content profile use, and the like.
    Also, there are no path alias setting.
Features with Strongarm
           on Automatic
Create a New Feature:

  - In Edit Component -> Content types: node, add the two content types

  - In Edit Components -> Permissions, select the two permissions

  - In Edit Components -> Roles: user_role, select “authenticated user”

Outcome:

  - Node types and CCK fields get created
  - Permissions set in role
  - Standard nodes type settings are set (E.g.
    workflow, comments, attachments)
  - But content profile use is not set. Also, there are no path alias setting.
Where’s Wald..the
               Node Type Setting
Finding Node Type Related Settings
Basic assumption: Persistent variable names will contain node_type name

Find related persistent variables using either:

• (Preferred) An SQL Browser Tool to query your site‟s DB using the query

         Select * from Variables where name like „%<node_type>%‟

 e.g. Select * from Variables where name like „%networking_profile%‟

• Alternatively, use the Devel Variable Editor page and search thru the
  listings
Where’s Wald.. the NT Setting




Green: Auto added by Strongarm
Red:   Need to be manually added
Where’s Wald..the
           Node Type Setting
Notes:

• Repeat for other content type

• Note the “name spaces” for other variables found.
 These are other modules you might want to add as
 defaults to your feature as well.

• Look at the values for indications of where it is set/what
  it‟s used for.

• Search the source code for the variable_set instances
  to validate use (or just keep a good test site db backup
  and test it).
Features with Strongarm
          and Manual Settings
Create a New Feature:

  - In Edit Component -> Content types: node, add the two content types

  - In Edit Components -> Permissions, select the two permissions

  - In Edit Components -> Roles: user_role, select “authenticated user”

  - In Edit Components -> Strongarm: variable, add variables found above.

Outcome:

  - Node types and CCK fields get created
  - Permissions set in role
  - Standard nodes type settings are set (E.g.
    workflow, comments, attachments)
  - Content profile use is set.
  - Path auto alias is set
Where’s Wald..the
                Module Setting
Finding Module Settings
Basic assumption: Persistent variable names will start with module name or
                  module specific prefix.

Find related persistent variables using either:

• (Preferred) An SQL Browser Tool to query your site‟s DB using the query

         Select * from Variables where name like „<module_name>%‟

 e.g. Select * from Variables where name like „realname%‟

• Alternatively, use the Devel Variable Editor page and search thru the
  listings
Where’s Wald..the
             Module Setting
Notes:
•   Modules may use their own DB tables to store
    settings. Strongarm will not work with these.
•   Setting may be a DB record id reference or other
    complicated structure and will not work.
•   The variable name is often the same name as the
    admin form field that sets it.
•   Look at the “postfix” and values for indications of
    where it is set/what it‟s used for.
•   Search the source code for the variable_set instances
    to validate use (or just keep a good test site db
    backup and test it).
Conclusion


 Strongarm allows for many non-Feature

enabled module settings to be captured in

           a Feature Module
Questions?

Mais conteúdo relacionado

Mais procurados

JDBC: java DataBase connectivity
JDBC: java DataBase connectivityJDBC: java DataBase connectivity
JDBC: java DataBase connectivityTanmoy Barman
 
Jdbc in servlets
Jdbc in servletsJdbc in servlets
Jdbc in servletsNuha Noor
 
Database Access in mule ESB
Database Access in mule ESBDatabase Access in mule ESB
Database Access in mule ESBSrinu Prasad
 
Interface callable statement
Interface callable statementInterface callable statement
Interface callable statementmyrajendra
 
Java- JDBC- Mazenet Solution
Java- JDBC- Mazenet SolutionJava- JDBC- Mazenet Solution
Java- JDBC- Mazenet SolutionMazenetsolution
 
Managing JavaScript Dependencies With RequireJS
Managing JavaScript Dependencies With RequireJSManaging JavaScript Dependencies With RequireJS
Managing JavaScript Dependencies With RequireJSDen Odell
 
vBrownBag 2015-07-08 - VCP6-DCV Foundations Section 7: Monitoring
vBrownBag 2015-07-08 - VCP6-DCV Foundations Section 7: MonitoringvBrownBag 2015-07-08 - VCP6-DCV Foundations Section 7: Monitoring
vBrownBag 2015-07-08 - VCP6-DCV Foundations Section 7: MonitoringDan Barr
 
14 asp.net session20
14 asp.net session2014 asp.net session20
14 asp.net session20Niit Care
 
Develop plugin for Mozilla Firefox and structure a JS-based application
Develop plugin for Mozilla Firefox and structure a JS-based applicationDevelop plugin for Mozilla Firefox and structure a JS-based application
Develop plugin for Mozilla Firefox and structure a JS-based applicationAfshin Mehrabani
 
Java DataBase Connectivity API (JDBC API)
Java DataBase Connectivity API (JDBC API)Java DataBase Connectivity API (JDBC API)
Java DataBase Connectivity API (JDBC API)Luzan Baral
 
Jsp (java server page)
Jsp (java server page)Jsp (java server page)
Jsp (java server page)Chitrank Dixit
 
Drupal module development training delhi
Drupal module development training delhiDrupal module development training delhi
Drupal module development training delhiunitedwebsoft
 

Mais procurados (20)

JDBC: java DataBase connectivity
JDBC: java DataBase connectivityJDBC: java DataBase connectivity
JDBC: java DataBase connectivity
 
Jdbc in servlets
Jdbc in servletsJdbc in servlets
Jdbc in servlets
 
Database Access in mule ESB
Database Access in mule ESBDatabase Access in mule ESB
Database Access in mule ESB
 
JDBC Tutorial
JDBC TutorialJDBC Tutorial
JDBC Tutorial
 
RequireJS
RequireJSRequireJS
RequireJS
 
Interface callable statement
Interface callable statementInterface callable statement
Interface callable statement
 
Jdbc Ppt
Jdbc PptJdbc Ppt
Jdbc Ppt
 
Java- JDBC- Mazenet Solution
Java- JDBC- Mazenet SolutionJava- JDBC- Mazenet Solution
Java- JDBC- Mazenet Solution
 
Managing JavaScript Dependencies With RequireJS
Managing JavaScript Dependencies With RequireJSManaging JavaScript Dependencies With RequireJS
Managing JavaScript Dependencies With RequireJS
 
java Jdbc
java Jdbc java Jdbc
java Jdbc
 
jsf2 Notes
jsf2 Notesjsf2 Notes
jsf2 Notes
 
Jdbc
JdbcJdbc
Jdbc
 
vBrownBag 2015-07-08 - VCP6-DCV Foundations Section 7: Monitoring
vBrownBag 2015-07-08 - VCP6-DCV Foundations Section 7: MonitoringvBrownBag 2015-07-08 - VCP6-DCV Foundations Section 7: Monitoring
vBrownBag 2015-07-08 - VCP6-DCV Foundations Section 7: Monitoring
 
14 asp.net session20
14 asp.net session2014 asp.net session20
14 asp.net session20
 
Jdbc
JdbcJdbc
Jdbc
 
Develop plugin for Mozilla Firefox and structure a JS-based application
Develop plugin for Mozilla Firefox and structure a JS-based applicationDevelop plugin for Mozilla Firefox and structure a JS-based application
Develop plugin for Mozilla Firefox and structure a JS-based application
 
Java DataBase Connectivity API (JDBC API)
Java DataBase Connectivity API (JDBC API)Java DataBase Connectivity API (JDBC API)
Java DataBase Connectivity API (JDBC API)
 
Jsp (java server page)
Jsp (java server page)Jsp (java server page)
Jsp (java server page)
 
Overview Of JDBC
Overview Of JDBCOverview Of JDBC
Overview Of JDBC
 
Drupal module development training delhi
Drupal module development training delhiDrupal module development training delhi
Drupal module development training delhi
 

Destaque

بى سمارت
بى سمارتبى سمارت
بى سمارتmohamed
 
11 ∆ΕΚΕΜΒΡΙΟΥ, Η ΠΑΓΚΟΣΜΙΑ ΗΜΕΡΑ ΤΟΥ ΠΑΙ∆ΙΟΥ - ΥΠΕΝΘΥΜΙΣΗ ΓΙΑ ΤΑ ∆ΙΚΑΙΩΜΑΤΑ Τ...
11 ∆ΕΚΕΜΒΡΙΟΥ, Η ΠΑΓΚΟΣΜΙΑ ΗΜΕΡΑ ΤΟΥ ΠΑΙ∆ΙΟΥ - ΥΠΕΝΘΥΜΙΣΗ ΓΙΑ ΤΑ ∆ΙΚΑΙΩΜΑΤΑ Τ...11 ∆ΕΚΕΜΒΡΙΟΥ, Η ΠΑΓΚΟΣΜΙΑ ΗΜΕΡΑ ΤΟΥ ΠΑΙ∆ΙΟΥ - ΥΠΕΝΘΥΜΙΣΗ ΓΙΑ ΤΑ ∆ΙΚΑΙΩΜΑΤΑ Τ...
11 ∆ΕΚΕΜΒΡΙΟΥ, Η ΠΑΓΚΟΣΜΙΑ ΗΜΕΡΑ ΤΟΥ ΠΑΙ∆ΙΟΥ - ΥΠΕΝΘΥΜΙΣΗ ΓΙΑ ΤΑ ∆ΙΚΑΙΩΜΑΤΑ Τ...Ellh
 
Ynno Core Presentation
Ynno Core PresentationYnno Core Presentation
Ynno Core PresentationYNNO
 
Taller salud ocupacional
Taller salud ocupacionalTaller salud ocupacional
Taller salud ocupacionalguest531f33
 
Incidence of posterior capsular opacification in rigid pmma
Incidence of posterior capsular opacification in rigid pmmaIncidence of posterior capsular opacification in rigid pmma
Incidence of posterior capsular opacification in rigid pmmaDr. Anand Sudhalkar
 
Getting to the Heart of the Matter: Communities and Health Systems Strengthening
Getting to the Heart of the Matter: Communities and Health Systems StrengtheningGetting to the Heart of the Matter: Communities and Health Systems Strengthening
Getting to the Heart of the Matter: Communities and Health Systems Strengtheningjehill3
 
Partnership Defined Quality: Acting it Out!
Partnership Defined Quality: Acting it Out!Partnership Defined Quality: Acting it Out!
Partnership Defined Quality: Acting it Out!jehill3
 
Workshop Social Media - FNV Bondgenoten vrijdag 4 maart 2011
Workshop Social Media - FNV Bondgenoten vrijdag 4 maart 2011Workshop Social Media - FNV Bondgenoten vrijdag 4 maart 2011
Workshop Social Media - FNV Bondgenoten vrijdag 4 maart 2011Wieger Waardenburg
 
2009 Retail Development Seminar
2009 Retail Development Seminar2009 Retail Development Seminar
2009 Retail Development SeminarStephanie Lindley
 
Adam michael digestive
Adam michael digestiveAdam michael digestive
Adam michael digestivejaccalder
 
Mobile Photography for Brands - A Case Study
Mobile Photography for Brands - A Case Study Mobile Photography for Brands - A Case Study
Mobile Photography for Brands - A Case Study Michoel Ogince
 
Twitter me this...
Twitter me this...Twitter me this...
Twitter me this...Vicky
 
Marruecos
MarruecosMarruecos
MarruecosUlacit
 

Destaque (20)

بى سمارت
بى سمارتبى سمارت
بى سمارت
 
11 ∆ΕΚΕΜΒΡΙΟΥ, Η ΠΑΓΚΟΣΜΙΑ ΗΜΕΡΑ ΤΟΥ ΠΑΙ∆ΙΟΥ - ΥΠΕΝΘΥΜΙΣΗ ΓΙΑ ΤΑ ∆ΙΚΑΙΩΜΑΤΑ Τ...
11 ∆ΕΚΕΜΒΡΙΟΥ, Η ΠΑΓΚΟΣΜΙΑ ΗΜΕΡΑ ΤΟΥ ΠΑΙ∆ΙΟΥ - ΥΠΕΝΘΥΜΙΣΗ ΓΙΑ ΤΑ ∆ΙΚΑΙΩΜΑΤΑ Τ...11 ∆ΕΚΕΜΒΡΙΟΥ, Η ΠΑΓΚΟΣΜΙΑ ΗΜΕΡΑ ΤΟΥ ΠΑΙ∆ΙΟΥ - ΥΠΕΝΘΥΜΙΣΗ ΓΙΑ ΤΑ ∆ΙΚΑΙΩΜΑΤΑ Τ...
11 ∆ΕΚΕΜΒΡΙΟΥ, Η ΠΑΓΚΟΣΜΙΑ ΗΜΕΡΑ ΤΟΥ ΠΑΙ∆ΙΟΥ - ΥΠΕΝΘΥΜΙΣΗ ΓΙΑ ΤΑ ∆ΙΚΑΙΩΜΑΤΑ Τ...
 
Proyecto Basuras
Proyecto BasurasProyecto Basuras
Proyecto Basuras
 
Ynno Core Presentation
Ynno Core PresentationYnno Core Presentation
Ynno Core Presentation
 
Crm
CrmCrm
Crm
 
Taller salud ocupacional
Taller salud ocupacionalTaller salud ocupacional
Taller salud ocupacional
 
Incidence of posterior capsular opacification in rigid pmma
Incidence of posterior capsular opacification in rigid pmmaIncidence of posterior capsular opacification in rigid pmma
Incidence of posterior capsular opacification in rigid pmma
 
Perimetros areas para blogs
Perimetros areas para blogsPerimetros areas para blogs
Perimetros areas para blogs
 
Getting to the Heart of the Matter: Communities and Health Systems Strengthening
Getting to the Heart of the Matter: Communities and Health Systems StrengtheningGetting to the Heart of the Matter: Communities and Health Systems Strengthening
Getting to the Heart of the Matter: Communities and Health Systems Strengthening
 
Partnership Defined Quality: Acting it Out!
Partnership Defined Quality: Acting it Out!Partnership Defined Quality: Acting it Out!
Partnership Defined Quality: Acting it Out!
 
Doc4400
Doc4400Doc4400
Doc4400
 
European Venture Market
European Venture MarketEuropean Venture Market
European Venture Market
 
Workshop Social Media - FNV Bondgenoten vrijdag 4 maart 2011
Workshop Social Media - FNV Bondgenoten vrijdag 4 maart 2011Workshop Social Media - FNV Bondgenoten vrijdag 4 maart 2011
Workshop Social Media - FNV Bondgenoten vrijdag 4 maart 2011
 
2009 Retail Development Seminar
2009 Retail Development Seminar2009 Retail Development Seminar
2009 Retail Development Seminar
 
Adam michael digestive
Adam michael digestiveAdam michael digestive
Adam michael digestive
 
Mobile Photography for Brands - A Case Study
Mobile Photography for Brands - A Case Study Mobile Photography for Brands - A Case Study
Mobile Photography for Brands - A Case Study
 
Twitter me this...
Twitter me this...Twitter me this...
Twitter me this...
 
Marruecos
MarruecosMarruecos
Marruecos
 
Ots thrift charter
Ots thrift charterOts thrift charter
Ots thrift charter
 
Poems
PoemsPoems
Poems
 

Semelhante a The Drupal Strongarm Module - Tips and Tricks.

Mule data weave_2
Mule data weave_2Mule data weave_2
Mule data weave_2kunal vishe
 
Ruby on Rails: Coding Guideline
Ruby on Rails: Coding GuidelineRuby on Rails: Coding Guideline
Ruby on Rails: Coding GuidelineNascenia IT
 
Magento 2.0: Prepare yourself for a new way of module development
Magento 2.0: Prepare yourself for a new way of module developmentMagento 2.0: Prepare yourself for a new way of module development
Magento 2.0: Prepare yourself for a new way of module developmentIvan Chepurnyi
 
Dexterity in the Wild
Dexterity in the WildDexterity in the Wild
Dexterity in the WildDavid Glick
 
Learning to code for startup mvp session 3
Learning to code for startup mvp session 3Learning to code for startup mvp session 3
Learning to code for startup mvp session 3Henry S
 
Muleesbcomponents1 160625154208
Muleesbcomponents1 160625154208Muleesbcomponents1 160625154208
Muleesbcomponents1 160625154208ppts123456
 
Mule ESB Components
Mule ESB Components Mule ESB Components
Mule ESB Components pat_91
 
Web components - An Introduction
Web components - An IntroductionWeb components - An Introduction
Web components - An Introductioncherukumilli2
 
Lightning web components
Lightning web components Lightning web components
Lightning web components Cloud Analogy
 
Asp Net Advance Topics
Asp Net Advance TopicsAsp Net Advance Topics
Asp Net Advance TopicsAli Taki
 
Rails application refactoring steps
Rails application refactoring stepsRails application refactoring steps
Rails application refactoring stepsMasud Rana
 
Mastering the Lightning Framework - Part 1
Mastering the Lightning Framework - Part 1Mastering the Lightning Framework - Part 1
Mastering the Lightning Framework - Part 1Salesforce Developers
 
SFDC UI - Advanced Visualforce
SFDC UI - Advanced VisualforceSFDC UI - Advanced Visualforce
SFDC UI - Advanced VisualforceSujit Kumar
 
Staying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHPStaying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHPOscar Merida
 
Mule connectors-part 1
Mule connectors-part 1Mule connectors-part 1
Mule connectors-part 1VirtusaPolaris
 

Semelhante a The Drupal Strongarm Module - Tips and Tricks. (20)

Mule data weave_2
Mule data weave_2Mule data weave_2
Mule data weave_2
 
Ruby on Rails: Coding Guideline
Ruby on Rails: Coding GuidelineRuby on Rails: Coding Guideline
Ruby on Rails: Coding Guideline
 
Magento 2.0: Prepare yourself for a new way of module development
Magento 2.0: Prepare yourself for a new way of module developmentMagento 2.0: Prepare yourself for a new way of module development
Magento 2.0: Prepare yourself for a new way of module development
 
Unit 2 - Data Binding.pptx
Unit 2 - Data Binding.pptxUnit 2 - Data Binding.pptx
Unit 2 - Data Binding.pptx
 
KAAccessControl
KAAccessControlKAAccessControl
KAAccessControl
 
Dexterity in the Wild
Dexterity in the WildDexterity in the Wild
Dexterity in the Wild
 
Learning to code for startup mvp session 3
Learning to code for startup mvp session 3Learning to code for startup mvp session 3
Learning to code for startup mvp session 3
 
Muleesbcomponents1 160625154208
Muleesbcomponents1 160625154208Muleesbcomponents1 160625154208
Muleesbcomponents1 160625154208
 
Mule connectors-session1
Mule connectors-session1Mule connectors-session1
Mule connectors-session1
 
Mule ESB Components
Mule ESB Components Mule ESB Components
Mule ESB Components
 
Web components - An Introduction
Web components - An IntroductionWeb components - An Introduction
Web components - An Introduction
 
Lightning web components
Lightning web components Lightning web components
Lightning web components
 
Asp Net Advance Topics
Asp Net Advance TopicsAsp Net Advance Topics
Asp Net Advance Topics
 
Rails application refactoring steps
Rails application refactoring stepsRails application refactoring steps
Rails application refactoring steps
 
Ember - introduction
Ember - introductionEmber - introduction
Ember - introduction
 
Mastering the Lightning Framework - Part 1
Mastering the Lightning Framework - Part 1Mastering the Lightning Framework - Part 1
Mastering the Lightning Framework - Part 1
 
Coding standards
Coding standards Coding standards
Coding standards
 
SFDC UI - Advanced Visualforce
SFDC UI - Advanced VisualforceSFDC UI - Advanced Visualforce
SFDC UI - Advanced Visualforce
 
Staying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHPStaying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHP
 
Mule connectors-part 1
Mule connectors-part 1Mule connectors-part 1
Mule connectors-part 1
 

Mais de cgmonroe

Structured SEO Data Overview and How To
Structured SEO Data Overview and How ToStructured SEO Data Overview and How To
Structured SEO Data Overview and How Tocgmonroe
 
Structured SEO Data: An overview and how to for Drupal
Structured SEO Data:  An overview and how to for DrupalStructured SEO Data:  An overview and how to for Drupal
Structured SEO Data: An overview and how to for Drupalcgmonroe
 
Tips on Securing Drupal Sites - DrupalCamp Atlanta (DCA)
Tips on Securing Drupal Sites - DrupalCamp Atlanta (DCA)Tips on Securing Drupal Sites - DrupalCamp Atlanta (DCA)
Tips on Securing Drupal Sites - DrupalCamp Atlanta (DCA)cgmonroe
 
Tips on Securing Drupal Sites
Tips on Securing Drupal SitesTips on Securing Drupal Sites
Tips on Securing Drupal Sitescgmonroe
 
Becoming "Facet"-nated with Search API
Becoming "Facet"-nated with Search APIBecoming "Facet"-nated with Search API
Becoming "Facet"-nated with Search APIcgmonroe
 
Intro to drupal module internals asheville
Intro to drupal module internals ashevilleIntro to drupal module internals asheville
Intro to drupal module internals ashevillecgmonroe
 
Using Content Delivery Networks with Drupal
Using Content Delivery Networks with DrupalUsing Content Delivery Networks with Drupal
Using Content Delivery Networks with Drupalcgmonroe
 
Solr facets and custom indices
Solr facets and custom indicesSolr facets and custom indices
Solr facets and custom indicescgmonroe
 
HTML Purifier, WYSIWYG, and TinyMCE
HTML Purifier, WYSIWYG, and TinyMCEHTML Purifier, WYSIWYG, and TinyMCE
HTML Purifier, WYSIWYG, and TinyMCEcgmonroe
 
Using the Features API
Using the Features APIUsing the Features API
Using the Features APIcgmonroe
 
Intro to CSS Selectors in Drupal
Intro to CSS Selectors in DrupalIntro to CSS Selectors in Drupal
Intro to CSS Selectors in Drupalcgmonroe
 
Drupal Workflow Concepts
Drupal Workflow ConceptsDrupal Workflow Concepts
Drupal Workflow Conceptscgmonroe
 
TriDUG WebFM Presentation
TriDUG WebFM PresentationTriDUG WebFM Presentation
TriDUG WebFM Presentationcgmonroe
 

Mais de cgmonroe (13)

Structured SEO Data Overview and How To
Structured SEO Data Overview and How ToStructured SEO Data Overview and How To
Structured SEO Data Overview and How To
 
Structured SEO Data: An overview and how to for Drupal
Structured SEO Data:  An overview and how to for DrupalStructured SEO Data:  An overview and how to for Drupal
Structured SEO Data: An overview and how to for Drupal
 
Tips on Securing Drupal Sites - DrupalCamp Atlanta (DCA)
Tips on Securing Drupal Sites - DrupalCamp Atlanta (DCA)Tips on Securing Drupal Sites - DrupalCamp Atlanta (DCA)
Tips on Securing Drupal Sites - DrupalCamp Atlanta (DCA)
 
Tips on Securing Drupal Sites
Tips on Securing Drupal SitesTips on Securing Drupal Sites
Tips on Securing Drupal Sites
 
Becoming "Facet"-nated with Search API
Becoming "Facet"-nated with Search APIBecoming "Facet"-nated with Search API
Becoming "Facet"-nated with Search API
 
Intro to drupal module internals asheville
Intro to drupal module internals ashevilleIntro to drupal module internals asheville
Intro to drupal module internals asheville
 
Using Content Delivery Networks with Drupal
Using Content Delivery Networks with DrupalUsing Content Delivery Networks with Drupal
Using Content Delivery Networks with Drupal
 
Solr facets and custom indices
Solr facets and custom indicesSolr facets and custom indices
Solr facets and custom indices
 
HTML Purifier, WYSIWYG, and TinyMCE
HTML Purifier, WYSIWYG, and TinyMCEHTML Purifier, WYSIWYG, and TinyMCE
HTML Purifier, WYSIWYG, and TinyMCE
 
Using the Features API
Using the Features APIUsing the Features API
Using the Features API
 
Intro to CSS Selectors in Drupal
Intro to CSS Selectors in DrupalIntro to CSS Selectors in Drupal
Intro to CSS Selectors in Drupal
 
Drupal Workflow Concepts
Drupal Workflow ConceptsDrupal Workflow Concepts
Drupal Workflow Concepts
 
TriDUG WebFM Presentation
TriDUG WebFM PresentationTriDUG WebFM Presentation
TriDUG WebFM Presentation
 

Último

Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 

Último (20)

Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 

The Drupal Strongarm Module - Tips and Tricks.

  • 1. Advanced Strongarm Some tricks and tips on using the Strongarm Features enhancement module
  • 2. Strongarm The Strongarm module allows Drupal Persistent Variables to be exported and imported via Features modules.
  • 3. Drupal Persistent Variables • Set by variable_set(name, value) • Retrieved by variable_get(name, def) • Values stored in the Variables table • Used by most modules for simple settings • Modules use their own Name Space Prefix (e.g ant = Automatic Node Title)
  • 4. A Case Study Need: A Feature for User profiles based on Content Profile nodes types. Requirements: - Two Content Profile node types: Contact Info (profile) and About Me (network_profile) - Pathauto module settings to automatically alias them under the /people URL - All users can create and edit their own profile info Tools: Two Drupal sites (source / test ) SQL Query Tool Devel module (variable editor) (optional) Editor for source code
  • 5. Expected Outcome Two Content Types with same setting: - Fields as defined - Workflow Default options set to publish but not front page - Comment settings the same - Content Profile option checked - Attachment settings Pathauto Settings - Settings in URL Aliases -> Automated Alias Settings -> Node Paths match. Authenticated User Role - Has permissions to “create profile content” and “create networking_profile content.
  • 6. Features only Create a New Feature: - In Edit Component -> Content types: node, add the two content types - In Edit Components -> Permissions, select the two permissions - In Edit Components -> Roles: user_role, select “authenticated user” Outcome: - Node types and CCK fields get created - Permissions set in role - but the node type settings are not set. E.g. workflow, comments, attachments, content profile use, and the like. Also, there are no path alias setting.
  • 7. Features with Strongarm on Automatic Create a New Feature: - In Edit Component -> Content types: node, add the two content types - In Edit Components -> Permissions, select the two permissions - In Edit Components -> Roles: user_role, select “authenticated user” Outcome: - Node types and CCK fields get created - Permissions set in role - Standard nodes type settings are set (E.g. workflow, comments, attachments) - But content profile use is not set. Also, there are no path alias setting.
  • 8. Where’s Wald..the Node Type Setting Finding Node Type Related Settings Basic assumption: Persistent variable names will contain node_type name Find related persistent variables using either: • (Preferred) An SQL Browser Tool to query your site‟s DB using the query Select * from Variables where name like „%<node_type>%‟ e.g. Select * from Variables where name like „%networking_profile%‟ • Alternatively, use the Devel Variable Editor page and search thru the listings
  • 9. Where’s Wald.. the NT Setting Green: Auto added by Strongarm Red: Need to be manually added
  • 10. Where’s Wald..the Node Type Setting Notes: • Repeat for other content type • Note the “name spaces” for other variables found. These are other modules you might want to add as defaults to your feature as well. • Look at the values for indications of where it is set/what it‟s used for. • Search the source code for the variable_set instances to validate use (or just keep a good test site db backup and test it).
  • 11. Features with Strongarm and Manual Settings Create a New Feature: - In Edit Component -> Content types: node, add the two content types - In Edit Components -> Permissions, select the two permissions - In Edit Components -> Roles: user_role, select “authenticated user” - In Edit Components -> Strongarm: variable, add variables found above. Outcome: - Node types and CCK fields get created - Permissions set in role - Standard nodes type settings are set (E.g. workflow, comments, attachments) - Content profile use is set. - Path auto alias is set
  • 12. Where’s Wald..the Module Setting Finding Module Settings Basic assumption: Persistent variable names will start with module name or module specific prefix. Find related persistent variables using either: • (Preferred) An SQL Browser Tool to query your site‟s DB using the query Select * from Variables where name like „<module_name>%‟ e.g. Select * from Variables where name like „realname%‟ • Alternatively, use the Devel Variable Editor page and search thru the listings
  • 13. Where’s Wald..the Module Setting Notes: • Modules may use their own DB tables to store settings. Strongarm will not work with these. • Setting may be a DB record id reference or other complicated structure and will not work. • The variable name is often the same name as the admin form field that sets it. • Look at the “postfix” and values for indications of where it is set/what it‟s used for. • Search the source code for the variable_set instances to validate use (or just keep a good test site db backup and test it).
  • 14. Conclusion Strongarm allows for many non-Feature enabled module settings to be captured in a Feature Module