Not logged in. · Lost password · Register
Forum: Customising UNB Designs RSS
How to add meta tag for iPhone? meta name="viewport"
katzlbt #1
Member since May 2006 · 38 posts
Group memberships: Members
Show profile · Link to this post
Subject: How to add meta tag for iPhone? meta name="viewport"
Hi all!

Does anyone know where to add the meta tag to tell the iPhone that the forums "site" can be viewed with 480px width instead of its default of 960px (which makes fonts inconveniently small).

I need to specifically add the following line:
    <meta name="viewport" content="width=480" />

Thanks, Thomas.

Remark: there is a small bug in the main menu: In FF3 the entries overlap vertically; in Safari the menus wrap, but only after being completely outside the page first (one menu could be invisible) ... although noone would really require access Statistics or Members desparately.
You can tune a filesystem, but you can't tune a fish!
katzlbt #2
Member since May 2006 · 38 posts
Group memberships: Members
Show profile · Link to this post
My research shows that there is a hook ...
"page.httpheader"
... maybe there is some way to use that?

HMMM? I found this ...
    // TODO: pass <meta>, <link> tags and other information (template parameters?) to the frame script

I cant imagine it is not possible to set robots metatags etc.
You can tune a filesystem, but you can't tune a fish!
This post was edited on 2009-02-03, 13:43 by katzlbt.
katzlbt #3
Member since May 2006 · 38 posts
Group memberships: Members
Show profile · Link to this post
I solved it, finally found it ... added it to ...
_head.html

The best setting for the iPhone is:
<meta name="viewport" content="width=580" />

Anything lower will distort the template.

On the iPhone the menu (tab) icons of search, members, etc. are shifted up a bit and the whitespace to the right of sub-forums is to large for mobile devices. But that are minor detals.

Thanks.
You can tune a filesystem, but you can't tune a fish!
The author has attached one file to this post:
Screenshot 2009.02.03 14.36.15.png 59 kBytes
You have no permission to open this file.
Avatar
Yves (Administrator) #4
User title: UNB developer & webmaster
Member since Jan 2004 · 3813 posts · Location: Erlangen, Germany
Group memberships: Administrators, Members
Show profile · Link to this post
_head.html is a good place for that.

I don't test web pages regularly on Safari. I only install it from time to time in my VM and test a few things. Until then, Safari just needs to display pages like Firefox, Opera or IE, and everything's just fine. :) I cannot do iPhone testing because I don't own one and probably never will.
♪ ...nanananah, all in all we’re just brilliant thieves, nanananah... ♪♬
surecool73 #5
Member since Apr 2009 · 3 posts
Group memberships: Members
Show profile · Link to this post
If you want your content to look perfect on an iPhone you must use the viewport meta tag. Without it, your page may look like thumbnail. I had not heard of this tag until now. But it does the trick.


<meta name="viewport" content="width=320, user-scalable=yes">

Add this tag to the head section of the HTML page. If you set user-scalable to no, then your users wont be able to zoom in or out, so it is friendly to set it to yes (unless you are writing a page that is not meant to be zoomed in).
Make money fast
Increase traffic to website
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
This board is powered by the Unclassified NewsBoard software, 20110527-dev, © 2003-2011 by Yves Goergen
Page created in 178.1 ms (98.3 ms) · 63 database queries in 121.7 ms
Current time: 2012-02-04, 03:24:32 (UTC +01:00)