Changes

Jump to navigation Jump to search

Template talk:Item

6,310 bytes added, 13:07, 8 December 2020
m
Cleaning up red links, no other changes
Are there any objections to adding a "Stats" section to the template with information like weight, volume, damage type (for items that can be used as weapons), and any other important stats people can think of? - [[User:Telarin|Telarin]]
: I would rather see a second template for such info - [[User:KaiH|KaiH]] ([[User talk:KaiH|talk]]) 11:57, 22 November 2012 (CST)
 
Anyone objecting to renaming this template to "Crafted" or "Craftable", since crafted items is what it really is about. My brain keeps demanding that I do it... [[User:Arvid|Arvid]] 16:29, 15 May 2010 (UTC)
Why did you make the image file format default to JPG? There are next to none jpeg format image files, if any, at least I can't find any File entries in the history for the past 30 days / 500 entries. Resulting in disabling any item template on the wiki showing an image.
The portable network graphics format has been used throughout the wiki, they're of good image quality and moderate file size if the [[images]] are saved correctly. I can't see a lot of jpeg format files being uploaded any time soon. A consistent transition would be if the existing png image files were converted and uploaded in advance instead. But then again, for what reason? --[[User:Ulviirala|Ulviirala]] 21:42, 24 May 2010 (UTC)
I changed it based on the following correspondence with MrBloodworth:
Oh that went faster than I expected, I managed to make it happen. I would still choose the [[:Image:Small padlock.png]] (256 colours optimized octree palette @ 40kb) over the the [[:Image:Small padlock.jpg]] (compression level 10 (closer to "best quality") at 12kb) though. When comparing both images thoroughful, you will notice the jpeg "smudging" around all edges caused by the compression which only at compression level 1 (37kb image) disappears in this picture. This is why I personally prefer PNG anytime which also has been developed for a web standard. Please consider the course of action for images. --[[User:Ulviirala|Ulviirala]] 07:01, 27 May 2010 (UTC)
 
 
Aight, this might be the final edit. Unfortunately I couldn't come up with something cleaner and more efficient but it will do the job of helping in the change. Feel free to optimize this if you're more familiar with the wiki markups :)
 
<pre>{{#ifexist: Image:{{{name|{{PAGENAME}}}}}.{{{imagetype|jpg}}}
| [[Image: {{{image|{{{name|{{PAGENAME}}}}}.{{{imagetype|jpg}}}}}}|center|90px|A {{{name|{{PAGENAME}}}}}]]
| {{#ifexist: Image:{{{name|{{PAGENAME}}}}}.{{{imagetype|png}}}
| [[Image: {{{image|{{{name|{{PAGENAME}}}}}.{{{imagetype|png}}}}}}|center|90px|A {{{name|{{PAGENAME}}}}}]]
| [[Image: {{{image|{{{name|{{PAGENAME}}}}}.{{{imagetype|jpg}}}}}}|center|90px|A {{{name|{{PAGENAME}}}}}]]
}}
}}</pre>
 
The Pseudocode for this is:
 
<pre>IF a JPG image exists THEN
Display the JPG
ELSE
IF PNG image exists THEN
Display the PNG
ELSE
Display redlink for JPG</pre>
 
It turned out to be nested to finally display a redlink for a jpeg when no images exist, so nobody uploads another png instead. I couldn't find any documentation on the ''imagetype'' keyword at all so I don't know if this could be written more tidy. :\ --[[User:Ulviirala|Ulviirala]] 09:48, 28 May 2010 (UTC)
 
Lol, ''imagetype'' is a variable I included to make it possible to use any imageformat. I guess it's not really needed anymore and so can safely be removed. I originally attempted to do what you did, but found that my brain at that time wasn't quite sharp enough to grasp the intricasies needed. So thank you very much for your work here. It is very much appreciated. [[User:Arvid|Arvid]] 14:19, 28 May 2010 (UTC)
 
Hmm.. right now I'd appreciate if you remove that variable, since atm it will take me some time to wholly grasp that code :/. [[User:Arvid|Arvid]] 14:24, 28 May 2010 (UTC)
 
