SlideShare a Scribd company logo
Remembering the User A few simple things you can do to enhance the Drupal experience for your users
Introduction Hello my name is Oliver Walker Using Drupal for a year or two Develop websites for small businesses http://www.ventureweb.net Front end developer/themer Themeing Build Small ‘helper’ modules
Who am I enhancing it for? My ‘user group’ might not be your ‘user group’ Lots of different types of drupal users Module Developers Site Administrators Content Writers People who leave comments People who just look at your website … and more…
So who then?  1 - 3 people who ‘administer’ And by administer I mean… Change content anywhere from daily to weekly Add/edit content Moderate comments Moderate revisions  Basic user administration  Business areas (Local) Government Tourism Industry Small Business
4 things… …I have done to improve the experience of drupal for the users defined previously.
#1) Menu Settings Ordering Pages with the Menu System: Default Intuitive Drawbacks: Menu Settings on content authoring form has all the links in there Have to grant ‘administer menus’ permissions
#1) How to: If you don’t want to write your own module!.. Go: Admin > Site Building > Menus > Settings Drupal 6 “ Default Menu for content” Drupal 5: “ Content authoring form settings” However Drupal 5 restricts access totally Drupal 6 defines initial ‘starting point’
#1) Links and Resources Some resources http://drupal.org/node/270273
#2) User Profile Page Consider the sites and the users  No social media (buddy lists, alerts, favorites etc.) What does the user page have on it? “ Member for x days…” Can it be more usable? Blocks, custom layouts to add useful content e.g. Links to create content  (copy node_add() from node.module) Lists of user’s content Comments requiring administration Revisions that need approval
#2) User Profile Page - D5 code: /*** USER PAGE ***/ function _phptemplate_variables($hook, $vars) { $vars = array(); if ($hook == 'page') { global $user; if (arg(0) == 'user' && arg(1) == $user->name){ $suggestions[] = ’page-user'; $vars['template_files'] = $suggestions; }  } return $vars; } /*** USER PAGE CONTENT ***/ function phptemplate_user_profile($user, $fields = array()) { return _phptemplate_callback('user-profile, array('user' => $user, 'fields' => $fields)); } Add to your template.php file
#2) User Profile Page - D6 Just create the template files user-profile.tpl.php page-user.tpl.php … and remember to clear the cache! Admin > Site configuration > Performance http://ww.example.com/admin/settings/performance or use Devel Module
#2) User Profile Page You can then theme the new template files as you would any other template file: user-profile.tpl.php page-user.tpl.php
#2) Links and Resources “ Add Blocks to your User Profile page in Drupal 5 and 6” http://stevekrueger.com/ http://drupal.org/node/35728
#3) Content authoring forms Sometimes Content authoring form can get long. Theme the form so that, for example, it: Looks more like the node itself Provides further instruction to the user Looks like an administrative theme
#3) Content Authoring forms You can go a long way with just css. Creating specific template files gives you full control Better use of space Add extra help text, links for user assistance etc. Whatever you can think of
#3) Content Authoring forms - D5 /*** ADD NEW ***/ if ((arg(0) == 'node') && (arg(1) == 'add')){ if(arg(2) == ’ yourNodeType '){  function phptemplate_node_form($form) {  return _phptemplate_callback('node- yourNodeType -edit', array('user' => $user, 'form' => $form));  } } } /*** EDIT EXISTING ***/ if ((arg(0) == 'node') && (arg(2) == 'edit')){ $node = node_load(array('nid' => arg(1))); if($node->type == ' yourNodeType '){  function phptemplate_node_form($form) {  return _phptemplate_callback('node- yourNodeType -edit', array('user' => $user, 'form' => $form));  } } } Add to your template.php file
#3) Content Authoring Forms - D6 … and remember to clear the cache! function  yourThemeName _theme(){ return array( ’ yourNodeType _node_form' => array( 'arguments' => array('form' => NULL), 'template' => 'node- yourNodeType -edit', ), ); } Add to your template.php file
node- yourNodeType -edit.tpl.php drupal_render($form[‘title’]) Will render the form title drupal_render($form[‘field_xxxxx’]) Will render field_xxxxx drupal_render($form) Will render the form Will render what is remaining of the form after other fields have been rendered How do I find out what form values there are for me to render? print ‘<pre>’; print_r($form); print ‘</pre>’;
#3) You can also alter default form values For example Number of rows in a textarea Size of a specific text field Making things collapsible or not Value of a button (submit, edit, delete) Remove a form component altogether.
#3) Drupal 5 - form value overrride /** * add */ if ((arg(0) == 'node') && (arg(1) == 'add')){ if(arg(2) == 'listing'){  function phptemplate_node_form($form) {   $form['body_filter']['body']['#rows'] = 30; $form['field_sq_foot'][0]['value']['#size'] = 5; $form['preview']['#value'] = “Preview the listing”; $form['submit']['#value'] = Create!&quot;; unset($form['menu']); return _phptemplate_callback('node-listing-edit', array('user' => $user, 'form' => $form)); … Add to your template.php file
#3) Drupal 6 - form value override function vwtheme_preprocess_listing_node_form(&$vars) { $vars['form']['buttons']['submit']['#value'] = &quot;Cowabunga&quot;;   $vars['form'][ 'field_sq_foot'][0]['value']['#size'] = 5; … … } Add to your template.php file … and remember to clear the cache!
#3) Links and Resources http://www.drupal.org/101092 Lullabot tutorial (modifying forms in general) Covers how to alter using a module and hook_form_alter http://www.lullabot.com/articles/modifying-forms-5-and-6 Template suggestions http://drupal.org/node/223440
#4) Video Content as bonus to README Readme files are important  Who doesn’t like to watch video! Tailored video makes people feel warm and special Easy to make Screen capture software  e.g. iShowU @ shineywhitebox.com for $20 US Product Placement as a possible revenue stream??

