Template talk:AH/1

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:

The usage is (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, but I haven't been able to find a replacement for. ~ 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:
 * I haven't tested this, but it should work. If 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  is defined, then it will display "Cannot be auctioned, traded, or bazaared." ~ Karuberu 00:52, 4 April 2007 (EDT)
 * I haven't tested this, but it should work. If 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  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 variable to , 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:

The usage is (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... -- 16:31, 24 May 2007 (CDT)

It is. -- 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. -- 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, but that's not possible with the way the template's set-up at the moment (aside from using  , 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? -- 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. -- 17:37, 24 May 2007 (CDT)

There's also "Breads & Rice" and "Meat & Eggs". I could just put a  (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. -- 00:06, 25 May 2007 (CDT)

I'd like to keep the s 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  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. -- 14:27, 25 May 2007 (CDT)

Ok, I changed the code slightly to allow easier adding of s 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. -- 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? -- 16:32, 15 June 2007 (CDT)

You mean, have it add the category to the item page? -- 16:41, 15 June 2007 (CDT)
 * Yes. I think it already does this for the other categories? -- 17:02, 15 June 2007 (CDT)
 * If you mean adding a  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:
 * This will automatically add the items to the appropriate category/categories. I don't see a downside. Feel free to test with AH2. -- 18:31, 17 June 2007 (CDT)
 * This will automatically add the items to the appropriate category/categories. I don't see a downside. Feel free to test with AH2. -- 18:31, 17 June 2007 (CDT)

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? -- 18:37, 17 June 2007 (CDT)
 * Don't think so. Misc. has a move tag on it.  Otherwise I think they are all there.  I think we'd need to change "Other" to "Others" in the AH template where applicable. Actually the template should say "Others" anyway in the text as well.  -- 18:49, 17 June 2007 (CDT)


 * It will put items like Silica into Alchemy as well (i.e. materials that are not synthed by the craft but are used by the craft). I think this is probably past due anyway.  If they are in the AH category we should follow. -- 19:26, 17 June 2007 (CDT)


 * I concur. -- 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  categorization 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 would automatically add it to Category:Bonecraft. This would be less of a hassle maintaining pages that utilize these categories, or incorporating new ones. -- 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. -- 21:51, 19 June 2007 (CDT)

Here's the previous discussion: Template talk:Craft. 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. -- 08:43, 29 August 2007 (CDT)