Extension talk:MobileFrontend

About this board

If you have a feature request just request it here you'll get a much quicker reply :-) We are also around in #wikimedia-mobile if you want a quicker answer!

If you are trying to replicate behaviour you see on Wikimedia sites, please be sure to read through the configuration options before asking a question here.

Special:MobileDiff is not shown in color anymore

1
Brawl345 (talkcontribs)

I upgraded my MediaWiki from 1.31 to 1.35 and updated MobileFrontend together with the Minerva skin but Special:MobileDiff doesn't show any color. When I compare it to another wiki on 1.31, the whole HTML structure is different. I'm missing all "mw-diff-inline-added" classes for example and so the diffs don't get styled. Does anyone have any idea?

Reply to "Special:MobileDiff is not shown in color anymore"

Extension not works as expected

1
110.137.102.198 (talkcontribs)

how to use these extension properly? just show desktop version on desktop and mobile version on mobile devices


show a mobile version while on mobile and show a desktop version on desktop?

$wgVectorResponsive = true; - this not looks clean and good

$wgVectorResponsive = false; - this looks responsive version of my vector themes but still not looks good


$wgVectorDefaultSkinVersion = '1'; this make desktop view as default on mobile while 2 is make mobile as default view on desktop?

am i missing something ?

Reply to "Extension not works as expected"

Possible to have a default uncollapsed header (with the rest being collapsed)

1
Kiwibasket (talkcontribs)

Hello! My wiki has a navbox on the bottom of the page, which ideally should be displayed on the bottom of the page at all times. However, due to the structure of Mediawiki, what ends up happening is that it ends up being part of the last section and then collapsing under that section.

Is it possible to keep one section uncollapsed by default, while having the rest be collapsed? If not, is it possible to make a part of the page "sectionless" (like how the lead section isn't under a section)? Thanks in advance!

Reply to "Possible to have a default uncollapsed header (with the rest being collapsed)"

Is there a way to default mobile users to desktop?

1
OncMD (talkcontribs)

For our site, we feel that the desktop version of the site still works better for mobile users, so we'd like to default them to it. However, rather than disabling the mobilefrontend entirely, I'd like to still have it available as an option (link at the bottom of the page saying "mobile view") for them to select if they'd like.


Is there a way to force all visitors to default to the desktop view, but still have the option of using the mobile version? Thank you!

Reply to "Is there a way to default mobile users to desktop?"
Iantresman (talkcontribs)

$wgMobileFrontendLogo specifies only a small icon (35×22px). I'd like to show a large logo (or image) near the top of my mobile home page only. Is there a workaround? Can the image be responsive?

Jdlrobson (talkcontribs)

Currently this is not configurable. Open to ideas and to hear more about your use case and how that could be supported.

Iantresman (talkcontribs)

The three image show:

  1. How I'd like to display a header image as my logo for my mobile view
  2. My workaround, currently showing an image at the top of my home page content, with mf- class suffix (and hidden it from my desktop view with some css)
  3. How the page looks without an image on my mobile view (Android, 720x480)

I think a configuration setting using a variable in LocalSettings.php, eg.

  • $wgMFheaderImageAllPages = filename
  • $wgMFheaderImageHomePage = filename (overrides $wgMFheaderImageAllPages)

By default, I would envisage width=100%, and then users can use MediaWiki:Common.css to modify its position, size and whether it is fixed.

173.73.158.163 (talkcontribs)

Has anyone come up with a solution to add a logo header on mobilefrontend?

111.220.142.238 (talkcontribs)

Same question here.

Jdlrobson (talkcontribs)
MarkJurgens (talkcontribs)

I'd like to add a logo using $wgMobileFrontendLogo

but this path (noted in the docs) doesn't exist. /MobileFrontend/stylesheets/images/mw.png

Is there a new path? Where do I drop my logo.png file?

I only have a vague understanding of how $wgExtensionAssetsPath might be used to fix this.

Thanks!

Florianschmidtwelzow (talkcontribs)

Hello! For the $wgExtensionAssetsPath variable you can see the manual page: Manual:$wgExtensionAssetsPath It's "simply" the extension folder :) The standard value of $wgMobileFrontendLogo is false and with false no image will be used (i have changed that in the table). So, if you want to use an image, copy the 35 × 22 px image to an known location, e.g. images/ in root of your mediawiki installation and set following path: "{$wgScriptPath}/images/image_for_mf.png". This is all :)

67.71.44.23 (talkcontribs)

Sorry Florian, I don't understand. You need to say it more simply step by step.

I did the following 1. Made an image - mw.png 2. Uploaded it to the /extensions directory 3. Then set this in my local settings: $wgMobileFrontendLogo = "{$wgScriptPath}/mw.png";

And nothing changed.

Update: Ah ha!

$wgMobileFrontendLogo = "{$wgScriptPath}/mw.png"; And then drop the image in the ROOT of your mediawiki installation (same spot as your local settings)

Just a note: Simple examples with the entire line of code are really helpful for the some (like me) who are in a little over their heads. ;)