More Related Content

What's hot

Firefox addons
Firefox addonsFirefox addons
Firefox addons
Gurpreet Singh Sachdeva
 
7 reasons why developers should love Joomla!
7 reasons why developers should love Joomla!7 reasons why developers should love Joomla!
7 reasons why developers should love Joomla!
Bartłomiej Krztuk
 
WebMatrix 100-level presentation
WebMatrix 100-level presentationWebMatrix 100-level presentation
WebMatrix 100-level presentation
Alice Pang
 
Routing System In Symfony 1.2
Routing System In Symfony 1.2Routing System In Symfony 1.2
Routing System In Symfony 1.2
Alex Demchenko
 
Statische Websites in Rails 3.1
Statische Websites in Rails 3.1Statische Websites in Rails 3.1
Statische Websites in Rails 3.1
RobinBrouwer
 
Drupal 8: Routing & More
Drupal 8: Routing & MoreDrupal 8: Routing & More
Drupal 8: Routing & More
drubb
 
Drupal 8: Forms
Drupal 8: FormsDrupal 8: Forms
Drupal 8: Forms
drubb
 
Word press templates
Word press templatesWord press templates
Word press templates
Dan Phiffer
 
Firefox Extension Development
Firefox Extension DevelopmentFirefox Extension Development
Firefox Extension Development
phamvanvung
 
Intro to #memtech PHP 2011-12-05
Intro to #memtech PHP   2011-12-05Intro to #memtech PHP   2011-12-05
Intro to #memtech PHP 2011-12-05
Jeremy Kendall
 
Why I love Haml
Why I love HamlWhy I love Haml
Why I love Haml
Flumes
 
Firefox extension Development
Firefox extension DevelopmentFirefox extension Development
Firefox extension Development
Abhinav Chittora
 
Geek Moot '09 -- FrontendUsers/CustomContent
Geek Moot '09 -- FrontendUsers/CustomContentGeek Moot '09 -- FrontendUsers/CustomContent
Geek Moot '09 -- FrontendUsers/CustomContent
Ted Kulp
 
D7 theming what's new - London
D7 theming what's new - LondonD7 theming what's new - London
D7 theming what's new - London
Marek Sotak
 
Introduction to WordPress Theme Development
Introduction to WordPress Theme DevelopmentIntroduction to WordPress Theme Development
Introduction to WordPress Theme Development
Sitdhibong Laokok
 
Your Custom WordPress Admin Pages Suck
Your Custom WordPress Admin Pages SuckYour Custom WordPress Admin Pages Suck
Your Custom WordPress Admin Pages Suck
Anthony Montalbano
 
Fundamental JQuery
Fundamental JQueryFundamental JQuery
Fundamental JQuery
Achmad Solichin
 
PHP 102: Out with the Bad, In with the Good
PHP 102: Out with the Bad, In with the GoodPHP 102: Out with the Bad, In with the Good
PHP 102: Out with the Bad, In with the Good
Jeremy Kendall
 
Kickass
KickassKickass
WordPress Theme Development
 WordPress Theme Development WordPress Theme Development
WordPress Theme Development
Bijay Oli
 

What's hot (20)

Firefox addons
Firefox addonsFirefox addons
Firefox addons
 
7 reasons why developers should love Joomla!
7 reasons why developers should love Joomla!7 reasons why developers should love Joomla!
7 reasons why developers should love Joomla!
 
WebMatrix 100-level presentation
WebMatrix 100-level presentationWebMatrix 100-level presentation
WebMatrix 100-level presentation
 
