- you needn't understand what the text means to figure out how probably you could use JavaScript with image maps.
- But don't be overhasty. I think perhaps one column would be enough; for example if you make a tooltip, onmouseover will call a function that displays the tooltip, and onmouseout simply calls the counterpart that hides it. It should be first discussed whether there should be elementary JavaScript functions as a part of MediaWiki...
--Mr. B.B.C.16:49, 11 January 2007 (UTC)
Change image on mouseover
I needed this functionality so I modified this extension to add it. It is a pretty nasty hack but it does the job for me. Based on [tutorial]. I modified version 1.12, will upload if anyone is interested. --Jackocleebrown17:56, 12 March 2009 (UTC)
Does not work in Templates
Latest comment: 17 years ago12 comments10 people in discussion
Seems, the extension does not work in templates. If I write in a template:
<imagemap>
Image:Foo.jpg|100px|picture of a foo
rect 0 0 50 50 [[{{{1|}}}]]
desc bottom-left
</imagemap>
this is the result:
Error: Invalid title in link at line 4.
I think the extension is too early and interprets the brackets as signs instead of waiting for the replacement of the brackets with the parameter's content. If you omit the | it's even worse, then the whole page is broken. Am I right or do I make a mistake? --Slomox17:30, 11 January 2007 (UTC)
I checked this, but I was able to use without problems in templates. jeroenvrp 02:58, 14 January 2007 (UTC)
Just wanted to note that using {{{1}}} as part of the image name also doesn't work. Trying to develope an imagemaped element table at Wikipedia:Template talk:Elementbox header#Testing clickable elements. I'll just use a single elements name while putting together the long list of coordinates, but this needs to be fixed if it's to be usefull for this particular (and other) applications. Otherwise, this is Great, especially the auto coordinat resizing! --D0li004:27, 23 January 2007 (UTC)
Can a demonstration of this #tag parser function be demonstrated? The documentation for the tag function is significantly lacking. --Robert Horning00:43, 19 January 2009 (UTC)
The coordinates are rendered as double values (e.g. coords="22.3404255319,22.3404255319,14.8936170213") which is useless and causes errors in some browsers. For example, in Opera all circle areas are broken. Please round all coordinates. Thank you. --TM
I checked it in Konqueror 3.5.5, Firefox 2.0.0.1 and the Opera 9.1, all on Linux. I can confirm that the imagemap does not work correctly in Opera. Konqueror and Firefox work great. Anyhow I really like to thank the developer who made this possible, the possibilities are really great with this extension. jeroenvrp 03:06, 14 January 2007 (UTC)
Polygons
Latest comment: 19 years ago2 comments1 person in discussion
How polygons should be described? Can you give an example? I tried to define Display and Keyboard on the example, but it does not work, probably coordinates are wrong :( Maximaximax 10:10, 16 January 2007 (UTC)
PS. Polygons I created with Map This. Maximaximax10:14, 16 January 2007 (UTC)
Look at the example. I made 2 polygons - for display and keyboard, but they are wrong - only keyboard is shown and in wrong place:
Error: Invalid coordinate at line 4, must be a number.
What is also strange - on the original example (with circle and square) it shows only display but no keyboard:
<imagemap>
Image:Foo.jpg|200px|picture of a foo
rect 0 0 50 50 [[Foo type A]]
# A comment, this line is ignored
circle 50 50 20 [[Foo type B]]
poly 122,34 120,125 234,122 232,29 122,34 [[Display]]
poly 101,133 108,175 276,165 266,127 105,134 101,133 [[Keyboard]]
desc bottom-left
</imagemap>
Output of this example:
Error: Invalid coordinate at line 8, must be a number.
I can confirm this. jeroenvrp 12:42, 18 January 2007 (UTC)
<imagemap>
Image:Foo.jpg|picture of a foo
poly 122 34 120 125 234 122 232 29 122 34 [[Display]]
poly 101 133 108 175 276 165 266 127 105 134 101 133 [[Keyboard]]
rect 0 0 50 50 [[Foo type A]]
# A comment, this line is ignored
circle 50 50 20 [[Foo type B]]
desc bottom-left
</imagemap>
picture of a foo
Things to note:
poly coords do not take commas.
poly-s are defined prior to any other shapes
the image is left full-size
Once you get past the documentation problem involving commas, the problem is that the script is not re-initializing its list of coordinates prior to parsing poly coordinates. Thus, when parsing a poly it starts with the previous shape's coordinate list and adds the poly's coordinates to it. If you leave the image full-size, then each subsequent poly is the aggregate of all the previous poly's, but you don't generally notice because the earlier ones are on top. If you're scaling, then each subsequent poly starts with a scaled version of the previous poly, which gets kinda weird.
If you're interested in fixing it, you might insert
in ImageMap_body.php right after
Latest comment: 19 years ago1 comment1 person in discussion
The documentation says that the format [[Page title|description]] should work. However, once I place that in the call to imagemap, the extension has the same issue that we've seen with curly braces: you can't submit or preview the page. – Minh Nguyễn (talk, contribs) 05:29, 17 January 2007 (UTC)
Longdesc not working
Latest comment: 19 years ago2 comments1 person in discussion
In my screen readerJAWS, when I encounter an image with a long description, I can press enter to hear the description. That doesn't work at the moment - when using the example on the page, I get this page with the extra "</wiki>" in the address. I don't see a problem with using the extension otherwise as long as sensible image descriptions are used. Graham8707:22, 17 January 2007 (UTC)
Latest comment: 18 years ago8 comments6 people in discussion
Would it be possible to add a way to reduce the size of the image description link? Currently existing 'clickable images' using template hacks are generally used for small icons. When the ImageMap is applied to these the link for the image description page winds up covering a large part of the image. The sister projects links on the en-wikip 'Main Page' are a good example of this. --12.42.50.5115:27, 17 January 2007 (UTC)
Also, it would be nice if it were possible to use:
<imagemap>Image:whatever.jpg
[[Wherever]]</imagemap>
or
<imagemap>Image:whatever.jpg
default [[Wherever]]</imagemap>
Currently you have to specify a rectangle, circle, or polygon region before you can set a default for the rest of the image... but 99.99% of the time people are going to want the entire image to be clickable and link to a single location. --12.42.50.5115:34, 17 January 2007 (UTC)
The above worked fine for me in Firefox but in I.E. 7.0 the hyperlink does not work (you can't click through to the page specified). Ross Allen20:12, 21 May 2008 (UTC)
Another issue, if 'imagemap' is used within a template it does not seem to be able to handle parameters. That is, <imagemap>Image:{{{image|smiley.jpg}}}, fails to display any image at all even if the 'image' parameter is set. --12.42.50.5117:34, 17 January 2007 (UTC)
Responding to your first question, you can disable the image description icon entirely by specifying desc none at the end of the call to <imagemap>. – Minh Nguyễn (talk, contribs) 19:29, 17 January 2007 (UTC)
i Info button on the image
After I installed the imagemap extension, when I was first trying to use it, an kind of ugly 'i' info button showed up on top of the image. It took a while to figure out how to get rid of this 'i' since the syntax example provided in the extension is incorrect (I think). At the bottom of the syntax example it reads:
desc bottom-left
</imagemap>
However, in the image example, there is no 'i' button in the lower lefthand corner of the image. If I understand this extension correctly, either the syntax example should be changed to
desc none
</imagemap>
or the example should correctly reflect the syntax example, and show the 'i' button in the lower lefthand corner.
Inline use
Latest comment: 19 years ago4 comments4 people in discussion
First of all, thanks to TimStarling for this fantastic and long-awaited extension! It is really handy. However, there is one (minor) problem with it: It can't be used inline. If I want a line that links a country's flag to the country (instead of the image, of course), then write something next to the flag, that text will come one liner further down. See what I mean here:
Latest comment: 19 years ago3 comments2 people in discussion
Can anyone explain why this doesn't work? I am trying to link the big logo image in the center to a page. But using <imagemap> it winds up with no link at all, neither to the page nor to the imagepage.
I've probably made some silly mistake in the coding, but if someone could point that out it would also be great. Dovi06:41, 19 January 2007 (UTC)
First of all, a 50×50-pixel rectangle wouldn't cover very much of the 180×190-pixel image. But besides that, I've noticed that this extension tends to reduce the shape sizes to between ½ and 1/3 of the specified sizes. In the case of this image, it means that the linked region is a 22×22-pixel rectangle in the very top-left corner, in whitespace. If you make the rectangle 400×500 px, or turn it into a circle using:
Latest comment: 19 years ago1 comment1 person in discussion
It would be nice if the simple default for coordinates was that clicking anywhere on the entire image (with the exception of the image description link if there is one) sends the user to the link. I.e. with no coordinate numbers, to make it easier for the average user -- mainly when the user simply wants the image to serve as an icon. Is this currently possible? Dovi11:54, 21 January 2007 (UTC)
External linking
Latest comment: 19 years ago1 comment1 person in discussion
Would it be possible for this extension to support linking to external sites? Somethign like: -
<imagemap>
Image:Firefox.jpg|200px|picture of Firefox
default http://www.firefox.com
desc none
</imagemap>
I don't know were or how to post it so I put it here, you are free to movie to another more appropiate location:
I have made a Dutch translation for the ImageMap extension which could be incorporated in a later version:
/* Dutch (Erik van Berkum) */
'nl' => array(
'imagemap_no_image' => '<imagemap>: moet een afbeelding specificeren in de eerste regel',
'imagemap_invalid_image' => '<imagemap>: afbeelding bestaat niet of er is een spelfout',
'imagemap_no_link' => '<imagemap>: ongeldige link gevonden aan het eind van de regel $1',
'imagemap_invalid_title' => '<imagemap>: ongeldige titel in de link bij regel $1',
'imagemap_missing_coord' => '<imagemap>: niet genoeg coordinaten voor een vorm bij regel $1',
'imagemap_unrecognised_shape' => '<imagemap>: de vorm wordt niet herkent bij regel $1, elke lijn moet starten met een van de volgende: '.
'default, rechthoek, circel or poly',
'imagemap_no_areas' => '<imagemap>: op zijn minst een gebied moet gespecificeerd worden',
'imagemap_invalid_coord' => '<imagemap>: ongeldige coordinaat bij regel $1, het moet een nummer zijn',
'imagemap_invalid_desc' => '<imagemap>: ongeldige desc specificatie, moet een van de volgende zijn: $1',
'imagemap_description' => 'Over deze afbeelding',
# Note to translators: keep the same order
'imagemap_desc_types' => 'boven-rechts, beneden-rechts, bodem-links, boven-links, geen',
),
Possible bug report
I've discovered why some of the click maps seem to be far too small: The pixel co-ordinates specified are for the original-sized image, not for the image as resized by this tag. Since this tag is itself resizing images, and since the image map coordinates come after the resize statement, shouldn't the co-ordinates refer to the transformed pixels rather than the original ones? 18:09, 23 January 2007 (UTC) Rawling from Wikipedia
Well, I've noticed this is explicitly referenced on the main page, so I'll just leave now. Hopefully this might explain it if, like me, someone else fails to notice... 18:36, 23 January 2007 (UTC) Rawling from Wikipedia
Bug 8835: No links from image caption
Latest comment: 19 years ago1 comment1 person in discussion
Latest comment: 19 years ago2 comments2 people in discussion
I have copied these files into extensions/ImageMap and added the necessary line to LocalSettings.php, however the example produces no image and no error messages.
Could someone provide a list of the steps necessary to enable this extension.
Latest comment: 19 years ago2 comments1 person in discussion
I've developed an ImageMap extension at the same time and published documentation before this was published. In my opinion I was ready before all of this was posted. This seems to be an accident or a mistake. I do not like to work at something another guy already coded. I searched all extension sources and MediaWiki and I've not found an imagemap extension at the end of January 2007. Than I started to write an extension at my own. The major benefit of my work compared to this imagemap extension is that using my extension a user can use kImageMapEditor to create imagemaps. This is just a huge benefit compared to this extension.
I'm currently writing a php program to convert a generic HTML file with <MAP>...</MAP> included into the map tag format that Tim's ImageMap extension uses. I have a bunch of wiki articles that use the older ImageMap format with files and this will allow me to convert them. As well, it will allow me to convert files generated by generic Map editors for use with Tim's ImageMap.
I was also thinking of taking the two ImageMap extensions and merging them into a single extension so that one can use either format - external files with map data uploaded to the wiki (McNaught's)or imbedded map tags (Tim's). I wonder if there'd be any interest? Michael Daly19:24, 25 March 2007 (UTC)
Latest comment: 19 years ago1 comment1 person in discussion
I added the name of the image to the error message. Makes it easier to find the missing image.
// ImageMap_body.php
$domDoc = DOMDocument::loadXML( $imageHTML );
$xpath = new DOMXPath( $domDoc );
$imgs = $xpath->query( '//img' );
if ( !$imgs->length ) {
return self::error( 'imagemap_invalid_image' . ': ' . $image ); // change this line
}
This fix will break the internationalization. The text 'imagemap_invalid_image' is the key to a table that contains the full text of the message in the user's language. There is a better way to do this but it requires a change to the error messages. Michael Daly07:09, 12 May 2007 (UTC)
MediaWiki 1.8.2
Latest comment: 19 years ago1 comment1 person in discussion
I found that it works in 1.8.2 also.
I get "Table 'wikidb.mw_cur' doesn't exist (localhost)" in MediaWiki 1.8.2 -- Adrianm, 28 February 2007
the cur table hasn't been used since the days of 1.4 - i find it unlikely this extension is using it (in fact, it does not appear to use any direct db access at all). So that error must be caused by something else. -- Duesentrieb⇌10:26, 28 February 2007 (UTC)
thanks, I now get: "Class 'DOMDocument' not found", even though this class should be included in PHP 5 [1] (I am using PHP 5.1.6) -- Adrianm, 2 March 2007
Eliminate Case Sensitive Shape Names
Latest comment: 19 years ago1 comment1 person in discussion
I added a couple of lines to ImageMap_body.php:
here:
to eliminate case sensitivity in the shape parameters - this to make it easier to convert from Shannon McNaught's older version of ImageMap to this one.
Latest comment: 19 years ago1 comment1 person in discussion
Just wondering how the image maps behave on less capable browsers like mobile phones etc. I'm a bit concerned that lists of links on Wikipedia are being replaced by image maps, without regard for browsers that can't render them (or in which clicking on a link in an image is basically impossible). If this is a valid concern, we might need a policy like "Every image map should be accompanied by a link to an equivalent list of the links"? Stevage13:26, 11 March 2007 (UTC)
Single Area / clickable image
Latest comment: 19 years ago2 comments2 people in discussion
It would be nice if you could make clickable images easily by just giving the default area. Now you have to specify also a dummy rect area. And the default does not seem to work (bug?)
picture of a foo
Can do!
I believe that we could enable clickable images simply by removing the test that requires at least one area to be defined. Ie. in ImageMap_body.php, remove these lines starting about line 190:
This is in the latest release of ImageMap. BTW - the above patch is not "safe" as it prevents a check on no imput at all! The fixed version has a safer check. Michael Daly05:54, 5 May 2007 (UTC)
Extension extension
Latest comment: 19 years ago1 comment1 person in discussion
Hi Tim. Great extension!
I have a question:
Is it possible for a mapped area to trigger "Lupin's popups" like the unmapped area does? Or is that a question for Lupin?
And 2 really cool additions that should excite and intrigue you :->
1) add a color-key (or similar) to individual areas. (Ambitiously with a "legend".)
2) add an optional "detail" field to ImageMap such that a sub map will be displayed. E.g. for a detailed "ImageMap:Countries of the world allow a grab of (x1,y1, x2,y2) to display just an ImageMap-ed detail of central Africa. (Even if the sub-map has to be created as a seperate image, allows the use of the larger ImageMap coords.)
Think of the possibilities! A single, really detailed map of the world/motherboard/whatever that can/would be populated as needed and grabbed willy-nilly the next time someone needs a submap. Now, a sub-map has to be re-ImageMap-ed all over again.
Latest comment: 19 years ago1 comment1 person in discussion
I noticed that png-images are not working as image-source. Could this be changed?
This extension works just fine with png, gif and jpg. Perhaps your problem is that your installation does not premit png. In DefaultSettings.php, you have the valid uploadable file extensions with
Latest comment: 19 years ago1 comment1 person in discussion
Right now the code works, but produces the following PHP error:
[Wed Apr 18 16:03:03 2007] [error] [client 10.34.18.28] PHP Notice: Undefined variable: extLinks in /x/eng/wiki/xwikid/extensions/ImageMap/ImageMap_body.php on line 292
[Wed Apr 18 16:03:03 2007] [error] [client 10.34.18.28] PHP Warning: Invalid argument supplied for foreach() in /x/eng/wiki/xwikid/extensions/ImageMap/ImageMap_body.php on line 292
I get the next bug :
Warning: call_user_func_array(): First argumented is expected to be a valid callback, 'ImageMap::render' was given in includes/Parser.php on line 468
The code is:
<imagemap>
Imagen:My_Image.png | 200px | This image ...
rect 0 0 50 50 [[Foo type A]]
circle 50 50 20 [[Foo type B]]
desc bottom-left
</imagemap>
And nothing is displayed, anyone could help me?
Thanks !
I encountered this same error when trying ImageMap with an older version of MediaWiki. Upgrading to 1.12 solved the problem.
please support external links in the new version
Latest comment: 19 years ago4 comments2 people in discussion
Oh, "NOTE: This parameter has been removed in the latest version (Revision 23292). It now always permits external links." is wrote on Extension:ImageMap#Parameters. I think the extension should re-support external links and hope that the Wikimedia Foundation will set the parameter "true" on all the Wikis hosted by the foundation. --Yes0song08:29, 13 July 2007 (UTC)
Couldn't it be possible to implement this (very useful) function natively into mediawiki? It doesn't have to be exactly in this form, but I can think of something like:
[[some-article|[[image:foo.png]]]]
...therefore simply allowing [[image]] inside a usual link would also be an intuitive way for authors to include images within links.
error
Latest comment: 19 years ago4 comments3 people in discussion
Fatal error: Call to undefined method Title::getFragmentForURL() in /extensions/ImageMap/ImageMap_body.php on line 199
I'm having the same problem. Using fully patched Ubuntu server (mediawiki 1.7) with no other extensions, and subversion rev 23292130.102.0.17806:39, 28 June 2007 (UTC)
Read the description again, particularly the part where it says that this extension works with MediaWiki version 1.9 and later. HTH HAND —Phil | Talk07:20, 28 June 2007 (UTC)
Latest comment: 19 years ago1 comment1 person in discussion
Hi
I was unable to find any information on porting this extension to mediawiki 1.7 here or anywhere else.
I was however able to do this myself. The two necessary changes are outlined below. Hopefully they will be useful to someone.
Only two changes are necessary to the file ImageMap_body.php
1. Change call $title->getFragmentForURL() to $title->getFragment() (line 199)
Addition request: blue info icon only for logged in users
Latest comment: 18 years ago2 comments2 people in discussion
Hey this is sort of a request, would there be a way to make this extension only show the blue icons for users that are logged in? I'm using this extension to make images linkable to articles, and the wiki it's self is being used as a website/CMS. by hiding the links from guests that would allow the admins an easier time maintaining the image without having to go to image list, and keep the site clean for normal users. I tried to do this on my own but I didn't get it to work. Thanks.
Latest comment: 18 years ago5 comments3 people in discussion
I would like to have an image that does not have any target link - purely acting as an icon. However, the extension complains when there are no links. -- Barrylb02:01, 20 August 2007 (UTC)
Why would you use imagemap at all in that circumstance? If you don't want a link, just display the image alone. Or do you mean that you want to use it as a means of turning off the link to the image page itself? Michael Daly19:16, 22 August 2007 (UTC)
Yes, I would like to use it to turn off the link to the image page. Seems like a useful thing to do with extension. Barrylb04:54, 23 August 2007 (UTC)
I'd expect some resistance to allowing that in this extension, since it's used in Wikipedia and they won't want to turn off the link to the attribution and copyright info for the image. You could try putting in a request via Mediazilla and see what happens. I could see making it a site-configurable option - i.e. the wiki's admin can allow or disallow the use of such an option. Michael Daly05:00, 28 August 2007 (UTC)
Though the blue icon is still there, and I don't know how to get rid of it, you should be able to just use it like this. — Preceding unsigned comment added by 217.120.159.198 (talk • contribs)
<imagemap>
Image:Foo.svg|200px|picture of a foo
poly 0 0 0 0 [[Display]]
desc none
</imagemap>
Error on install
Latest comment: 18 years ago3 comments2 people in discussion
When I attempt to install this extension, I get the error below displayed when I attempt to view the main page of my wiki. Restoring the original localsettings.php file removes the problem. Any suggestions on how to fix this?Peter Campbell00:16, 19 September 2007 (UTC)
[mediawiki] / trunk / extensions / ImageMap / ImageMap.php Repository: mediawikipywikipedia
ViewVC logotype
Log of /trunk/extensions/ImageMap/ImageMap.php
Parent Directory Parent Directory
Links to HEAD: (view) (download) (as text) (annotate)
Sticky Revision:
Revision 23533 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jun 29 01:36:09 2007 UTC (2 months, 3 weeks ago) by simetrical
File length: 516 byte(s)
Diff to previous 23292
Extensions too!
Revision 23292 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Jun 23 11:01:10 2007 UTC (2 months, 3 weeks ago) by tstarling
File length: 518 byte(s)
Diff to previous 21360
Removed $wgImageMapAllowExternalLinks, feature enabled unconditionally. Not sure why you wouldn't want that.
Revision 21360 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Apr 19 06:00:19 2007 UTC (5 months ago) by raymond
File length: 657 byte(s)
Diff to previous 21342
* Changing $wgImageMapAllowExternLink -> $wgImageMapAllowExternalLinks
per hint of Rob Church at wikitech-l
* ooops, not every ImageMap use external links...
Revision 21342 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Apr 18 09:14:41 2007 UTC (5 months ago) by raymond
File length: 654 byte(s)
Diff to previous 19113
* (bug 8746) Support for external links
$wgImageMapAllowExternLink = false per default -> no risk for WMF live sites
Revision 19113 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jan 11 05:36:48 2007 UTC (8 months, 1 week ago) by ivanlanin
File length: 518 byte(s)
Diff to previous 17337
Add descriptions and urls (if available) for 4 extensions used in Wikipedia:
* ConfirmEdit
* EasyTimeline
* ImageMap
* OAIRepository
Revision 17337 - (view) (download) (as text) (annotate) - [select for diffs]
Added Wed Nov 1 06:34:42 2006 UTC (10 months, 2 weeks ago) by tstarling
File length: 356 byte(s)
HTML image map extension. Not quite complete, but usable as it is.
What part of that is an error? It looks like a dump of the SVN info.
Did you download the files properly? I've seen something like this when someone thought they were downloading the file, but ended up saving the display of the SVN page instead. When included into the LocalSettings.php file, it just spewed out onto the main page.
Look at the files you've downloaded with a simple editor and compare the content with the (view) of the same file from SVN. If they don't match, you've not got the proper PHP source. Michael Daly15:49, 22 September 2007 (UTC)
Latest comment: 18 years ago1 comment1 person in discussion
Clicking on an area with no link defined does not work in IE6 (will test Firefox later). Ironically, right-clicking and selecting 'open link in new window' does work. Also, the default link does work when no other areas are defined. Edokter10:36, 2 October 2007 (UTC)
With circe:
Start now!
Without circle:
Start now!
Anchors on same page (create error on specialpage "wanted pages")
Latest comment: 18 years ago1 comment1 person in discussion
If I use an anchorlink in an imagemap that links directly to the same page (e.g. #foo) I get an errormessage on "wanted pages":
Fatal error: Call to a member function getPrefixedUrl() on a non-object in /var/www/xyz/html/wiki/includes/SpecialWantedpages.php on line 105
Latest comment: 18 years ago3 comments2 people in discussion
How about adding Alt descriptions for those visually impaired folks who have to use special tools to get around the web? Is it implemented already? Because it is not demonstrated on the extension's page, and Dreamweaver keeps yelling at me to fill it :-) --Nathanael Bar-Aur L.00:30, 23 November 2007 (UTC)
Check the page output source in your browser. You should see the alt filled in. If you look at the image properties (in Firefox at least) you'll see the alt filled out. Alt is filled with the text that follows the pipe in:
Latest comment: 18 years ago3 comments2 people in discussion
I'm not sure whats going on but when image map is enabled and an image map is put into the page the screen blanks on both preview and saved view. Running FC5, Apache 2.0, php5 fresh install of MW 1.11.
I thought installing Wiki for a testing ground was going to be an easy install but I guess I was wrong. I'm bumping into all kinds of problems. --DP67(talk/contribs)04:02, 28 December 2007 (UTC)
Comparing the IE7 and Firefox views of the page, I think the problem is in the CSS for the page rather than directly due to the imagemap extension (though imagemap may be exacerbating the existing problem). That's an educated guess rather than anything else, but I noticed that resizing the font (<ctrl><+> or <ctrl><->) works fine in FF but is messed up in IE7. In FF, the sidebar on the right is sized according to the font and the content area moves slightly to accommodate. IE7, on the other hand, either has the content area overlapping the sidebar or moves the content far to the left.
IE is picky about sizing of various objects on the page (especially <div>s, <table> cells etc.) and this sort of thing might, with other sizing problems, be pushing the overall page width to be slightly larger than the viewable width and IE then pops in the horizontal scroll.
I'd suggest looking into IE7fixes.css and see if there need to be adjustments for the skin. I have no experience with RTL fonts, so there may be a simple problem to fix to tell IE what's going on. It's surprising to me, since it appears you're using generic Monobook. --Michael Daly19:47, 17 January 2008 (UTC)
Funny thing is that there is no content overflowing. It seems as if it might be some shadow margin or something of that sort. I looked at the file, but all these CSS hacks are chinese to me. Is there a place I can go to ask about IE fixes for MediaWiki's Monobook skin? Thanks, Nathanael Bar-Aur L.14:16, 23 January 2008 (UTC)
Where are images stored?
Latest comment: 18 years ago1 comment1 person in discussion
I can search a site and figure out where a specific image is stored but I looked through the code and couldn't tell how the code determined where to put the image. I'm writing a Perl script to crawl a Wiki (we've got MediaWiki at work and I have a couple of MW wikis at home) and generate a set of web pages. I can do regular images with no problem but I want the code to be able to know, deterministically, where ImageMap images are kept.
Never mind -- I figured it out. The burden of being an idiot is, sometimes, nearly too much to bear.
Useful suggestion: Add a class
For the CSS, this extension could be more easy inserting the 'class="imagemap"' to the link which wraps the image, as the default [[image:]] does (it inserts class="image"). --Sergio 01:17, 18 February 2008 (UTC)
Display 2 imagemaps inline
Latest comment: 17 years ago4 comments4 people in discussion
Hi! i'm struggling with this problem, you can see better here:
picture of a foopicture of a foo
it's possible to put 2 or more imagemaps in line? if yes, how? ( i prefer to not use a table. )
I know that i can use a table, i wrote that i prefer to not use it ;) maybe someone can add a code in imagemap to make it stay in the same line. I hate tables! ( and notice that they go in the next line, they cannot stay in the same line of the text )
text1 ->
text2 ->
picture of a foo
picture of a foo
<- text2
<- text
This is not good, ex: i want to put two small imagemaps in text like "... text O text O text ..." Arlas!! 13:44, 2 mar 2008
Imagemap can't currently do this, as it wraps the image in a <div> of unspecified width. This causes other problems. There's a bug report on it. A fix has been proposed and code for the fix submitted (by yours truly in mid 2007) but it has not been reviewed and acted on.
I've had no problems doing this with a fixed-width wrapper and CSS Float. Works like a charm. Arodicus
Has there been any resolution to this bug? I haven't been able to get this to work in any reasonable way unless it's on its own line. Then I can float the imagemap or the text, but even with everything or just the imagemap within a fixed-width div, it won't stay on the same line as other text. - 24.234.156.4623:17, 13 January 2009 (UTC)
Latest comment: 18 years ago4 comments3 people in discussion
Fatal error: Call to undefined function wfloadextensionmessages() in /home/a5668505/public_html/wiki/mediawiki-1.9.3/extensions/ImageMap/ImageMap_body.php on line 31
Function wfLoadExtensionMessages() was added in MediaWiki version 1.11. Upgrade your wiki (recommended) or use an older version of ImageMap extension (it can be found in the SVN). --Sayuri22:46, 21 March 2008 (UTC)
You have to use compatible versions. Either the latest Imagemap version with MW1.11 or an older Imagemap version with 1.9.3. --Michael Daly19:16, 23 March 2008 (UTC)
Equations?
Latest comment: 18 years ago1 comment1 person in discussion
Image map on top of equations script?:
would be sweat - you could hover over formulas to reveal the descrition and then click on it to go to an appropriate page. 82.32.4.24321:19, 12 May 2008 (UTC)
Imagemap with the Imagemap Template from Wikipedia
Hello,
I tried to use the Wikipedia-Template Template:Imagemap, but nothing happened.
I want to use it in an other Template with some Coords, but it doesnt works.
The output is just:
<div style="position:absolute; z-index:2; top:66.8%; left:34.1%; height:0; width:0;"> {{#tag:imagemap|Bild:RedMountain.svg|12x12px|Otzberg default Otzberg
desc none}}
">Otzberg </div></div>
Can you help me??
<div style="position: relative">
Latest comment: 18 years ago1 comment1 person in discussion
What purpose does the extra div serve apart from to restrict the possibility of using this for inline images? Is it possible to get a class-name added to the div instead of just manually coding in the style, both to be neater and also to allow for customisation? Conrad.Irwin19:26, 7 June 2008 (UTC)
Add usual wiki picture border to imagemap pictures
Latest comment: 18 years ago1 comment1 person in discussion
I removed this from the feature requests, since it is already there. Imagemap can take all the parameters of an image. For example,
image:example.jpg|frame|center|300px|Bunch of text
will produce a frame around the image, the image will be centered on the page and 300px wide with the text as a caption. --Michael Daly204:59, 6 July 2008 (UTC)
Why?
Latest comment: 18 years ago2 comments2 people in discussion
This command doesn't work in a page where {{SUBPAGENAME}}=1 (at template namespace):
Latest comment: 17 years ago3 comments2 people in discussion
Is it possible to use Media: links with this extension? It seems that these links aren't working properly; instead of linking Media:Example.png to the actual file, it links to a wiki page (which then redirects to the Image: page). --Ryan lane14:58, 20 November 2008 (UTC)
the JS is for popping up some other image on mouseover. How can I make this possible?
is there any other way for this?
Jack
Creating a image dictionary
Latest comment: 17 years ago1 comment1 person in discussion
I believe that the imagemap extension could be nice to create a collaborative image dictionary like http://www.bildwoerterbuch.com (but better). We have enought pictures an interwikilinks to create such a thing where poeple have a way to learn languages. It would be a project between Commons, Wikipedia, Wiktionary and Wikiversity. I would see the meta files in the image description page at Commons and a translation tool at toolserver where the user could choose one or two languages. We would need a complete Interwikilink database and a tool like this from dapete to create such content. And it would be nice to see directly the vocabulary at screen, but this should be no problem for the script with the help of CCS, see commons:Commons:Geocoding/Panorama. What do think about it? Interested? Where is a better place to discuse? --Kolossos10:13, 21 January 2009 (UTC)
Imagemap and external images
Hi,
Is there any way to use imagemap with external pictures ? Like
Latest comment: 17 years ago2 comments1 person in discussion
Why does this layout keep giving me the errors
Error: at least one area specification must be given</br></br> <nowiki><imagemap>Image:Google wordmark.svg|120px|alt=Alt text default [[Google]] desc none
</imagemap>
Note:I was trying to make an image link without captions, border...etc.
Latest comment: 16 years ago4 comments3 people in discussion
Hi. I recently stumbled over an IMHO very ugly hack for creating image maps with text lables. For example one template using this hack is en:Template:Star_nav (and its translations in other Wikipedias). How about adding directly visible text labels (both: links and plain text) to the imagemap extension? It would very helpful as we could avoid a lot of multiple translated versions of diagrams (if you look at Wikimedia Commons you will find a lot of localised versions of diagrams) and of course yet another ugly hack could be avoided. ;-) Arnomane21:55, 13 June 2009 (UTC)
A better solution would be to use SVG images with multiple language support. We're still waiting for full SVG support in browsers. If you put multiple languages into the SVG image itself, essentially no change is required in this extension. We'll have to wait for this SVG support, though. --Michael Daly218:16, 14 June 2009 (UTC)
Text labels would be very useful but I don't think it's realistic to hope for a SVG version of most images. Wouldn't that mean changing a huge number of images? 83.134.216.15022:37, 30 June 2010 (UTC)
Additional rationale
On the English Wikipedia, there is an image of a carburettor labelled with English text. The same image is used on several non-English Wikipedias, w:gu:કાર્બ્યુરેટર, w:hi:कार्ब्युरेटर, w:id:Karburator, w:ja:キャブレター, w:ms:Karburetor. In each case, these non-English pages have an image with English labels, not exactly ideal. So should there be copies of this image with text modified for each different language? That would be quite laborious and result in many duplicate images.
Hi. Thanks for the great extension! However, I have a problem. I have the following:
<Imagemap>
imagemap|Image:Button_download.gif|center|Download this article
default [{{{Article_Link}}}]
desc none
</Imagemap>
But it says "Error: no valid link was found at the end of line 3". So I read this page and then tried:
{{#tag:imagemap|Image:Button_download.gif|center|Download this article
default [{{{Article_Link}}}]
desc none
}}
But that throws the error "Error: at least one area specification must be given". I tried adding a rect etc, but it still throws the error.
Any ideas? Many thanks!
[User:Mitchelln|Mitchelln]] 11:43, 18 June 2009 (UTC)
Mark the selectable arrea
Latest comment: 17 years ago1 comment1 person in discussion
Feature requests : It would be nice if the area which is clickable can be displayed with f.e. dotted line. Then the user knows, without the need of moving the mouse, which area is selectable.
This is especialy usefull for small area's and for area's which are hard to gues it is (or it might be) selectable. It would be perfect if the line type and colour can be set different for each link. Each link type can have its own colour so the user knows what to expect.
Imagemap is a very nice extension which I use a lot. --BernardHulsman15:46, 24 June 2009 (UTC)
Testing and Suggestion
Latest comment: 17 years ago3 comments3 people in discussion
Googleplex
Can you make a syntax element for background
bgcolor
transparent
white
autodetect (if the image doesn't have a border e.g. autodetct the background components color. e.g. if use it in article (background is article space),
(templates)...etc
above=""
below=""
color;RGB (enter RGB color or Hexadecimal colors)
color;CMYK (enter RGB color or Hexadecimal colors)
Note: if the image is GIF don't define it, if you really want a background color try developing a method for Gradient syntax.
Latest comment: 17 years ago4 comments2 people in discussion
I have ImageMap r35980 installed on MediaWiki 1.13.4
PHP 5.1.6 (apache2handler)
MySQL 5.0.22.
It is well installed -Special:Version) but if I use it the page is not render anymore, it gives me a blank page with no error printed on screen.--almaghi10:15, 1 July 2009 (UTC)
I only manage to get the error "Error: must specify an image in the first line" when no image is specified.
Latest comment: 16 years ago2 comments2 people in discussion
Is it possible to highlight the outlines of areas while the cursor is hovering on them? --百楽兎00:29, 15 August 2009 (UTC)
Not really. In the olden days the trick was, for each area, to make a different image with that area hilighted, and swap them with javascript. A very bad hack. Splarka07:48, 15 August 2009 (UTC)
customizing desc icon length
Latest comment: 16 years ago1 comment1 person in discussion
For a small (or bigger) desc-20.png icon, like desc-10.png, we can add a hard-coded customization at ImageMap_body.php:
Latest comment: 16 years ago1 comment1 person in discussion
Yes, there is a section above that discusses this, but it seems to have been lost amongst the shuffle and I think this is something that needs to be fixed so imagemaps can be used more readily.
Currently image maps will insert the name of the article being linked to/the piped entry for the article into the alt parameter, the same as it puts into the title parameter. Is it, or can it be made possible, to set a custom alt text that is different from the text that will show up to users when they hover their mouse over the link? - Floydian19:10, 27 October 2009 (UTC)
extension simply doesn't work.
mediawiki 1.11.2
php 5.2.6
mysql 5.0.67
imagemap installed per instructions. shows up in Special:Version
double checked that imagemagick was installed and in use. LocalSettings.php confirms both.
double checked that php DOM was installed. phptest script confirms.
dom
DOM/XML
enabled
DOM/XML API Version
20031129
libxml Version
2.6.16
HTML Support
enabled
XPath Support
enabled
XPointer Support
enabled
Schema Support
enabled
RelaxNG Support
enabled
wiki markup:
it is what is seen below, with a few carriage returns.
what i get on the page:
<imagemap> Image:LogoMICCy.gif|150px|alt=Alt text default Go to main page </imagemap>
Filepath function does not work
Latest comment: 15 years ago1 comment1 person in discussion
Problably an stupid mistake from my side but the absolute path reference is not working
<imagemap>
Image:Food_icon.jpg|thumb|center|400px|alt=Dining room
rect 0 0 100 100 [[ {{Media:Food_ch.mp3 test1}}]]
rect 100 100 200 200 [http://www.google.com test2]
</imagemap>
The first link is only jumping to the internal WIKI page containing the downloaded mp3 file
The second external link is ok
What we wanted is simple an clickable sound array from an image
Step 1: upload an mp3 file eg Food_ch.mp3
Step 2: Test the access to the Media (music) file [{{FILEPATH:Food_ch.mp3}}]
Note: This creates an nice direct url link to the file without maintanance in case the file
name etc changes therefore we need an direct relation to the above file otherwise you could
use [http:// www.xxx.com/wiki/blablabla ]
Step 3: insert this link to the above example
<imagemap>
Image:Food_icon.jpg|thumb|center|400px|alt=Dining room
rect 0 0 100 100 [{{FILEPATH:Food_ch.mp3}}]
rect 100 100 200 200 [http://www.google.com test2]
</imagemap>
This produces an unexpected error
Error: no valid link was found at the end of line 3
any good suggestions to recover from this error?
Actually it's the same on my wiki, the line 3 error comes from the accolades, and without the accolades no clicking sound is possible... JackPotte07:42, 21 August 2010 (UTC)
notes
Jack: in what way could i contact you more directly, for some additional questions?
I will delete this line again, but need some additional information to see how we can resolve these issue's. >> worldexpatonline@hotmail.com
Use with Tooltips
I am wondering if its at all possible to use this with Extension:Tooltip something like:
This would be EXTREMELY useful for us when we're attempting to organize things on the wiki.
-- Nick (( nick [at] ashkir.com ))
Problem with image map extension and image map editor
Latest comment: 15 years ago4 comments2 people in discussion
Hello i've installed imagemap
and when i edit my article with the following code
<imagemap>
File:Admin--Tests machine.jpg|thumb|1300px|My Test
rect 33 362 12 8 [[Tractor]]
desc bottom-left<br/>
</imagemap>
I had this error :
'''<imagemap>: you must specify an image in the first line'''
I don't know what to do?
i 've already try to write Image instead of File but no success
i think imagemap is well installed
and i 've tried to use the image map editor (Imagemap plugin for FCKeditor) http://martinezdelizarrondo.com/imagemaps/
and it takes no effect after having select the image map areas
so I don't know where does the problem (if there is an incompatibility whith this plugin? or if the problem is from mediawiki)
ok, but how can i do? when i upload a file, the title begin always with a capital letter
i've tried to use the Simple example without caption here with the same image, and the same code. And i've always the same error. i don't see where the error is
Latest comment: 15 years ago2 comments2 people in discussion
Hello,
i have this error Warning: domdocument::domdocument() expects at least 1 parameter, 0 given in C:\wamp\www\mediawiki\extensions\ImageMap\ImageMap_body.php on line 81
Fatal error: Call to undefined method domdocument::loadXML() in C:\wamp\www\mediawiki\extensions\ImageMap\ImageMap_body.php on line 83
what does it mean please? could you help me?
thanks for your help 195.221.117.8311:50, 22 September 2010 (UTC)
i've found the error : dom and domxml are incompatible. when i've disabled domxml.dll, it works fine
Eva13:07, 22 September 2010 (UTC)
Problem with image map extension and FCK editor
Latest comment: 15 years ago1 comment1 person in discussion
Hi, I've installed the latest ImageMap version on mediawiki 1.16.1, but I get an "Invalid image" message when I try to edit a page containing an Imagemap with FCKEditor.
Looking at the code, the error is thrown because of this condition around line 113 in ImageMap_body.php
The HTML generated by the FCK editor doesn't have these attributes, it actually sets a _fck_mw_width attribute instead on the image tag, and doesn't set any _fck_mw_height. But the issue doesn't end here I guess, because even when I tried to hardcode the width/height values in ImageMap_body.php for my tests, I then got blocked on the following part (seems $parent ibacomes null)
Latest comment: 15 years ago1 comment1 person in discussion
Hello, I would like to set up an image map with an image caption that includes the {{legend|#006699|color}} template. I got the impression that this is not possible and results in an error message. Is there a workaround for this? Thank you --89.247.209.16019:09, 2 March 2011 (UTC)
External links in new window?
Latest comment: 14 years ago1 comment1 person in discussion
Is it possible to make external links open in a new window?
{{#tag:imagemap|
Image:Test.png{{!}}1000px{{!}}Click
# next opens in new window
rect 0 0 100 100 [[Media:Video1.wmv{{!}}Video1]]!
# next one not
rect 0 100 100 200 [[Media:Video2.wmv{{!}}Video2]]
desc none
}}
To do this add in ImageMap_body.php:
# Find the link
$link = trim( strstr( $line, '[' ) );
// Add this to check for trailing !
if (substr($link,-1,1)=='!') {
$innewwindow = true;
$link = substr($link,0,-1);
} else $innewwindow = false;
// End of added code
and
# Construct the area tag
$attribs = array();
// Add this to realise the target
if ( $innewwindow ) $attribs['target'] = '_blank';
// End of added code
Install Issue - doesn't appear in list of extensions for my wiki after install
Just tried to install this into my wiki. But it's not working. Have installed several other extensions in the past - and followed the instructions carefully.
It doesn't appear in the list of extensions installed under Special:Version in my wiki. Also, the <imagemap> tags in test image maps are just left as they are in my wiki test page.
I've done the require_once and uploaded the files, and also if I remove the ImageMap folder from the site immediately get an error message so it is obviously getting included in the LocalSettings. Tried both the 1.16 and the 1.11 versions of the extension with same effect.
How do i get text to show up over the area where the Map Coords are?
I have the mediawiki link that the click-through goes to but i also want a text overlay of the area.
Text, images, borders and hover options
Latest comment: 14 years ago1 comment1 person in discussion
I feel that Wikipedia is somewhat diminished by not being able to show on an image, areas/rectangles and text, and optional hover capabilities. On the plus side, I think it would greatly enhance diagrams to be able to do so, and I guess something like jQuery could enable this to be done. On the downside, this capability might not be compatible with certain mobile devices and hard printed copies.