Difference between revisions of "Template:Fanart/Doc"

From questden
m (Fix typo)
(Removed nsfw example image, expanded examples, cross-linked related templates)
Line 1: Line 1:
 
<noinclude>{{Doc}}</noinclude>
 
<noinclude>{{Doc}}</noinclude>
This template inlines posts from fanart threads nicely with links to the post. (If you want to inline some other art from the board, use <code>questart</code>, which is otherwise exactly the same.) In short, just pass the post number:
+
This template inlines posts from fanart threads nicely with links to the post (click the [[Image:LinkToBoard.gif]] icon).
<pre><nowiki>{{fanart|857}}</nowiki></pre>
 
Which gives:
 
{{fanart|857}}
 
In practice you probably want to put a whole bunch of these under a <code><nowiki>= Fanart =</nowiki></code> heading toward the bottom of the quest's page.
 
  
__NOTOC__ <!-- Because of the example, the ToC is nonsense -->
+
A post ID number is the only required input.
= Advanced usage =
+
 
 +
==Optional Parameters==
 
;board:Specify the board on which to find the post, e.g. <code>|board=quest</code>. The default is ''questdis''.
 
;board:Specify the board on which to find the post, e.g. <code>|board=quest</code>. The default is ''questdis''.
 
;caption:Put a caption below the image. Captions can contain limited markup, but shouldn't be too long.
 
;caption:Put a caption below the image. Captions can contain limited markup, but shouldn't be too long.
 
;by:Attribute the image's artist. Will be linked automatically.
 
;by:Attribute the image's artist. Will be linked automatically.
 +
;mouseover:Specifies mouseover text for the thumbnail. 
  
