DAT Stuff

Random thoughts and observations from DAT

Archive for the tag “MediaWiki”

Mobile Wiki Skin

The next step in reviving my wiki was to make it accesible on my iPhone.  A quick trip through Google, and I found an answer on Stack Overflow. I installed the extension and the skin, and it worked – for the most part.  It did format the content nicely, but I saw the following error at the top of the page.


I haven’t done much with MediaWiki skins, but was hoping it wouldn’t be too hard to fix. So I searched my MediaWiki skins directory for the problematic function, and the following lines stood out:

I changed WPtouch.php to make it consistent with Vector.php, and the error went away. Following is a diff of the before (top) & after:

I also changed the Display_Actions flag, to enable mobile edits (among other things).  It worked, but the Portrait mode needs a little tweaking:

Portrait: Portrait

Landscape: Landscape

It’s not pretty, but it seems to work fine in landscape mode, so I’ll leave it alone for now.  If you’re on a mobile device, you can see it here: datguy.net/wiki

EDIT: I thought that there might be a newer version of the skin.  The Stack Overflow answer links to a 2010 page, but the mediawiki gallery links to a 2012 update.  I examined the download links and they seem to be the same.

Also, after posting my solution I got a reply from someone that had the same problem, and his solution to the “Actions” problem in portrait mode was to change the “Personal tools” text.  I changed mine to “My tools” (in ./languages/messages/MessagesEn.php), and that was enough to prevent Actions from wrapping onto the second line.


Post Navigation