JP
  •  JP
  • 100% (Exalted)
  • YAF Leader Topic Starter
2011-01-17T18:58:08Z
As usual, I have to ask some simple forum usability questions... 😁

1 - How should I do to make it work for mobile devices?

When I use my WinMobile phone, I get the normal forum theme.
Since I use global theme settings, I only have 2 themes set - my own + the YAFMobile.
I do not wish to use personal theme settings at all, at least not for now...

2 - Is it automatically adjusting, ie sensing smaller screen size and the deciding to use the YAFMobile theme?

That I would really love...

3 - Can I do something with an URL, like having a "mobile.forumsite.com" as I know a lot of news sites and such do?

4 - Are there any restrictions, like "only works with Apple iOS" or such?

I am very interested in how to make this work, since I know some members (including a mod) read the forum while commuting by bus, train etc with their Smartphones...
He who asks a question is a fool for five minutes. He who does not ask a question remains a fool forever. [Old Chinese Proverb]
Sponsor
tha_watcha
2011-01-18T14:08:03Z
Quote:

1 - How should I do to make it work for mobile devices?



Yaf detects if you are using a mobile device, it should support all mobile devices, and not only iOS.

There is a setting in the profile "Use Mobile Forum Theme" (Which is only visible when in browser mode) where you can turn on/off the mobile theme (By Default this setting is on). There is also a Link visible in the footer to switch between full and mobile site. Or you can switch with a url parameter

[code=plain]http://forum.yetanotherforum.net/Default.aspx?fullsite=true[/code]

http://forum.yetanotherforum.net/Default.aspx?mobilesite=true

UserPostedImage
JP
  •  JP
  • 100% (Exalted)
  • YAF Leader Topic Starter
2011-01-18T19:03:53Z
Hmm... Tried to use the ?mobileforum=true parameter...

With my HTC HD Mini (Winmobile 6.5.3 & Opera) no difference, but with my iPod Touch (Safari)- it seems to work...

Thank you for the pointers! Much appreciated. πŸ‘
He who asks a question is a fool for five minutes. He who does not ask a question remains a fool forever. [Old Chinese Proverb]
JP
  •  JP
  • 100% (Exalted)
  • YAF Leader Topic Starter
2011-01-19T18:59:11Z
Have got confirmations from my forum users that it works with Droids too...πŸ‘

So now only my own phone left...πŸ˜’
He who asks a question is a fool for five minutes. He who does not ask a question remains a fool forever. [Old Chinese Proverb]
JP
  •  JP
  • 100% (Exalted)
  • YAF Leader Topic Starter
2011-01-21T19:06:21Z
Well iPxxx's work, Droids work, Winmobile works if using IE, Winmobile with Opera does not work(full theme layout).

Work colleague tried with Nokia N8 (Symbian 3) and the mobile theme comes up, but complains about cookies, even if cookies are allowed...

Blackberry forum user said he gets the full theme layout...

A great addition to the forum it is, anyway! πŸ‘
He who asks a question is a fool for five minutes. He who does not ask a question remains a fool forever. [Old Chinese Proverb]
bbobb
  •  bbobb
  • 100% (Exalted)
  • YAF Developer
2011-01-22T00:37:54Z
Originally Posted by: JP 


With my HTC HD Mini (Winmobile 6.5.3 & Opera) no difference


Technically, you can simply "HD_mini" to mobile devices key words in a file and recompile it. It's your personal magic word.

Originally Posted by: JP 


Work colleague tried with Nokia N8 (Symbian 3) and the mobile theme comes up, but complains about cookies, even if cookies are allowed...
It browser says that it doesn't support, YAF believes him.
A Symbian 3 browser problem.

Originally Posted by: JP 


Blackberry forum user said he gets the full theme layout...


Blackberry devices should be detected en masse.


squirrel
2011-01-22T02:20:42Z
Originally Posted by: bbobb 

Originally Posted by: JP 


With my HTC HD Mini (Winmobile 6.5.3 & Opera) no difference


Technically, you can simply "HD_mini" to mobile devices key words in a file and recompile it. It's your personal magic word.

Originally Posted by: JP 


Work colleague tried with Nokia N8 (Symbian 3) and the mobile theme comes up, but complains about cookies, even if cookies are allowed...
It browser says that it doesn't support, YAF believes him.
A Symbian 3 browser problem.

Originally Posted by: JP 


Blackberry forum user said he gets the full theme layout...


Blackberry devices should be detected en masse.



I also have a user with a Windows based SmartPhone who complains that cookies are being rejected by YAF. I am still investigating this though.
If you can't find it using the forum search, try my signature link -- searches this site using Google: Google is my Friend 
bbobb
  •  bbobb
  • 100% (Exalted)
  • YAF Developer
