Not logged in. · Lost password · Register
Forum: Customising UNB Designs RSS
How to add meta tag for iPhone? meta name="viewport"
Reply
Reply · Quote 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!
Reply · Quote 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.
Reply · Quote 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
Reply · Quote Yves (Administrator) #4
User title: UNB developer & webmaster
Member since Jan 2004 · 3740 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... ♪♬
Reply · Quote 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 note the verification code from the picture into the text field next to it.
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Reply
Go to forum
This board is powered by the Unclassified NewsBoard software, 20100516-dev, © 2003-10 by Yves Goergen
Page created in 192 ms (144 ms) · 63 database queries in 124 ms
Current time: 2010-07-30, 10:58:20 (UTC +02:00)