Wikia

WoWWiki

WoWWiki:Map Lightbox and Map Tooltip

Talk0
101,314pages on
this wiki
This is a proposal aimed at making the Map Tooltip and the Map Lightbox more ubiquitous in this wiki. There are three parts to this proposal:
  1. a minor rewrite of Template:Coords
  2. a new template, called Template:MLink for now
  3. another new template, called Template:Map for now

Template:Coords Edit

The plan is to make a few minor edits to Template:Coords that will open the Map Lightbox when the user clicks on the coordinates. (Currently nothing happens). The template's usage would remain unchanged. No wikicode would have to be rewritten - a bit of JavaScript - but no wikicode.

wikicode 
Dalaran {{Coords|70|45|Dalaran}}
result 
Dalaran [70, 45]
try me! 
hover over the coordinates to see the preview and click on them to open the Map Lighbox!

Template:MLink Edit

This template is brand new and meant to replace all textual links to maps. A bot will replace all the current links with the new template:

current text links 
[[:File:WorldMap-Dalaran2.jpg|Dalaran]
new template 
{{MLink|Dalaran}}
result 
Dalaran
try me! 
hover over the text to see the preview and click on it to open the Map Lighbox!

Usage of Template:MLink Edit

{{Mlink|<zone>|<view>|<text>}}

zone 
name of the zone in question
view (optional) 
some zones are represented by several maps; this is the "section" or "phase" parameter you can find in the table on Template:Coords/Maps; some maps require this parameter - most don't
text (optional) 
if you want to use link text other than the zone's name, set this parameter

Template:Map Edit

This is another brand new template and meant to replace all image links to maps. Replacing these link with instances of this template is also another bot job.

In the long run this template is also meant to completely replace Template:Instance_Map and Template:Zone_Map but there's no rush. The functionality itself will also apply to instances of these two templates.

current image links 
[[File:WorldMap-Dalaran2.jpg]]
new template 
{{Map|Dalaran}}
result 
WorldMap-DalaranCity1
try me! 
click on the map to open the Map Lighbox!

Usage of Template:Map Edit

{{Map|<zone>|<view>|<size>|<notes>}}

zone 
name of the zone in question
view (optional) 
some zones are represented by several maps; this is the "section" or "phase" parameter you can find in the table on Template:Coords/Maps; some maps require this parameter - most don't
size (optional) 
the width of the map in pixels (but without units); defaults to 501 (50% of the full size maps)
notes (optional) 
a list of one or more map notes

Note Edit

All three templates output regular wikilinks - albeit with a wrapper that contains metadata. That means Special:WhatLinksHere will correctly list the pages where a certain map is used. The links are rewritten on the fly with JavaScript to open the Map Lightbox instead of loading the File: page.

Around Wikia's network

Random Wiki