Template:Fanfile: Difference between revisions
(Duplicate of fanart for posts that contain files without thumbnails) |
m (Testing) |
||
Line 3: | Line 3: | ||
The upper row of the table is the image. The maximum thumbnail size will be 200px or 250px depending if it's the OP, plus 2x2px padding. Hence the max value. | The upper row of the table is the image. The maximum thumbnail size will be 200px or 250px depending if it's the OP, plus 2x2px padding. Hence the max value. | ||
--><tr><td style="padding: 2px;" colspan="2"><span class="plainlinks" {{#if:{{{mouseover|}}}|title="{{{mouseover}}}"|}}>[http://tgchan.org/kusaba/image-for/{{{board|questdis}}}/{{{1}}} | --><tr><td style="padding: 2px;" colspan="2"><span class="plainlinks" {{#if:{{{mouseover|}}}|title="{{{mouseover}}}"|}}>[http://tgchan.org/kusaba/image-for/{{{board|questdis}}}/{{{1}}} http://tgchan.org/kusaba/inc/filetypes/generic.png]</span></td></tr><!-- | ||
The second row contains a caption cell (may be empty) and the link to the post. | The second row contains a caption cell (may be empty) and the link to the post. |
Latest revision as of 20:36, 28 May 2018
This template is basically a duplicate of the fanart template but with minor chances so it uses the generic thumbnail instead of the thumb-for link, this is because some non-image posts such as mp4s use that. I've done it this way because I am lazy and don't want to risk breaking everything by editing template:fanart to have a if else statement in there. The documentation has also been shamelessly copied and edited.
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 questart
, which is otherwise exactly the same.) In short, just pass the post number:
{{fanfile|857}}
Which gives:
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.
- by
- Attribute the image's artist. Will be linked automatically.
Example
Markup | Result | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
= Fanart = {{fanfile|857|caption=Why [[Lohrke]]s are known for their hips.|by=Lucid}} {{fanfile|798}} {{fanfile|515|caption=Deme encounters [[Deep|Ven]]}} |
Fanart
|
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 withContent-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.