Topic on Extension talk:ImageMap

Extension ImageMap with Extension Header Tabs

3
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:

{{#tag:imagemap|
Datei:XYZ.JPG{{!}}1000px

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"