Forum:Get inventory icon of item

From the RuneScape Wiki, the wiki for all things RuneScape
Jump to: navigation, search
Forums: Yew Grove > Get inventory icon of item
This page or section is an archive.
Please do not edit the contents of this page.
This thread was archived on 22 October 2011 by Nex Undique.

It would be cool if you could just use

{{InvIcon|Green dragonhide body}}

and get Green dragonhide body.png This can currently be achieved with items tradeable in GE with

{{GEIcon|Green dragonhide body}}

Green dragonhide body.png However with untradeable items, this can't be achieved. So i propose that Template:Infobox Item can be included (called?) with the option View=image or similiar, so you an just do

{{:Green dragonhide body|View=image}}

as the View=image is sent to the Infobox Item. Then you could make a template called InvIcon which contains the code


which can be called by

{{InvIcon|Green dragonhide body}}

Prayer-icon.pngTyiloTalkQuest.png 18:38, September 14, 2011 (UTC)

Discussion[edit source]

As nominator Prayer-icon.pngTyiloTalkQuest.png 18:39, September 14, 2011 (UTC)

Support - But how to do so, seeing how the naming conventions for inventory items aren't necessarily followed to a T. I mean, that example of a green dragonhide body just showed the image name lacks the apostrophe, for example (File:Green dragonhide body.png). Hofmic Talk 06:20, September 15, 2011 (UTC)

Support, if it can be done - Right now, there is one actual rule for how inventory images are named: It must contain the name of the item. In order for this to work, everything would have to be named the same (except for the name of the page it'll appear on, of course), which would require a teraton of moving. But the idea is good, if there are people willing to move all those images. -Hourglass (2011 Hallowe'en event) detail.png I Am Me Talk III The Spark.png- 18:40, September 17, 2011 (UTC)

Oh, I get it now. Well, I think I still support. -Hourglass (2011 Hallowe'en event) detail.png I Am Me Talk III The Spark.png- 11:34, September 18, 2011 (UTC)

Comment - I think you two are missing the point of what he's saying. It's not based on the image name, but rather what's in the image parameter on {{Infobox Item}}. On that matter, I'm not sure if it's really worth it to change the format of such a widely used template just so we can call the image. ʞooɔ 19:48, September 17, 2011 (UTC)

It could come in handy for other templates such as {{Infotable Bonuses row}}, wehre you might want to have an item that is not tradeable. kitty.pngPsycho Robot talkSilver bar.png 03:32, September 18, 2011 (UTC)
cook is right. That is what i meant. Prayer-icon.pngTyiloTalkQuest.png 19:00, September 18, 2011 (UTC)

Support - The file namespace is quite messy, and I think this would be very beneficial. It would bring some much needed consistency, and make adding inventory images much simpler, cleaner and faster. I don't see any harm by adding the required code to the infobox. Cheers, Chicken7 >talk 13:21, September 19, 2011 (UTC)

Wait, how would it bring consistency? ʞooɔ 16:51, September 19, 2011 (UTC)
I'm assuming he means how we'd use a consistent method of grabbing the icon rather than the inconsistent use of [[File:Funst00fhere...]]. Hofmic Talk 23:51, September 19, 2011 (UTC)

Oppose - If we'd make all inventory icons have consistent names, for a start, we could make it a lot easier. Also, getting the inventory icon from item pages would have the exact same problems as getting alch prices from the item pages, which have all been explained here. I don't think this is possible considering the amount of loading time required to get an inventory icon. In the long run, it would be a lot better to just move the inventory icon files manually, even, than loading the entire page just for one icon. JOEYTJE50TALKpull my finger 09:21, September 20, 2011 (UTC)

Neutral - Tylio, great idea, but I won't support until {{Exchange:Bucket|View=item}} is deleted and becomes {{Invicon|bucket}}. Also, InvIcon -> Invicon. If these are satisfied feel free to cross out these words and put support. --中亚人/中亞人 (Chinasian/Jeffwang16) 跟我谈话 14:43, September 25, 2011 (UTC)

{{:Exchange:<item>|View=<whatever>}} will not be deleted. That format forms the basis of our exchange page system. Template:InvIcon and Template:Invicon have been redirected to Template:GEIcon, which already does this - redirects are cheap. Quest.png Gaz Lloyd 7:^]Events!99s 15:40, September 25, 2011 (UTC)

Comment - Can this be closed? It is impossible to do this, per the things said at Forum:Using GEMW for High and Low Alchemy values in infoboxes, so I don't see why there should be any more discussion. JOEYTJE50TALKpull my finger 07:27, September 30, 2011 (UTC)

This could be done with JS, but it would be ugly and only load after page load. Prayer-icon.pngTyiloTalkQuest.png 16:50, September 30, 2011 (UTC)

Other solution - Another solution would be have a massive template containing the file names of all the different inventory icons, and call that every time. Example:

|Green dragonhide body = Green dragonhide body.png
|Oddball = Oddball aura.png
|No image.png

Prayer-icon.pngTyiloTalkQuest.png 13:23, October 1, 2011 (UTC)

I could easily program a bot, which could create this and keep it updated.
or... we make the same list of all item pages, and move all files with AWB or manually. Then it doesn't require such a big template, which probably takes quite long to load, I think, but we still got the same thing. Also we have consistency in those files already, which was the purpose in Forum:Filenames. JOEYTJE50TALKpull my finger 15:20, October 1, 2011 (UTC)
That would be the best solution. Prayer-icon.pngTyiloTalkQuest.png 15:55, October 1, 2011 (UTC)
I've made a long list of all files that don't have the same filename as the item's name in my sandbox (still listing the inventory icons of amounts, for example arrows). The links to move all files are listed here, but still need to be filtered a bit more. We could probably use this to move all files to the right names. Maybe the same can be done for other images that have a license on them (I could easily make more of such lists). If nobody objects, I'll move all files in that list that actually need moving to the consistent filename, and then I assume this thread can be closed (again, if nobody objects) JOEYTJE50TALKpull my finger 10:18, October 6, 2011 (UTC)

Close please - Dead discussion. --中亚人/中亞人 (Chinasian/Jeffwang16) 跟我谈话 00:50, October 21, 2011 (UTC)

The reason for that is that I don't have access to AWB now, so I can't do the moving of the files. When my computer is repaired, I can get AWB back and move the files and filelinks. I don't know if any of this still needs to be discussed, but at least that is the reason why nothing happened so far. JOEYTJE50TALKpull my finger 09:21, October 21, 2011 (UTC)

Closed - My understanding is that soon Joey, or another user, will take the necessary steps to implement this. Therefore, no more discussion is needed. ɳex undique 02:01, October 22, 2011 (UTC)