Florianschmidtwelzow (talkcontribs)

Just to clarify, what you have tried :)

The First try ($wgMobileFrontendLogo = "{$wgScriptPath}/mw.png";) will try to load the image from your wiki's script path (there, where the inedx.php is, probably the wiki root). That won't work, because you uploaded the image to extensions/ not into the wiki root :)
-> Solution for this way: Change in LocalSettings.php to: $wgMobileFrontendLogo = "{$wgScriptPath}extensions/mw.png";

The second ($wgMobileFrontendLogo = "/images/mw.png";) tries to load the image from the absolute server path (important is: absolute path). So, if your wiki installation is at /var/www/wiki/ the server tries to load from /images which is an directory at the same position as /var. This is impossible, too, because you uploaded the image not to this absolute dir.
-> Solution for this: Change the value to the solution of first one, or (if you want to upload the image to images/ of your wiki) then do:

  1. Move mw.png from extensions/mw.png to images/mw.png
  2. Change in LocalSettings.php: $wgMobileFrontendLogo = "{$wgScriptPath}images/mw.png";

The third ($wgMobileFrontendLogo = "$IP/extensions/mw.png";) is the most false way :) $IP is the absolute path to your wiki installation, e.g. /var/www/wiki/. The Browser will try to include the image using an relative path which results in an construct like: http://example.com/wiki/var/www/wiki/extensions/mw.img. This can't work :)
-> Solution: Use the solution of the first one ;) $IP is, simply said, only for installation of extensions or skins.

Hope that helps you!

MarkJurgens (talkcontribs)

Thanks Florian, I updated the above comment minutes before you replied. :)

I figured it out using option one.

Now, any way to make that image look good on a retina (iphone) display? It sure looks fuzzy.

173.73.158.163 (talkcontribs)
111.220.142.238 (talkcontribs)

I have done the same and no effect either.

Reply to "Customize: Mobile Logo"

How can I add something between headings tags?

1
Xsteeplol (talkcontribs)

Hi, I would like to know how it is possible to insert something (text, image or even script) between the "sections" of the headings tags.

From this image it is easier to understand what I mean.

https://ibb.co/tKH2Kkr


Please, I've been trying for hours but can't find a solution.

[Suggestion] Using collapsible sections outside of mobile

1
Lens0021 (talkcontribs)

MobileFrontend provides a feature that makes sections collapsible. I think it is also useful in the desktop as well as mobile, especially for the very long references section.

But I don't think MobileFrontend is responsible for the desktop. It would be nice if collapsible sections are splited out from MobileFrontend into a standalone extension.

Reply to "[Suggestion] Using collapsible sections outside of mobile"
Polymath uk (talkcontribs)

Mobilefrontend does not retrieve items from the filecache, nor does it trigger the generation of a cached version of an article on first viewing. Opening articles on the desktop skin does this. I realise that there is a section on using Varnish, but for those of us that like to keep things simple, is there a way (i.e. a line to add to LocalSettings.php) that would trigger the generation of cached copies of articles for mobile devices? I don't much care if there has to be two cached files, one for desktop and one for mobiles, or one cached file with both data in.

Thanks for any pointers.

Reply to "Cache"

Browser detection missing from installation guide

2
TrustworthyPerson (talkcontribs)

FYI: Installing this extension per the instructions doesn't do anything. The user will not see any difference in their website. One needs to also add `$wgMFAutodetectMobileView = true;` to LocalSettings.php or do some fancy additional configuration. Neither are mentioned here, and almost certainly should be. I would add it but... I have no clue how. I tried but there's some translate format I don't understand.

Dinoguy1000 (talkcontribs)

You can make the additions without worrying about the translation formatting (that's the recommended method for making edits here, as I understand), and someone who knows how to handle the formatting will follow along and add it for you.

Reply to "Browser detection missing from installation guide"
Return to "MobileFrontend" page.