Please show your support of Waihekepedia by adding a link to us from your web site. Waihekepedia T Shirts now available at the Ostend Market

Difference between revisions of "Waihekepedia Revival"

From Waihekepedia
Jump to navigation Jump to search
Line 90: Line 90:
 
==== Replacing old googlemaps ====
 
==== Replacing old googlemaps ====
 
Install http://www.mediawiki.org/wiki/Extension:Replace_Text extension
 
Install http://www.mediawiki.org/wiki/Extension:Replace_Text extension
 +
 +
*First step
 +
<pre>
 +
Original Text:
 +
Google Maps location of (.*)\<googlemap(.*)lat="(.*)" lon="(.*)" zoom="(.*)" width="(.*)" height="(.*)" type="(.*)"\>(.*)\<.googlemap\>
 +
Replacement Text:
 +
Maps location of $1 {{map|lat=$3|lon=$4|zoom=$5|width=$6|height=$7|type=$8|title=$9}}
 +
</pre>
 +
* Second step
 
<pre>
 
<pre>
 
Original Text:
 
Original Text:
Line 95: Line 104:
 
Replacement Text:
 
Replacement Text:
 
{{map|lat=$2|lon=$3|zoom=$4|width=$5|height=$6|type=$7|title=$8}}
 
{{map|lat=$2|lon=$3|zoom=$4|width=$5|height=$6|type=$7|title=$8}}
 +
</pre>
 +
* Third step
 +
<pre>
 +
e.g. Boat Shed Bay
 +
<googlemap version="0.9" lat="-36.778183" lon="175.044415" type="satellite" zoom="16"> http:// -36.778122, 175.047015, Boat Shed Bay Boat Shed Bay </googlemap>
 +
 +
Original Text:
 +
Google Maps location of (.*)\<googlemap(.*)lat="(.*)" lon="(.*)" zoom="(.*)" width="(.*)" height="(.*)" type="(.*)"\>(.*)\<.googlemap\>
 +
Replacement Text:
 +
Maps location of $1 {{map|lat=$3|lon=$4|zoom=$5|width=$6|height=$7|type=$8|title=$9}}
 
</pre>
 
</pre>

Revision as of 09:03, 7 October 2014

Reactivating RSS feeds

See:

Recent_Pages has a comment on what needed to be changed

Replacing Maps extension

The GoogleMaps extension is deprecated.

is a replacement

According to

composer is needed for installing the replacement extension

wf@tol:/tmp$ curl -sS https://getcomposer.org/installer | php
#!/usr/bin/env php
All settings correct for using Composer
Downloading...

Composer successfully installed to: /tmp/composer.phar
Use it: php composer.phar
wf@tol:/tmp$ sudo mv composer.phar /usr/local/bin/composer.phar

Install with composer

php /usr/local/bin/composer.phar require mediawiki/maps "*"
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Installing composer/installers (v1.0.18)
    Downloading: 100%         

  - Installing data-values/interfaces (0.1.4)
    Downloading: 100%         

  - Installing data-values/data-values (0.1.1)
    Downloading: 100%         

  - Installing data-values/common (0.2.2)
    Downloading: 100%         

  - Installing data-values/geo (1.0)
    Downloading: 100%         

  - Installing data-values/validators (0.1.1)
    Downloading: 100%         

  - Installing param-processor/param-processor (1.2.1)
    Downloading: 100%         

  - Installing mediawiki/validator (2.0.4)
    Downloading: 100%         

  - Installing mediawiki/maps (3.2.0)
    Downloading: 100%         

Writing lock file
Generating autoload files

Test

display map by name
Loading map...
lat/lon test

Old Googlemap Markup:

<googlemap lat="-36.777908" lon="175.043085" zoom="15" width="400" height="300">Map Title</googlemap>

New display_map markup:

{{#display_map: -36.777908, 175.043085
| height= 200px
| width= 300px
|resizable=yes
|minzoom=12
|maxzoom=15
|zoom=14
}}

result:

Loading map...

Replacing old googlemaps

Install http://www.mediawiki.org/wiki/Extension:Replace_Text extension

  • First step
Original Text:
Google Maps location of (.*)\<googlemap(.*)lat="(.*)" lon="(.*)" zoom="(.*)" width="(.*)" height="(.*)" type="(.*)"\>(.*)\<.googlemap\>
Replacement Text:
Maps location of $1 {{map|lat=$3|lon=$4|zoom=$5|width=$6|height=$7|type=$8|title=$9}}
  • Second step
Original Text:
\<googlemap(.*)lat="(.*)" lon="(.*)" zoom="(.*)" width="(.*)" height="(.*)" type="(.*)"\>(.*)\<.googlemap\>
Replacement Text:
{{map|lat=$2|lon=$3|zoom=$4|width=$5|height=$6|type=$7|title=$8}}
  • Third step
e.g. Boat Shed Bay
<googlemap version="0.9" lat="-36.778183" lon="175.044415" type="satellite" zoom="16"> http:// -36.778122, 175.047015, Boat Shed Bay Boat Shed Bay </googlemap> 

Original Text:
Google Maps location of (.*)\<googlemap(.*)lat="(.*)" lon="(.*)" zoom="(.*)" width="(.*)" height="(.*)" type="(.*)"\>(.*)\<.googlemap\>
Replacement Text:
Maps location of $1 {{map|lat=$3|lon=$4|zoom=$5|width=$6|height=$7|type=$8|title=$9}}