Extension talk:MobileSkin

Further Testing Request
This extension needs more testing with different mobile devices and browsers. I disabled all skins but MonoBook, had my CSS guy create an "iPhone" skin, and copied chick as a skin called "Mobile" (so non-technical users don't get confused by the name). So the list of skins is "Mobile", "MonoBook", and "iPhone". New users are set to "MonoBook" for their desktop/laptop access by default. Then MobileSkin changes skin when pages are displayed, without changing the user's default skin. Makes the login page easier to use on a mobile screen too. Let me know if you see a better way to implement this feature or experience any problems. Chanur 16:33, 19 December 2008 (UTC)

Skin Bug
Fatal error: Cannot access protected property SkinStandard::$skinname in /var/www/vhosts/betazoid.co.za/httpdocs/wiki/extensions/MobileSkin/MobileSkin.php on line 30

This occurs with Classic and Nostalgia when browsing from my PC. Is there a way to detect screen width?


 * Didn't get notified the talk page changed until today. What version of MediaWiki are you running? I haven't tested it with Classic or Nostalgia as default skin, but I will. Chanur 01:30, 25 June 2009 (UTC)


 * Edit MobileSkin.body.php and change line 25 from "$this->mobileDebug = 2;" to "$this->mobileDebug  = 0;". The debug messaging is trying to get the skin name and Nostalgia and Classic do not like that. I did not look at those skins to see why, but this appears to correct the fatal error. Chanur 16:17, 25 June 2009 (UTC)


 * I've changed the code to use the accessor method (hope you don't mind!). —Emufarmers(T 19:19, 27 June 2009 (UTC)


 * No problem. I'm always open to a better way. Thanks Chanur 23:15, 27 June 2009 (UTC)

PHP <? Tag for Source code
The article recommends to copy the code into .php files, yet it does not have the <? php text to identify the file is php code for the server to analyze. This results in the main PHP file being dumped and gives many header errors on execution. Many users using MediaWiki may be unaware of this issue, resulting in failed installations.


 * Good point. Chanur 01:32, 25 June 2009 (UTC)


 * I suggest you add the ?> to the end of the file too. 70.76.32.230


 * As I recall the final ?> is not supposed to be in the text on the page; this is a documentation convention though I don't remember why. Chanur 02:15, 11 July 2009 (UTC)


 * Ahh, having the ?> actually breaks the extension's functionality (causes PHP-parse issue), so it's a good idea to not stick it in. 70.76.32.230 00:29, 18 July 2009 (UTC)

Where are the iPhone skins?
At least on Ubuntu, the mediawiki package does not contain the 'iphone' skin. It sure would be nice if this page linked to where that file was available, rather than forcing a lot of Googling. This plugin and that skin seem more useful together than apart. 70.76.32.230


 * There is no official iphone skin. We put one together for a client but it was very branded. I'll look at generalizing it to provide a starting point. Chanur 02:15, 11 July 2009 (UTC)


 * Simple iPhone skin posted to Manual:Gallery of user styles. Look for "Simple iPhone". Download and modify it (e.g. change colors, etc) to meet your needs. Chanur 02:47, 11 July 2009 (UTC)

IE8 Vista64 Mobile Render
It appears Internet Explorer 8 (x86) on Vista x64 machines renders in mobile mode. HTTP_USER_AGENTS appear to be identical, yet I cannot find the source of why this occurs. This has been reported to occur on two separate machines. I am unsure why this occurs.

32-Bit - Rendered MobileSkin: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.21022; .NET CLR 3.5.30729; OfficeLiveConnector.1.4; OfficeLivePatch.0.0; .NET CLR 3.0.30729)

