DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:imagemap

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:imagemap [2012-11-15 07:35] – [Usage and Syntax] demo site down rikblokplugin:imagemap [2023-04-06 22:50] (current) Aleksandr
Line 1: Line 1:
-====== Image Map plugin ======+====== Image Map Plugin ======
  
 ---- plugin ---- ---- plugin ----
Line 6: Line 6:
 email      : tnharris@whoopdedo.org email      : tnharris@whoopdedo.org
 type       : syntax type       : syntax
-lastupdate : 2012-05-31 +lastupdate : 2015-11-04 
-compatible : 2009-02-14++compatible : !Frusterick Manners, !Elenor Of Tsort, Binky,Ponder Stibbons, Hrun, Detritus
 depends    :  depends    : 
-conflicts +conflicts imagemapping
 similar    :  similar    : 
 tags       : media, images, links tags       : media, images, links
  
-downloadurl: http://whoopdedo.org/doku-plugins/imagemap.zip+downloadurl: http://www.whoopdedo.org/doku-plugins/imagemap.zip
 bugtracker :  bugtracker : 
 sourcerepo :  sourcerepo : 
 donationurl:  donationurl: 
  
 +securitywarning: This plugin crashes on DokuWiki Hogfather. See the bugs section.
 ---- ----
 +
 +:!: PHP7 support is missing. Please have a look at [[plugin:imagemapping]].
  
 An image map is a graphical object where portions of the image act as links. With this plugin, you can not only create an image map, but also an alternate representation that can be used by non-visual browsers. An image map is a graphical object where portions of the image act as links. With this plugin, you can not only create an image map, but also an alternate representation that can be used by non-visual browsers.
Line 24: Line 27:
 ===== Installation ===== ===== Installation =====
  
-Download using the plugin manager the given URL above, or manually and unzip in your ''plugins'' folderAfter installing, you must refresh the style cache. Go to the configuration editor and press "save" so DokuWiki will rebuild the CSS.+Search and install the plugin using the [[plugin:extension|Extension Manager]]Refer to [[:Plugins]] on how to install plugins manually.
  
 ==== Changes ==== ==== Changes ====
Line 30: Line 33:
   * 2009-05-05 - An error in the handling of custom sizes prevented the plugin from working.   * 2009-05-05 - An error in the handling of custom sizes prevented the plugin from working.
   * 2012-05-31 - Improve link generation and filter unwanted URL schemes.   * 2012-05-31 - Improve link generation and filter unwanted URL schemes.
 +  * 2015-11-04 - Support media markup in the map.
 +
 +A [[plugin:imagemapping|newer version of the plugin]] adds a map editor and better support for responsive images.
  
 ===== Usage and Syntax ===== ===== Usage and Syntax =====
  
-See the plugin in action FIXME [[http://whoopdedo.org/doku/wiki/imagemap|here]].+See the plugin in action [[http://www.whoopdedo.org/doku/wiki/imagemap|here]].
  
 <code> <code>
Line 43: Line 49:
   * [[wp>image_map|An interwiki link @ 110,50,40]]   * [[wp>image_map|An interwiki link @ 110,50,40]]
   * [[http://w3c.org/|{{w3c_logo.png|Even image links work @10,115,80,95,150,115,80,135}}]]   * [[http://w3c.org/|{{w3c_logo.png|Even image links work @10,115,80,95,150,115,80,135}}]]
 +  * {{w3c-logo.png|Direct link to a media file @155,90,244,142}}
 {{<map}} {{<map}}
 </code> </code>
Line 51: Line 58:
   * An interwiki link in a circle.   * An interwiki link in a circle.
   * An external link in a polygon. The link is defined with an image, so the alternate text of the image is used for the map.   * An external link in a polygon. The link is defined with an image, so the alternate text of the image is used for the map.
 +  * A link to a media file.
  
 For a link to be used in the map, it must define the shape as part of the link text. This is done with the ''@'' character followed by a list of coordinates. The number of coordinates determines the shape of the link. For a link to be used in the map, it must define the shape as part of the link text. This is done with the ''@'' character followed by a list of coordinates. The number of coordinates determines the shape of the link.
  
-^  #  ^   shape   ^ coordinates               | +^  #   ^   shape   ^ coordinates               | 
-|  3  | circle    | center-x,center-y,radius +|  3   | circle    | center-x,center-y,radius 
-|  4  | rectangle | left,top,right,bottom     | +|  4   | rectangle | left,top,right,bottom     | 
-|  6+ | polygon   | x1,y1,x2,y2,x3,y3...      |+|  6+  | polygon   | x1,y1,x2,y2,x3,y3...      |
  
 If the label does not contain a suitable shape description, then that link will be ignored for the map. The coordinates will be removed from the link tag, in both the image map and the alternate markup. If the label does not contain a suitable shape description, then that link will be ignored for the map. The coordinates will be removed from the link tag, in both the image map and the alternate markup.
Line 71: Line 79:
 The plugin includes CSS rules that will hide the text links in desktop browsers. If the styles have not been updated, then you will see the links in addition to the image map. You need to reset the cache on the server (go to the configuration admin page and click "save") and in your browser cache (hold the Shift key while you click "Refresh"). The plugin includes CSS rules that will hide the text links in desktop browsers. If the styles have not been updated, then you will see the links in addition to the image map. You need to reset the cache on the server (go to the configuration admin page and click "save") and in your browser cache (hold the Shift key while you click "Refresh").
  
 +===== Bugs =====
 +
 +If the image is resized, the map coordinates will become unaligned. Some templates will automatically shrink large images to fit within the page area. To avoid unintentional resizing, you should specify the correct width and height. <code>{{map>image.png?500x400}}</code>
 +//(reported by Gregg Siegfried on 2013-04-17)//
 +
 +== Error after update ==
 +
 +  PHP Catchable fatal error:  Argument 1 passed to Doku_Handler_List::__construct() 
 +  must implement interface Doku_Handler_CallWriter_Interface, instance of 
 +  ImageMap_Handler given, called in /var/www/inc/parser/handler.php on line 235 and 
 +  defined in /var/www/inc/parser/handler.php on line 827, referer: [...]/doku.php
 +  
  
plugin/imagemap.1352961354.txt.gz · Last modified: 2012-11-15 07:35 by rikblok

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki