User:Igottheconch/Map

From MediaWiki.org
Jump to navigation Jump to search

I was able to figure out how to make the text on the map links. But I have spent all today and yesterday trying to color the links on the map, per Wikipedia:Link_color:

[[example|<span style="color:green;">This page exists.</span>]]

I do not really understand how the links are built. There is no [[ | ]] anywhere. It is as frustrating as learning templates again for the first time, as I did years ago.

If you are bored and want a small challenge, i would be most grateful. I need to learn how these hash tags work -- i don't understand them at all. The variables I am starting to grasp and can start writing a variables for dummies.

Anyway, if you are bored it would be very appreciated. Igottheconch 06:11, 13 December 2011 (UTC)

But you already changed link color from red to blue? I guess you could try modifying Template:Masterpopup, just wrap it all or just the {{{label|}}} with span. This might already work: <span style="color:green;">{{{label|}}}</span> Instead of a specific color you can of course use another template parameter to specify it from outside. --Danwe 13:57, 13 December 2011 (UTC)
I think i tried this. hmm...
Actually I never changed the text color. What happens when the text becomes a link, it aquires the link color. the default link color on the wiki is blue. Your awesome span style is still on Template:1 (previously Template:Overlay2) , (<span style="font-family:arial black;color:red;font-style:bold;font-size:22">) increasing the size and font type of the text, but not changing the color of the link.
I changed the link color in the template using .css in MediaWiki:Monaco.css but this .css does not work when the template is embedd into another page.
Let me try your solution in Masterpopup :) Thank you! have a wonderful day. I think I am going to use your awesome Extension:Variables and completely rewrite the way our two wikis use templates, increasing the load speed. Your incredible extensions just open a world of possibilities. Igottheconch 15:50, 13 December 2011 (UTC)
hmmm... all the text disappeared when I attempted this.[1] The text and pop ups are still in the coding though, they just don't appear.
RE:Instead of a specific color you can of course use another template parameter to specify it from outside.
Eventually thats the plan :)
I will play with it some more. If you have any flashes of genius, always interested. :)
spoke with a career counseler and decided not to pursue a computer sci degree. Igottheconch 17:10, 13 December 2011 (UTC)
Update

You nailed it. most definetly the solution is found in the label line of template:masterpopup.

I entered TEST in template:masterpopup:

{{#tag:balloon
|{{#if: {{{label|}}}<!--
-->|{{{label|}}} TEST<!--
-->|{{#tag:imagemap|Image:{{{icon|Idcard002_small_icon.png}}}{{!}}link={{{link|error}}}{{!}}{{{iconwidth|50px}}}{{!}}{{{alt|}}} default [[{{{link|error_no_link}}}|]]

Sure enough TEST showed up after each label on the map.

So it has something to so with the template not accepting standard span style. I have benn playing with escape characters similar to Template:! in an attempt to make the template allow span style. so far no luck. Igottheconch 21:43, 14 December 2011 (UTC)

Attempt:

-->|{{bracket1}}span style{{=}}"color:green;"{{bracket2}}{{{label|}}} TEST{{bracket1}}/span{{bracket2}}<!--

Does not work, where:

template:bracket1 is <
template:bracket2 is >
template:= is =

Comparing the coding for the working map (no span style) and the map with no labels (with span style) on Word 2007, using the compare feature I learned:

Modified Original
<span style="position:absolute; left:817.5px; top:352.25px; z-index:1">
<span style="font-family:arial black;color:red;font-style:bold;font-size:22">
<a href="Uninvited Guests" >
<span onmouseover="balloon.showTooltip(event,'load:customicon5',0,290)"   style="cursor:pointer">
</span>
<span style="position:absolute; left:817.5px; top:352.25px; z-index:1">
<span style="font-family:arial black;color:red;font-style:bold;font-size:22">
<a href="Uninvited Guests" >
<span onmouseover="balloon.showTooltip(event,'load:customicon5',0,290)"   style="cursor:pointer">• Uninvited Guests TEST
</span>

The text of the link, • Uninvited Guests TEST is missing from the modified map.

possible solution

Extension:Balloons#Formatted_text_and_images_inside_the_balloon

I really never worked with that balloon extension so I don't really know much about how to make extensive formatting work there. Did this work^^? Another way could be to use the style attribute of the balloon tag! --Danwe 00:55, 15 December 2011 (UTC)