SlideShare a Scribd company logo
1 of 24
Optimizing Drupal for Mobile Devices Sugree Phatanapherom [email_address] http://sugree.com/ @sugree
Mobile Devices ,[object Object],[object Object],[object Object],[object Object],[object Object]
Motivation http://sugree.com/
Size ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Complexity
SE W810i
Motivation http://m.sugree.com/
Size ,[object Object],[object Object],[object Object],[object Object]
Complexity
SE W810i
How? ,[object Object],[object Object],[object Object],[object Object]
CSS is not enough? ,[object Object],[object Object],[object Object]
Mobile Theme ,[object Object]
page.tpl.php <!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;> <html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; lang=&quot;<?php print $language->language ?>&quot; xml:lang=&quot;<?php print $language->language ?>&quot;> <head> <title><?php print $head_title ?></title> <meta http-equiv=&quot;Content-Style-Type&quot; content=&quot;text/css&quot; /> <?php print $head ?> </head> <body <?php print theme(&quot;onload_attribute&quot;); ?>> <a href=&quot;<?php print url($_GET['q'], array('query' => NULL, 'fragment' => 'nav', 'absolute' => TRUE)); ?>&quot;><?php print t('skip to navigation');?></a> <?php if ($title != &quot;&quot;): ?> <h2 class=&quot;content-title&quot;><?php print $title ?></h2> <?php endif; ?>  <?php if ($help != &quot;&quot;): ?> <p id=&quot;help&quot;><?php print $help ?></p> <?php endif; ?>  <?php if ($messages != &quot;&quot;): ?> <div id=&quot;message&quot;><?php print $messages ?></div> <?php endif; ?> <?php print $content ?> <?php if ($tabs != &quot;&quot;): ?> <?php print $tabs ?> <?php endif; ?> <a name=&quot;nav&quot;></a> <?php print $left . $right; ?>  <?php if ($footer_message) : ?> <?php print $footer;?> <?php endif; ?> <?php print $closure;?> </body> </html>
node.tpl.php <?php if ($page == 0): ?> <h2><a href=&quot;<?php print $node_url ?>&quot;><?php print $title ?></a></h2> <?php endif; ?> <?php print $content ?> <?php if ($signature): ?> <div class=&quot;user-signature clear-block&quot;><?php print $signature ?></div> <?php endif; ?> <?php print $submitted ?> <?php if ($links): ?> <?php print $links ?> <?php endif; ?>
Customization ,[object Object],[object Object]
template.php <?php function mobile_regions() { return array( 'leaderboard' => t('leaderboard'), 'suckerfish' => t('suckerfish menu'), 'sidebar_left' => t('left sidebar'), 'sidebar_right' => t('right sidebar'), 'sidebar_outside' => t('outside sidebar'), 'content_top_left' => t('content top left'), 'content_top_right' => t('content top right'), 'content_bottom_left' => t('content bottom left'), 'content_bottom_right' => t('content bottom right'), 'header_left' => t('header left'), 'header_center' => t('header center'), 'header_right' => t('header right'), 'banner' => t('banner'), 'user1' => t('user1'), 'user2' => t('user2'), 'user3' => t('user3'), 'user4' => t('user4'), 'user5' => t('user5'), 'user6' => t('user6'), 'user7' => t('user7'), 'user8' => t('user8'), 'user9' => t('user9'), 'user10' => t('user10'), 'user11' => t('user11'), 'user12' => t('user12'), 'user13' => t('user13'), 'user14' => t('user14'), 'user15' => t('user15'), 'footer_left' => t('footer left'), 'footer_center' => t('footer center'), 'footer_right' => t('footer right') ); }
page.tpl.php <!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;> <html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; lang=&quot;<?php print $language ?>&quot; xml:lang=&quot;<?php print $language ?>&quot;> <head> <title><?php print $head_title ?></title> <meta http-equiv=&quot;Content-Style-Type&quot; content=&quot;text/css&quot; /> <?php print $head ?> <style type=&quot;text/css&quot;> body { background-color: #000000; color: #DDDDDD; width: 176px; } a { color: #BBBB00; } </style> </head>
page.tpl.php <?php print theme('menu_links', $primary_links) ?> <?php print theme('menu_links', $secondary_links) ?> <?php print $header_left ?> <?php print $header_center ?> <?php print $header_right ?> <?php print $banner ?> <?php print $sidebar_left ?> <?php print $sidebar_right ?> <?php print $sidebar_outside ?> <?php print $sidebar_top_left ?> <?php print $sidebar_top_right ?> <?php print $sidebar_bottom_left ?> <?php print $sidebar_bottom_right ?> <?php print $user1 ?> <?php print $user2 ?> <?php print $user3 ?> <?php print $user4 ?> <?php print $user5 ?> <?php print $user6 ?> <?php print $user7 ?> <?php print $user8 ?> <?php print $user9 ?> <?php print $user10 ?> <?php print $user11 ?> <?php print $user12 ?> <?php print $user13 ?> <?php print $user14 ?> <?php print $user15 ?> <?php print $footer_left ?> <?php print $footer_center ?> <?php print $footer_right ?> <?php print $closure;?> </body> </html>
Multi-site ,[object Object],[object Object],[object Object],[object Object]
settings.php # $conf = array( #  'site_name' => 'My Drupal site', #  'theme_default' => 'minnelli', #  'anonymous' => 'Visitor', # ); $conf = array( #  'site_name' => 'My Drupal site', 'theme_default' => 'mobile', #  'anonymous' => 'Visitor', ); ,[object Object],[object Object]
All done? ,[object Object],[object Object],[object Object],[object Object],[object Object]
.htaccess RewriteCond %{HTTP_HOST} !^msugreecom$ RewriteCond %{HTTP_ACCEPT} &quot;text/vnd.wap.wml|application/vnd.wap.xhtml+xml&quot; [NC,OR] RewriteCond %{HTTP_USER_AGENT} &quot;acs|alav|alca|amoi|audi|aste|avan|benq|bird|blac|blaz|brew|cell|cldc|cmd-&quot; [NC,OR] RewriteCond %{HTTP_USER_AGENT} &quot;dang|doco|eric|hipt|inno|ipaq|java|jigs|kddi|keji|leno|lg-c|lg-d|lg-g|lge-&quot; [NC,OR] RewriteCond %{HTTP_USER_AGENT} &quot;maui|maxo|midp|mits|mmef|mobi|mot-|moto|mwbp|nec-|newt|noki|opwv&quot; [NC,OR] RewriteCond %{HTTP_USER_AGENT} &quot;palm|pana|pant|pdxg|phil|play|pluc|port|prox|qtek|qwap|sage|sams|sany&quot; [NC,OR] RewriteCond %{HTTP_USER_AGENT} &quot;sch-|sec-|send|seri|sgh-|shar|sie-|siem|smal|smar|sony|sph-|symb|t-mo&quot; [NC,OR] RewriteCond %{HTTP_USER_AGENT} &quot;teli|tim-|tsm-|upg1|upsi|vk-v|voda|w3cs|wap-|wapa|wapi&quot; [NC,OR] RewriteCond %{HTTP_USER_AGENT} &quot;wapp|wapr|webc|winw|winw|xda|xda-&quot; [NC,OR] RewriteCond %{HTTP_USER_AGENT} &quot;up.browser|up.link|windowssce|iemobile|mini|mmp&quot; [NC,OR] RewriteCond %{HTTP_USER_AGENT} &quot;symbian|midp|wap|phone|pocket|mobile|pda|psp&quot; [NC] RewriteRule ^(.*)$ http://m.sugree.com/$1 [L,R=302]
Any Questions?

More Related Content

What's hot

Building Secure Twitter Apps
Building Secure Twitter AppsBuilding Secure Twitter Apps
Building Secure Twitter AppsDamon Cortesi
 
PHP Basics for Designers
PHP Basics for DesignersPHP Basics for Designers
PHP Basics for DesignersMatthew Turland
 
Block2 Session2 Presentation
Block2 Session2 PresentationBlock2 Session2 Presentation
Block2 Session2 PresentationMichael Gwyther
 
Creating Yahoo Mobile Widgets
Creating Yahoo Mobile WidgetsCreating Yahoo Mobile Widgets
Creating Yahoo Mobile WidgetsRicardo Varela
 
Secure Coding With Wordpress (BarCamp Orlando 2009)
Secure Coding With Wordpress (BarCamp Orlando 2009)Secure Coding With Wordpress (BarCamp Orlando 2009)
Secure Coding With Wordpress (BarCamp Orlando 2009)Mark Jaquith
 
Maritza
MaritzaMaritza
Maritzaladyva
 
Microformats at Web 2.0 Expo April 2007
Microformats at Web 2.0 Expo April 2007Microformats at Web 2.0 Expo April 2007
Microformats at Web 2.0 Expo April 2007John Allsopp
 
Web APIs & Google APIs
Web APIs & Google APIsWeb APIs & Google APIs
Web APIs & Google APIsPamela Fox
 
Lca2009 Video A11y
Lca2009 Video A11yLca2009 Video A11y
Lca2009 Video A11yguesta3d158
 
2016 First steps with Angular 2 – enterjs
2016 First steps with Angular 2 – enterjs2016 First steps with Angular 2 – enterjs
2016 First steps with Angular 2 – enterjsGeilDanke
 
Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure
Living in the Cloud: Hosting Data & Apps Using the Google InfrastructureLiving in the Cloud: Hosting Data & Apps Using the Google Infrastructure
Living in the Cloud: Hosting Data & Apps Using the Google InfrastructurePamela Fox
 
MCSL016 IGNOU SOLVED LAB MANUAL
MCSL016 IGNOU SOLVED LAB MANUALMCSL016 IGNOU SOLVED LAB MANUAL
MCSL016 IGNOU SOLVED LAB MANUALDIVYA SINGH
 
Html in a box
Html in a boxHtml in a box
Html in a boxbdubuque
 
Microformats HTML to API
Microformats HTML to APIMicroformats HTML to API
Microformats HTML to APIelliando dias
 

What's hot (20)

Jogos
JogosJogos
Jogos
 
Building Secure Twitter Apps
Building Secure Twitter AppsBuilding Secure Twitter Apps
Building Secure Twitter Apps
 
PHP Basics for Designers
PHP Basics for DesignersPHP Basics for Designers
PHP Basics for Designers
 
Block2 Session2 Presentation
Block2 Session2 PresentationBlock2 Session2 Presentation
Block2 Session2 Presentation
 
Creating Yahoo Mobile Widgets
Creating Yahoo Mobile WidgetsCreating Yahoo Mobile Widgets
Creating Yahoo Mobile Widgets
 
Secure Coding With Wordpress (BarCamp Orlando 2009)
Secure Coding With Wordpress (BarCamp Orlando 2009)Secure Coding With Wordpress (BarCamp Orlando 2009)
Secure Coding With Wordpress (BarCamp Orlando 2009)
 
HTML5: 5 Quick Wins
HTML5:  5 Quick WinsHTML5:  5 Quick Wins
HTML5: 5 Quick Wins
 
Maritza
MaritzaMaritza
Maritza
 
Eg2 M1 2009 I
Eg2 M1 2009 IEg2 M1 2009 I
Eg2 M1 2009 I
 
Microformats at Web 2.0 Expo April 2007
Microformats at Web 2.0 Expo April 2007Microformats at Web 2.0 Expo April 2007
Microformats at Web 2.0 Expo April 2007
 
Web APIs & Google APIs
Web APIs & Google APIsWeb APIs & Google APIs
Web APIs & Google APIs
 
A More Perfect Union with CSS
A More Perfect Union with CSSA More Perfect Union with CSS
A More Perfect Union with CSS
 
Lca2009 Video A11y
Lca2009 Video A11yLca2009 Video A11y
Lca2009 Video A11y
 
2016 First steps with Angular 2 – enterjs
2016 First steps with Angular 2 – enterjs2016 First steps with Angular 2 – enterjs
2016 First steps with Angular 2 – enterjs
 
Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure
Living in the Cloud: Hosting Data & Apps Using the Google InfrastructureLiving in the Cloud: Hosting Data & Apps Using the Google Infrastructure
Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure
 
MCSL016 IGNOU SOLVED LAB MANUAL
MCSL016 IGNOU SOLVED LAB MANUALMCSL016 IGNOU SOLVED LAB MANUAL
MCSL016 IGNOU SOLVED LAB MANUAL
 
Html in a box
Html in a boxHtml in a box
Html in a box
 
Correlatividades febrero 2011
Correlatividades febrero 2011Correlatividades febrero 2011
Correlatividades febrero 2011
 
Microformats HTML to API
Microformats HTML to APIMicroformats HTML to API
Microformats HTML to API
 
Yerma
YermaYerma
Yerma
 

Similar to Optimizing Drupal for Mobile Devices

WordPress Standardized Loop API
WordPress Standardized Loop APIWordPress Standardized Loop API
WordPress Standardized Loop APIChris Jean
 
The Basics Of Page Creation
The Basics Of Page CreationThe Basics Of Page Creation
The Basics Of Page CreationWildan Maulana
 
Drupal 7 Theming - what's new
Drupal 7 Theming - what's newDrupal 7 Theming - what's new
Drupal 7 Theming - what's newMarek Sotak
 
User Experience is dead. Long live the user experience!
User Experience is dead. Long live the user experience!User Experience is dead. Long live the user experience!
User Experience is dead. Long live the user experience!Greg Bell
 
Introduction To Lamp
Introduction To LampIntroduction To Lamp
Introduction To LampAmzad Hossain
 
Jade & Javascript templating
Jade & Javascript templatingJade & Javascript templating
Jade & Javascript templatingwearefractal
 
PHPTAL introduction
PHPTAL introductionPHPTAL introduction
PHPTAL introduction'"">
 
Neil Patel - What You Need to be Measuring and How to Do It
Neil Patel - What You Need to be Measuring and How to Do ItNeil Patel - What You Need to be Measuring and How to Do It
Neil Patel - What You Need to be Measuring and How to Do ItCarsonified Team
 
Building Web Interface On Rails
Building Web Interface On RailsBuilding Web Interface On Rails
Building Web Interface On RailsWen-Tien Chang
 
Anvita Dynamic Fontson Web Feb2001
Anvita Dynamic Fontson Web Feb2001Anvita Dynamic Fontson Web Feb2001
Anvita Dynamic Fontson Web Feb2001guest6e7a1b1
 
Enterprise Google Gadgets Integrated with Alfresco - Open Source ECM
Enterprise Google Gadgets Integrated with Alfresco - Open Source ECM Enterprise Google Gadgets Integrated with Alfresco - Open Source ECM
Enterprise Google Gadgets Integrated with Alfresco - Open Source ECM Alfresco Software
 
Developing Gadgets
Developing GadgetsDeveloping Gadgets
Developing GadgetsQuirk
 
Facebook Development with Zend Framework
Facebook Development with Zend FrameworkFacebook Development with Zend Framework
Facebook Development with Zend FrameworkBrett Harris
 
Php Crash Course
Php Crash CoursePhp Crash Course
Php Crash Coursemussawir20
 
ImplementingChangeTrackingAndFlagging
ImplementingChangeTrackingAndFlaggingImplementingChangeTrackingAndFlagging
ImplementingChangeTrackingAndFlaggingSuite Solutions
 

Similar to Optimizing Drupal for Mobile Devices (20)

WordPress Standardized Loop API
WordPress Standardized Loop APIWordPress Standardized Loop API
WordPress Standardized Loop API
 
The Basics Of Page Creation
The Basics Of Page CreationThe Basics Of Page Creation
The Basics Of Page Creation
 
Drupal 7 Theming - what's new
Drupal 7 Theming - what's newDrupal 7 Theming - what's new
Drupal 7 Theming - what's new
 
User Experience is dead. Long live the user experience!
User Experience is dead. Long live the user experience!User Experience is dead. Long live the user experience!
User Experience is dead. Long live the user experience!
 
Front End on Rails
Front End on RailsFront End on Rails
Front End on Rails
 
Introduction To Lamp
Introduction To LampIntroduction To Lamp
Introduction To Lamp
 
Php 3 1
Php 3 1Php 3 1
Php 3 1
 
Jade & Javascript templating
Jade & Javascript templatingJade & Javascript templating
Jade & Javascript templating
 
PHPTAL introduction
PHPTAL introductionPHPTAL introduction
PHPTAL introduction
 
JQuery 101
JQuery 101JQuery 101
JQuery 101
 
Neil Patel - What You Need to be Measuring and How to Do It
Neil Patel - What You Need to be Measuring and How to Do ItNeil Patel - What You Need to be Measuring and How to Do It
Neil Patel - What You Need to be Measuring and How to Do It
 
Building Web Interface On Rails
Building Web Interface On RailsBuilding Web Interface On Rails
Building Web Interface On Rails
 
Anvita Dynamic Fontson Web Feb2001
Anvita Dynamic Fontson Web Feb2001Anvita Dynamic Fontson Web Feb2001
Anvita Dynamic Fontson Web Feb2001
 
Mojolicious on Steroids
Mojolicious on SteroidsMojolicious on Steroids
Mojolicious on Steroids
 
Enterprise Google Gadgets Integrated with Alfresco - Open Source ECM
Enterprise Google Gadgets Integrated with Alfresco - Open Source ECM Enterprise Google Gadgets Integrated with Alfresco - Open Source ECM
Enterprise Google Gadgets Integrated with Alfresco - Open Source ECM
 
Developing Gadgets
Developing GadgetsDeveloping Gadgets
Developing Gadgets
 
Html5
Html5Html5
Html5
 
Facebook Development with Zend Framework
Facebook Development with Zend FrameworkFacebook Development with Zend Framework
Facebook Development with Zend Framework
 
Php Crash Course
Php Crash CoursePhp Crash Course
Php Crash Course
 
ImplementingChangeTrackingAndFlagging
ImplementingChangeTrackingAndFlaggingImplementingChangeTrackingAndFlagging
ImplementingChangeTrackingAndFlagging
 

More from Sugree Phatanapherom

More from Sugree Phatanapherom (16)

Twitter, Facebook and etc: Quick Startup Guide for Marketing
Twitter, Facebook and etc: Quick Startup Guide for MarketingTwitter, Facebook and etc: Quick Startup Guide for Marketing
Twitter, Facebook and etc: Quick Startup Guide for Marketing
 
@sugree and Twitter
@sugree and Twitter@sugree and Twitter
@sugree and Twitter
 
Behind the madness
Behind the madnessBehind the madness
Behind the madness
 
drupal.in.th
drupal.in.thdrupal.in.th
drupal.in.th
 
Twitter API and Startup Ideas
Twitter API and Startup IdeasTwitter API and Startup Ideas
Twitter API and Startup Ideas
 
Readme Read Sugree
Readme Read SugreeReadme Read Sugree
Readme Read Sugree
 
SCMSWeb and Condor-G Demonstration
SCMSWeb and Condor-G DemonstrationSCMSWeb and Condor-G Demonstration
SCMSWeb and Condor-G Demonstration
 
Hand-on Resources II: Extending SCMSWeb
Hand-on Resources II: Extending SCMSWebHand-on Resources II: Extending SCMSWeb
Hand-on Resources II: Extending SCMSWeb
 
Drupal: blog and beyond
Drupal: blog and beyondDrupal: blog and beyond
Drupal: blog and beyond
 
The Spirit of Open Source
The Spirit of Open SourceThe Spirit of Open Source
The Spirit of Open Source
 
mbpurple - the replacement twitter im
mbpurple - the replacement twitter immbpurple - the replacement twitter im
mbpurple - the replacement twitter im
 
jibjib - ultimate twitter client for your phone
jibjib - ultimate twitter client for your phonejibjib - ultimate twitter client for your phone
jibjib - ultimate twitter client for your phone
 
Next Web Application - Brainstorm
Next Web Application - BrainstormNext Web Application - Brainstorm
Next Web Application - Brainstorm
 
Automatic Self-Tuning Architecture for Batch Scheduler on Large Scale Computi...
Automatic Self-Tuning Architecture for Batch Scheduler on Large Scale Computi...Automatic Self-Tuning Architecture for Batch Scheduler on Large Scale Computi...
Automatic Self-Tuning Architecture for Batch Scheduler on Large Scale Computi...
 
Call for Students: Google Summer of Code 2008
Call for Students: Google Summer of Code 2008Call for Students: Google Summer of Code 2008
Call for Students: Google Summer of Code 2008
 
Twitter Rules
Twitter RulesTwitter Rules
Twitter Rules
 

Recently uploaded

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 TerraformAndrey Devyatkin
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAnitaRaj43
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
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...apidays
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 

Recently uploaded (20)

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
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
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...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 

Optimizing Drupal for Mobile Devices

  • 1. Optimizing Drupal for Mobile Devices Sugree Phatanapherom [email_address] http://sugree.com/ @sugree
  • 2.
  • 4.
  • 8.
  • 11.
  • 12.
  • 13.
  • 14. page.tpl.php <!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;> <html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; lang=&quot;<?php print $language->language ?>&quot; xml:lang=&quot;<?php print $language->language ?>&quot;> <head> <title><?php print $head_title ?></title> <meta http-equiv=&quot;Content-Style-Type&quot; content=&quot;text/css&quot; /> <?php print $head ?> </head> <body <?php print theme(&quot;onload_attribute&quot;); ?>> <a href=&quot;<?php print url($_GET['q'], array('query' => NULL, 'fragment' => 'nav', 'absolute' => TRUE)); ?>&quot;><?php print t('skip to navigation');?></a> <?php if ($title != &quot;&quot;): ?> <h2 class=&quot;content-title&quot;><?php print $title ?></h2> <?php endif; ?> <?php if ($help != &quot;&quot;): ?> <p id=&quot;help&quot;><?php print $help ?></p> <?php endif; ?> <?php if ($messages != &quot;&quot;): ?> <div id=&quot;message&quot;><?php print $messages ?></div> <?php endif; ?> <?php print $content ?> <?php if ($tabs != &quot;&quot;): ?> <?php print $tabs ?> <?php endif; ?> <a name=&quot;nav&quot;></a> <?php print $left . $right; ?> <?php if ($footer_message) : ?> <?php print $footer;?> <?php endif; ?> <?php print $closure;?> </body> </html>
  • 15. node.tpl.php <?php if ($page == 0): ?> <h2><a href=&quot;<?php print $node_url ?>&quot;><?php print $title ?></a></h2> <?php endif; ?> <?php print $content ?> <?php if ($signature): ?> <div class=&quot;user-signature clear-block&quot;><?php print $signature ?></div> <?php endif; ?> <?php print $submitted ?> <?php if ($links): ?> <?php print $links ?> <?php endif; ?>
  • 16.
  • 17. template.php <?php function mobile_regions() { return array( 'leaderboard' => t('leaderboard'), 'suckerfish' => t('suckerfish menu'), 'sidebar_left' => t('left sidebar'), 'sidebar_right' => t('right sidebar'), 'sidebar_outside' => t('outside sidebar'), 'content_top_left' => t('content top left'), 'content_top_right' => t('content top right'), 'content_bottom_left' => t('content bottom left'), 'content_bottom_right' => t('content bottom right'), 'header_left' => t('header left'), 'header_center' => t('header center'), 'header_right' => t('header right'), 'banner' => t('banner'), 'user1' => t('user1'), 'user2' => t('user2'), 'user3' => t('user3'), 'user4' => t('user4'), 'user5' => t('user5'), 'user6' => t('user6'), 'user7' => t('user7'), 'user8' => t('user8'), 'user9' => t('user9'), 'user10' => t('user10'), 'user11' => t('user11'), 'user12' => t('user12'), 'user13' => t('user13'), 'user14' => t('user14'), 'user15' => t('user15'), 'footer_left' => t('footer left'), 'footer_center' => t('footer center'), 'footer_right' => t('footer right') ); }
  • 18. page.tpl.php <!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;> <html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; lang=&quot;<?php print $language ?>&quot; xml:lang=&quot;<?php print $language ?>&quot;> <head> <title><?php print $head_title ?></title> <meta http-equiv=&quot;Content-Style-Type&quot; content=&quot;text/css&quot; /> <?php print $head ?> <style type=&quot;text/css&quot;> body { background-color: #000000; color: #DDDDDD; width: 176px; } a { color: #BBBB00; } </style> </head>
  • 19. page.tpl.php <?php print theme('menu_links', $primary_links) ?> <?php print theme('menu_links', $secondary_links) ?> <?php print $header_left ?> <?php print $header_center ?> <?php print $header_right ?> <?php print $banner ?> <?php print $sidebar_left ?> <?php print $sidebar_right ?> <?php print $sidebar_outside ?> <?php print $sidebar_top_left ?> <?php print $sidebar_top_right ?> <?php print $sidebar_bottom_left ?> <?php print $sidebar_bottom_right ?> <?php print $user1 ?> <?php print $user2 ?> <?php print $user3 ?> <?php print $user4 ?> <?php print $user5 ?> <?php print $user6 ?> <?php print $user7 ?> <?php print $user8 ?> <?php print $user9 ?> <?php print $user10 ?> <?php print $user11 ?> <?php print $user12 ?> <?php print $user13 ?> <?php print $user14 ?> <?php print $user15 ?> <?php print $footer_left ?> <?php print $footer_center ?> <?php print $footer_right ?> <?php print $closure;?> </body> </html>
  • 20.
  • 21.
  • 22.
  • 23. .htaccess RewriteCond %{HTTP_HOST} !^msugreecom$ RewriteCond %{HTTP_ACCEPT} &quot;text/vnd.wap.wml|application/vnd.wap.xhtml+xml&quot; [NC,OR] RewriteCond %{HTTP_USER_AGENT} &quot;acs|alav|alca|amoi|audi|aste|avan|benq|bird|blac|blaz|brew|cell|cldc|cmd-&quot; [NC,OR] RewriteCond %{HTTP_USER_AGENT} &quot;dang|doco|eric|hipt|inno|ipaq|java|jigs|kddi|keji|leno|lg-c|lg-d|lg-g|lge-&quot; [NC,OR] RewriteCond %{HTTP_USER_AGENT} &quot;maui|maxo|midp|mits|mmef|mobi|mot-|moto|mwbp|nec-|newt|noki|opwv&quot; [NC,OR] RewriteCond %{HTTP_USER_AGENT} &quot;palm|pana|pant|pdxg|phil|play|pluc|port|prox|qtek|qwap|sage|sams|sany&quot; [NC,OR] RewriteCond %{HTTP_USER_AGENT} &quot;sch-|sec-|send|seri|sgh-|shar|sie-|siem|smal|smar|sony|sph-|symb|t-mo&quot; [NC,OR] RewriteCond %{HTTP_USER_AGENT} &quot;teli|tim-|tsm-|upg1|upsi|vk-v|voda|w3cs|wap-|wapa|wapi&quot; [NC,OR] RewriteCond %{HTTP_USER_AGENT} &quot;wapp|wapr|webc|winw|winw|xda|xda-&quot; [NC,OR] RewriteCond %{HTTP_USER_AGENT} &quot;up.browser|up.link|windowssce|iemobile|mini|mmp&quot; [NC,OR] RewriteCond %{HTTP_USER_AGENT} &quot;symbian|midp|wap|phone|pocket|mobile|pda|psp&quot; [NC] RewriteRule ^(.*)$ http://m.sugree.com/$1 [L,R=302]