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

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
 
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
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
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
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
"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
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
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
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
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
 
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
 
"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
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 

Recently uploaded (20)

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
 
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
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
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
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
"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
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
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
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
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...
 
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
 
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
 
"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...
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 

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]