Community Archive
Template talk:AH/1
|
This is an archive of past discussions. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
Hmm... I'm not sure I like this... I have a snippet from the new full-page template I'm working on that might work better:
{{#if:{{{1|}}}|{{#ifeq:{{{1}}}|Exclusive|'''''Cannot be [[Auction House|auctioned]], [[Trade|traded]], or [[Bazaar|bazaared]].'''''|'''[[Auction House#Categories|Auction House Category]]:''' [[{{{1}}}]]}} {{#if:{{{2|}}}|> [[{{{2}}}]] {{#if:{{{3|}}}|> [[{{{3}}}]]|}}|}}|'''''Cannot be sold on the [[Auction House]].'''''}}
The usage is {{AH|category|subcategory|subcategory}} (the subcategories are optional). This would show "Cannot be sold on the Auction House." if nothing is defined, "Cannot be auctioned, traded, or bazaared." if "Exclusive" is defined, and would allow for up to three categories (which, I believe, is the max).
However, this requires the Parser Functions extension, which FFXIclopedia doesn't seem to have. I know {{ifdef}} will work in place of #if:, but I haven't been able to find a replacement for #ifeq:. ~ Karuberu 23:28, 3 April 2007 (EDT)
The lack of said parcer functions is why something that complex isn't used. I'd prefer to use something you can program with an if/then, but what can you do. It works the way it is now, though, and it's easy enough to use. --Chrisjander 00:13, 4 April 2007 (EDT)
- It'd be easy enough to add the extension, but I won't get into all that. Here's a similar version using only {{ifdef}}:
{{ifdef|{{{1|}}}|'''[[Auction House#Categories|Auction House Category]]:''' [[{{{1}}}]] {{ifdef|{{{2|}}}|> [[{{{2}}}]] {{ifdef|{{{3|}}}|> [[{{{3}}}]]}}}}{{ifdef|{{{no trade|}}}|<br>'''''Cannot be traded or bazaared.'''''}}}}{{ifndef|{{{1|}}}|{{ifdef|{{{no trade|}}}|'''''Cannot be [[Auction House|auctioned]], [[Trade|traded]], or [[Bazaar|bazaared]].'''''}}{{ifndef|{{{no trade|}}}|'''''Cannot be sold on the [[Auction House]], but can be [[Trade|traded]] and [[Bazaar|bazaared]].'''''}}}}
- I haven't tested this, but it should work. If {{{no trade}}} is defined (the variable name could be changed), then it will display "Cannot be traded or bazaared." (on a new line after the categories, if they're defined); If no categories are defined, then it will display "Cannot be sold on the Auction House, but can be traded and bazaared."; If no categories are defined and {{{no trade}}} is defined, then it will display "Cannot be auctioned, traded, or bazaared." ~ Karuberu 00:52, 4 April 2007 (EDT)
What about cannot be auctioned, but can be bazaared and traded? --Chrisjander 11:21, 4 April 2007 (EDT)
- Or for that matter, can be all three? --Chrisjander 11:23, 4 April 2007 (EDT)
- Since almost every non-Ex item can be bazaared/traded, it's assumed that it can be if there's no message stating otherwise. Or, at least, that's my logic. But, if you want, I can insert a message for items that are able to be traded (an example message to go off would be nice). ~ Karuberu 14:36, 4 April 2007 (EDT)
- The point is to have it there for items that aren't immediately apparent. For example, a Quadav Augury Shell cannot be sold on the auction house, but can be bazaared and traded. I feel it's important to not leave it as assumed. --Chrisjander 15:24, 4 April 2007 (EDT)
- Yes, I see your point. I changed the "Cannot be sold on the Auction House." to "Cannot be sold on the Auction House, but can be traded and bazaared." (the code didn't need any changing, just the wording). I also changed the {{{no bazaar}}} variable to {{{no trade}}}, since bazaaring is really just another form of trading. ~ Karuberu 15:47, 4 April 2007 (EDT)
- Well, I tested the code, and it didn't work. I had thought that {{ifdef}} has an else case, but it doesn't. However, I modified the code to work with {{ifndef}}, which is basically the opposite of {{ifdef}}, and it works now. ~ Karuberu 16:13, 4 April 2007 (EDT)
- If we can get the extension, it would work great. --Chrisjander 16:29, 4 April 2007 (EDT)
ParserFunctions
The ParserFunctions extension was recently installed, so I'm resubmitting my previous suggestion:
{{#if:{{{1|}}}|{{#ifeq:{{{1}}}|Exclusive|'''''Cannot be [[Auction House|auctioned]], [[Trade|traded]], or [[Bazaar|bazaared]].'''''|'''[[Auction House#Categories|Auction House Category]]:''' [[{{{1}}}]]}} {{#if:{{{2|}}}|> [[{{{2}}}]] {{#if:{{{3|}}}|> [[{{{3}}}]]|}}|}}|'''''Cannot be sold on the [[Auction House]], but can be [[Trade|traded]] and [[Bazaar|bazaared]].'''''}}
The usage is {{AH|category|subcategory|subcategory}} (the subcategories are optional). This would show "Cannot be sold on the Auction House, but can be traded and bazaared." if nothing is defined, "Cannot be auctioned, traded, or bazaared." if "Exclusive" is defined, and would allow for up to three categories (which, I believe, is the max).
~ Karuberu 16:15, 24 May 2007 (CDT)
Lemme make sure the max categories is three... --◄Chrisjander► t/ c 16:31, 24 May 2007 (CDT)
It is. --◄Chrisjander► t/ c 16:32, 24 May 2007 (CDT)
Make your changes, and we'll test drive it on a couple of pages and put it to the rest of the crew. --◄Chrisjander► t/ c 16:34, 24 May 2007 (CDT)
I've already noticed a slight problem: The AH categories don't work quite right. A good example is Ammo & Misc: it needs to be [[Ammo and Misc.|Ammo & Misc.]], but that's not possible with the way the template's set-up at the moment (aside from using Ammo and Misc.{{!}}Ammo & Misc., which isn't pretty). I'm going to remove the auto-linking to solve the problem for now, though I'd like to eventually solve the problem with coding instead. ~ Karuberu 17:28, 24 May 2007 (CDT)
I think it's only with Ammo & Misc... hmmm. I'd honestly still rather have the links there... maybe just do away with the Ampersand? --◄Chrisjander► t/ c 17:33, 24 May 2007 (CDT)
Well, I'm not sure why that worked... but hey it worked. We can just add the links as part of the variable. --◄Chrisjander► t/ c 17:37, 24 May 2007 (CDT)
There's also "Breads & Rice" and "Meat & Eggs". I could just put a {{#ifeq:{{{2}}}|Ammo & Misc.|[[Ammo and Misc.|Ammo & Misc.]]|[[{{{2}}}]]}} (and similar a #ifeq for each of the others) into the template, since these seem to be the only problems. ~ Karuberu 17:48, 24 May 2007 (CDT)
- Tested it on Gysahl Greens, it works as planned. ~ Karuberu 18:02, 24 May 2007 (CDT)
Here's a full list of all the AH categories displayed using this template. Some links need redirect pages created for them, and "Automaton" links to the pet, not the category, but there doesn't appear to be any other problems. ~ Karuberu 19:09, 24 May 2007 (CDT)
You can throw in some "if"s for those five red ones, and why don't I make a page for "Automaton (Auction House)" that we can make another "if" for. --◄Chrisjander► t/ c 00:06, 25 May 2007 (CDT)
I'd like to keep the #ifeqs down to a minimum, since they complicate the code. The red links could just be created as redirects to the appropriate category (most categories have redirects to them anyways, such as Alchemy redirecting to Category:Alchemy). I will put in an #ifeq for "Automaton", but there is already an AH page for them at Category:Automaton Attachments. Should I link there or to your "Automaton (Auction House)" page? ~ Karuberu 14:02, 25 May 2007 (CDT)
There was? huh... link it to the category, I'll change the links so they point to the correct places. And I'll delete the Automaton page I made. --◄Chrisjander► t/ c 14:27, 25 May 2007 (CDT)
Ok, I changed the code slightly to allow easier adding of #ifeqs and added Automaton Attachments to them. I tried to use Category:Automaton Attachments, but it was buggy (the colon in front of the link created a problem, I'm not sure why). ~ Karuberu 14:42, 25 May 2007 (CDT)
Looks good, that probably needed a redirect anyway. --◄Chrisjander► t/ c 15:45, 25 May 2007 (CDT)
Categorization
Can we get this to automatically add category:Others and it's subcetagories too? Any reason not to? --GAHOO t/ c 16:32, 15 June 2007 (CDT)
You mean, have it add the category to the item page? --◄Chrisjander► t/ c 16:41, 15 June 2007 (CDT)
- Yes. I think it already does this for the other categories? --GAHOO t/ c 17:02, 15 June 2007 (CDT)
- If you mean adding a
[[Category:<AH category>]]line to any page it's used on, no, it does not do this (and I would rather that it doesn't, to keep it simple); This template only adds an AH line with the appropriate categories and subcategories (or the exclusive or non-auctionable message). If you mean linking to the AH page, you already can (see my sandbox for examples of all the AH categories). ~ Karuberu 21:50, 15 June 2007 (CDT)- I propose adding the following code:
<includeonly> {{#if:{{{1|}}}|{{#ifeq:{{{1}}}|{{{1}}}|[[category:{{{1}}}]]}} |}} {{#if:{{{2|}}}|{{#ifeq:{{{2}}}|Ammo & Misc.|[[category:Ammo and Misc.]]|{{#ifeq:{{{2}}}|Automaton|[[Category:Automaton Attachments]]|[[category:{{{2}}}]]}} |}} |}} {{#if:{{{3|}}}|{{#ifeq:{{{3}}}|Breads & Rice|[[category:Breads and Rice]]|{{#ifeq:{{{3}}}|Meat & Eggs|[[Category:Meat Dishes]]|[[category:{{{3}}}]]}} |}} |}} </includeonly>
- This will automatically add the items to the appropriate category/categories. I don't see a downside. Feel free to test with {{AH2}}. --GAHOO t/ c 18:31, 17 June 2007 (CDT)
- I propose adding the following code:
- If you mean adding a
Hmmm, I can't think of a reason not to have it do this. Are there any AH categories that we don't have Categories for? --◄Chrisjander► t/ c 18:37, 17 June 2007 (CDT)
- I concur. --◄Chrisjander► t/ c 19:40, 17 June 2007 (CDT)
- I'd rather not complicate the template with this feature, but if you both think it's a good idea, there's not much I can do (I have no good arguement against it). I'll go ahead and update the code. ~ Karuberu 01:30, 18 June 2007 (CDT)
- Added
#switchcategorization for all missing categories. Some of them have the {{move}} tag on them, but that can be dealt with when/if the move goes through. ~ Karuberu 01:59, 18 June 2007 (CDT)
- Ok, I'm seeing a rather large problem... All pet items will be categorized into "Weapons." I know this technically works for items like Pet Food Beta, which use the ammo slot (and thus, could be stretched to be considered a weapon), but Gysahl Greens, no matter how you put it, it not a weapon. Any ideas on how to fix this somewhat humorous problem? ~ Karuberu 15:00, 18 June 2007 (CDT)
On top of automatic category inclusion for the AH template, would it also be appropriate to do this with craft templates as well? For example putting a {{Craft|Bonecraft|(82)}} would automatically add it to Category:Bonecraft. This would be less of a hassle maintaining pages that utilize these categories, or incorporating new ones. --User:Charitwo/Sig 18:18, 19 June 2007 (CDT)
This was discussed, and the short answer is no. It's utilized for too many different uses to work in that regard. --◄Chrisjander► t/ c 21:51, 19 June 2007 (CDT)
Here's the previous discussion: Template talk:Craft#Auto-Categorize. However, I do agree; If the template was used more responsibly, the auto-categorization feature would make it much easier to keep track of and change categories for items. ~ Karuberu 23:23, 19 June 2007 (CDT)
I couldn't get Meat & Eggs to work when making new pages this morning. --User:Charitwo/Sig 08:43, 29 August 2007 (CDT)
Source entry: Template talk:AH/1. Cached on this server on 5 November 2026.
