{"id":12145,"date":"2015-02-05T05:38:54","date_gmt":"2015-02-04T18:38:54","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=12145"},"modified":"2015-02-05T05:38:54","modified_gmt":"2015-02-04T18:38:54","slug":"php-rhopalic-letter-sentence-game-mobile-friendly-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/php-rhopalic-letter-sentence-game-mobile-friendly-tutorial\/","title":{"rendered":"PHP Rhopalic Letter Sentence Game Mobile Friendly Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/rhopalic_letter_sentence.php\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"PHP Rhopalic Letter Sentence Game Mobile Friendly Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/rhopalic_letter_sentence.gif\" title=\"PHP Rhopalic Letter Sentence Game Mobile Friendly Tutorial\"    \/><\/a><p class=\"wp-caption-text\">PHP Rhopalic Letter Sentence Game Mobile Friendly Tutorial<\/p><\/div>\n<p>To make a web application more mobile device friendly, there is the look and the usability to consider.  When you consider the look you should try to take into account, very small device widths, as would be applicable for a lot of smartphones.  As far as usability goes, one thing we&#8217;ve found is that keyboard entry is less friendly than for your laptop, or desktop computer.<\/p>\n<p>This is a huge topic area, but put the spotlight on a tutorial web application from a few days back to see some of the issues &#8230; do you remember <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=12084'>PHP Rhopalic Letter Sentence Game Primer Tutorial<\/a>?  As a first look through for mobile friendliness, we touched on &#8230;<\/p>\n<ul>\n<li>add functionality so that the choice is there for less keyboard initializing taking place &#8230; if all keyboard can happen in one or two places that is better than for lots of textbox places, on mobile devices<\/li>\n<li>make <i>input type=&#8221;text&#8221;<\/i> tiny bit wider<\/li>\n<li>if down the track you think this will be the innards of a WebView of a mobile application, stop any navigation that takes you to another webpage, else accompany any WebView with <i>&#8220;back&#8221;<\/i> and <i>&#8220;forward&#8221;<\/i> buttons (whose functionality is most likely neatly encapsulated by easy measures you can take within the IDE you are using)<\/li>\n<li>use a PHP <a target=_blank title='PHP mail function' href='http:\/\/php.net\/manual\/en\/function.mail.php'>mail<\/a> (server-side) method of emailing rather than using an HTML <i>a<\/i> tag <a target=_blank title='mailto information from w3schools' href='http:\/\/www.w3schools.com\/tags\/tryit.asp?filename=tryhtml_link_mailto'><i>mailto:<\/i><\/a> <a target=_blank title='HTML a tag information from w3schools' href='http:\/\/www.w3schools.com\/tags\/tag_a.asp'><i>href<\/i><\/a> value (client-side method, that relies on an email client program) &#8230; this is only an issue, if down the line, this may become the innards of a WebView in a mobile application<\/li>\n<li>at the client (and this is perhaps the better, but not the only (ie. if PHP server-side is involved, <a target=_blank title='Some PHP research and development ideas regarding mobile device detection could start here ... thanks' href='http:\/\/stackoverflow.com\/questions\/4117555\/simplest-way-to-detect-a-mobile-device'>it can be done there too<\/a>, but not the same way &#8230; doh!), place to test for it), with Javascript, use a test like &#8230;<br \/>\n<code><br \/>\nif (navigator.userAgent.match(\/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile\/i)) {<br \/>\n  \/\/ it is a mobile device<br \/>\n}<br \/>\n<\/code><br \/>\n &#8230; great thanks to this <a target=_blank title='Great cross-platform advice' href='http:\/\/www.abeautifulsite.net\/detecting-mobile-devices-with-javascript\/'>link<\/a> for this advice and idea\n<\/li>\n<li>use meta tag like &#8230;<br \/>\n<code><br \/>\n&lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=yes\" \/&gt;<br \/>\n<\/code><br \/>\n&#8230; between &lt;head&gt; and &lt;\/head&gt; &#8230; as you can imagine, there are huge variations in requirements here, and if you want a start at some more R&#038;D, have a read of a Firefox  (after all, this is a cross-browser, as well as cross-platform, issue) <a target=_blank title='Firefox take (after all, this is a cross-browser, as well as cross-platform, issue) on viewport meta tag regarding mobile devices' href='https:\/\/developer.mozilla.org\/en\/docs\/Mozilla\/Mobile\/Viewport_meta_tag'>webpage<\/a> talking about the viewport meta tag regarding mobile devices<\/li>\n<\/ul>\n<p>&#8230; to, hopefully, improve it as a mobile web application, and hopefully, as a web application generally.<\/p>\n<p>Please tee up a <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/rhopalic_letter_sentence.php\" title='Click picture'>live run<\/a> with the PHP programming source code <a target=_blank  download=\"rhopalic_letter_sentence.php\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/rhopalic_letter_sentence.php-GETME\" title='rhopalic_letter_sentence.php'>rhopalic_letter_sentence.php<\/a> (changed from a few days ago, to make it more mobile friendly, as per <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/rhopalic_letter_sentence.php-GETME\" title='rhopalic_letter_sentence.php'>rhopalic_letter_sentence.php<\/a>).<\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d12145' onclick='var dv=document.getElementById(\"d12145\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=mobile-friendly\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d12145' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>To make a web application more mobile device friendly, there is the look and the usability to consider. When you consider the look you should try to take into account, very small device widths, as would be applicable for a &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/php-rhopalic-letter-sentence-game-mobile-friendly-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,37],"tags":[123,213,276,278,381,458,576,585,652,777,795,796,798,830,932,997,1319,1329,1373],"class_list":["post-12145","post","type-post","status-publish","format-standard","hentry","category-elearning","category-tutorials","tag-back-button","tag-clientserver","tag-cross-browser-issues","tag-cross-platform","tag-email-client","tag-forward-button","tag-html","tag-ide","tag-javascript","tag-meta-tag","tag-mobile","tag-mobile-app","tag-mobile-friendly","tag-navigation","tag-php","tag-programming","tag-tutorial","tag-uiwebview","tag-viewport"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/12145"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=12145"}],"version-history":[{"count":0,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/12145\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=12145"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=12145"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=12145"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}