Latest Neocron News and Information

  • New test server patch #591 has been released to Vedeena

Template talk:Vendor

From Neocron Wiki
Jump to: navigation, search

Is it possible to make a template so we only have to add item id's and it will show a formated table with all the proper itemdb formatting? I've been looking at templates on mediawiki and it seems it is very easy if you know beforehand the amount of variables you'll get, but can't find if you can make it like depending on the amount of parameters? --Biglines 12:56, 24 June 2008 (BST)

I'll let Delphi say whether this is possible or not, since he's the master of template writing around here. It may need a combination of a wiki extension to make it possible.

--Brammers 13:47, 24 June 2008 (BST)

I havent come across a way to make the template dynamic, I have been looking into this as if you look at {{npcbox}} you will see that there are three optional arguments for the damage types - this was the quick and dirty fix that I did... Unfortunately I think it might be an ask Brammers nicely to make a wiki extension to do it ;) --δρDelphi (t)(c) 14:13, 24 June 2008 (BST)

Hmm been thinking about this and I could make a itemdb tag to do this. How about a wrapper command than can produce a table of items.

<itemdb:repeat_table columns="2" tag="itemdb:show_icon" items="100,101,102,500,1000,1012,2345"/>

Where tag is the normal item DB tag you want to use, and items is the list of items.

Then this would create the table with each item specifed in each cell, like what we have now.

This would have a few other bonuses. Since this would be 1 call to the THN API instead of lots of multiple calls, the page would render a hell of a lot quicker, and be much more gentle on the server resources.

Tell me what you think. --Brammers 16:33, 24 June 2008 (BST)

Yes! --Biglines 17:23, 24 June 2008 (BST)

Will the new images be with transparant background btw? in that case I would maybe be better looking if the black background I put in is deleted, since we cant edit the thn api, but still yes plz, would make a lot of difference. --Biglines 17:25, 24 June 2008 (BST)

Ok I'll plan to add this command in the 1.5.1 release (1.5.0 is feature frozen), it will be at least week or 2 before the new command makes it into the API.

As for transparent icons, not every icon is a trasparent PNG. They are slowly being updated, so to begin with, the table will need to be a black backgorund. --Brammers 19:37, 24 June 2008 (BST)