Routing System In Symfony 1.2
Routing System In Symfony 1.2Routing System In Symfony 1.2
Routing System In Symfony 1.2
 
Statische Websites in Rails 3.1
Statische Websites in Rails 3.1Statische Websites in Rails 3.1
Statische Websites in Rails 3.1
 
Drupal 8: Routing & More
Drupal 8: Routing & MoreDrupal 8: Routing & More
Drupal 8: Routing & More
 
Drupal 8: Forms
Drupal 8: FormsDrupal 8: Forms
Drupal 8: Forms
 
Word press templates
Word press templatesWord press templates
Word press templates
 
Firefox Extension Development
Firefox Extension DevelopmentFirefox Extension Development
Firefox Extension Development
 
Intro to #memtech PHP 2011-12-05
Intro to #memtech PHP   2011-12-05Intro to #memtech PHP   2011-12-05
Intro to #memtech PHP 2011-12-05
 
Why I love Haml
Why I love HamlWhy I love Haml
Why I love Haml
 
Firefox extension Development
Firefox extension DevelopmentFirefox extension Development
Firefox extension Development
 
Geek Moot '09 -- FrontendUsers/CustomContent
Geek Moot '09 -- FrontendUsers/CustomContentGeek Moot '09 -- FrontendUsers/CustomContent
Geek Moot '09 -- FrontendUsers/CustomContent
 
D7 theming what's new - London
D7 theming what's new - LondonD7 theming what's new - London
D7 theming what's new - London
 
Introduction to WordPress Theme Development
Introduction to WordPress Theme DevelopmentIntroduction to WordPress Theme Development
Introduction to WordPress Theme Development
 
Your Custom WordPress Admin Pages Suck
Your Custom WordPress Admin Pages SuckYour Custom WordPress Admin Pages Suck
Your Custom WordPress Admin Pages Suck
 
Fundamental JQuery
Fundamental JQueryFundamental JQuery
Fundamental JQuery
 
PHP 102: Out with the Bad, In with the Good
PHP 102: Out with the Bad, In with the GoodPHP 102: Out with the Bad, In with the Good
PHP 102: Out with the Bad, In with the Good
 
Kickass
KickassKickass
Kickass
 
WordPress Theme Development
 WordPress Theme Development WordPress Theme Development
WordPress Theme Development
 

Viewers also liked

D2bdtechitup
D2bdtechitupD2bdtechitup
D2bdtechitup
Paul Stacey
 
Opdftechitup
OpdftechitupOpdftechitup
Opdftechitup
Paul Stacey
 
Campos
CamposCampos
Campos
Mandracke
 
Corporateblogging
CorporatebloggingCorporateblogging
Corporateblogging
tryonslideshare
 
Fotos de Bami
Fotos de BamiFotos de Bami
Fotos de Bami
mati.edel
 
Study: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsStudy: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving Cars
LinkedIn
 

Viewers also liked (6)

D2bdtechitup
D2bdtechitupD2bdtechitup
D2bdtechitup
 
Opdftechitup
OpdftechitupOpdftechitup
Opdftechitup
 
Campos
CamposCampos
Campos
 
Corporateblogging
CorporatebloggingCorporateblogging
Corporateblogging
 
Fotos de Bami
Fotos de BamiFotos de Bami
Fotos de Bami
 
Study: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsStudy: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving Cars
 

Similar to Vancouver League of Drupallers - Remembering the User (August 2008)

Boston Computing Review - Ruby on Rails
Boston Computing Review - Ruby on RailsBoston Computing Review - Ruby on Rails
Boston Computing Review - Ruby on Rails
John Brunswick
 
Create a web-app with Cgi Appplication
Create a web-app with Cgi AppplicationCreate a web-app with Cgi Appplication
Create a web-app with Cgi Appplication
olegmmiller
 
Smarter Interfaces with jQuery (and Drupal)
Smarter Interfaces with jQuery (and Drupal)Smarter Interfaces with jQuery (and Drupal)
Smarter Interfaces with jQuery (and Drupal)
aasarava
 
Best Practices For Drupal Developers By Mir Nazim @ Drupal Camp India 2008
Best Practices For Drupal Developers By Mir Nazim @ Drupal Camp India 2008Best Practices For Drupal Developers By Mir Nazim @ Drupal Camp India 2008
Best Practices For Drupal Developers By Mir Nazim @ Drupal Camp India 2008
Mir Nazim
 
WordPress development paradigms, idiosyncrasies and other big words
WordPress development paradigms, idiosyncrasies and other big wordsWordPress development paradigms, idiosyncrasies and other big words
WordPress development paradigms, idiosyncrasies and other big words
TomAuger
 
