Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision | |||
| wiki:image_map_plugin [2023/02/18 06:44] – removed - external edit (Unknown date) 127.0.0.1 | wiki:image_map_plugin [2023/02/18 06:44] (current) – ↷ Page moved from contributing:image_map_plugin to wiki:image_map_plugin suedunham | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Image Map plugin ====== | ||
| + | |||
| + | [[doku> | ||
| + | |||
| + | This is used to make the map of Hârn work to link pages dedicated to particular Atlas Hârnica maps, such as in [[works: | ||
| + | |||
| + | This plugin is a bit wonky. Sometimes the desired areas don't align with the image as they should if the image has been resized to fit the page. Usually, refreshing the page in the browser a time or two (or three, or…) will set it right. | ||
| + | |||
| + | It has also been hacked to make the shaded portion under the cursor more visible. Be aware that this will have to be redone upon updating the plugin. See [[# | ||
| + | |||
| + | ===== Basic use ===== | ||
| + | |||
| + | First, a raster image is uploaded to the wiki via the [[doku> | ||
| + | |||
| + | < | ||
| + | {{map> | ||
| + | * [[works: | ||
| + | |||
| + | ... | ||
| + | |||
| + | {{<map}} | ||
| + | </ | ||
| + | |||
| + | ===== Use with include plugin ===== | ||
| + | |||
| + | In all of the cases in HârnWiki, the same image map has been employed at the bottoms of many similar pages. This heavily favors making one master page for each and using the [[include_plugin]] to put them everywhere they need to go. Perhaps they' | ||
| + | |||
| + | A wiki can never have too many links, so here they are. | ||
| + | |||
| + | * [[inclusions: | ||
| + | * [[inclusions: | ||
| + | * [[inclusions: | ||
| + | * [[inclusions: | ||
| + | * [[inclusions: | ||
| + | |||
| + | ===== Plugin modifications ===== | ||
| + | |||
| + | The file, ''/ | ||
| + | |||
| + | <code javascript [enable_line_numbers=" | ||
| + | /* DOKUWIKI: | ||
| + | |||
| + | (function($){ | ||
| + | |||
| + | $(function(){ | ||
| + | $(' | ||
| + | fillColor: ' | ||
| + | fillOpacity: | ||
| + | wrapClass: true, | ||
| + | wrapCss: true, | ||
| + | clickNavigate: | ||
| + | }); | ||
| + | }); | ||
| + | |||
| + | $(window).resize(function(){ | ||
| + | $(' | ||
| + | $(this).mapster(' | ||
| + | }); | ||
| + | }); | ||
| + | |||
| + | })(jQuery); | ||
| + | |||
| + | function addBtnActionImagemap(btn, | ||
| + | // Not implemented yet | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | To remedy this, the file was first renamed '' | ||
| + | |||
| + | The file contents were then copied to a new location at ''/ | ||
| + | |||
| + | Two modifications were made: the link to '' | ||
| + | |||
| + | <code javascript [enable_line_numbers=" | ||
| + | /* DOKUWIKI: | ||
| + | |||
| + | (function($){ | ||
| + | |||
| + | $(function(){ | ||
| + | $(' | ||
| + | fillColor: ' | ||
| + | fillOpacity: | ||
| + | wrapClass: true, | ||
| + | wrapCss: true, | ||
| + | clickNavigate: | ||
| + | }); | ||
| + | }); | ||
| + | |||
| + | $(window).resize(function(){ | ||
| + | $(' | ||
| + | $(this).mapster(' | ||
| + | }); | ||
| + | }); | ||
| + | |||
| + | })(jQuery); | ||
| + | |||
| + | function addBtnActionImagemap(btn, | ||
| + | // Not implemented yet | ||
| + | } | ||
| + | </ | ||