LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Mobile
User Name
Password
Linux - Mobile This forum is for the discussion of all topics relating to Mobile Linux. This includes Android, Tizen, Firefox OS, Sailfish OS, Maemo, MeeGo, Ubuntu Mobile, WebOS, Open Mobile Alliance and other similar projects and products.
A reminder that LQ now has a dedicated Android sister site: AndroidQuestions.org

Notices

Reply
 
Search this Thread
Old 06-06-2012, 12:56 AM   #1
fhleung
Member
 
Registered: Aug 2004
Distribution: Fedora, Debian
Posts: 355

Rep: Reputation: 30
mobile version website -- m.website.com


I having few websites which host by hosting company using PHP + MySQL
It is so common that website having mobile version.

The address link of mobile version website usually like this: m.website.com

I wondering howto develop a mobile version add on my current normal website?
Could anyone share their experience on making of mobile version?



found something after google:
Code:
<link href='css/480.css' media='only screen and (max-width: 480px)' rel='stylesheet' type='text/css'>
http://protofluid.com/#launchProtoFluid


source: http://mobile.smashingmagazine.com/2...-your-website/

Last edited by fhleung; 06-07-2012 at 11:18 AM.
 
Old 07-27-2014, 09:30 PM   #2
fhleung
Member
 
Registered: Aug 2004
Distribution: Fedora, Debian
Posts: 355

Original Poster
Rep: Reputation: 30
http://en.wikipedia.org/wiki/List_of..._pixel_density
 
Old 07-30-2014, 10:13 AM   #3
sundialsvcs
Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 5,425

Rep: Reputation: 1159Reputation: 1159Reputation: 1159Reputation: 1159Reputation: 1159Reputation: 1159Reputation: 1159Reputation: 1159Reputation: 1159
When any browser talks to you, one piece of metadata that it provides is whether it claims to be a "mobile" device or not. (Incidentally, browsers on mobile devices normally allow you to switch that on or off ...)

When the "main" web site observes this metadata, it normally issues a redirect to the "m." site (which does the opposite).

Then, whether or not there are actually two separate services on the back-end providing the output in each case, the two follow different paths: most especially, the use of different templates to handle the generation of appropriate HTML.

In programming-language terms, I happen to like to define "the web service" as a programming-language object in three parts: (1) a base-class; (2) a "non-mobile" child class; and (3) a "mobile" one. Any of which might be further subdivided, e.g. to handle browser-differences or mobile-device differences. Where differences exist, the child-classes override the appropriate handlers while passing most of the actual work to their inherited parent. What I am consciously trying to do here is to factor-out the complexity that otherwise can very-easily permeate the source-code of the application.

I also define an object for "a request" (and "the response"), and each of these specifically has an attribute such as is_mobile, so that there is "one, and only one, Official Way™" to recognize the two cases in code that is common.

Remember that we certainly have not seen the end of the evolution of just what "a mobile device" means, nor of what such a thing can do. Design for the future, knowing that the future will very-quickly arrive.

Last edited by sundialsvcs; 07-30-2014 at 10:16 AM.
 
Old 08-04-2014, 10:50 PM   #4
fhleung
Member
 
Registered: Aug 2004
Distribution: Fedora, Debian
Posts: 355

Original Poster
Rep: Reputation: 30
ratio of mobile device -- screen.height divide by screen.width

The above link got the info of screen size, dimension, pixel of many mobile devices.

What the following code do is:
By the height and width of the pixel screen size, then get the ratio/scale of mobile device, and so redirect to different .html/css file.


Please check, have a look anything wrong the following code. Simply copy and paste into a .html file

Code:
<script type="text/javascript">
if ( screen.height / screen.width = 1.3 ) { window.location = "m1.html"; }
else if ( screen.height / screen.width = 1.5 ) { window.location = "m2.html"; }
else ( screen.height / screen.width = 3.0 ) { window.location = "m3.html"; }
</SCRIPT>
 
Old 11-06-2014, 03:07 AM   #5
fhleung
Member
 
Registered: Aug 2004
Distribution: Fedora, Debian
Posts: 355

Original Poster
Rep: Reputation: 30
I got another question about web page, viewing in mobile machine / phone

The question is about text size viewing in mobile phone. The problem I having was, I can't view the text in scale. For example please visit this page: http://54205029.com/career

It just simply html text only page, like a line of text with no <BR> tag, can't format in the whole phone screen width, but it sepearate with servel lines... I mean it didn't use whole width.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
need someone to point out the way for making this kind of website website rastiazul Linux - General 1 01-15-2011 01:59 AM
LXer: Creating A Mobile Version of Your Drupal Website Part 1 LXer Syndicated Linux News 0 11-25-2010 08:30 AM
Mobile to Website sajdutt Linux - Software 1 05-14-2008 03:48 AM
mobile version of a website Jordan&&&& Linux - Enterprise 2 04-17-2008 01:25 PM


All times are GMT -5. The time now is 12:48 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration