Difference between revisions of "Template:Image popup"

From City of Hope MUSH
Jump to navigation Jump to search
imported>Crystaltears83
(Created page with "<noinclude> ==Usage== <big>'''<nowiki>{{Image popup|Text|Filename|width=###|height=##|bgcolor=(color)|xtrnl=(condition)|link=(page)|alt=(text)}}</nowiki>'''</big> * You may <...")
 
imported>Crystaltears83
(Replaced content with "Did not work as intended, delete please :P")
 
Line 1: Line 1:
<noinclude>
+
Did not work as intended, delete please :P
==Usage==
 
<big>'''<nowiki>{{Image popup|Text|Filename|width=###|height=##|bgcolor=(color)|xtrnl=(condition)|link=(page)|alt=(text)}}</nowiki>'''</big>
 
 
 
* You may <nowiki>[[Link]]</nowiki> the '''Text'''.
 
* Filename defaults to '''No_pic.jpg''' if not defined.
 
* Default bgcolor is '''#FFFFFF''' {{popup|AKA|Also Known As}} '''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 ''e'''''xt'''''e'''''rn'''''a'''''l''' 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==
 
* <pre>{{Image popup|No_pic image on mouseover|No_pic.jpg}}</pre>
 
** {{Image popup|No_pic image on mouseover|No_pic.jpg}}
 
* <pre>{{Image popup|No_pic image on mouseover, 1/2 width, purple background|No_pic.jpg|width=150|bgcolor=purple}}</pre>
 
** {{Image popup|No_pic image on mouseover, 1/2 width, purple background|No_pic.jpg|width=150|bgcolor=purple}}
 
* <pre>{{Image popup|External image on mouseover|http://upload.wikimedia.org/wikipedia/mediawiki/a/a9/Example.jpg|external=yes|width=400}}</pre>
 
** {{Image popup|External image on mouseover|http://upload.wikimedia.org/wikipedia/mediawiki/a/a9/Example.jpg|external=yes|width=400}}
 
* <pre>{{Image popup|External image on mouseover, red background, too small of a box|http://upload.wikimedia.org/wikipedia/mediawiki
 
/a/a9/Example.jpg|xtrnl=y|bgcolor=red|width=200}}</pre>
 
** {{Image popup|External image on mouseover, red background, too small of a box|http://upload.wikimedia.org/wikipedia/mediawiki/a/a9/Example.jpg|xtrnl=y|bgcolor=red|width=200}}
 
* <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}}</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}}
 
 
 
==See Also==
 
* [[Template:popup]]
 
* [[Template:Short popup]]
 
* [[Template:Long popup]]
 
* [[Template:Custom popup]] -- Still incomplete, not working as intended {{popup|ATM|At The Moment}}.
 
 
 
 
 
==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|300}}}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|300}}}px|{{{width|300}}}x{{{height}}}px}}|center|{{#if:{{{link|}}}|{{#ifeq:{{{link|}}}|&empty;|link=|link={{{link}}}}}|{{#if:{{{alt}}}|alt={{{alt|}}}|{{#ifeq:{{{alt|}}}|&empty;|alt=|alt={{{1|}}}}}}}}}]] }}</span></span></onlyinclude>
 

Latest revision as of 11:40, 21 October 2013

Did not work as intended, delete please :P