= Example =
+
==Examples==
<table style="width: 100%">
+
{| class="wikitable" style="margin: auto; background-color:#FFFFFF; width:95%; text-align:center" cellpadding="2"
<tr><th style="width: 50%">Markup</th><th style="width: 50%">Result</th></tr>
+
! Description
<tr>
+
! Code
<td><pre style="white-space: pre-wrap;"><nowiki>= Fanart =
+
! Output
{{fanart|857|caption=Why [[Lohrke]]s are known for their hips.|by=Lucid}}
+
|-
{{fanart|798}}
+
|Short and simple.<br>Just the provide the post ID number.
{{fanart|515|caption=Deme encounters [[Deep|Ven]]}}</nowiki></pre></td>
+
|
<td>
+
<nowiki>{{fanart|111411}}</nowiki>
 +
|
 +
{{fanart|111411}}
 +
|-
 +
|Credit the artist, if you know who they are.<br>It's okay to leave it blank if you don't know and the artist didn't leave their name.
 +
|
 +
<nowiki>{{fanart|110849|by=LimeBreaker}}</nowiki>
 +
|
 +
{{fanart|110849|by=LimeBreaker}}
 +
|-
 +
|Captions can be informative or silly.<br>You can put links inside of captions.
 +
|
 +
<nowiki>{{fanart|120758|caption=[[Polo Quest|Polo]] in a pile}}</nowiki>
 +
|
 +
{{fanart|120758|caption=[[Polo Quest|Polo]] in a pile}}
 +
|-
 +
|Long captions may extend past the edge of the thumbnail, which doesn't look great.
 +
|
 +
<nowiki>{{fanart|122701|caption=Here's some Moon Elf from Audit}}</nowiki>
 +
|
 +
{{fanart|122701|caption=Here's some Moon Elf from Audit}}
 +
|-
 +
|You can make long captions look better by using <code><nowiki><br></nowiki></code> to manually break up lines
 +
|
 +
<nowiki>{{fanart|122701|caption=Here's some<br>Moon Elf<br>from Audit}}</nowiki>
 +
|
 +
{{fanart|122701|caption=Here's some<br>Moon Elf<br>from Audit}}
 +
|-
 +
|You can also hide text that will appear when people move their cursor over the thumbnail.
 +
|
 +
<nowiki>{{fanart|122612|mouseover=surprise!}}</nowiki>
 +
|
 +
{{fanart|122612|mouseover=surprise!}}
 +
|-
 +
|If you want to link an image that's not on the /questdis/ board, you need to specify the board name.
 +
|
 +
<nowiki>{{fanart|board=draw|39396}}</nowiki>
 +
|
 +
{{fanart|board=draw|39396}}
 +
|}
  
= Fanart =
+
==See also==
{{fanart|857|caption=Why [[Lohrke]]s are known for their hips.|by=Lucid}}
+
*[[Template:questart]] A renamed version of the fanart template.  Maybe someone once intended to differentiate these templates, but currently using one or the other is just a formatting convention.
{{fanart|798}}
+
*[[Template:Flash]] The fanart template, but for flash.
{{fanart|515|caption=Deme encounters [[Deep|Ven]]}}
+
*[[Template:Fanfile]] The fanart template, but for mp4s.
</td>
+
*[[Template:Fanaudio]] The fanart template, but for audio files.
</tr>
+
*[[Template:Fakeart]] The fanart template, but it lets you pick a different thumbnail for fakeouts.
</table>
+
*[[Template:Comic]] Provides a text link to an image posted on the board, instead of providing a thumbnail.
 +
*[[Template:NSFWsubpage]] Used to segregate NSFW images when creating galleries for quests.
  
= Maintenance notes =
+
==Maintenance notes==
 
* It depends on the set of redirects that let you look up kusaba resources by post number:
 
* It depends on the set of redirects that let you look up kusaba resources by post number:
 
**<code>&hellip;kusaba/thumb-for/'''board'''/'''post'''</code> &rarr; <code>&hellip;kusaba/'''board'''/thumb/'''thumbnail-filename'''</code>
 
**<code>&hellip;kusaba/thumb-for/'''board'''/'''post'''</code> &rarr; <code>&hellip;kusaba/'''board'''/thumb/'''thumbnail-filename'''</code>
Line 37: Line 75:
 
**And because MediaWiki is kind of dumb, a hack that lets it ignore a <code>.png</code> extension on these and let the browser sort out the details with <code>Content-Type</code>.
 
**And because MediaWiki is kind of dumb, a hack that lets it ignore a <code>.png</code> extension on these and let the browser sort out the details with <code>Content-Type</code>.
 
* It makes assumptions about the maximum size of thumbnail images, namely that they'll never exceed 250px width.
 
* It makes assumptions about the maximum size of thumbnail images, namely that they'll never exceed 250px width.
* It doesn't play nice with galleries because Mediawiki syntax doesn't allow for external images in them.
+
* It doesn't play nice with gallery tags (<code><nowiki><gallery></gallery></nowiki></code>) because Mediawiki syntax doesn't allow for external images in them.

Revision as of 23:09, 23 July 2018

This is a template documentation page. It is transcluded into place.

This template inlines posts from fanart threads nicely with links to the post (click the LinkToBoard.gif icon).

A post ID number is the only required input.

Optional Parameters

board
Specify the board on which to find the post, e.g. |board=quest. The default is questdis.
caption
Put a caption below the image. Captions can contain limited markup, but shouldn't be too long.
by
Attribute the image's artist. Will be linked automatically.
mouseover
Specifies mouseover text for the thumbnail.

Examples

Description Code Output
Short and simple.
Just the provide the post ID number.
{{fanart|111411}}
111411.png
LinkToBoard.gif
Credit the artist, if you know who they are.
It's okay to leave it blank if you don't know and the artist didn't leave their name.
{{fanart|110849|by=LimeBreaker}}
110849.png
By LimeBreakerLinkToBoard.gif
Captions can be informative or silly.
You can put links inside of captions.
{{fanart|120758|caption=[[Polo Quest|Polo]] in a pile}}
120758.png
Polo in a pileLinkToBoard.gif
Long captions may extend past the edge of the thumbnail, which doesn't look great.
{{fanart|122701|caption=Here's some Moon Elf from Audit}}
122701.png
Here's some Moon Elf from AuditLinkToBoard.gif
You can make long captions look better by using <br> to manually break up lines
{{fanart|122701|caption=Here's some<br>Moon Elf<br>from Audit}}
122701.png
Here's some
Moon Elf
from Audit
LinkToBoard.gif
You can also hide text that will appear when people move their cursor over the thumbnail.
{{fanart|122612|mouseover=surprise!}}
122612.png
LinkToBoard.gif
If you want to link an image that's not on the /questdis/ board, you need to specify the board name.
{{fanart|board=draw|39396}}
39396.png
LinkToBoard.gif

See also

  • Template:questart A renamed version of the fanart template. Maybe someone once intended to differentiate these templates, but currently using one or the other is just a formatting convention.
  • Template:Flash The fanart template, but for flash.
  • Template:Fanfile The fanart template, but for mp4s.
  • Template:Fanaudio The fanart template, but for audio files.
  • Template:Fakeart The fanart template, but it lets you pick a different thumbnail for fakeouts.
  • Template:Comic Provides a text link to an image posted on the board, instead of providing a thumbnail.
  • Template:NSFWsubpage Used to segregate NSFW images when creating galleries for quests.

Maintenance notes

  • It depends on the set of redirects that let you look up kusaba resources by post number:
    • …kusaba/thumb-for/board/post…kusaba/board/thumb/thumbnail-filename
    • …kusaba/image-for/board/post…kusaba/board/src/fullsize-image-filename
    • …kusaba/thread-for/board/post…kusaba/board/res/thread.html#post
    • And because MediaWiki is kind of dumb, a hack that lets it ignore a .png extension on these and let the browser sort out the details with Content-Type.
  • It makes assumptions about the maximum size of thumbnail images, namely that they'll never exceed 250px width.
  • It doesn't play nice with gallery tags (<gallery></gallery>) because Mediawiki syntax doesn't allow for external images in them.