2011-01-22T12:31:23Z
Originally Posted by: squirrel 


I also have a user with a Windows based SmartPhone who complains that cookies are being rejected by YAF. I am still investigating this though.


If a browser lies YAF that it doesn't support cookies, but really it supports it, this is definitely the mobile device's soft problemπŸ˜„.
squirrel
2011-01-22T18:29:48Z
Originally Posted by: bbobb 

Originally Posted by: squirrel 


I also have a user with a Windows based SmartPhone who complains that cookies are being rejected by YAF. I am still investigating this though.


If a browser lies YAF that it doesn't support cookies, but really it supports it, this is definitely the mobile device's soft problemπŸ˜„.



Agreed πŸ™‚ I'm digging more into why the phone claims it doesn't --
If you can't find it using the forum search, try my signature link -- searches this site using Google: Google is my Friend 
midwestSS
2011-01-24T15:41:04Z
do i have to set my theme to mobile, THEN go into the site on a phone?
squirrel
2011-01-25T01:01:37Z
Multiple Blackberry devices are reporting that the forum is rejecting them with a refresh loop saying "Javascript version not supported" -- what JS version does YAF require in a mobile? I am currently recommending to my users that they upgrade their mobile browser to OperaMini to work around this. It solved the cookie issue with the Windows SmartPhone that was complaining about cookies (even though it was accepting cookies on the default browser with other sites, it was rejecting YAFs cookies for some reason (according to YAF).
If you can't find it using the forum search, try my signature link -- searches this site using Google: Google is my Friend 
bbobb
  •  bbobb
  • 100% (Exalted)
  • YAF Developer
2011-01-25T01:21:27Z
In forum.ascx.cs in /pages play around with this. This is your redirect.ecmaVersion.Major >= 0

Version ecmaVersion = HttpContext.Current.Request.Browser.EcmaScriptVersion;
              if (ecmaVersion != null)
              {
                  if (!(ecmaVersion.Major >= 0))
                  {
                      YafBuildLink.RedirectInfoPage(InfoMessage.EcmaScriptVersionUnsupported);
                  }
              }
              else
              {
                  YafBuildLink.RedirectInfoPage(InfoMessage.RequiresEcmaScript);
              }

RichP714
2011-03-31T01:47:10Z
Originally Posted by: JP 

.......Winmobile works if using IE, Winmobile with Opera does not work(full theme layout). ......




I get the same behavior running a Samsung OMNIA. IE works, but Opera won't switch to mobile theme, and The profile setting doesn't have the mobile checkbox, so it thinks it's not on a mobile device.

Is there any way to Force this?
Enjoy!

Running YAF 1.9.5.5 final at: http://thecarversite.com 
RichP714
2011-04-12T21:01:32Z
I've discovered a way to get the behavior I want, even if the site won't recognize a device as mobile (Omnia running Opera 10)

All we really want to do is hide the user box and sig.

1. in default.aspx add the following meta tag in head:

Quote:

<meta name="viewport" content="width=device-width" />



This connects the browser screen width to the device screen width

2. In forum.css add the following

Quote:

@media all and (max-width: 799px)
{
.hideThis
{
display : none;
}
}



This creates a style calle hideThis for devices less than 799 pixels wide

3. in Displaypost.ascx add hideThis class to the style that shows the userbox.

Quote:

<tr class="<%#GetPostClass()%>">
<td valign="top" height="<%# GetUserBoxHeight() %>" class="hideThis UserBox" colspan='<%#GetIndentSpan()%>'>
<YAF:UserBox id="UserBox1" runat="server" Visible="<%# !PostData.IsSponserMessage %>" PageCache="<%# PageContext.CurrentForumPage.PageCache %>" DataRow="<%# DataRow %>"></YAF:UserBox>
</td>



The userbox won't show on mobile devices (we have big medals and large avatars)

4. In the theme file, add the following

Quote:


@media all and (max-width: 799px)
{
.yafnet div.yafsignature
{
display: none;
}
.yafnet .UserBox {
display: none;
}
}



the sig line won't show on mobile devices (we use sig for 'what gear does your audio system have' and it gets long.


Hope somebody finds this useful
Enjoy!

Running YAF 1.9.5.5 final at: http://thecarversite.com 
bbobb
  •  bbobb
  • 100% (Exalted)
  • YAF Developer
2011-04-12T21:31:22Z
I think it's possible to fake UA string in Opera Mobile 10 too.
Another option is "samsung" or "sec-" in app.config.
Unfortunately it requieres UserAgent string to say exactly.
YAF checks if a browser say that it's a mobile one explicitely and it checks by keywords in the file above .

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved