Usermap install
From Wiki
This is the installation guide for the mediwiki usermap extension.
Contents |
required software
- a webserver environment with a running mediwiki (>1.10) instance.
- access to a postgis enabled postgres databaes.
- MediaWiki Extension SimpleForms (the file is also included in the usermap svn reository)
- userMap Exteionson from svn: http://svn.christian-willmes.de/usermap
Please see fulltilt bonus
File locations
- In the extensions folder of your mediawiki instance create a Folder 'userMap' and copy the files in this Folder.
- For the installation of SimpleForms please see their site. (It is just moveing the file to the folder and setting of two lines in LocalSettings.php)
database setup
The extension has three db tables. One of them ('users') has a postgis geometry column.
SQL's for the tables
-- Table: users -- DROP TABLE users; CREATE TABLE users ( uname character varying(30), rname character varying(30), locationname character varying(50), "location" geometry ) WITH (OIDS=FALSE);
-- Table: mapviews -- DROP TABLE mapviews; CREATE TABLE mapviews ( id serial NOT NULL, uname character varying(30), viewname character varying(12), centerat character varying(16), width character varying(6), height character varying(6), zoom character varying(2), navbar character varying(1), baselayer character varying(1) ) WITH (OIDS=FALSE);
-- Table: usermaps -- DROP TABLE usermaps; CREATE TABLE usermaps ( username character varying(30), width character varying(6), height character varying(6), zoom character varying(2), navbar character varying(1), baselayer character varying(1) ) WITH (OIDS=FALSE);
For the courseMap feature the following two tables are necessary
-- Table: coursemaps -- DROP TABLE coursemaps; CREATE TABLE coursemaps ( id serial NOT NULL, courseid integer, centerat character varying(16), width character varying(6), height character varying(6), zoom character varying(2), navbar character varying(1), baselayer character varying(1), wikiuser character varying(30) ) WITH (OIDS=FALSE);
and
-- Table: courses -- DROP TABLE courses; CREATE TABLE courses ( id serial NOT NULL, course character varying(30), organization character varying(50), lecturer character varying(30), description text, locationname character varying(50), "location" geometry, wikiuser character varying(30) ) WITH (OIDS=FALSE);
Mediawiki Settings
Unfortunatley the caching option of mediawiki pages must be disabled that usermap extension works properly.
Edit LocalSettings.php
- Disable Caching in Mediawiki, by adding the following lines to your LocalSettings.php
/** Allow client-side caching of pages */ $wgCachePages = false; /** * Set this to current time to invalidate all prior cached pages. Affects both * client- and server-side caching. * You can get the current date on your server by using the command: * date +%Y%m%d%H%M%S */ $wgCacheEpoch = 'date +%Y%m%d%H%M%S';
- Include the following lines at the end of LocalSettings.php (take care of the paths if you maybe installed the files to another path apply it accordingly)
$wgUseAjax = true;
include("extensions/SimpleForms/SimpleForms.php");
include_once('extensions/userMap/userMap.php');
Usermap Settings
Edit config.php
Fill in the required values into the config.php file in your extensions/userMap directory. The required Informations are:
- database connection information (host, dbname, username, password)
- path to the Icon you want to display for the placemarks
- path to the Icon for the courseMap placemarks
- the url to your extension folder