Drupal Theme Development - DrupalCon Chicago 2011
Drupal Theme Development - DrupalCon Chicago 2011Drupal Theme Development - DrupalCon Chicago 2011
Drupal Theme Development - DrupalCon Chicago 2011
Ryan Price
 
Coder Presentation Boston
Coder Presentation BostonCoder Presentation Boston
Coder Presentation Boston
Doug Green
 
Optimize Site Deployments with Drush (DrupalCamp WNY 2011)
Optimize Site Deployments with Drush (DrupalCamp WNY 2011)Optimize Site Deployments with Drush (DrupalCamp WNY 2011)
Optimize Site Deployments with Drush (DrupalCamp WNY 2011)
Jon Peck
 
Framework
FrameworkFramework
Framework
Nguyen Linh
 
Intro To Mvc Development In Php
Intro To Mvc Development In PhpIntro To Mvc Development In Php
Intro To Mvc Development In Php
funkatron
 
Exploring Symfony's Code
Exploring Symfony's CodeExploring Symfony's Code
Exploring Symfony's Code
Wildan Maulana
 
Drupal Module Development - OSI Days 2010
Drupal Module Development - OSI Days 2010Drupal Module Development - OSI Days 2010
Drupal Module Development - OSI Days 2010
Siva Epari
 
Drupal Module Development
Drupal Module DevelopmentDrupal Module Development
Drupal Module Development
ipsitamishra
 
Php frameworks
Php frameworksPhp frameworks
Php frameworks
Anil Kumar Panigrahi
 
CICONF 2012 - Don't Make Me Read Your Mind
CICONF 2012 - Don't Make Me Read Your MindCICONF 2012 - Don't Make Me Read Your Mind
CICONF 2012 - Don't Make Me Read Your Mind
ciconf
 
GHC
GHCGHC
GHC
AidIQ
 
Slick Data Sharding: Slides from DrupalCon London
Slick Data Sharding: Slides from DrupalCon LondonSlick Data Sharding: Slides from DrupalCon London
Slick Data Sharding: Slides from DrupalCon London
Phase2
 
Coder Presentation Szeged
Coder Presentation SzegedCoder Presentation Szeged
Coder Presentation Szeged
Doug Green
 
Hardcore URL Routing for WordPress - WordCamp Atlanta 2014 (PPT)
Hardcore URL Routing for WordPress - WordCamp Atlanta 2014 (PPT)Hardcore URL Routing for WordPress - WordCamp Atlanta 2014 (PPT)
Hardcore URL Routing for WordPress - WordCamp Atlanta 2014 (PPT)
Mike Schinkel
 
Advanced Module development
Advanced Module developmentAdvanced Module development
Advanced Module development
drupalindia
 

Similar to Vancouver League of Drupallers - Remembering the User (August 2008) (20)

Boston Computing Review - Ruby on Rails
Boston Computing Review - Ruby on RailsBoston Computing Review - Ruby on Rails
Boston Computing Review - Ruby on Rails
 
Create a web-app with Cgi Appplication
Create a web-app with Cgi AppplicationCreate a web-app with Cgi Appplication
Create a web-app with Cgi Appplication
 
Smarter Interfaces with jQuery (and Drupal)
Smarter Interfaces with jQuery (and Drupal)Smarter Interfaces with jQuery (and Drupal)
Smarter Interfaces with jQuery (and Drupal)
 
Best Practices For Drupal Developers By Mir Nazim @ Drupal Camp India 2008
Best Practices For Drupal Developers By Mir Nazim @ Drupal Camp India 2008Best Practices For Drupal Developers By Mir Nazim @ Drupal Camp India 2008
Best Practices For Drupal Developers By Mir Nazim @ Drupal Camp India 2008
 
WordPress development paradigms, idiosyncrasies and other big words
WordPress development paradigms, idiosyncrasies and other big wordsWordPress development paradigms, idiosyncrasies and other big words
WordPress development paradigms, idiosyncrasies and other big words
 
Drupal Theme Development - DrupalCon Chicago 2011
Drupal Theme Development - DrupalCon Chicago 2011Drupal Theme Development - DrupalCon Chicago 2011
Drupal Theme Development - DrupalCon Chicago 2011
 
Coder Presentation Boston
Coder Presentation BostonCoder Presentation Boston
Coder Presentation Boston
 
Optimize Site Deployments with Drush (DrupalCamp WNY 2011)
Optimize Site Deployments with Drush (DrupalCamp WNY 2011)Optimize Site Deployments with Drush (DrupalCamp WNY 2011)
Optimize Site Deployments with Drush (DrupalCamp WNY 2011)
 
Framework
FrameworkFramework
Framework
 
