Difference between revisions of "Mobile"

From Entopedia
Jump to: navigation, search
(Created page with "== WPtouch == cd /usr/home/wiki/skins wget --no-check-certificate https://extdist.wmflabs.org/dist/skins/WPtouch-REL1_27-2091e4b.tar.gz * https://www.mediawiki.org/wiki/Sk...")
 
(WPtouch)
Line 7: Line 7:
  
 
In LocalSettings.php
 
In LocalSettings.php
  wfLoadSkin( 'WPtouch' );
+
  wfLoadSkin( 'wptouch' );
 +
 
 +
Change from:
 +
$wgDefaultSkin = "vector";
 +
to:
 +
$wgDefaultSkin = "wptouch";
 +
 
 +
Or set default based on user agent, e.g.:
 +
 
 +
<pre>if (preg_match("/mobile|webos|opera mini/i",
 +
$_SERVER['HTTP_USER_AGENT'])){
 +
 
 +
$wgDefaultSkin = "wptouch";
 +
}
 +
else {
 +
$wgDefaultSkin = "vector";
 +
}
 +
</pre>

Revision as of 19:12, 18 August 2016

WPtouch

cd /usr/home/wiki/skins
wget --no-check-certificate https://extdist.wmflabs.org/dist/skins/WPtouch-REL1_27-2091e4b.tar.gz

In LocalSettings.php

wfLoadSkin( 'wptouch' );

Change from:

$wgDefaultSkin = "vector";

to:

$wgDefaultSkin = "wptouch";

Or set default based on user agent, e.g.:

if (preg_match("/mobile|webos|opera mini/i",
$_SERVER['HTTP_USER_AGENT'])){

$wgDefaultSkin = "wptouch";
}
else {
$wgDefaultSkin = "vector"; 
}