Topic on Extension talk:MobileFrontend

Customize: Mobile Logo

7
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"