Wedge

Public area => Bug reports => The Pub => Archived fixes => Discussion démarrée par: ziycon le 5 Juin 2012 à 12:28

Titre: Mobile Version
Posté par: ziycon le 5 Juin 2012 à 12:28
Just a heads up. Not sure if it's still being worked on and not sure if there is a mobile version yet but on my phone, Samsung Wave, it doesn't look pretty at all and doesn't auto detect it as a mobile device.
Titre: Re: Mobile Version
Posté par: Nao le 5 Juin 2012 à 12:31
There's a mobile version, can be seen here as well, but it's really mostly geared towards iOS...
Not that I prefer iOS, but I simply have no other devices to test on.
Titre: Re: Mobile Version
Posté par: ziycon le 5 Juin 2012 à 12:34
Will other mobile platforms be supported by a generic mobile site and will auto-detect be added?
Titre: Re: Mobile Version
Posté par: Nao le 5 Juin 2012 à 13:23
Nothing will be done until I have an opportunity to play with any devices people want support for.

As for detection, iirc Wedge should redirect most mobile and tablet devices to the wireless skin. If it doesn't, go to your profile, change skin and check whether you're on the wireless or weaving skin.
Titre: Re: Mobile Version
Posté par: ziycon le 5 Juin 2012 à 15:45
Grand, no worries.
Titre: Re: Mobile Version
Posté par: Nao le 5 Juin 2012 à 16:44
So..?
Titre: Re: Mobile Version
Posté par: ziycon le 5 Juin 2012 à 16:51
Hadn't looked, I was just saying thanks as in I was going to but now that I've had a chance, its set to the forum default. :)
Titre: Re: Mobile Version
Posté par: Nao le 5 Juin 2012 à 17:02
Okay. I'll have a look at the ua for Wave and add it to my list if it isn't there.
Titre: Re: Mobile Version
Posté par: Nao le 5 Juin 2012 à 17:20
There aren't any 'wave' ua strings available, only phone models which I'm not going to care about, so I added a generic 'samsung' string... I doubt they'll ever release a desktop browser, so it should be fine forever.

Can you confirm you get the wireless skin by default, now..?
Titre: Re: Mobile Version
Posté par: Nao le 5 Juin 2012 à 19:51
Sorry, site was down for some time...
Didn't realize my FTP client had failed to upload Class-MoDe.php properly -- so it was generating errors on new sessions.
Titre: Re: Mobile Version
Posté par: ziycon le 5 Juin 2012 à 19:54
Was this the error as this is what I was getting for a good while now!?
Citation
Fatal error: Class 'weMoDe' not found in /Sources/Load.php on line 368
Still getting the default theme on my wireless device.
Titre: Re: Mobile Version
Posté par: Nao le 5 Juin 2012 à 20:45
Yes, and it should be working for you, are you sure you didn't change the skin *while* you were visiting the site on your mobile, by any chance..?

If not, go there and copy/paste your Wave's user agent here:

http://whatsmyuseragent.com/
Titre: Re: Mobile Version
Posté par: ziycon le 6 Juin 2012 à 00:50
Still the same, heres my user agent.
Citation
SAMSUNG-GT-S8500/S8500BWKB1 Bada/1.0 Dolfin/2.0 NexPlayer/3.0 SMM-MMS/1.2.0 profile/MIDP-2.1 configuration/CLDC-1.1 OPN-B
Titre: Re: Mobile Version
Posté par: Nao le 6 Juin 2012 à 09:20
Well it should be working then... Very odd.
Titre: Re: Mobile Version
Posté par: Dragooon le 6 Juin 2012 à 11:38
Cached in SESSION?
Titre: Re: Mobile Version
Posté par: Nao le 6 Juin 2012 à 11:46
Oh yeah, forgot to suggest logging off :)
Titre: Re: Mobile Version
Posté par: ziycon le 6 Juin 2012 à 11:46
Citation de Dragooon le 6 Juin 2012 à 11:38
Cached in SESSION?
Cleared the phones cache still the same.
Titre: Re: Mobile Version
Posté par: Dragooon le 6 Juin 2012 à 11:47
Citation de ziycon le 6 Juin 2012 à 11:46
Citation de Dragooon le 6 Juin 2012 à 11:38
Cached in SESSION?
Cleared the phones cache still the same.
Clear your phone's cookies.
Titre: Re: Mobile Version
Posté par: Nao le 6 Juin 2012 à 11:50
Yup... And/or log out ;)
Titre: Re: Mobile Version
Posté par: ziycon le 6 Juin 2012 à 12:46
Cleared everything I could possible clear and logged out and back in, still the same. <_<
Titre: Re: Mobile Version
Posté par: Nao le 6 Juin 2012 à 13:09
It's no fun anymore. :(
Titre: Re: Mobile Version
Posté par: Dragooon le 6 Juin 2012 à 13:20
Code: (Class-MoDe.php) [Sélectionner]
if (strpos($ua, $device) !== false)
return true;
Shouldn't that be
Code: (Replace) [Sélectionner]
if (preg_match('/' . $device . '/i', $ua))
return true;
?

Plus I don't see samsung/bada in there?
Posté : 6 Juin 2012 à 13:16

Crap, no. Didn't read the foreach declaration.
Titre: Re: Mobile Version
Posté par: Nao le 6 Juin 2012 à 13:21
Citation de Dragooon le 6 Juin 2012 à 13:16
Code: (Class-MoDe.php) [Sélectionner]
if (strpos($ua, $device) !== false)
return true;
Shouldn't that be
Code: (Replace) [Sélectionner]
if (preg_match('/' . $device . '/i', $ua))
return true;
?
No... This is an array of short strings that are lowercased, and the user agent is lowercased at this point, too. There's no point in wasting time compiling a regex for that. I'm just scanning the user agent for these strings. It could be faster to do a global regex match for the entire list of devices, but I did some tests earlier and it was actually slower... (Yes, a single preg_match was slower than dozens of strpos calls...)
Maybe it has changed since I did my first tests, but I doubt so.
Citation
Plus I don't see samsung/bada in there?
Because it's not committed yet. Currently on wedge.org there's an additional '|samsung|' in the 'generic' list. It should return 0 for ziycon (start of the string), which is !== false (but not != false of course), and thus should return true overall...
Titre: Re: Mobile Version
Posté par: Dragooon le 6 Juin 2012 à 13:22
It is case sensitive. samsung won't match anything as it's SAMSUNG (strpos is case sensitive, stripos isn't).
Titre: Re: Mobile Version
Posté par: Nao le 6 Juin 2012 à 14:18
Look at the strtolower............. :whistle:
Titre: Re: Mobile Version
Posté par: Dragooon le 6 Juin 2012 à 14:26
What the f....I got no idea why that won't work.
Titre: Re: Mobile Version
Posté par: Nao le 6 Juin 2012 à 14:38
Hence my original reply...

Perhaps it always worked for him, but he chose to go Weaving at some point during his mobile tests, and I can't do anything for him...
But if he's logged out (a guest), and has cookies disabled, then it SHOULD work...
Titre: Re: Mobile Version
Posté par: Dragooon le 6 Juin 2012 à 14:44
Did a test run using that UA, code is evaluating it fine (after adding |samsung|). So must be something else.
Titre: Re: Mobile Version
Posté par: Nao le 6 Juin 2012 à 15:40
Yup...
Titre: Re: Mobile Version
Posté par: ziycon le 6 Juin 2012 à 16:55
The only other thing I can think of is that the mobile site is being applied but it doesn't like working with my device, can you post a screen of what the mobile site should look like?!
Titre: Re: Mobile Version
Posté par: Nao le 6 Juin 2012 à 18:03
It's simple enough: the user name (in topic pages) is ABOVE the post, and there's no message counter below it. The date is on the right side. There is no permalink to the post, either.