Intro To Mvc Development In Php
Intro To Mvc Development In PhpIntro To Mvc Development In Php
Intro To Mvc Development In Php
 
Exploring Symfony's Code
Exploring Symfony's CodeExploring Symfony's Code
Exploring Symfony's Code
 
Drupal Module Development - OSI Days 2010
Drupal Module Development - OSI Days 2010Drupal Module Development - OSI Days 2010
Drupal Module Development - OSI Days 2010
 
Drupal Module Development
Drupal Module DevelopmentDrupal Module Development
Drupal Module Development
 
Php frameworks
Php frameworksPhp frameworks
Php frameworks
 
CICONF 2012 - Don't Make Me Read Your Mind
CICONF 2012 - Don't Make Me Read Your MindCICONF 2012 - Don't Make Me Read Your Mind
CICONF 2012 - Don't Make Me Read Your Mind
 
GHC
GHCGHC
GHC
 
Slick Data Sharding: Slides from DrupalCon London
Slick Data Sharding: Slides from DrupalCon LondonSlick Data Sharding: Slides from DrupalCon London
Slick Data Sharding: Slides from DrupalCon London
 
Coder Presentation Szeged
Coder Presentation SzegedCoder Presentation Szeged
Coder Presentation Szeged
 
Hardcore URL Routing for WordPress - WordCamp Atlanta 2014 (PPT)
Hardcore URL Routing for WordPress - WordCamp Atlanta 2014 (PPT)Hardcore URL Routing for WordPress - WordCamp Atlanta 2014 (PPT)
Hardcore URL Routing for WordPress - WordCamp Atlanta 2014 (PPT)
 
Advanced Module development
Advanced Module developmentAdvanced Module development
Advanced Module development
 

Recently uploaded

United Kingdom's Real Estate Mogul: Newman George Leech's Impact on the Swiss...
United Kingdom's Real Estate Mogul: Newman George Leech's Impact on the Swiss...United Kingdom's Real Estate Mogul: Newman George Leech's Impact on the Swiss...
United Kingdom's Real Estate Mogul: Newman George Leech's Impact on the Swiss...
Newman George Leech
 
ハワイ大学留学プログラム最終プレゼン「ハワイ大学マノア校におけるシェアリングモビリティの提案」
ハワイ大学留学プログラム最終プレゼン「ハワイ大学マノア校におけるシェアリングモビリティの提案」ハワイ大学留学プログラム最終プレゼン「ハワイ大学マノア校におけるシェアリングモビリティの提案」
ハワイ大学留学プログラム最終プレゼン「ハワイ大学マノア校におけるシェアリングモビリティの提案」
Katsuya Shiratori
 
ShotOniPhone campaign by Vancy macwan.pptx
ShotOniPhone campaign by Vancy macwan.pptxShotOniPhone campaign by Vancy macwan.pptx
ShotOniPhone campaign by Vancy macwan.pptx
macwanvancy
 
Network Observability – 5 Best Platforms for Observability
Network Observability – 5 Best Platforms for ObservabilityNetwork Observability – 5 Best Platforms for Observability
Network Observability – 5 Best Platforms for Observability
GauriKale30
 
Gym business MODEL .pdf .
Gym business MODEL .pdf                 .Gym business MODEL .pdf                 .
Gym business MODEL .pdf .
Divyanshu56740
 
WAM Corporate Presentation July 2024.pdf
WAM Corporate Presentation July 2024.pdfWAM Corporate Presentation July 2024.pdf
WAM Corporate Presentation July 2024.pdf
Western Alaska Minerals Corp.
 
New Girls Call Mumbai 9910780858 Provide Best And Top Girl Service And No1 in...
New Girls Call Mumbai 9910780858 Provide Best And Top Girl Service And No1 in...New Girls Call Mumbai 9910780858 Provide Best And Top Girl Service And No1 in...
New Girls Call Mumbai 9910780858 Provide Best And Top Girl Service And No1 in...
44annissa
 
Cracking the Customer Experience Code.pptx
Cracking the Customer Experience Code.pptxCracking the Customer Experience Code.pptx
Cracking the Customer Experience Code.pptx
Workforce Group
 
Standard Operating Procedure for Digital Marketing
Standard Operating Procedure for Digital MarketingStandard Operating Procedure for Digital Marketing
Standard Operating Procedure for Digital Marketing
Dipendra Prasad Poudel
 
High Profile Girls Call Bhubaneswar 🎈🔥000XX00000 🔥💋🎈 Provide Best And Top Gir...
High Profile Girls Call Bhubaneswar 🎈🔥000XX00000 🔥💋🎈 Provide Best And Top Gir...High Profile Girls Call Bhubaneswar 🎈🔥000XX00000 🔥💋🎈 Provide Best And Top Gir...
High Profile Girls Call Bhubaneswar 🎈🔥000XX00000 🔥💋🎈 Provide Best And Top Gir...
dimplekumaridk322
 
What's your strategy? Getting tactical about being strategic.
What's your strategy? Getting tactical about being strategic.What's your strategy? Getting tactical about being strategic.
What's your strategy? Getting tactical about being strategic.
Doug Hall
 
Maximise your Business Potential: Annual Planning Workshop
Maximise your Business Potential: Annual Planning WorkshopMaximise your Business Potential: Annual Planning Workshop
Maximise your Business Potential: Annual Planning Workshop
chris908327
 
Business Model Canvas for Successful Business
Business Model Canvas for Successful BusinessBusiness Model Canvas for Successful Business
Business Model Canvas for Successful Business
SuganthiPrakash1
 
Why is Structural Engineering Critical in Disaster Preparedness and Resilienc...
Why is Structural Engineering Critical in Disaster Preparedness and Resilienc...Why is Structural Engineering Critical in Disaster Preparedness and Resilienc...
Why is Structural Engineering Critical in Disaster Preparedness and Resilienc...
grouphirani24
 
How Do Flange Adapters Work and Why Are They Essential?
How Do Flange Adapters Work and Why Are They Essential?How Do Flange Adapters Work and Why Are They Essential?
How Do Flange Adapters Work and Why Are They Essential?
Texas Flange
 
Restaurant Chiraz Sindbad Hotel Hammamet
Restaurant Chiraz Sindbad Hotel HammametRestaurant Chiraz Sindbad Hotel Hammamet
Restaurant Chiraz Sindbad Hotel Hammamet
rihabkorbi24
 
Look at our July library display on Mining
Look at our July library display on MiningLook at our July library display on Mining
Look at our July library display on Mining
NZSG
 
A Playbook for Solo & Siloed Data Science Practitioners
A Playbook for Solo & Siloed Data Science PractitionersA Playbook for Solo & Siloed Data Science Practitioners
A Playbook for Solo & Siloed Data Science Practitioners
Tim Wilson
 
A Complete Guide of Dubai Freelance Visa and Permit in 2024
A Complete Guide of Dubai Freelance Visa and Permit in 2024A Complete Guide of Dubai Freelance Visa and Permit in 2024
A Complete Guide of Dubai Freelance Visa and Permit in 2024
Dubiz
 
AI and Best Use Cases for Your Personal Life.pptx
AI and Best Use Cases for Your Personal Life.pptxAI and Best Use Cases for Your Personal Life.pptx
AI and Best Use Cases for Your Personal Life.pptx
Brian Frerichs
 

Recently uploaded (20)

United Kingdom's Real Estate Mogul: Newman George Leech's Impact on the Swiss...
United Kingdom's Real Estate Mogul: Newman George Leech's Impact on the Swiss...United Kingdom's Real Estate Mogul: Newman George Leech's Impact on the Swiss...
United Kingdom's Real Estate Mogul: Newman George Leech's Impact on the Swiss...
 
ハワイ大学留学プログラム最終プレゼン「ハワイ大学マノア校におけるシェアリングモビリティの提案」
ハワイ大学留学プログラム最終プレゼン「ハワイ大学マノア校におけるシェアリングモビリティの提案」ハワイ大学留学プログラム最終プレゼン「ハワイ大学マノア校におけるシェアリングモビリティの提案」
ハワイ大学留学プログラム最終プレゼン「ハワイ大学マノア校におけるシェアリングモビリティの提案」
 
ShotOniPhone campaign by Vancy macwan.pptx
ShotOniPhone campaign by Vancy macwan.pptxShotOniPhone campaign by Vancy macwan.pptx
ShotOniPhone campaign by Vancy macwan.pptx
 
Network Observability – 5 Best Platforms for Observability
Network Observability – 5 Best Platforms for ObservabilityNetwork Observability – 5 Best Platforms for Observability
Network Observability – 5 Best Platforms for Observability
 
Gym business MODEL .pdf .
Gym business MODEL .pdf                 .Gym business MODEL .pdf                 .
Gym business MODEL .pdf .
 
WAM Corporate Presentation July 2024.pdf
WAM Corporate Presentation July 2024.pdfWAM Corporate Presentation July 2024.pdf
WAM Corporate Presentation July 2024.pdf
 
New Girls Call Mumbai 9910780858 Provide Best And Top Girl Service And No1 in...
New Girls Call Mumbai 9910780858 Provide Best And Top Girl Service And No1 in...New Girls Call Mumbai 9910780858 Provide Best And Top Girl Service And No1 in...
New Girls Call Mumbai 9910780858 Provide Best And Top Girl Service And No1 in...
 
