Template:Fanart/Doc: Difference between revisions

From questden
Jump to navigationJump to search
LionsPhil (talk | contribs)
Moving stubbed documentation
 
LionsPhil (talk | contribs)
Documenting fanart template
Line 1: Line 1:
<noinclude>:'''This is a template documentation page.''' It is transcluded into place.</noinclude>
<noinclude>{{Notice|majortext=This is a template documentation page.|minortext=It is transcluded into place.}}</noinclude>
This inlines posts from fanart threads (''technically'', any thread, but that's not what it's for) with links to the post. It doesn't play nice with galleries because Mediawiki syntax doesn't allow for it.
This template inlines posts from fanart threads nicely with links to the post. In short, just pass the post number:
<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.


'''Work in progress.'''
= Advanced usage =
;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.
 
= Example =
<table style="width: 100%">
<tr><th style="width: 50%">Markup</th><th style="width: 50%">Result</th></tr>
<tr>
<td><pre><nowiki>= Fanart =
{{fanart|857|caption=Why [[Lohrke]]s are known for their hips.}}
{{fanart|798}}
{{fanart|515|caption=Deme encounters [[Deep|Ven]]}}</nowiki></pre></td>
<td>
= Fanart =
{{fanart|857|caption=Why [[Lohrke]]s are known for their hips.}}
{{fanart|798}}
{{fanart|515|caption=Deme encounters [[Deep|Ven]]}}
</td>
</tr>
</table>
 
= Maintenance notes =
* 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/image-for/'''board'''/'''post'''</code> &rarr; <code>&hellip;kusaba/'''board'''/src/'''fullsize-image-filename'''</code>
**<code>&hellip;kusaba/thread-for/'''board'''/'''post'''</code> &rarr; <code>&hellip;kusaba/'''board'''/res/'''thread'''.html#'''post'''</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 doesn't play nice with galleries because Mediawiki syntax doesn't allow for external images in them.

Revision as of 23:28, 6 September 2011

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

This template inlines posts from fanart threads nicely with links to the post. In short, just pass the post number:

{{fanart|857}}

Which gives:

857.png

In practice you probably want to put a whole bunch of these under a = Fanart = heading toward the bottom of the quest's page.

Advanced usage

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.

Example

MarkupResult
= Fanart =
{{fanart|857|caption=Why [[Lohrke]]s are known for their hips.}}
{{fanart|798}}
{{fanart|515|caption=Deme encounters [[Deep|Ven]]}}

Fanart

857.png
Why Lohrkes are known for their hips.
798.png
515.png
Deme encounters Ven

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 galleries because Mediawiki syntax doesn't allow for external images in them.