Template:Image popup
(test to allow inline external image on mouseover) |
(added warning) |
||
(One intermediate revision not shown) | |||
Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
+ | '''''NOTE: not working yet - must be missing some teplate scripting engine in Wiki/MediaWiki''''' | ||
+ | |||
==Usage== | ==Usage== | ||
<big>'''<nowiki>{{Image popup|Text|Filename|width=###|height=##|bgcolor=(color)|xtrnl=(condition)|link=(page)|alt=(text)}}</nowiki>'''</big> | <big>'''<nowiki>{{Image popup|Text|Filename|width=###|height=##|bgcolor=(color)|xtrnl=(condition)|link=(page)|alt=(text)}}</nowiki>'''</big> | ||
Line 11: | Line 13: | ||
** NOTE: External images do NOT follow the width rules, be sure to enter an appropriate width or your popup box size/border may be too small or too large. | ** NOTE: External images do NOT follow the width rules, be sure to enter an appropriate width or your popup box size/border may be too small or too large. | ||
* link= & alt= cannot be used together. You can either specify a different page for the page to go to or a different text but not both. | * link= & alt= cannot be used together. You can either specify a different page for the page to go to or a different text but not both. | ||
+ | |||
==Examples== | ==Examples== | ||
Line 25: | Line 28: | ||
/a/a9/Example.jpg|xtrnl=y|bgcolor=red|width=500}}</pre> | /a/a9/Example.jpg|xtrnl=y|bgcolor=red|width=500}}</pre> | ||
** {{Image popup|External image on mouseover, red background, too large of a box|http://upload.wikimedia.org/wikipedia/mediawiki/a/a9/Example.jpg|xtrnl=y|bgcolor=red|width=500}} | ** {{Image popup|External image on mouseover, red background, too large of a box|http://upload.wikimedia.org/wikipedia/mediawiki/a/a9/Example.jpg|xtrnl=y|bgcolor=red|width=500}} | ||
+ | |||
==See Also== | ==See Also== | ||
- | * [[Template:popup]] | + | * [[Template:Image popup galeg]] |
- | * [[Template: | + | |
- | * [[Template: | + | |
- | * [[Template: | + | ==Taken From== |
+ | http://ddowiki.com/ | ||
+ | * [[http://ddowiki.com/page/Template:Image popup]] | ||
+ | * [[http://ddowiki.com/page/Template:popup]] | ||
+ | * [[http://ddowiki.com/page/Template:Short popup]] | ||
+ | * [[http://ddowiki.com/page/Template:Long popup]] | ||
==Coding== | ==Coding== | ||
- | </noinclude><onlyinclude><span class="has_tooltip">{{#switch:{{lc:{{{external|{{{xtrnl|no}}}}}}}}|1|on|true|y|yes=[{{{2}}} {{{1}}}]|#default={{{1}}}}}<span class="tooltip" style="z-index: 5;width: {{{width| | + | </noinclude><onlyinclude><span class="has_tooltip">{{#switch:{{lc:{{{external|{{{xtrnl|no}}}}}}}}|1|on|true|y|yes=[{{{2}}} {{{1}}}]|#default={{{1}}}}}<span class="tooltip" style="z-index: 5;width: {{{width|90}}}px; padding: 5px; background-color: {{{bgcolor|#FFFFFF}}}; border: 1px solid #DDDDDD; text-align: center;">{{#switch:{{lc:{{{external|{{{xtrnl|no}}}}}}}}|1|on|true|y|yes={{{2}}}|#default=[[{{ns:6}}:{{{2|No_pic.jpg}}}|{{#ifeq:{{{height|-1}}}|-1|{{{width|90}}}px|{{{width|90}}}x{{{height}}}px}}|center|{{#if:{{{link|}}}|{{#ifeq:{{{link|}}}|∅|link=|link={{{link}}}}}|{{#if:{{{alt}}}|alt={{{alt|}}}|{{#ifeq:{{{alt|}}}|∅|alt=|alt={{{1|}}}}}}}}}]] }}</span></span></onlyinclude> |
Current revision as of 06:33, 27 August 2012
NOTE: not working yet - must be missing some teplate scripting engine in Wiki/MediaWiki
Contents |
Usage
{{Image popup|Text|Filename|width=###|height=##|bgcolor=(color)|xtrnl=(condition)|link=(page)|alt=(text)}}
- You may [[Link]] the Text.
- Filename defaults to No_pic.jpg if not defined.
- Default bgcolor is #FFFFFF Template:Popup white.
- Default width is 300. (A width greater than 500 will likely end up off the page on smaller screens)
- Default height is inherited based on width and size of image.
- Default external condition is no. Acceptable true switches are: 1, on, true, y, yes
- NOTE: External images do NOT follow the width rules, be sure to enter an appropriate width or your popup box size/border may be too small or too large.
- link= & alt= cannot be used together. You can either specify a different page for the page to go to or a different text but not both.
Examples
-
{{Image popup|No_pic image on mouseover|No_pic.jpg}}
- No_pic image on mouseover
-
{{Image popup|No_pic image on mouseover, 1/2 width, purple background|No_pic.jpg|width=150|bgcolor=purple}}
- No_pic image on mouseover, 1/2 width, purple background
-
{{Image popup|External image on mouseover|http://upload.wikimedia.org/wikipedia/mediawiki/a/a9/Example.jpg|external=yes|width=400}}
-
{{Image popup|External image on mouseover, red background, too small of a box|http://upload.wikimedia.org/wikipedia/mediawiki
-
{{Image popup|External image on mouseover, red background, too large of a box|http://upload.wikimedia.org/wikipedia/mediawiki
See Also
Taken From