Cracking the Customer Experience Code.pptx
Cracking the Customer Experience Code.pptxCracking the Customer Experience Code.pptx
Cracking the Customer Experience Code.pptx
 
Standard Operating Procedure for Digital Marketing
Standard Operating Procedure for Digital MarketingStandard Operating Procedure for Digital Marketing
Standard Operating Procedure for Digital Marketing
 
High Profile Girls Call Bhubaneswar 🎈🔥000XX00000 🔥💋🎈 Provide Best And Top Gir...
High Profile Girls Call Bhubaneswar 🎈🔥000XX00000 🔥💋🎈 Provide Best And Top Gir...High Profile Girls Call Bhubaneswar 🎈🔥000XX00000 🔥💋🎈 Provide Best And Top Gir...
High Profile Girls Call Bhubaneswar 🎈🔥000XX00000 🔥💋🎈 Provide Best And Top Gir...
 
What's your strategy? Getting tactical about being strategic.
What's your strategy? Getting tactical about being strategic.What's your strategy? Getting tactical about being strategic.
What's your strategy? Getting tactical about being strategic.
 
Maximise your Business Potential: Annual Planning Workshop
Maximise your Business Potential: Annual Planning WorkshopMaximise your Business Potential: Annual Planning Workshop
Maximise your Business Potential: Annual Planning Workshop
 
Business Model Canvas for Successful Business
Business Model Canvas for Successful BusinessBusiness Model Canvas for Successful Business
Business Model Canvas for Successful Business
 
Why is Structural Engineering Critical in Disaster Preparedness and Resilienc...
Why is Structural Engineering Critical in Disaster Preparedness and Resilienc...Why is Structural Engineering Critical in Disaster Preparedness and Resilienc...
Why is Structural Engineering Critical in Disaster Preparedness and Resilienc...
 
How Do Flange Adapters Work and Why Are They Essential?
How Do Flange Adapters Work and Why Are They Essential?How Do Flange Adapters Work and Why Are They Essential?
How Do Flange Adapters Work and Why Are They Essential?
 
Restaurant Chiraz Sindbad Hotel Hammamet
Restaurant Chiraz Sindbad Hotel HammametRestaurant Chiraz Sindbad Hotel Hammamet
Restaurant Chiraz Sindbad Hotel Hammamet
 
Look at our July library display on Mining
Look at our July library display on MiningLook at our July library display on Mining
Look at our July library display on Mining
 
A Playbook for Solo & Siloed Data Science Practitioners
A Playbook for Solo & Siloed Data Science PractitionersA Playbook for Solo & Siloed Data Science Practitioners
A Playbook for Solo & Siloed Data Science Practitioners
 
A Complete Guide of Dubai Freelance Visa and Permit in 2024
A Complete Guide of Dubai Freelance Visa and Permit in 2024A Complete Guide of Dubai Freelance Visa and Permit in 2024
A Complete Guide of Dubai Freelance Visa and Permit in 2024
 
AI and Best Use Cases for Your Personal Life.pptx
AI and Best Use Cases for Your Personal Life.pptxAI and Best Use Cases for Your Personal Life.pptx
AI and Best Use Cases for Your Personal Life.pptx
 

