Extension talk:MobileFrontend/2013
Add topicThis page used the LiquidThreads extension to give structured discussions. It has since been converted to wikitext, so the content and history here are only an approximation of what was actually displayed at the time these comments were made. |
Auto detect on MW 1.18
[edit]Sorry for repeating this topic. I see that in the latest version a configuration option has been added for auto detection and redirection of mobile browsers to the mobile frontend. However, I'm using MW 1.18 and upgrading to MW 1.20 just for this is too much for me.
Will someone be willing to provide a simple step-by-step guide for redirection in MW 1.18? I'm using apache 2.2.22 on Ubuntu 12.04, PHP 5.3.10. I have root access, and can change whatever setting I need. I just need to know what to do. Thank you Osishkin (talk) 21:27, 16 February 2013 (UTC)
PHP Fatal error: Call to undefined method DeviceProperties::moduleName()
[edit]After installing the extension with git and adding required lines to LocalSettings.php file, my Wiki pages are disappeared. The error log shows lots of the occurrences of the same error:
[Sat Feb 16 16:31:18 2013] [error] [client IP] PHP Fatal error: Call to undefined method DeviceProperties::moduleName() in /home/mysite/domains/wiki.mysite.com/public_html/extensions/MobileFrontend/includes/skins/SkinMobile.php on line 317
and line 317 in SkinMobile.php has the following line:
if ( $device->moduleName() ) { 67.160.248.117 00:43, 17 February 2013 (UTC)
- You will have better chances of receiving an answer by reporting a bug - see How_to_report_a_bug. Qgil (talk) 22:33, 19 February 2013 (UTC)
- I'm also having this issue on 1.20, and have opened bugzilla ticket # 45315 on it. 174.79.212.131 23:31, 25 February 2013 (UTC)
- you need to update MediaWiki core... 190.212.81.44 22:48, 19 February 2013 (UTC)
- What a lazy answer... 79.220.253.182 17:48, 22 March 2013 (UTC)
SemanticForms problem
[edit]Semantic Form
[edit]I've managed to get MobileFrontend to work well on my wiki, and I'm pleased with it. Super useful extension. However I have SemanticForms extensions, and its form and queries do not display on the mobile version. Any idea what might cause this? You can see an example here. The original form definition can be found here. SemanticForms is a very popular extension, I think understanding why the conflict occurs would soon be useful to others as well Osishkin (talk) 15:50, 21 February 2013 (UTC)
Google analytics conflict?
[edit]Ever since I installed MobileFrontend in my wiki, almost all traffic from mobiles is not recognized in my Google analytics account. I can clearly see a drop in traffic recognized as mobile from several hundreds per day to almost zero, starting from the MF installation date. And yes - it is possible to view the website in its mobile version, there's no problem. Has anyone encountered this problem? is it possible MF is dropping some headers used to identify type of traffic? Osishkin (talk) 07:57, 1 March 2013 (UTC)
- Mobile only runs a subset of desktop code due to it not working or not being relevant.
- How do you serve the google analytics code.
- If via a hook this hook probably needs to be added to mobile.
- If via an extension this extension needs to be mobile aware.
- Would you mind opening a bug here with this information - https://bugzilla.wikimedia.org/enter_bug.cgi?product=MediaWiki%20extensions&component=MobileFrontend
- Thanks! 216.38.130.162 18:58, 1 March 2013 (UTC)
- OK, done Osishkin (talk) 22:36, 1 March 2013 (UTC)
- I have this exact same problem.
- Did you manage to fix this some way? TimMacG (talk) 14:04, 19 September 2014 (UTC)
- OK, done Osishkin (talk) 22:36, 1 March 2013 (UTC)
Is JavaScript filtered?
[edit]Hi, I'm using the Widgets extension to embed disqus comments in articles. However in mobile view the comments disappear. I've checked the page source and in the nomal version there is some JS: pastebin. In the mobile version it is removed: pastebin 87.138.79.73 13:50, 22 March 2013 (UTC)
- By design the mobile site doesn't allow any javascript from the desktop site..
- This is because most javascript for mediawiki is not written with the mobile in mind. In mobile it is essential to keep page load as low as possible.
- Currently extensions have to register themselves for mobile, which is a relatively easy code change, but also will require some extensive testing. It might be worth raising a bug in the widgets extension so we can explore the best way of doing this for mobile.
- Thanks! Jdlrobson (talk) 17:18, 23 March 2013 (UTC)
- so the it's my understanding that mobilefrontend does not include common.js and common.css.
- this is probably the right thing to do, as most of the stuff in those two pages is desktop specific.
- however, i did not find a way to add site-specific CSS and JS on the mobile view, which does cause issues. is there an alternative for common.js and common.css for mobile? something like "Mediawiki:Mobileview.css" and "Mediawiki:Mobileview.js" which will be loaded?
- leaving no per-cite customization options for the mobilefrontend is problematic, IMO.
- peace. קיפודנחש (talk) 17:06, 26 March 2013 (UTC)
- Correct.. we have Mobile.css and Mobile.js but due to a bug these are currently broken :/
- See https://bugzilla.wikimedia.org/show_bug.cgi?id=46480 Jdlrobson (talk) 17:11, 26 March 2013 (UTC)
- Thanks for your information. I've added this to the Widget extension google group here: https://groups.google.com/forum/#!topic/mediawiki-widgets/WXrMzG1BR_c 87.138.79.73 16:17, 2 April 2013 (UTC)
- Hello,
- I have a similar problem with the ConfirmEdit extension together with Recaptcha mode.
- Is there any documentation available how the extension can be registered for mobile?
- Thank you,
- Christoph 91.223.201.22 06:39, 10 April 2013 (UTC)
Apache returns 500 error when switching to mobile view
[edit]I'm running MW 1.20.4 with a fresh clone of MobileFrontend on a Bitnami LAMP stack. I've installed MobileFrontend and see the "Mobile view" in the footer.
When I click on that "Mobile view", I'm expecting to see the XHTML-rendered version of the Main Page, but I receive an HTTP 500 server error. In error_log, I get the following:
Mon Apr 29 19:24:40.846836 2013] [:error] [pid 2112] [client 68.8.14.91:36270] PHP Fatal error: Call to undefined method OutputPage::getProperty() in /opt/bitnami/apps/mediawiki/htdocs/extensions/MobileFrontend/includes/skins/SkinMobile.php on line 195, referer: http://ec2-184-72-9-131.us-west-1.compute.amazonaws.com/mediawiki/index.php/Main_Page
I'm wondering if that method belongs in the Skin, MobileFrontend, or core. It doesn't look like much has been changed recently on the git repository. I'm also wondering if this is environmental to Bitnami or AWS (but that doesn't seem like it would be.) C morgan2005 (talk) 19:43, 29 April 2013 (UTC)
- MobileFrontend last code is not compatible with 1.20. You can try and use ExtensionDistributor to get the code as it was around 1.20 release but this may work or not; if you find a revision that works with 1.20, please note it here. Nemo 07:33, 30 April 2013 (UTC)
- Ahh, thanks. Do you know what is the preferred method to offer mobile-desktop switching in MW 1.2? Is there an other extension I should look at? C morgan2005 (talk) 03:26, 1 May 2013 (UTC)
- So, when cloned the git repository, I got the latest version, which did not work. Using ExtensionDistibutor, I got the 1.20 version, which is working correctly. C morgan2005 (talk) 05:34, 1 May 2013 (UTC)
- Note the latest MobileFrontend code requires the latest MediaWiki core code. Jdlrobson (talk) 15:06, 1 May 2013 (UTC)
Conditional Content
[edit]What is the best way to show one version of the content for mobile and another for desktop?
Specifically I have a slideshow showing featured media. But it uses javascript. So on mobile I want to just show a static image but on desktop I still want to show the slideshow. Thanks. Fenyx4 (talk) 21:01, 23 May 2013 (UTC)
- The best way is probably to include the data for your static fallback in the delivered HTML; then it's available when JavaScript is off and when the HTML is used isolated.
- Then all you need to do is not load the JavaScript on mobile... :) brion (talk) 14:54, 24 May 2013 (UTC)
- Thanks. Been trying the fallback but so far no luck. I'll keep poking. Fenyx4 (talk) 21:39, 25 May 2013 (UTC)
How to let mobileview api support form post
[edit]I have the following html code snippet which submits the form data to the MediaWiki server. It works perfectly on my desktop browser (for both desktop view and mobile view). But it fails on my android application, which uses mobileview api (https://servername/wiki/api.php?action=mobileview) to retrieve and render webpages. I guess it fails because the response returned by the formAction is in html format. It cannot meet the expectation of the android app, i.e., a format returned by mobileview api.
Can you shed some light on how should I revise the formAction to make it works on android app?
$formAction = $wgScript.'?title='.$wcl->getNsText(NS_SPECIAL).':ProcessFormAction'; <form action=$formAction> <input 1 ... /> <input 2 ... /> </form>
68.105.164.20 01:04, 24 May 2013 (UTC)
- I'm not entirely sure what you are trying to achieve here or do. You also talk about android app which confuses me - do you mean mobile web view on your android or a native application? Please give us more information or send an e-mail to mobile-l [1] to get a better response/support network
- [1] https://lists.wikimedia.org/mailman/listinfo/mobile-l 89.187.79.181 18:33, 24 May 2013 (UTC)
- What I developed is a native android app based on PhoneGap. Inside the app, there is a mobile browser view. It sends out the following request using mobileview api.
'https://mywebsite/wiki/api.php?format=json&action=mobileview&page=' + encodeURIComponent(this.title) + '&redirects=1&prop=sections|text§ions=all§ionprop=level|line&noheadings=true';
- The response from the wiki server is in jason format, which can be further analyzed and shown on the embedded browser view.
$.each( rawJSON.mobileview.sections, function( index, section ) { xxxxx # append the (sub)sections to mobile view }
- My code is assumed to analyze only the response in jason format. However, the response of form submission is in html format, because the formAction does not use the mobileview api.
$formAction = $wgScript.'?title='.$wcl->getNsText(NS_SPECIAL).':ProcessFormAction';
- As for me, it would be the best, if all the responses from the server are in the uniform jason format. I wonder whether there is a method for me to revise the formAction to use the mobileview api and get a jason response. 68.105.164.20 01:04, 25 May 2013 (UTC)
- What we generally recommend is to provide your interface as an API module as well as a Special: page form. (Preferably use one common backend implementation class which both interfaces use, rather than implementing things twice!)
- Then your app can use the API method and speak JSON like with the other bits. brion (talk) 13:31, 25 May 2013 (UTC)
I hope this is available soon for current version of MW
[edit]It says it needs 1.22. Right now we have 1.21.1. I bet a lot of people would like to see a version that works in the current stable release. Thanks to the people who are working on it. Choshi (talk) 00:55, 7 June 2013 (UTC)
Installation problems
[edit]I downloaded the release for MediaWiki 1.19, extracted the downloaded archive to extensions folder, added require_once line to LocalSettings.php, in result wiki was down and error stating that extensions/MobileFrontend/library/WURFL/Application.php cannot be found was logged. DavisNT (talk) 00:21, 10 June 2013 (UTC)
- Unfortunately, the 1.19-era MobileFrontend is very antiquated, and is quite hard to set up for use in a non-Wikimedia environment. This particular problem has legal grounds (because the developers of a library used in this version decided to become copyright trolls it has beed removed from source control history, breaking old versions). We recommend you to upgrade your MediaWiki and install a corresponding version of MF. The latest release, 1.21, has particulary nice features like the ability to automatically display mobile content for mobile users without having to mess with frontend proxy. Max Semenik (talk) 21:53, 10 June 2013 (UTC)
- Thank you!
- I have already solved the problem by upgrading Mediawiki to 1.21 and installing required library. I don't remember exact procedure (so the following may contain errors).
- Library (please at first read its license at: http://wurfl.sourceforge.net/) can be installed as follows:
- Download library from http://sourceforge.net/projects/wurfl/files/WURFL%20PHP/1.4/
- Create folder $IP/extensions/MobileFrontend/library/
- Extract folder /WURFL from downloaded archive to $IP/extensions/MobileFrontend/library/WURFL
- Extract folder /examples/resources from downloaded archive to $IP/extensions/MobileFrontend/library/resources
- Optionally download latest WURFL data file from http://sourceforge.net/projects/wurfl/files/WURFL/ in ZIP format, rename it to wurfl.zip and copy to folder $IP/extensions/MobileFrontend/library/resources/ (overwriting existing wurfl.zip) DavisNT (talk) 16:29, 15 June 2013 (UTC)
- I followed through the steps you did, but it isn't displaying any mobile page.
- I checked /MobileFrontend/library/WURFL/Application.php is correctly installed.
- require_once("$IP/extensions/MobileFrontend/MobileFrontend.php"); is in LocalSettings.
- If I go to my website via mobile, can't see any difference before and after installing it.
- What do you think is the problem? Cosfly (talk) 17:43, 20 August 2013 (UTC)
- Cau you please describe the problem in detail:
- Is the problem with mobile device autodetection or MobileFrontend is not working at all?
- Does Special:Version page list MobileFrontend under extensions?
- Do you see Mobile view link in bottom of the page? DavisNT (talk) 18:58, 31 August 2013 (UTC)
- Also, do you really need all the WURFL setup in your site? Otherwise setting up mobile autodetection can be as simple as adding to LocalSettings.php
$wgMFAutodetectMobileView = true;
Qgil (talk) 17:10, 3 September 2013 (UTC)
- Cau you please describe the problem in detail:
text tag to show text only on mobile view
[edit]I red that there is a tag not to show on mobile view.
but is there a way to show a tag and the text inside only on mobile view?
<onlymobile>something to show only on mobile view</onlymobile>
Raid (talk) 16:38, 10 June 2013 (UTC)
autodetection embedded ver 1.20 fix
[edit]I use last stable 1.20.6 and I merged with the code of Extension:MobileDetect and it is working very well
find:
public function isMobileDevice() {
$xDevice = $this->getXDevice();
if ( empty( $xDevice ) ) {
return false;
}
return true;
}
replace with:
public function isMobileDevice() {
$user_agent = (isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : "");
$http_accept = (isset($_SERVER['HTTP_ACCEPT']) ? $_SERVER['HTTP_ACCEPT'] : "");
switch(true){
// iPad
case (preg_match('/ipad/i',$user_agent));
return false; // Not Mobile
break;
// iPod/iPhone
case (preg_match('/ipod/i',$user_agent)||preg_match('/iphone/i',$user_agent));
return true; // Mobile
break;
// Android
case (preg_match('/android/i',$user_agent));
return true; // Mobile
break;
// Opera Mini/Mobile
case (preg_match('/opera mini/i',$user_agent));
return true; // Mobile
break;
// Blackberry
case (preg_match('/blackberry/i',$user_agent));
return true; // Mobile
break;
// Palm OS
case (preg_match('/(pre\/|palm os|palm|hiptop|avantgo|plucker|xiino|blazer|elaine)/i',$user_agent));
return true; // Mobile
break;
// Windows Mobile
case (preg_match('/(iris|3g_t|windows ce|opera mobi|windows ce; smartphone;|windows ce; iemobile)/i',$user_agent));
return true; // Mobile
break;
// Others
case (preg_match('/(mini 9.5|vx1000|lge |m800|e860|u940|ux840|compal|wireless| mobi|ahong|lg380|lgku|lgu900|lg210|lg47|lg920|lg840|lg370|sam-r|mg50|s55|g83|t66|vx400|mk99|d615|d763|el370|sl900|mp500|samu3|samu4|vx10|xda_|samu5|samu6|samu7|samu9|a615|b832|m881|s920|n210|s700|c-810|_h797|mob-x|sk16d|848b|mowser|s580|r800|471x|v120|rim8|c500foma:|160x|x160|480x|x640|t503|w839|i250|sprint|w398samr810|m5252|c7100|mt126|x225|s5330|s820|htil-g1|fly v71|s302|-x113|novarra|k610i|-three|8325rc|8352rc|sanyo|vx54|c888|nx250|n120|mtk |c5588|s710|t880|c5005|i;458x|p404i|s210|c5100|teleca|s940|c500|s590|foma|samsu|vx8|vx9|a1000|_mms|myx|a700|gu1100|bc831|e300|ems100|me701|me702m-three|sd588|s800|8325rc|ac831|mw200|brew |d88|htc\/|htc_touch|355x|m50|km100|d736|p-9521|telco|sl74|ktouch|m4u\/|me702|8325rc|kddi|phone|lg |sonyericsson|samsung|240x|x320|vx10|nokia|sony cmd|motorola|up.browser|up.link|mmp|symbian|smartphone|midp|wap|vodafone|o2|pocket|kindle|mobile|psp|treo)/i',$user_agent)); // check if any of the values listed create a match on the user agent - these are some of the most common terms used in agents to identify them as being mobile devices - the i at the end makes it case insensitive
return true; // Mobile
break;
// Detect WAP Support
case ((strpos($http_accept,'text/vnd.wap.wml')>0)||(strpos($http_accept,'application/vnd.wap.xhtml+xml')>0));
return true; // Mobile
break;
// Detect WAP Header Support
case (isset($_SERVER['HTTP_X_WAP_PROFILE'])||isset($_SERVER['HTTP_PROFILE']));
return true;
break;
// Last Case Other Mobile Device Detection
case (in_array(strtolower(substr($user_agent,0,4)),array('1207'=>'1207','3gso'=>'3gso','4thp'=>'4thp','501i'=>'501i','502i'=>'502i','503i'=>'503i','504i'=>'504i','505i'=>'505i','506i'=>'506i','6310'=>'6310','6590'=>'6590','770s'=>'770s','802s'=>'802s','a wa'=>'a wa','acer'=>'acer','acs-'=>'acs-','airn'=>'airn','alav'=>'alav','asus'=>'asus','attw'=>'attw','au-m'=>'au-m','aur '=>'aur ','aus '=>'aus ','abac'=>'abac','acoo'=>'acoo','aiko'=>'aiko','alco'=>'alco','alca'=>'alca','amoi'=>'amoi','anex'=>'anex','anny'=>'anny','anyw'=>'anyw','aptu'=>'aptu','arch'=>'arch','argo'=>'argo','bell'=>'bell','bird'=>'bird','bw-n'=>'bw-n','bw-u'=>'bw-u','beck'=>'beck','benq'=>'benq','bilb'=>'bilb','blac'=>'blac','c55/'=>'c55/','cdm-'=>'cdm-','chtm'=>'chtm','capi'=>'capi','cond'=>'cond','craw'=>'craw','dall'=>'dall','dbte'=>'dbte','dc-s'=>'dc-s','dica'=>'dica','ds-d'=>'ds-d','ds12'=>'ds12','dait'=>'dait','devi'=>'devi','dmob'=>'dmob','doco'=>'doco','dopo'=>'dopo','el49'=>'el49','erk0'=>'erk0','esl8'=>'esl8','ez40'=>'ez40','ez60'=>'ez60','ez70'=>'ez70','ezos'=>'ezos','ezze'=>'ezze','elai'=>'elai','emul'=>'emul','eric'=>'eric','ezwa'=>'ezwa','fake'=>'fake','fly-'=>'fly-','fly_'=>'fly_','g-mo'=>'g-mo','g1 u'=>'g1 u','g560'=>'g560','gf-5'=>'gf-5','grun'=>'grun','gene'=>'gene','go.w'=>'go.w','good'=>'good','grad'=>'grad','hcit'=>'hcit','hd-m'=>'hd-m','hd-p'=>'hd-p','hd-t'=>'hd-t','hei-'=>'hei-','hp i'=>'hp i','hpip'=>'hpip','hs-c'=>'hs-c','htc '=>'htc ','htc-'=>'htc-','htca'=>'htca','htcg'=>'htcg','htcp'=>'htcp','htcs'=>'htcs','htct'=>'htct','htc_'=>'htc_','haie'=>'haie','hita'=>'hita','huaw'=>'huaw','hutc'=>'hutc','i-20'=>'i-20','i-go'=>'i-go','i-ma'=>'i-ma','i230'=>'i230','iac'=>'iac','iac-'=>'iac-','iac/'=>'iac/','ig01'=>'ig01','im1k'=>'im1k','inno'=>'inno','iris'=>'iris','jata'=>'jata','java'=>'java','kddi'=>'kddi','kgt'=>'kgt','kgt/'=>'kgt/','kpt '=>'kpt ','kwc-'=>'kwc-','klon'=>'klon','lexi'=>'lexi','lg g'=>'lg g','lg-a'=>'lg-a','lg-b'=>'lg-b','lg-c'=>'lg-c','lg-d'=>'lg-d','lg-f'=>'lg-f','lg-g'=>'lg-g','lg-k'=>'lg-k','lg-l'=>'lg-l','lg-m'=>'lg-m','lg-o'=>'lg-o','lg-p'=>'lg-p','lg-s'=>'lg-s','lg-t'=>'lg-t','lg-u'=>'lg-u','lg-w'=>'lg-w','lg/k'=>'lg/k','lg/l'=>'lg/l','lg/u'=>'lg/u','lg50'=>'lg50','lg54'=>'lg54','lge-'=>'lge-','lge/'=>'lge/','lynx'=>'lynx','leno'=>'leno','m1-w'=>'m1-w','m3ga'=>'m3ga','m50/'=>'m50/','maui'=>'maui','mc01'=>'mc01','mc21'=>'mc21','mcca'=>'mcca','medi'=>'medi','meri'=>'meri','mio8'=>'mio8','mioa'=>'mioa','mo01'=>'mo01','mo02'=>'mo02','mode'=>'mode','modo'=>'modo','mot '=>'mot ','mot-'=>'mot-','mt50'=>'mt50','mtp1'=>'mtp1','mtv '=>'mtv ','mate'=>'mate','maxo'=>'maxo','merc'=>'merc','mits'=>'mits','mobi'=>'mobi','motv'=>'motv','mozz'=>'mozz','n100'=>'n100','n101'=>'n101','n102'=>'n102','n202'=>'n202','n203'=>'n203','n300'=>'n300','n302'=>'n302','n500'=>'n500','n502'=>'n502','n505'=>'n505','n700'=>'n700','n701'=>'n701','n710'=>'n710','nec-'=>'nec-','nem-'=>'nem-','newg'=>'newg','neon'=>'neon','netf'=>'netf','noki'=>'noki','nzph'=>'nzph','o2 x'=>'o2 x','o2-x'=>'o2-x','opwv'=>'opwv','owg1'=>'owg1','opti'=>'opti','oran'=>'oran','p800'=>'p800','pand'=>'pand','pg-1'=>'pg-1','pg-2'=>'pg-2','pg-3'=>'pg-3','pg-6'=>'pg-6','pg-8'=>'pg-8','pg-c'=>'pg-c','pg13'=>'pg13','phil'=>'phil','pn-2'=>'pn-2','pt-g'=>'pt-g','palm'=>'palm','pana'=>'pana','pire'=>'pire','pock'=>'pock','pose'=>'pose','psio'=>'psio','qa-a'=>'qa-a','qc-2'=>'qc-2','qc-3'=>'qc-3','qc-5'=>'qc-5','qc-7'=>'qc-7','qc07'=>'qc07','qc12'=>'qc12','qc21'=>'qc21','qc32'=>'qc32','qc60'=>'qc60','qci-'=>'qci-','qwap'=>'qwap','qtek'=>'qtek','r380'=>'r380','r600'=>'r600','raks'=>'raks','rim9'=>'rim9','rove'=>'rove','s55/'=>'s55/','sage'=>'sage','sams'=>'sams','sc01'=>'sc01','sch-'=>'sch-','scp-'=>'scp-','sdk/'=>'sdk/','se47'=>'se47','sec-'=>'sec-','sec0'=>'sec0','sec1'=>'sec1','semc'=>'semc','sgh-'=>'sgh-','shar'=>'shar','sie-'=>'sie-','sk-0'=>'sk-0','sl45'=>'sl45','slid'=>'slid','smb3'=>'smb3','smt5'=>'smt5','sp01'=>'sp01','sph-'=>'sph-','spv '=>'spv ','spv-'=>'spv-','sy01'=>'sy01','samm'=>'samm','sany'=>'sany','sava'=>'sava','scoo'=>'scoo','send'=>'send','siem'=>'siem','smar'=>'smar','smit'=>'smit','soft'=>'soft','sony'=>'sony','t-mo'=>'t-mo','t218'=>'t218','t250'=>'t250','t600'=>'t600','t610'=>'t610','t618'=>'t618','tcl-'=>'tcl-','tdg-'=>'tdg-','telm'=>'telm','tim-'=>'tim-','ts70'=>'ts70','tsm-'=>'tsm-','tsm3'=>'tsm3','tsm5'=>'tsm5','tx-9'=>'tx-9','tagt'=>'tagt','talk'=>'talk','teli'=>'teli','topl'=>'topl','hiba'=>'hiba','up.b'=>'up.b','upg1'=>'upg1','utst'=>'utst','v400'=>'v400','v750'=>'v750','veri'=>'veri','vk-v'=>'vk-v','vk40'=>'vk40','vk50'=>'vk50','vk52'=>'vk52','vk53'=>'vk53','vm40'=>'vm40','vx98'=>'vx98','virg'=>'virg','vite'=>'vite','voda'=>'voda','vulc'=>'vulc','w3c '=>'w3c ','w3c-'=>'w3c-','wapj'=>'wapj','wapp'=>'wapp','wapu'=>'wapu','wapm'=>'wapm','wig '=>'wig ','wapi'=>'wapi','wapr'=>'wapr','wapv'=>'wapv','wapy'=>'wapy','wapa'=>'wapa','waps'=>'waps','wapt'=>'wapt','winc'=>'winc','winw'=>'winw','wonu'=>'wonu','x700'=>'x700','xda2'=>'xda2','xdag'=>'xdag','yas-'=>'yas-','your'=>'your','zte-'=>'zte-','zeto'=>'zeto','acs-'=>'acs-','alav'=>'alav','alca'=>'alca','amoi'=>'amoi','aste'=>'aste','audi'=>'audi','avan'=>'avan','benq'=>'benq','bird'=>'bird','blac'=>'blac','blaz'=>'blaz','brew'=>'brew','brvw'=>'brvw','bumb'=>'bumb','ccwa'=>'ccwa','cell'=>'cell','cldc'=>'cldc','cmd-'=>'cmd-','dang'=>'dang','doco'=>'doco','eml2'=>'eml2','eric'=>'eric','fetc'=>'fetc','hipt'=>'hipt','http'=>'http','ibro'=>'ibro','idea'=>'idea','ikom'=>'ikom','inno'=>'inno','ipaq'=>'ipaq','jbro'=>'jbro','jemu'=>'jemu','java'=>'java','jigs'=>'jigs','kddi'=>'kddi','keji'=>'keji','kyoc'=>'kyoc','kyok'=>'kyok','leno'=>'leno','lg-c'=>'lg-c','lg-d'=>'lg-d','lg-g'=>'lg-g','lge-'=>'lge-','libw'=>'libw','m-cr'=>'m-cr','maui'=>'maui','maxo'=>'maxo','midp'=>'midp','mits'=>'mits','mmef'=>'mmef','mobi'=>'mobi','mot-'=>'mot-','moto'=>'moto','mwbp'=>'mwbp','mywa'=>'mywa','nec-'=>'nec-','newt'=>'newt','nok6'=>'nok6','noki'=>'noki','o2im'=>'o2im','opwv'=>'opwv','palm'=>'palm','pana'=>'pana','pant'=>'pant','pdxg'=>'pdxg','phil'=>'phil','play'=>'play','pluc'=>'pluc','port'=>'port','prox'=>'prox','qtek'=>'qtek','qwap'=>'qwap','rozo'=>'rozo','sage'=>'sage','sama'=>'sama','sams'=>'sams','sany'=>'sany','sch-'=>'sch-','sec-'=>'sec-','send'=>'send','seri'=>'seri','sgh-'=>'sgh-','shar'=>'shar','sie-'=>'sie-','siem'=>'siem','smal'=>'smal','smar'=>'smar','sony'=>'sony','sph-'=>'sph-','symb'=>'symb','t-mo'=>'t-mo','teli'=>'teli','tim-'=>'tim-','tosh'=>'tosh','treo'=>'treo','tsm-'=>'tsm-','upg1'=>'upg1','upsi'=>'upsi','vk-v'=>'vk-v','voda'=>'voda','vx52'=>'vx52','vx53'=>'vx53','vx60'=>'vx60','vx61'=>'vx61','vx70'=>'vx70','vx80'=>'vx80','vx81'=>'vx81','vx83'=>'vx83','vx85'=>'vx85','wap-'=>'wap-','wapa'=>'wapa','wapi'=>'wapi','wapp'=>'wapp','wapr'=>'wapr','webc'=>'webc','whit'=>'whit','winw'=>'winw','wmlb'=>'wmlb','xda-'=>'xda-',))); // check against a list of trimmed user agents to see if we find a match
return true;
break;
// If all checks pass, return false
default;
return false;
break;
}
Raid (talk) 07:50, 11 June 2013 (UTC)
}
Warning for file cache users
[edit]If $wgMFAutodetectMobileView
is set to true
file cache must be disabled by setting $wgUseFileCache to false
(otherwise autodetection won't be reliable due to cached copies being shown). DavisNT (talk) 16:46, 15 June 2013 (UTC)
Uploads related message texts
[edit]Some messages that I've been trying to translate keep bugging me. I believe they need better wording in original. MediaWiki:Mobile-frontend-photo-ownership-bullet-one was lately changed from "photos that you took yourself" to "images that you own". "Owning" is a rather abstract term. Other than images that one owns, one also owns images in one's picture albums with random authorship or images one's been given and for which there is no information whether publishing it under free license is OK. Moreover, message MediaWiki:Mobile-frontend-photo-ownership-bullet-two that follows the last, says "Copyrighted /../ images will be removed". In fact, images published under CC BY-SA 3.0 are also copyrighted. --88.196.241.249 12:53, 17 June 2013 (UTC)
- We're working on a new version of the messages, which will hopefully address some of these issues. To be honest, though, I don't think there's any perfect way to describe the scope and licensing requirements of Commons to someone on a mobile device (or desktop for that matter, but that's a separate issue...), and you kind of have to assume 80% of people will only glance at the keywords and ignore the nuance. "Photos that you took yourself" has two sub-optimal cursory readings, "photos that you took OF yourself" (which we're seeing quite a lot of in mobile web uploads) and "photos that you took from other places yourself." Most people these days don't bat an eyelash at "taking" a photo from Facebook or Twitter and considering it theirs. "Own" at least avoids the former, and I don't think it's much more abstract than "take."
- As for the copyrighted thing, technically Creative Commons licenses are copyleft :) Maryana (WMF) (talk) 18:09, 17 June 2013 (UTC)
- Yeh, probably not random Twitter or Facebook photos. My experience is that people think that they (co-)own images in their family albums or images they have ordered from a photographer. But if they aren't the authors, then usually it's not theirs to decide the copyright matters, whether publishing the work under a free license or not. Which is why the new wording confuses me more than the previous. Maybe "taken by you" instead of "took yourself" would do.
- Copyleft, as much as I understand, is a special case of copyright where some of the author's rights are still preserved. 88.196.241.249 19:38, 17 June 2013 (UTC)
- Yes, "took yourself" is bad: "shot yourself" seems an easy rewording in English; there's no such ambiguity e.g. in Italian (we don't use the generic take/prendere for photos). Nemo 06:51, 18 June 2013 (UTC)
The licensing of the whole Wiki is always CC-BY-SA 3.0
[edit]I have installed the extension on a MW with GFDL license, but when I use my phone to browse the page, I found that the whole site is licensed CC-BY-SA 3.0. How can I change it to GFDL? Haneluya (talk) 03:19, 15 July 2013 (UTC)
- To check, can you please copy and paste all your license-related settings in LocalSettings.php? Nemo 07:23, 15 July 2013 (UTC)
- You should be able tp overwrite the license message key in Special:AllMessages.
- The key in the footer is:'mobile-frontend-footer-license' Jdlrobson (talk) 17:38, 15 July 2013 (UTC)
## For attaching licensing metadata to pages, and displaying an ## appropriate copyright notice / icon. GNU Free Documentation ## License and Creative Commons licenses are supported so far. $wgRightsPage = "Project:著作权协议"; # Set to the title of a wiki page that describes your license/copyright $wgRightsUrl = "http://www.gnu.org/copyleft/fdl.html"; $wgRightsText = "GFDL v.1.3 or later"; $wgRightsIcon = "{$wgStylePath}/common/images/gnu-fdl.png";
- Nemo, I only found these. I don't know if further configurations are required.
- Jdlrobson, that works. Thanks. Haneluya (talk) 07:08, 19 July 2013 (UTC)
- The licensing and terms of use are still hardcoded in the latest development version, would it not make sense to have it pick up the localsettings license, and link terms of use to a local page by default? MarkJurgens (talk) 12:42, 7 August 2013 (UTC)
- Yes, it should follow core's footer behaviour. Worth filing a bug if there isn't one already. Nemo 19:03, 8 August 2013 (UTC)
- The licensing and terms of use are still hardcoded in the latest development version, would it not make sense to have it pick up the localsettings license, and link terms of use to a local page by default? MarkJurgens (talk) 12:42, 7 August 2013 (UTC)
Add Sidebar items to the mobile view menu list
[edit]RESOLVED | |
See Extension talk:MobileFrontend/2017#h-MODIFY_THE_MAIN_MENU-2017-01-04T02:24:00.000Z for an interim solution |
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
- Hi,
- when i click on the menu icon in my mobile view, i only have the following items listed:
- -Home
- -Random
- -Settings
- how can i add my desktop view sidebar items or new links, such as:
- -Main Categories
- -Browse Categories
- -List Contacts
- ? 81.249.35.222 12:24, 19 July 2013 (UTC)
- Currently not possible.
- Most of these pages are not mobile optimised and thus not surfaced.
- There is a lot of work to be done before the mobile skin is a traditional skin with these sorts of capabilities.
- Also the left menu was never intended as a dumping ground for lots of features. We are still exploring a design for an additional user menu/page which would be a better place for these.
- Also see somewhat related https://bugzilla.wikimedia.org/show_bug.cgi?id=30902 98.234.235.96 16:40, 19 July 2013 (UTC)
- Any news about this? Adrelanos (talk) 19:24, 23 June 2015 (UTC)
- Currently not, we have a task for it, you're welcome to help! :) Florianschmidtwelzow (talk) 00:42, 12 July 2015 (UTC)
- any news about it? 89.166.253.3 (talk) 15:20, 12 November 2016 (UTC)
- You can track the progress at https://phabricator.wikimedia.org/T65459 Bmansurov (WMF) (talk) 16:02, 15 December 2016 (UTC)
- see the above subject: MODIFY THE MAIN MENU
- is easy to add items ^_^ Jackqbox (talk) 17:12, 4 January 2017 (UTC)
Set useformat=mobile depending on hostname
[edit]Hi!
Assuming I have a Wiki mywiki.net. The wgMobileUrlTemplate is set to mobile.mywiki.net. Now for every page on the regular wiki the "Mobile view"-link at the bottom leads to the corresponding page on the mobile-Wiki, but these are still displayed the same as the desktop-variant.
Is there a way to automatically render all pages on mobile.mywiki.net as mobile pages regardless whether I look at them from the desktop-machine or a mobile-machine? That would make it easier to update the main page to a form that is usable on mobile devices (and even after that I'd prefer that arrangement as it makes switching to the desktop-variant easier) Bgschaid (talk) 14:53, 23 July 2013 (UTC)
Questy Captcha does not display in Mobile View
[edit]Great extension!
I know it's still experimental but I thought I'd point out, It doesn't display when trying to 'create a new user' on the mobile site.
Any thoughts/hacks? MarkJurgens MarkJurgens (talk) 23:14, 8 August 2013 (UTC)
- Hi Mark maybe you've discovered a bug? Could you make it clearer what you are referring to and how to replicate? Jdlrobson (talk) 18:52, 14 August 2013 (UTC)
h1 tag not converted on mobile view
[edit]hi,
I am using mediawiki 1.20.6 (php 5.3.27)with last stable version for my MW.
on desktop version I have: =1= ==1.1== ==1.2== =2= ==2.1== ==2.2==
On mobile version I have: =1= ==1.1== ==1.2== title 2 inside paragraph 1.2 as text ==2.1== ==2.2==
how can I fix it?
thx Raid (talk) 15:15, 12 August 2013 (UTC)
- ..\extensions\MobileFrontend\includes\MobileFormatter.php
- Look for:
- "<h2 class='section_heading' id='section_{$this->headings}'>{$matches[2]}</h2>";
- Replace with:
- "<h1 class='section_heading' id='section_{$this->headings}'>{$matches[2]}</h1>";
- Look for:
- '%<h2(.*)<span class="mw-headline" [^>]*>(.+)</span>[\s\r\n]*</h2>%sU',
- Replace with:
- '%<h1(.*)<span class="mw-headline" [^>]*>(.+)</span>[\s\r\n]*</h1>%sU',
- With this edits on long articles the compression will be over title h1 e not h2 (default). As I said on h2 it is wrong because the h1 title goes inside h2.
- I hope it will be useful. Raid (talk) 11:55, 13 August 2013 (UTC)
Not sure why its displaying "pageok"
[edit]I have uploaded this extension to my site. when I view the site under my mobile phone it just has the text "pageok". Any idea how to fix this?? 71.195.238.249 08:17, 16 August 2013 (UTC)
- I do not think that is something coming from the MobileFrontend extension and probably not Mediawiki either. Can you please describe your setup (eg specific version of Mediawiki, specific version of MobileFrontend, MobileFrontend-specific settings, your webserver, any caching layer, etc)? Arthur Richards (talk) 17:20, 9 October 2013 (UTC)
mw-collapsible not compatible with Mobilefrontend?
[edit]I am using mediawiki 1.21 and mobilefrontend.
I used mw-collapsible like
{| class="wikitable mw-collapsible mw-collapsed" style="width: 40%;"
But the mobile page (both the mobile page viewed from desktop and mobile page viewed from mobile) wasn't collapsing the table.
It didn't even have the "Collapse" button.
What should I do?
I searched http://www.google.co.kr/?gws_rd=cr#fp=afad099fdd8ea46b&newwindow=1&q=mobile+%22mw-collapsible%22
but I got no answer but got some crude guess that it's related with js query thing? Happily8 (talk) 06:54, 24 August 2013 (UTC)
- same question. any news? Special:Contributions/anon 16:04, 12 August 2014 (UTC)
- I don't know any progress there. Can you open a feature request on bugzilla? Florianschmidtwelzow (talk) 18:59, 18 August 2014 (UTC)
- The JS isn't loaded as it creates a confusing experience when run alongside mobile section toggling. I think there is a bug somewhere about this but I can't find it. Jdlrobson (talk) 19:03, 18 August 2014 (UTC)
- Jdlrobson: Did you mean this one? bug 29504 I found no other :) Or this one? bug 53136. Florianschmidtwelzow (talk) 19:23, 18 August 2014 (UTC)
- The JS isn't loaded as it creates a confusing experience when run alongside mobile section toggling. I think there is a bug somewhere about this but I can't find it. Jdlrobson (talk) 19:03, 18 August 2014 (UTC)
- I don't know any progress there. Can you open a feature request on bugzilla? Florianschmidtwelzow (talk) 18:59, 18 August 2014 (UTC)
useformat=mobile works but mobile domain doesn't
[edit]http://espiral.org/wk/Happiness_for_everyone?useformat=mobile works but if you try to access through the mobile link view you'll get an error:
http://m.espiral.org/wk/Happiness_for_everyone
This is the version tagged "1.21". I have tried with the branch "production" but won't work either.
In LocalSettings:
$wgMobileUrlTemplate = 'm.%h0.%h1'
QuimGil (talk) 06:36, 29 August 2013 (UTC)
- The mobile domain does not exist;) Max Semenik (talk) 15:40, 29 August 2013 (UTC)
- Ok, sounds silly but I thought the extension would take care of everything. Now I see that there is some homework I need to do with my host - which is fine. I will add the comment so other hobbyists, follow-step-by-step dudes like me know what to do. Thanks! QuimGil (talk) 15:59, 29 August 2013 (UTC)
Can we force sections to collapse if they don't automagically do so?
[edit]Is there a class (or something) that can be used to force article sections to become collapsible by the MobileFrontend extension? There are a couple of pages on our wiki where the sections aren't collapsing, and we would like them to. RainbowJester (talk) 03:33, 1 September 2013 (UTC)
- Can you share the URLs? Qgil (talk) 17:06, 3 September 2013 (UTC)
- Currently toggled sections are only triggered if there are at least 2 h2's in a page. Theoretically we could make it possible to enable all the time by adding a configuration variable but this would need to be implemented. I raised a bug for you so you can track this - https://bugzilla.wikimedia.org/show_bug.cgi?id=53802 Jdlrobson (talk) 16:27, 5 September 2013 (UTC)
Manually switch back to mobile view on mobile device
[edit]I'm running MW 1.21.2 and it works all fine except ...
If on a mobile device I have manually switched to the desktop view, how can I now switch back to mobile view by click on a link?
Regards Horst 217.91.154.83 07:27, 13 September 2013 (UTC)
- Click on the "Mobile view" link at the bottom of the screen. brion (talk) 14:13, 13 September 2013 (UTC)
- Same issue here. I click on "Mobile view" and it reloads as a desktop view Camponez (talk) 18:58, 13 October 2013 (UTC)
- URLs, please? Works for me... Qgil (talk) 16:28, 24 October 2013 (UTC)
- there is the link: http://cruzeiropedia.org
- If I start the mobile browser (firefox or chrome) in private mode I can see the mobile version otherwise no. Camponez (talk) 19:37, 25 October 2013 (UTC)
- What is your MobileFrontend configuration in LocalSettings.php?
- Try whether it works by simply adding this:
- require_once("$IP/extensions/MobileFrontend/MobileFrontend.php");
- $wgMFAutodetectMobileView = true;
Qgil (talk) 18:32, 26 October 2013 (UTC)
- Great! It works now! I had:
$wgMobileUrlTemplate = 'mobile.cruzeiropedia.org';
also. - Thanks! Camponez (talk) 16:31, 28 October 2013 (UTC)
- Great! It works now! I had:
- URLs, please? Works for me... Qgil (talk) 16:28, 24 October 2013 (UTC)
- Same issue here. I click on "Mobile view" and it reloads as a desktop view Camponez (talk) 18:58, 13 October 2013 (UTC)
Html Formatter Not Found
[edit]- With the simple configuration (Mediawiki v1.21) I get a 500 error for all pages. The error is:
PHP Fatal error: Class 'HtmlFormatter' not found in /var/www/internal/wiki/extensions/MobileFrontend/includes/formatters/MobileFormatter.php on line 6...</
Is this something that can be fixed with configurations, or a compatibility issue Davebridges (talk) 14:46, 9 October 2013 (UTC)
- You will need to run the latest version of MediaWiki for MobileFrontend to work.
- We're in the process of making this compatibility issue more obvious. Jdlrobson (talk) 17:54, 9 October 2013 (UTC)
- I have the legacy 1.26 and still doesn't works. 181.228.189.51 (talk) 05:21, 26 July 2016 (UTC)
- I believe that the problem may be that mbstring it is still without a fallback (otherwise, why would it be calling to MobileFormatter.php??) 181.228.189.51 (talk) 05:46, 26 July 2016 (UTC)
How can I hide certain parts of the page only from mobile view of Mediawiki?
[edit]- I am using MobileFrontEnd to generate the mobile view.
- How can I hide certain elements from mobile view of Mediawiki?
- Things like
- <noinclude>content</noinclude>
- will completely hide the content both from mobile view and desktop view,
- but is there any code that will hide the content only from mobile view? Happily8 (talk) 12:10, 10 October 2013 (UTC)
- You can use nomobile class, e.g.
<span class="nomobile">hide this</span>
. - We also used to use noprint, but it was removed. Nemo 16:34, 10 October 2013 (UTC)
- Thank you! Your answer helps me a lot. However it seems that there are two things.
- <span class="nomobile"> and <span class='nomobile'>
- Is there any difference between the two?
- Thank you again! Happily8 (talk) 03:48, 12 October 2013 (UTC)
- Two things? I only see one, nomobile. Nemo 05:42, 12 October 2013 (UTC)
- Oh I am sorry, I forgot to put nowiki tag when I put codes in the question. I fixed the question. Thank you! Happily8 (talk) 13:03, 13 October 2013 (UTC)
- It's the same thing. Nemo 19:59, 13 October 2013 (UTC)
- Thank you! I could check that the tag can hide texts from mobile view. However, it couldn't hide the whole table. I tried
- <span class="nomobile"> {| class="wikitable mw-collapsible mw-collapsed" style="width: 50%;" |- ! title |- |dfsdf |- |}</span>
- but it didn't hide the table from mobile. So instead I tried this
- {| class="wikitable mw-collapsible mw-collapsed" |- !<span class="nomobile">blahblah</span> |- |<span class="nomobile">kk</span> |}
- It worked. But isn't there any way to hide the whole table more simply?
- Actually I decided to hide it because the table wasn't collapsed in the mobile. So if the question at https://www.mediawiki.org/wiki/Extension_talk:MobileFrontend#mw-collapsible_not_compatible_with_Mobilefrontend.3F_32385 is resolved, then I might not need <span class="nomobile"> in the first place :) Happily8 (talk) 12:20, 19 October 2013 (UTC)
- You can't put a table inside a span; use
<div class="nomobile">...</div>
instead. — Edokter (talk) — 12:12, 20 October 2013 (UTC)
- You can't put a table inside a span; use
- It's the same thing. Nemo 19:59, 13 October 2013 (UTC)
- Oh I am sorry, I forgot to put nowiki tag when I put codes in the question. I fixed the question. Thank you! Happily8 (talk) 13:03, 13 October 2013 (UTC)
- Two things? I only see one, nomobile. Nemo 05:42, 12 October 2013 (UTC)
- Weird question, but is there a way to make parts of the main page only show up to Mobile view with a similar div class statement? Blinkingline (talk) 18:46, 8 January 2020 (UTC)
- class="mobileonly" 94.221.183.87 (talk) 20:46, 31 May 2020 (UTC)
- You can use nomobile class, e.g.
- for show up on mobile only: mobileonly.
- just on desktop view: nomobile 2001:1388:19:BB15:8995:D67F:7754:C714 (talk) 15:25, 22 November 2021 (UTC)
- Hi guys, I am trying to show an image on my page only on desktop, but hide it on mobile. I can't get it to work. I tried:
- <span class="nomobile">[[File:MB.jpg|alt=Michael Beijer|thumb|Michael Beijer]]</span> and <div class="nomobile">[[File:MB.jpg|alt=Michael Beijer|thumb|Michael Beijer]]</div>
- M.J.W.B. (talk) 21:50, 6 February 2024 (UTC)
default status of Sections as uncollapsed
[edit]When there's something like ==Section== then in mobile view the default appearance is that they appear as collapsed. Only when the user clicks the arrow-like button that looks like "V", the user can see the content of the section.
But I want the default to be "uncollapsed", so that users can see the section content without clicking "V".
Is this possible by slightly changing the code of MobileFrontend codes or the library? Happily8 (talk) 03:46, 12 October 2013 (UTC)
- Related discussion about Wikimedia projects: [1]. I don't know if it's hardcoded currently, sorry. Nemo 14:27, 12 October 2013 (UTC)
- I got back to this issue again. I decided finally that my mediawiki really needs sections not collapsed by default. What code changes should I make to do this? Happily8 (talk) 05:45, 18 June 2014 (UTC)
- I searched "expandablesections" using 'Find in files' of Notepad++.
- Then I found
MobileFrontend\includes\api\ApiParseExtender.php
Line 82: $mf->enableExpandableSections( !$params['mainpage'] );
MobileFrontend\includes\formatters\MobileFormatter.php
Line 23: protected $expandableSections = false;
Line 64: $formatter->enableExpandableSections( !$isMainPage && !$isSpecialPage );
Line 89: public function enableExpandableSections( $flag = true ) {
Line 90: $this->expandableSections = $flag;
MobileFrontend\includes\formatters\MobileFormatterHTML.php
Line 24: if ( $this->expandableSections ) {
MobileFrontend\tests\MobileFormatterTest.php
Line 24: $mf->enableExpandableSections();
- I tried changing
$expandableSections = false;
- to
$expandableSections = true;
- but it didn't make the sections uncollapsed.
- Does anyone have an idea of likely-to-succeed solution? Happily8 (talk) 05:45, 18 June 2014 (UTC)
- Hi! :) The var you changed is the right, but at the false place :) You changed the default value of $expandableSections, which is normally overwritten in Line 77 https://github.com/wikimedia/mediawiki-extensions-MobileFrontend/blob/4e9f5a096d0278af40a00a90bcdd1c3fc42fbe1f/includes/MobileFormatter.php#L77
- So, better is, if you want to enable $expandableSections on every page, to change line 77 to $formatter->enableExpandableSections( false );
- But be aware: That isn't a usecase, that the mobile team developed for. So, it can have some errors or symptoms ;) Florianschmidtwelzow (talk) 11:30, 18 June 2014 (UTC)
Desktop redirect link like $wgMobileUrlTemplate
[edit]Hi could someone add support for a desktop link like there is a $wgMobileUrlTemplate which when click on the mobile link it can be redirected to a mobile page you want but there is no desktop changing link so please add support for one 86.171.32.116 20:09, 13 October 2013 (UTC)
Can i hide some content from the desktop-view and show it ONLY in mobile View?
[edit]Is it possible to hide content on desktop-view, but show it on mobile view? 217.5.231.249 11:46, 18 October 2013 (UTC)
- MobileFrontend ignores MediaWiki:Common.css so you can put something like <div id="mf-banner">content</div> on your homepage and put #mf-banner { display: none; } in your MediaWiki:Common.css. Egel (talk) 12:16, 1 December 2013 (UTC)
- Ah, that explains why mobile view is not styled like I expect it ;-)
- Is there a way to include MediaWiki:Common.css (or another MediaWiki:whatever.css) in mobile view? Cboltz (talk) 13:27, 1 December 2013 (UTC)
- MediaWiki:Mobile.css, but that is not working on REL1_21. But works on REL1_22. Egel (talk) 14:57, 1 December 2013 (UTC)
Where can i see the MobileFrontend Logo?
[edit]Where can i see the mobilefrontend Logo? I set it up in localsettings, stored the png in the written path, but if i test with "xxx?useformat=mobile" i cant see any logo? 217.5.231.249 11:49, 18 October 2013 (UTC)
Html tag is been scaped?
[edit]Hello,
Looks like the link in the footer is been scaped, any ideas? ( Look at the bottom: http://www.cruzeiropedia.org/Página_principal?useformat=mobile )
This is output:
Artigo realizado por <a href="http://www.cruzeiropedia.org/index.php?title=P%C3%A1gina_principal&useformat=mobile&action=history">colaboradores</a> como você
tks Camponez (talk) 16:37, 28 October 2013 (UTC)
- This looks like an old version of MobileFrontend... The history link appears in the page itself not the footer (See en.m.wikipedia.org for example). Have you tried upgrading? Jdlrobson (talk) 17:50, 28 October 2013 (UTC)
- I am on a git branch REL1_21 Camponez (talk) 16:45, 4 November 2013 (UTC)
ResourceLoaderModule.php on line 469 Warning: file_exists(): open_basedir restriction in effect.
[edit]- Okay, here I am
- I installed succesfully MobileFrontend, I enabled the autodetection and all works except...
- In the mobile version of the site I get a long list of "warnings" by PHP:
Warning: file_exists(): open_basedir restriction in effect. File(/home/a9894545/public_html/wiki/resources/jquery.ui/themes/vector/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png) is not within the allowed path(s): (/home/u669937943:/usr/lib/php:/tmp) in /home/u669937943/public_html/wiki/includes/resourceloader/ResourceLoaderModule.php on line 469 Warning: file_exists(): open_basedir restriction in effect. File(/home/a9894545/public_html/wiki/resources/jquery.ui/themes/vector/images/ui-bg_highlight-soft_100_ffffff_1x100.png) is not within the allowed path(s): (/home/u669937943:/usr/lib/php:/tmp) in /home/u669937943/public_html/wiki/includes/resourceloader/ResourceLoaderModule.php on line 469 Warning: file_exists(): open_basedir restriction in effect. File(/home/a9894545/public_html/wiki/resources/jquery.ui/themes/vector/images/ui-bg_highlight-hard_80_d7ebf9_1x100.png) is not within the allowed path(s): (/home/u669937943:/usr/lib/php:/tmp) in /home/u669937943/public_html/wiki/includes/resourceloader/ResourceLoaderModule.php on line 469 Warning: file_exists(): open_basedir restriction in effect.
- ...and so on
- After this list the mobile template seems to work well and I can't see other problems...
- Any idea?
- Thank you! 79.13.204.135 19:09, 11 November 2013 (UTC)
- It appears you're trying to access files from another user account on your server. Notice how the user home directories don't match in your errors:
File(/home/a9894545/public_html/wiki/../png) is not within the allowed path(s): (/home/u669937943:/usr/lib/php:/tmp) in /home/u669937943/public_html/wiki/../ResourceLoaderModule.php on line 469
- This is an error raised by your server environment, not MobileFrontend. Presumably you moved your wiki around on the server, and the new location is still trying to access the old location, except that the old location is owned by a different user account which the new MediaWiki is not allowed to access.
- See also Manual:Moving a wiki. You might have to run update.php to clear additional caches that might refer to the old directory still. Krinkle (talk) 19:16, 11 November 2013 (UTC)
- I changed server (000webhost -> hostinger), I didn't noticed that in the error...
- Thank you, this helped me a lot understanding the error, it was so easy :)
- If this can help someone else I searched in the MySQL DB for my old path (a9894545) and I found some records containing that in the table module_deps, I simpy purged the table deleting all records from phpmyadmin.
- Thank you very much Krinkle :) 79.13.204.135 21:25, 11 November 2013 (UTC)
- I see the same error in my logs. But I can't find where the old paths are stored! Please help. PrometheusAla (talk) 18:56, 25 April 2016 (UTC)
LoginLink on MediaWiki 1.21 + MobileFrontend 121
[edit]If i switch to mobile frontend and click on the sysmbol right of the search input field a login button appears on the buttom of the page. But the link is incorrect.
There is a ? after :UserLogin, and it must be a &.
Is this a bug or is it due to missconfig !? 217.92.233.108 09:51, 21 November 2013 (UTC)
- It does look like a bug - but this is an old version of MediaWiki MobileFrontend so it is possible this has been fixed since. Try updating and see if the problem goes away :) Jdlrobson (talk) 21:59, 21 November 2013 (UTC)
- I downloaded not the latest Version cause it says only running on mediawiki 1.22.
- So i downloaded branch 1.21 from
- https://git.wikimedia.org/tree/mediawiki%2Fextensions%2FMobileFrontend.git/refs%2Fheads%2FREL1_21
- Am i wrong ?
- Also a problem seems to be that no collapsed section appear allthough i have lots of h2-sections in the articles. Is there a switch !?
- many thnx for your answers. 217.92.233.108 08:09, 22 November 2013 (UTC)
ability to edit talk pages
[edit]In mobile version I can only access talk page by manually typing in the new uri. Gryllida 11:18, 26 November 2013 (UTC)
using talk pages
[edit]This box, where I type this message, does not fit a mobile screen width. Gryllida 11:20, 26 November 2013 (UTC)
accessing preferences
[edit]If my understanding is correct this software powers mobile view of Wikimedia projects. In my experience at Wikipedia users are only given access to very basic preferences even after logging in. I for example only see Beta and Show images- two boolean settings. Gryllida 11:23, 26 November 2013 (UTC)
reading talk pages
[edit]When I read past discussions on this page I do not see the indentation. But it is essential to follow the thread... Gryllida 11:27, 26 November 2013 (UTC)
Conflict with Headertabs extension
[edit]Is there a way to make headertabs take effect only in the desktop view?
The articles where I use that extension are displaying incorrectly when I go to mobile mode. It only shows the content inside the first =h1= and all the rest is gone.
I tried the following without any success:
1.
<headertabs />
2. <headertabs class=nomobile>
Any ideas? 177.16.144.214 16:45, 26 November 2013 (UTC)
search is no longer working after updating
[edit]Ive updated to the latest branch of MediaWiki (1.22.0) and updated to the latest MobileFrontend. Now, i cannot search on MobileFrontend. I just get redirected to my mainpage.
Mediawiki is run on: apache: Apache/2.2.22 (Ubuntu) PHP: PHP Version 5.3.10-1ubuntu3.8 MySQL: v. 5.5.34.
Any ideas? Karlan85 (talk) 13:12, 9 December 2013 (UTC)
- same Problem here! Search redirects to mainpage. 91.89.79.112 17:50, 14 December 2013 (UTC)
Fitting Page to Width of Browser?
[edit]I just installed the MobileFrontend to my mediawiki running v.1.21 (masscrimlawwiki.com). But when it displays on mobile browsers it does not fit to the width of the browser and makes the page at least three times wider and causes the user to have to scroll over to the right to see the content.
Is anyone else having this problem? How do I fix this? Waldstein (talk) 20:24, 15 December 2013 (UTC)
- I figured this out....
- in the "common" javascripts folder go into "mf-application,js" and change the view port line to:
viewportmeta.content = 'width=device-width, initial-scale=1.0, maximum-scale=1.0';
- and that should do it Waldstein (talk) 15:43, 17 December 2013 (UTC)
- What mobile browser are you seeing this problem on? You shouldn't need to edit application.js under any circumstances...
- It sounds like you are using a very old version of MobileFrontend since mf-application.js is now renamed to application.js Jon (WMF) (talk) 17:53, 17 December 2013 (UTC)
- I'm using 1.21 and the extension for 1.21 Waldstein (talk) 21:58, 17 December 2013 (UTC)
How do you Customize the Menu?
[edit]How do you Customize the mobile menu? so that it links to the internal pages you want? Waldstein (talk) 20:33, 15 December 2013 (UTC)
- Also wondering about this. Done various googling for "MobileFrontEnd sidebar" without success. Getting ready to dive in and hack directly. 82.181.31.159 11:43, 19 December 2013 (UTC)
- I tried to do just that. my knowledge of JavaScript is limited.
- I can change the name that appears (just search for " 'Radom' " or whatever other title you want in the main PHP file and replace it. Changing the icon that appears next to it is also simple, go into the LESS CSS file called navigation and change the URL to the png you want, or just replace the old file.
- But I cant figure out how to add Items, remove Item, or change where the items in the menu link to. Appearently you need to edit the PHP and Javascript...but this is as of now beyond me. Waldstein (talk) 22:10, 19 December 2013 (UTC)
- At the moment your best bet is to use MediaWiki:Mobile.css to hide the elements.
#page-actions { display: none; }
- It would be useful to make this configurable via LocalSettings.php - patches welcomed. 2620:62:C000:149:F93C:798E:26E1:B270 16:44, 2 April 2014 (UTC)
HTTPs in Mobile View Link
[edit]Hi!
I found a problem, on my setup www.laub-home.de, the mobileview link ist with https. I never configured something with https, because my Server doesn't work with https.
when I change in includes/MobileContext.php
if ( $forceHttps ) { $parsedUrl['scheme'] = 'https';
to
$parsedUrl['scheme'] = 'http';
The Link is fine. I think the Problem is the variable $forceHttps. It seems that this one is set to true. But I need a false.
Could someone help me with that`?
Greetings Andreas 212.21.161.88 14:49, 16 December 2013 (UTC)
- I'm having the same issue. Any help out there? 101.166.163.189 11:49, 19 December 2013 (UTC)
- Same problem here, too. Would appreciate any advice! 119.15.78.139 03:08, 27 December 2013 (UTC)
- Just change in MobileContext.php:
- $parsedUrl['scheme'] = 'https'; to
- $parsedUrl['scheme'] = 'http';
- ...tested & worked (MediaWiki 1.22.0) Tickihgk (talk) 23:20, 15 January 2014 (UTC)
- $forceHttps have to be set to: false Tickihgk (talk) 23:26, 15 January 2014 (UTC)
- Perfect! Thanks. :) 119.15.78.50 09:55, 16 January 2014 (UTC)
- Is this bug 55982? If so, perhaps the information should be included on the extension's page. Peculiar Investor (talk) 14:09, 12 February 2014 (UTC)
- I think it's not a bug.
- Just add this line in "LocalSettings.php"
$wgMFForceSecureLogin = false;
- before
- Needsoft (talk) 07:16, 25 March 2014 (UTC)
require_once( "$IP/extensions/MobileFrontend/MobileFrontend.php" );
- Don't work for me. Unikum (talk) 20:01, 26 March 2014 (UTC)
- After not before. Max Semenik (talk) 19:03, 8 April 2014 (UTC)
- Is this bug 55982? If so, perhaps the information should be included on the extension's page. Peculiar Investor (talk) 14:09, 12 February 2014 (UTC)
- I set $forceHttps = false in LocalSettings.php -> doesn't work here.
- I scanned the code (REL1_22) and found out that this var is never set to true... which is strange
- Karsten Koemski (talk) 11:43, 28 March 2014 (UTC)
- Perfect! Thanks. :) 119.15.78.50 09:55, 16 January 2014 (UTC)
- Just change in MobileContext.php:
- Same problem here, too. Would appreciate any advice! 119.15.78.139 03:08, 27 December 2013 (UTC)
- Same here in the REL1_22 branch. It should be fixed in upstream. Unikum (talk) 03:00, 13 March 2014 (UTC)
Editing Default Footer?
[edit]where is the code to edit what appears in the footer? Anyone find it? I want to remove the default links and text that appear there. Waldstein (talk) 17:31, 17 December 2013 (UTC)
- Append any page url with &uselang=qqx, then you can see every message name. Then go to MediaWiki:[messagename] to edit the text. — Edokter (talk) — 20:42, 17 December 2013 (UTC)
- I meant removing the links themselves (taking away the clutter I don't need) or changing where they link to (some of the links are redundant or useless for my site). I know how to edit the text of a page.
- I found out how to edit the first two lines which are located in "MobileFrontend.i18n" which by default contain:
'mobile-frontend-footer-contributors-text' => 'Page by [$1 contributors] like you',
- and
'mobile-frontend-footer-license-text' => 'Content available under CC BY-SA 3.0',
'mobile-frontend-terms-use-text' => 'Terms of Use',
- But I still can't figure out how to change the "Privacy" link which has the text "mobile-frontend-privacy-link-text" and links to the page "Privacy_policy". I get the link to disappear or change the name that appears, but I can't get it to link to any other page. Does anyone know how to do this? Waldstein (talk) 22:17, 17 December 2013 (UTC)
- Not sure if there is a configuration setting for this, but you can modify the code in the getFooterLinks function in includes/skins/MobileTemplate.php to alter or remove the footer links. 72.78.235.227 04:35, 5 January 2014 (UTC)
Cannot start a new article in mobile view
[edit]Hi, I need help in adding a new article to my wiki in mobile view. How does this work? Whenever I open a page for a new article it says "click here to add a new article", but this sentence is not a link. Where can I cahnge this behavior? Thanks, Tuluqaruk Tuluqaruk (talk) 08:09, 18 December 2013 (UTC)
IdeaLab
[edit]There is an «Idea» available in the IdeaLab here, which lists MobileFrontend as one of its use-cases and tools it could be integrated into. Please take your time to look at the idea and leave feedback. Thank you. Gryllida 13:38, 28 December 2013 (UTC)
wgMFAutodetectMobileView and FileCache
[edit]Is there a way to work around the FileCache issue with wgMFAutodetectMobileView?
MediaWiki is really slow without cache and all other cache solutions require additional software to be installed on the server. Wassersturm (talk) 21:10, 29 December 2013 (UTC)
- Not only are there $wgUseFileCache issues, also maybe the HTTP response headers sent by Mediawiki need to be beefed up, lest someone retrieve some ISP's cached copy somewhere. Or maybe even an &sid=e8d89sd089 URL suffix needs to be added? (All guesses of mine.) Jidanni (talk) 00:41, 2 April 2014 (UTC)