Extension talk:ImageMap

Jump to: navigation, search

About this discussion


previous talk on this page

By clicking "Add topic", you agree to our Terms of Use and agree to irrevocably release your text under the CC BY-SA 3.0 License and GFDL
Karl Gruber (talkcontribs)

Im want us a template inside of the string <slippymap lat="48.07" lon="16.233333" z="15" w="360" h="360" layer="Mapnik" marker="0" /> lat und lon should be created through a template to read out metadata. e.g. <slippymap lat="{{Gdekoord-Nord|Hinterbrühl}}" lon="16.233333" z="15" w="360" h="360" layer="Mapnik" marker="0" /> But it doesn't work. Are there an other possibility. thx in adv.

קיפודנחש (talkcontribs)

you should use {{#tag:slippymap

see Help:Magic words (last item in table)


Karl Gruber (talkcontribs)

Sorry, but I am a little bit confused and can't understand. Would you be so helpfull and write me my sample: <slippymap lat="{{Gdekoord-Nord|Hinterbrühl}}" lon="16.233333" z="15" w="360" h="360" layer="Mapnik" marker="0" />. Thanks in advance --

קיפודנחש (talkcontribs)

according to the documentation, it should be something like:

 | lat = {{Gdekoord-Nord|Hinterbrühl}}
 | lon = 16.233333 
 | z = 15 
 | w = 360 
 | h = 360 
 | layer = Mapnik 
 | marker = 0

in your question, it seems that the tag itself has no body. if it would, you would want the body to appear as a nameless parameter - i ususally use "1 =" for nameless parameters.



Reply to "Template inside of slippymap"

Extension ImageMap with Extension Header Tabs

Deli68 (talkcontribs)

Hi, we're using both extensions and they're working very well on our wiki.

But now I'm stuck.

If I want to link to a tab (produced with Extension Header Tabs) from within that same page I can do it using the {{#switchtablink}} parser function and it works. The code looks like this:

{{#switchtablink:Tab name|Link text}}

Linking from an image using this description doesn't work. I get "<imagemap>-Fehler: ungültiger Titel im Link in Zeile 4". My code looks like this:


rect 688 261 871 346 [[{{#switchtablink:ABC|ABC}}]]
rect 909 550 1075 641 [[DEF|DEF]]

desc none

Do I miss something? Mostly it's just a forgotten pipe, a bracket too much or whatever... Unfortunately we have a closed wiki, so I can't post a link.

Any help/idea is highly appreciated. Thanks in advance!

MediaWiki 1.21.1, PHP 5.4.19, MySQL 5.5.32

Ciencia Al Poder (talkcontribs)

ImageMap is very simplistic, and it doesn't send the contents of the tag to the parser. Instead, it reads line by line, interpreting each line and generating links as needed.

It validates each link by looking if the link target is a valid page title (for internal links). If not, it throws that error.

There's no way to insert a parser function or even a Magic Word in the content of the link because of this. You should probably open a bug report for this.

Deli68 (talkcontribs)

Thanks a lot for your reply, even though it's not satisfying... I've opened a task on Phabricator T89643

Reply to "Extension ImageMap with Extension Header Tabs"
PhotographerTom (talkcontribs)

The Image Map Edit link (http://toolserver.org/~dapete/ImageMapEdit/ImageMapEdit.html?en) is saying that dapete's account has expired. Does anyone know who maintains this tool?

Reply to "Image Map Edit link"

PHP notices when running runJobs.php

Kghbln (talkcontribs)

With MW 1.21 and MW 1.22 I am once in a while getting these PHP notices when running runJob.php Cannot tell for earlier versions since I did not sysadministrate the wiki earlier.

PHP Notice:  Undefined variable: title in /.../extensions/ImageMap/ImageMap_body.php on line 165

Is this just the result of erroneous usage on some wiki pages or an issue to be rectified in the code base? I am asking here prior to reporting a possibly invalid bug.

Ciencia Al Poder (talkcontribs)


Although it's probably an erroneous usage (an imagemap without link), it does seem to be a bad quality code too, because a PHP notice shouldn't be there. Basically, the $title is not being defined in that particular code path (if there's no default link). If you have E_NOTICE errors enabled on the webserver, they may end being displayed on the page when it happens.

Kghbln (talkcontribs)

Thank you for your comment on this which made me report bug 66361 and your suggesting to widen error reporting. :)

Reply to "PHP notices when running runJobs.php"
Macaddct1984 (talkcontribs)

Hello, I'm trying to make an ImageMap template that accepts a size parameter. I've gotten as far as this and it still isn't working with an input such as: {{X9|400px}} using this at the beginning of the template: {{#tag:imagemap|File:New_Jersey_Counties.svg{{!}}thumb{{!}}right{{!}}{{{1{{!}}200px}}}{{!}}A clickable New Jersey county map ... }} Thanks!

Ciencia Al Poder (talkcontribs)

And what about: {{#tag:imagemap|File:New_Jersey_Counties.svg{{!}}thumb{{!}}right{{!}}{{{1|200px}}}{{!}}A clickable New Jersey county map ... }} ?

Using pipe instead of {{!}} for the parameter separator. At least, if I change the default 200px to something else, the image gets resized, so it should work, although I didn't checked transcluding the template.

Macaddct1984 (talkcontribs)

That fixed it, thank you! Is it worth adding something about that in the usage with templates, magic words, or parser functions. section? At the moment it reads as though every pipe in the source text should be replaced with a {{!}}

Ciencia Al Poder (talkcontribs)

Actually, the examples doesn't encode the pipe inside links, as it's not necessary in that context, but it's worth noting it. Done.

Reply to "Resizing an ImageMap with parameters"

externLink and $wgNoFollowDomainExceptions

2 (talkcontribs)

Currently the extension does not support:


I had to change Line 200 in ImageMap_body.php

// OLD
if ( $wgNoFollowLinks ) {
// NEW
if ( ($wgNoFollowLinks) AND (array_search ($externLink, $wgNoFollowDomainExceptions)) ) {
Reply to "externLink and $wgNoFollowDomainExceptions"
EEng (talkcontribs)

Not sure about prior versions, but I just noticed that under IE 11.0.9600.16411, everything works great at zoom 100%, but if I go to zoom 125% then some or all of the popups stop working. This even happens on the "Club" example on this MediaWiki page. In case you care, my particular application, with which I was just pleased as punch but may now need to abandon, is here EEng (talk) 00:41, 3 November 2013 (UTC)

Reply to "Zoom confuses it" (talkcontribs)

Hi, was hoping someone could put me out of my misery..

I'm trying to instal Media Wiki with ImageMap that's it. I keep getting left with white pages, some that I managed to turn into php error pages and then try to fix and now just white.

I have followed installation instructions as far as I know. The extension is visible under the special page. And the Wiki works fine excluding the extension. When I try and run the extension php file I just get white, I've tested it with another extension and same. From what I have been able to gather its probably a php error. Originally the server was still running 5.2 and when I first turned on error messages this was a problem due to __dir__, but have now tried it having updated the php on the sever to both 5.3 and 5.4. No doubt and obvious thing I'm doing wrong, but what??

Php settings are http://nunki.org/wiki/index.php/File:Php_Settings_1.png http://nunki.org/wiki/index.php/File:PhP_Settings_2.png

MediaWiki Version http://nunki.org/wiki/index.php/File:Mediawiki_Settings.png

Any help gratefully appreciated,

James (talkcontribs)

Notice some people are asking for the mw config screen details


Note this did enlighten me to the fact that I didnt have a apc of xcache enabled, I've since enabled apc which seems to have removed the warning but still whiter than white... :<

Ciencia Al Poder (talkcontribs)

What do you mean with When I try and run the extension php file?

The extensions PHP files aren't meant to be run. They extend MediaWiki Functionality but shouldn't be accessed from the web server directly.

I've edited the image's talk page, put the following code, and hit "show preview", and it seems to work as expected:

File:Mw config.png
rect 0 0 200 200 [[Main Page|Go to main page]]
Reply to "Getting Started"

Third link keeps messing up, slow to load

Bluesoju (talkcontribs)

I have this piece of code on my site @ http://www.koreanwikiproject.com/wiki : <imagemap> Image:Main_page_pic.png|center rect 7 39 368 89 [[Learn_Hangeul]] rect 27 107 363 157 [[Contributing]] rect 52 173 554 223 [[Translations]] rect 77 242 356 292 [[Flashcards]] rect 103 307 300 357 [[Quizzes]] rect 132 374 353 424 [http://www.facebook.com/koreanwikiproject] rect 188 441 385 491 [http://www.youtube.com/koreanwikiproject] </imagemap>

For some reason, when I hover over the link for Translation, it makes it the previous link, then all the links afterwards are messed up as well. Hovering over the links makes the loading animation too and it takes a really long time. Can anyone help please? Thanks

Bluesoju (talkcontribs)

Nevermind. The problem was the image map software kept loading an older image (which was bigger) and kept mapping coordinates that didn't exist.

Reply to "Third link keeps messing up, slow to load"

Why is the icon so different from the thumb icon?

TMg (talkcontribs)

Why is the icon a blue "i"? This is sooo different from the default double-rectangle thumb icon. There is currently a discussion in the German Wikipedia and I remember several earlier discussions. All users consider the blue "i" confusing. Why can't it be more similar to the default icon? Or a magnifying glass icon with a white outline? This would be very helpful, especially if an SVG map is shown in a smaller size and the user wants to enlarge it.

Mitchelln (talkcontribs)

It would be great if this couple be disabled completely via the MW link= parameter. I guess this extension was written before this parameter was added to images :)


קיפודנחש (talkcontribs)

actually, the link to the original image can easily be suppressed (as documented in the extension page) by adding the parameter

| desc none

(other possible values are "bottom-right" which is the default, "bottom-left", "top-right" and "top-left"). note that image copyright and good citizenship requires that a link to the original image will exist somewhere. this hold in wikis that adhere to CC-BY-SA, but may not be required in other wikis.


TMg (talkcontribs)
Alternative icons

This doesn't answer my question. Can we please change the (in my opinion) confusing blue "i" with something that looks like the default thumbnail icon or a magnifying glass?

Reply to "Why is the icon so different from the thumb icon?"