Oohhh now I get it >_< it's { { { variablename | default value } } } so it either takes the specified value for variablename or default value. I thought it was a parser function and it would evaluate all image format file extensions, because for example a jpg's file extenstion can be either .jpg or .jpeg. Now I can make much more sense of it! And this code wouldn't work very well either! :D Oh well, wiki markup sure likes brackets eh. I edited it so it should work better now but it still looks sorta twisted. --[[User:Ulviirala|Ulviirala]] 17:11, 29 May 2010 (UTC)
 
'''I don't know what is wrong, but this template adds redlinks on [[Special:WantedPages]] for the not used *.jpg/*.png even if one of them is existing. Could someone with more knowledge in 'Wiki markup language' check the code and hopefully fix it?''' - [[User:KaiH|KaiH]] 11:56, 7 August 2011 (UTC)
 
: It looks like this cannot be fixed. It seems to add it to the wanted pages when it checks if it exists, regardless if it exists or not. --[[User:Manny|Manny]] 14:03, 7 August 2011 (UTC)
 
: Switching the item template to only JPG would remove the need for this template, but that will require quite some work. Mediawiki has a bugzilla report on this but nothing has been done about it for years --[[User:Manny|Manny]] 14:43, 7 August 2011 (UTC)
 
::Thank you for looking into it, Manny. Leaves us to the workaround to add |image=imagename.jpg (or *.png) to the item page whenever there is an image added, at least that removes the entry on the WantedPages. - [[User:KaiH|KaiH]] 16:32, 7 August 2011 (UTC)
 
== Needs Image Category ==
Is it possible to automaticly include the Needsimage template if the redlink for the image is shown or adding it to Category:Needs image? --[[User:Ago|Ago]] 01:37, 17 September 2010 (UTC)
 
Yes. Category:Needs image is now added to all item pages missing an image :). [[User:Arvid|Arvid]] 09:17, 28 November 2010 (UTC)
 
== Rare ==
Would anyone object to me adding a rare parameter to describe the possible bonuses experienced when using a rare? --[[User:Marni|Marni]] ([[User talk:Marni|talk]]) 08:52, 4 January 2013 (CST)
: I'm not sure that fits in the template, which is all about creation and improvement and less about use. But the information from rare should definitely go somewhere on each item page. [[User:Thorgot|thorgot]] ([[User talk:Thorgot|talk]]) 11:12, 4 January 2013 (CST)
:: Understandable. I'll make a smaller template to describe rare-itivity. Maybe having a section for each level of rareness. (Did I just make up some new words?) --[[User:Marni|Marni]] ([[User talk:Marni|talk]]) 06:30, 6 January 2013 (CST)
 
== Numbering not working ==
<pre># [[Activate]] a {{{active}}}
# Right-click a {{{passive}}}
{{#if:{{{assemble|}}}|#{{{assemble}}}}}
{{#if:{{{group|}}}|# Open submenu "Create > [[{{{group}}}]]"}}</pre>
 
The above code is not continuing the numbering in the creation section of the template. Could someone please take a look? --[[User:Marni|Marni]] ([[User talk:Marni|talk]]) 09:03, 4 January 2013 (CST)
:The [[fishing rod]] page seems fine. I get
:1. Activate a fishing line (regular)
:2. Right-click a shaft (1.00 kg)
:3. Use the String action to complete the rod
:--[[User:Ago|Ago]] ([[User talk:Ago|talk]]) 11:52, 4 January 2013 (CST)
::Already fixed by thorgot --[[User:Ago|Ago]] ([[User talk:Ago|talk]]) 12:05, 4 January 2013 (CST)
 
I was in the middle of fixing it. I couldn't get assemble and group showing up on the list without the other breaking, so I gave up and switched it to an HTML list. --[[User:Thorgot|thorgot]] ([[User talk:Thorgot|talk]]) 12:09, 4 January 2013 (CST)
 
== Added decoration and storage params, made switches case-insensitive, combined with Template:ItemM ==
 
I was asked to make this change, I tested it a lot and there are no pages I can find that look any different or are broken unless the new parameters are used. I also combined Template:ItemM with this one so the fences no longer need their own template. If there are any objections please say so. --[[User:NESGamepro|NESGamepro]] ([[User talk:NESGamepro|talk]]) 15:18, 18 August 2013 (CEST)
editor
7,290

edits

Navigation menu