Is anyone able to replicate this issue on a Vista x64 machine using their 32-bit version of Internet Explorer?


 * I have IE8 on Vista x64 but it renders in the default skin on my wiki. My user agent is Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0; GTB6; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; InfoPath.2; .NET CLR 3.0.30729). I do not see any significant difference. Please let me know if you find anything else. Chanur 13:59, 19 September 2009 (UTC)


 * Firstly my thanks to the author - super! I've also found this issue though on IE8/Win7-x64.  I resolved it by tested for MSIE specifically, not particularly robust but works for my purposes as I'm only really bothered about iPhone anyway.  Code snippet thus,
 * $returnValue = '';	// default: not a mobile device
 * if (preg_match('/MSIE/i',$_SERVER['HTTP_USER_AGENT'])) {
 * $returnValue = '';
 * } elseif (isset($_SERVER['HTTP_X_WAP_PROFILE'])) {
 * $returnValue = $this->defaultDevice;

Error on 1.16
I'm getting the following error

PHP Fatal error: Call to a member function getNamespace on a non-object in Skin.php on line 222

I'm assuming that it's something to do with a simple change for the new version but haven't been able to track it down.


 * I haven't upgraded to 1.16 yet. It isn't an official release yet, is it? I know there are some changes coming so I will look into this. Chanur 13:59, 19 September 2009 (UTC)

Error on 1.6.8
I'd like to use MobileSkin on MediaWiki: 1.6.8, PHP: 4.4.9 But the following error comes up.

Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/sites/***/extensions/MobileSkin/MobileSkin.body.php on line 20


 * I didn't start developing this until v1.11 so I really didn't qualify it on earlier releases. Not sure how I could debug this since I don't have a way to create that environment. Sorry Chanur 13:59, 19 September 2009 (UTC)

Error
As of Nov. 3, 2009, I have the latest svn of MediaWiki. I'm getting the following when using the MobileSkin extension and visiting a page with an iPod Touch:


 * Call to member function getLocalURL on a non-object in /var/www/theopedia.com/includes/Skin.php on lien 242

- Aaronshaf 05:35, 4 November 2009 (UTC)

Screen dump
Someone kindly user who are able to take screenshots of the MobileSkin to evaluate it? - Captain U

Error on 1.16alpha-wmf (r58524)
Fatal error: Call to a member function getNamespace on a non-object in wiki/includes/Skin.php on line 220

Thomas 05:52, 6 November 2009 (UTC)

Not seeing anything...
I have installed the plugin as described - specs are: MediaWiki 1.14, apache_2.2.14-win32-x86-openssl-0.9.8k , mysql-essential-5.1.39, php-5.2.11

1) I did not include FCKeditor do i need this? My localsettings now contains:

$mobile = new MobileSkin; if (!$mobile->isMobile) require_once( "$IP/extensions/FCKeditor/FCKeditor.php" );

2) Initially i got this error: "Undefined property: SkinMonoBook::$getSkinName in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\wiki\extensions\MobileSkin\MobileSkin.body.php on line 201"

I fixed this by changing: $this->mobileDebug = 0;

But....

3) When i try to open the wiki pages at http://www.testiphone.com/ i do not see the page in a mobile format it looks exactly the same as before? Because this is internal server i can only test it from here?

Any suggestions? Thanks!

Stops HeaderTabs extension working
Hi. This is a great extension! The only problem I have is that it busts HeaderTabs http://www.mediawiki.org/wiki/HeaderTabs It stops them working even on a non mobile device (i.e. no skin change). Any ideas anyone? Thanks! mitchelln 16:55, 15 February 2010 (GMT)

Missing argument 2 for MobileSkin Setup
Wonderful extension - looking forward to putting it to use. Question: I get the following error on my IPhone: Warning: Missing argument 2 for evMobileSkin_Setup in .../MobileSkin/MobileSkin.php on line 33. How do I go about addressing the need for a second variable? Best wishes.. Ron --Sketch 00:53, 8 April 2010 (UTC)

It redirects me to WIKIPEDIA!
And I do not why. Iphone problem or extension problem?

Older Mediawiki
Hi. This looks like a great extension. However I see that it's for Mediawiki 1.13+ only. Is it possible to use it with Mediawiki 1.16 and PHP 4? Can it be done with minor modifications? or is it hopeless? I managed to avoid the bug described above b y eliminating all public function declarations but it seems do nothing for my site, when I test in on this demo http://www.opera.com/mobile/demo/?url=http%3A//www.ict4e.net/wiki/Mediawiki/Mobile/Skin. My site looks exactly the same. Any chance someone will take a crack at it? thank you 85.250.147.4 21:53, 14 April 2010 (UTC)

Not working in 1.16
Can't seem to get this to work properly in 1.16... Is this extension still being maintained?

Getting the following errors
My wiki (http://whatsafterthecredits.com) doesn't seem to like these two sections. Getting error on top of page on the computer and error on mobile device.

$sk = $wgUser->getSkin;	// initialize access to user's skin if (function_exists('wfDebug') && ($this->mobileDebug > 1)) wfDebug( "MobileSkin: user selected skin is '$sk->getSkinName'\n" );

$sk = Skin::newFromKey($skin);	// temporarily change skin for this page if (function_exists('wfDebug') && ($this->mobileDebug > 1)) wfDebug( "MobileSkin: user selected skin is '$sk->getSkinName' ($skin)\n" );

-I just had alook at your site in IE and on my iPhone and I cant see these errors? Also the mobile skin seems to work on the iPhone fine. Redeye 02:18, 7 November 2010 (UTC)