Template talk:Barter

From Lotro-Wiki.com
Jump to navigation Jump to search

Update

Updated to accomodate Level and a third barter item. Changes made are as follows:

  1. {{Barter|1@|2@Enforcer's Shoulder Guards|3@4,104|4@Skirmish Mark|5@6|6@Third Mark|7@}}
  2. {{Barter|1@|2@Enforcer's Shoulder Guards|3@4,104|4@Skirmish Mark|5@6|6@Third Mark|7@|8@Odothiulan Campaign Mark|9@}}
  3. {{Barter|1@|2@|3@Enforcer's Shoulder Guards|4@4,104|5@Skirmish Mark|6@6|7@Third Mark|8@|9@Odothiulan Campaign Mark|10@}}

wrong icon

This template assumes the icon name can be calculated from the item name. This is wrong in many cases.

For example:

  • Barter|Violet and for all other items where there is an icon name collision.
  • Barter|Heavy Sword Sheath and for all other items which use generic icons.

We fixed this for the Template:Reward some time ago. We need to do something like: [[Item:{{{1|}}}|mode=Icon]] [[Item:{{{1|}}}|{{#if:{{{rename|}}} | {{{rename}}} | {{#if:{{{2|}}} | {{{2}}} | {{{1}}} }} }}]] here.

RingTailCat (talk) 17:30, 25 May 2012 (EDT)

Barter does not easily work for items with generic icons as the icon name needs to be used - and as most icons are now generic this is a pain. the template reward can generally be used instead as this will bring in the current icon for the item. Noddi (talk) 00:37, 14 April 2018 (UTC)

Barter vs. Reward

From a quick survey, I'm concluding that the only difference between this template and Template:Reward is the advantage here of having the icons able to float left and fixing that horrid issue of lines flowing underneath the image. If this could be added to Reward, would it be possible/desirable to combine these two, or am I missing other significant differences? Sethladan 21:04, 14 June 2012 (EDT)

I agree, combining is in order -- The differences I see... looking at the page: Orc Reaver Skills we find
1,500 Commendations {{Barter|Commendation|1,500 Commendations}}
Converting this to Reward yields
1500 Commendation {{Reward|Commendation|1500|Commendations}}
Which makes the differences between the two templates obvious
  1. no plural
  2. no comma in the number
  3. The number ON the icon is a separate discussion at Template talk:Reward#Amount reads Faintly
My guess is that both the floating text issue and the way the template is constructed makes its parentage "Template:Item" -- which is completely unused now. WHY Barter was created instead of just using Template:Item, I have no guess.
By modifying "Template:Reward" and using syntax like: {{Reward|<name>|<amount>|<rename>}} and
  1. Getting rid of the keyword "plural=" and just making the rename value positional as it is in virtually everything else and allowing the positional value <amount> to be null would make the tag "Reward" /Barter/Item/whatever be much more consistant to how it is being used (or desired to be used) across the WIKI.
  2. Similarly -- just ignore any "c=" parameters found.
things become much simpler.
As for the "Float" business... I would make the "float=left" standard. I can't think of a situation where the base table would be so short as to require some portion of the name/rename to wind-up under the icon.
We could then change the description on the Template:Reward/doc page to read:
This template produces a link to a specific item along with the item's icon.
Hovering the mouse over the link generates a "pop-up" describing the item.
When used in a table, all text will appear to the right of the icon, on two lines if necessary.
Does a BOT conversion seem reasonable? -- I don't know how consistent the usage of Barter happens to be. I guessing that it is probably pretty standard.
There appear to be very few pages using the template (transclusions cause double counting in the "what lists here) listing, but I'm guessing that several of them use it extensively. ( Orc Reaver Skills is transcluded into Orc Reaver for example.) I know that if I could use emacs to edit the page, the changes would be quick and painless with multiple keyboard macros. Even so with the Rich Text editor that is part of the Wiki, it is not that difficult to cut and paste.
--Wm Magill - Valamar - OTG/OTC (talk) 19:08, 15 June 2012 (EDT)
Finding your suggestion a bit late, Seth, but I agree. Merging templates is a good idea. The fewer the better. Basically we just need to figure out which features we are using (want to support), which way should be default, and in which order the different extra parameters would kick in. IMHO the Reward template is the most used, hence I guess it is the default, or close to. Barter seems to be used when Reward is missing something, such as floating icon, or text to the left or right, plural (alternative text) is supported by both
If there are other templates that also do a similar job, which I do not know about, I think these two should also be merged into this one. But does this not make Rewards bulky and hard to use? Not if the default is set up in a good way. None of the parameters need to be set so it is not much to remember, really ;(
-- Zimoon 02:54, 31 August 2012 (EDT)