Open main menu
Home
Random
Donate
Recent changes
Special pages
Community portal
Preferences
About Stockhub
Disclaimers
Search
User menu
Talk
Contributions
Create account
Log in
Editing
Module:Pseudo image/doc
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Usage == This is designed to be used with a template like [[:Template:Pseudo image]] which receives the parameters that ''used'' to go to a File: or Image: thumbnail. For example, <nowiki>[[File:Abortionmethods.png|thumb|right|220px|Example: chart of abortion times]]</nowiki> is replaced in the template by <nowiki>{{Pseudo image|thumb|right|220px|link=:File:Abortionmethods.png|Example: chart of abortion times|image={{#invoke:Block diagram|main|''a bunch of stuff to draw the diagram as divs''}}}}</nowiki> The current division of labor in the process is that the [[Template:Pseudo image]] accepts this call, and outputs the graphics, while this module is limited to sorting out the parameters. Therefore, calls to the module itself accept an extra parameter ''query=(field name)'' and return the desired field for use within the template. The field names presently supported are: * ''thumb'' - returns the value "yes" if there a |thumb| or |thumbnail| is given. * ''frame'' - returns "yes" if there is a |frame| * ''px'' - returns the horizontal pixel size ### if there is a |###px| or |###x##px| * ''xpx'' - returns the vertical pixel size ### if there is a |##x###px| or |x###px| * ''float'' - returns ''left'', ''right'', ''center'', ''none'' if any one of these is present * ''vertical'' - returns ''baseline'',''middle'',''sub'',''super'',''text-top'',''text-bottom'',''top'', or ''bottom'' if any of these is present * ''caption'' - returns the first field that isn't any one of the preceding. Note: as a convenience, it also ignores blank fields and picks a later nonblank field instead, though that shouldn't happen anyway. * If two different values are given for the same field (''Pseudo image|thumb|left|right|center|'', whichever comes later as they're listed above should dominate, but let's call it "undefined", i.e. don't do this. ;) * Note that this module ignores fields like alt=, link= etc. for determining the caption because they are not unlabeled fields, but should actually return the values if queried anyway. But there's no obvious reason not to use those as simply <nowiki>{{{alt|}}},{{{link|}}}</nowiki> etc. without #invoking anyway.
Summary:
Please note that all contributions to Stockhub may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Stockhub:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)