Vancouver League of Drupallers - Remembering the User (August 2008)

  • 1. Remembering the User A few simple things you can do to enhance the Drupal experience for your users
  • 2. Introduction Hello my name is Oliver Walker Using Drupal for a year or two Develop websites for small businesses http://www.ventureweb.net Front end developer/themer Themeing Build Small ‘helper’ modules
  • 3. Who am I enhancing it for? My ‘user group’ might not be your ‘user group’ Lots of different types of drupal users Module Developers Site Administrators Content Writers People who leave comments People who just look at your website … and more…
  • 4. So who then? 1 - 3 people who ‘administer’ And by administer I mean… Change content anywhere from daily to weekly Add/edit content Moderate comments Moderate revisions Basic user administration Business areas (Local) Government Tourism Industry Small Business
  • 5. 4 things… …I have done to improve the experience of drupal for the users defined previously.
  • 6. #1) Menu Settings Ordering Pages with the Menu System: Default Intuitive Drawbacks: Menu Settings on content authoring form has all the links in there Have to grant ‘administer menus’ permissions
  • 7. #1) How to: If you don’t want to write your own module!.. Go: Admin > Site Building > Menus > Settings Drupal 6 “ Default Menu for content” Drupal 5: “ Content authoring form settings” However Drupal 5 restricts access totally Drupal 6 defines initial ‘starting point’
  • 8. #1) Links and Resources Some resources http://drupal.org/node/270273
  • 9. #2) User Profile Page Consider the sites and the users No social media (buddy lists, alerts, favorites etc.) What does the user page have on it? “ Member for x days…” Can it be more usable? Blocks, custom layouts to add useful content e.g. Links to create content (copy node_add() from node.module) Lists of user’s content Comments requiring administration Revisions that need approval
  • 10. #2) User Profile Page - D5 code: /*** USER PAGE ***/ function _phptemplate_variables($hook, $vars) { $vars = array(); if ($hook == 'page') { global $user; if (arg(0) == 'user' && arg(1) == $user->name){ $suggestions[] = ’page-user'; $vars['template_files'] = $suggestions; } } return $vars; } /*** USER PAGE CONTENT ***/ function phptemplate_user_profile($user, $fields = array()) { return _phptemplate_callback('user-profile, array('user' => $user, 'fields' => $fields)); } Add to your template.php file
  • 11. #2) User Profile Page - D6 Just create the template files user-profile.tpl.php page-user.tpl.php … and remember to clear the cache! Admin > Site configuration > Performance http://ww.example.com/admin/settings/performance or use Devel Module
  • 12. #2) User Profile Page You can then theme the new template files as you would any other template file: user-profile.tpl.php page-user.tpl.php
  • 13. #2) Links and Resources “ Add Blocks to your User Profile page in Drupal 5 and 6” http://stevekrueger.com/ http://drupal.org/node/35728
  • 14. #3) Content authoring forms Sometimes Content authoring form can get long. Theme the form so that, for example, it: Looks more like the node itself Provides further instruction to the user Looks like an administrative theme
  • 15. #3) Content Authoring forms You can go a long way with just css. Creating specific template files gives you full control Better use of space Add extra help text, links for user assistance etc. Whatever you can think of
  • 16. #3) Content Authoring forms - D5 /*** ADD NEW ***/ if ((arg(0) == 'node') && (arg(1) == 'add')){ if(arg(2) == ’ yourNodeType '){ function phptemplate_node_form($form) { return _phptemplate_callback('node- yourNodeType -edit', array('user' => $user, 'form' => $form)); } } } /*** EDIT EXISTING ***/ if ((arg(0) == 'node') && (arg(2) == 'edit')){ $node = node_load(array('nid' => arg(1))); if($node->type == ' yourNodeType '){ function phptemplate_node_form($form) { return _phptemplate_callback('node- yourNodeType -edit', array('user' => $user, 'form' => $form)); } } } Add to your template.php file
  • 17. #3) Content Authoring Forms - D6 … and remember to clear the cache! function yourThemeName _theme(){ return array( ’ yourNodeType _node_form' => array( 'arguments' => array('form' => NULL), 'template' => 'node- yourNodeType -edit', ), ); } Add to your template.php file
  • 18. node- yourNodeType -edit.tpl.php drupal_render($form[‘title’]) Will render the form title drupal_render($form[‘field_xxxxx’]) Will render field_xxxxx drupal_render($form) Will render the form Will render what is remaining of the form after other fields have been rendered How do I find out what form values there are for me to render? print ‘<pre>’; print_r($form); print ‘</pre>’;
  • 19. #3) You can also alter default form values For example Number of rows in a textarea Size of a specific text field Making things collapsible or not Value of a button (submit, edit, delete) Remove a form component altogether.
  • 20. #3) Drupal 5 - form value overrride /** * add */ if ((arg(0) == 'node') && (arg(1) == 'add')){ if(arg(2) == 'listing'){ function phptemplate_node_form($form) { $form['body_filter']['body']['#rows'] = 30; $form['field_sq_foot'][0]['value']['#size'] = 5; $form['preview']['#value'] = “Preview the listing”; $form['submit']['#value'] = Create!&quot;; unset($form['menu']); return _phptemplate_callback('node-listing-edit', array('user' => $user, 'form' => $form)); … Add to your template.php file
  • 21. #3) Drupal 6 - form value override function vwtheme_preprocess_listing_node_form(&$vars) { $vars['form']['buttons']['submit']['#value'] = &quot;Cowabunga&quot;; $vars['form'][ 'field_sq_foot'][0]['value']['#size'] = 5; … … } Add to your template.php file … and remember to clear the cache!
  • 22. #3) Links and Resources http://www.drupal.org/101092 Lullabot tutorial (modifying forms in general) Covers how to alter using a module and hook_form_alter http://www.lullabot.com/articles/modifying-forms-5-and-6 Template suggestions http://drupal.org/node/223440
  • 23. #4) Video Content as bonus to README Readme files are important Who doesn’t like to watch video! Tailored video makes people feel warm and special Easy to make Screen capture software e.g. iShowU @ shineywhitebox.com for $20 US Product Placement as a possible revenue stream??