Forum:Automatic link formatting

I am currently contemplating implementing an extension that'd allow us to alter how default ( Page ) links to a page look like on a per-page basis. Essentially, it'd allow you to type a basic link and get a formatted text output: Note that this only applies to default links (links without a specified caption text) -- if you wanted to do something particularly fancy, like, you'd still use our current syntax; and if you wanted a normal link, you could just append a pipe:. The choice of what to display for which pages is independent of the extension itself, so the examples above are not necessarily binding -- we could use the Shadowmourne style for item links, for instance.

For wiki-related purposes, the links would behave as ordinary links -- not template/page transclusions, as the current item/loot/quality system works.

Do you have any thoughts, suggestions, or questions related to this? &mdash; foxlit (talk) 22:58, 9 November 2010 (UTC)


 * No thanks, I'd rather have a default choice that how we link now would show a link, not something colored in brackets and icons everywhere. -- 23:05, 9 November 2010 (UTC)


 * I'm with gourra in this. As well, such a change decreases the consistency of how the markup is used, which makes it harder for people to jump in and change things and expect certain outputs for the person's input markup. Plus, this creates something of a dependency of an extension on templates, which is somewhat backward. --Sky (talk) 23:45, 9 November 2010 (UTC)


 * I'm not convinced that the "But I want a link by default!" case has much merit -- most links to database content are already formatted using those templates, to the point that it's the defacto default, only a much bigger pain for the editors to type. Check it out: Item, Achievement, Quest... seems like the majority of incoming links is passed through a formatting template anyway. Ultimately, I do not see article paragraphs becoming christmas trees because of this change -- moderation in formatting use is ensured by editors, and this doesn't make it particularly hard. It would be helpful if you could point out concrete pages that would prove troublesome here.
 * My personal opinion is that this change would vastly improve usability for editors: adding a quest/item/achievement link is no longer an exercise in "What is that link template called again? Do I want quest or questlong? What do I pass it? In what order? Is this a group quest or an elite quest? Screw it, I'm going home." -- the change makes it a simple "Do I want to draw attention to this link, or blend it in with the other text?" choice, and the behavior and syntax can be explained in a single sentence, rather than miles of template documentation. As an additional benefit, we get links that reflect article content, rather than the randomly-sprinkled instances of questlong/loot that may fall out of sync with the article they're linking to.
 * I don't consider "dependency of an extension on templates" to be an argument at all -- the extension is blissfully ignorant of templates, nor would it matter if it wasn't. &mdash; foxlit (talk) 00:24, 10 November 2010 (UTC)

And that's your personal opinion. I'm of the opinion that we should be keeping things consistent. If I want a link, I want a link. If I want a pretty link, I want a template/pretty link. If I want a quest, then I'll use a quest template. I see where you're coming from with "do I want to draw attention?", but manipulating current syntax in that manner will make things more confusing for newbies. End of story. I would be fine with supporting a parser type syntax, or the xml looking syntax of &lt;item>xxx&lt;/item>, or even &lt;item name="xxx" />, but I see your examples as an abuse and usurpation of the linking syntax. (As a note, Teomyr was looking into doing this sort of thing way back in 2007.) Further, there is already extensive documentation on the difficulties and perks of the current linking syntax, such as the pipe-trick and others (which we could and should have a local copy of); extending the documentation to cover your case would be, as before, a nightmare of consistency. "Link this like this, but this like this for all these other things" is somewhat stupid. --Sky (talk) 00:47, 10 November 2010 (UTC)
 * I would say it does matter if it were (as that's your opinion and you didn't offer much of a reason to support your opinion&mdash;mine obviously disagrees), but as it's not, it's a moot point.
 * It's not really stretching the normal syntax to any significant degree -- Shadowmourne still produces a link to Shadowmourne, formatted as the server wants it to be. If you want to format it differently, the situation is the same as it is now -- you have to use the piped link syntax or some template. I do not think this is much in conflict with existing documentation: "Link like this to produce a link to the page; link like that to customize the link's appearance; these are some templates you might like." MediaWiki can already produce several different types of links from the same syntax, so adding a few more does not seem like a big stumbling block for newbies, and is a major time-saver for editors who know how it works.
 * I do not particularly like the alternate tags you suggested: they end up being longer than the current implementation, at which point they aren't saving me, as an editor, any effort. Using the internal link syntax also keeps the wikitext compatible with standard MediaWiki without the extension. &mdash; foxlit (talk) 01:56, 10 November 2010 (UTC)
 * Approve. I think that automatically formatting links based on the page linked to is an awesome idea. Jamash (talk) 00:56, 10 November 2010 (UTC)
 * I'd be for this in the sense that we get quest-like formatting out of this instead of questlong-style. Just enough to get the javascript tooltip working. The Master's Plan would output the code generated by and the like. Jaina Proudmore ->.
 * The issue, of course, is with items/spells/achievements. I don't see an easy solution with these other than to display the colored brackets like we do now with loot/achievement/ability. Just without the achievement point icon. -- k_d3 01:26, 10 November 2010 (UTC)
 * I thought I'd hear this from you, especially with all the toolips generated by NPC and quest pretty much everywhere possible. The one thing we need to ask is if we really need this? -- 20:40, 10 November 2010 (UTC)
 * Like I said on IRC last night, making things easier for editors (and bots!) gets a vote from me. I would much rather see articles and template calls full of Links than links. Since you're aware of how I have been making articles lately, you know that I use the latter for semantic purposes rather than formatting purposes, these days. (As compared to my The Scepter of the Shifting Sands quest chain crusade a few years back&mdash;has it really been that long?&mdash;which had icons everywhere...) I want the links to mean something, rather than be a blind pointer elsewhere.
 * Bot-assisted editing cycles actually being able to handle native links rather than our templated-approximation of them would be quite useful and I'd vote yes to this proposal for that aspect alone. That JS tooltips would work everywhere is a nice bonus, but, as was also pointed out on IRC, not the point of this. -- k_d3 21:11, 10 November 2010 (UTC)
 * The problem I have though is with the proposed changes to | and NPC links, having the levels and factions being default just clutters the whole thing. Imagine an article that have a lot of links to characters. -- 00:50, 11 November 2010 (UTC)
 * Is there any way to have something like  and   somewhat like how   and   work for templates? --[[Image:gengar orange 22x22.png]] Fandyllic (talk &middot; contribs) 6:19 PM PST 10 Nov 2010
 * And where exactly would those be? -- 08:02, 11 November 2010 (UTC)
 * I didn't say those tags existed, I was just asking if we could implement something that would work with new tags. Did you read what I said? --[[Image:gengar orange 22x22.png]] Fandyllic (talk &middot; contribs) 9:45 AM PST 11 Nov 2010
 * I think the question was how would they work? We could theoretically implement it that way on an item-by-item basis but what would be the point there? -- 16:47, 11 November 2010 (UTC)
 * Maybe just  for those people who want their links to be more plain in areas like history, lore, or non-list sections. I misspoke when comparing them to the include tags. A better example might be  . If link formatting is turned on globally, it could get out of control and seems to act contrary to the concerns voiced in Forum:Abuse of Template:Npc on links.
 * As to how they would work, I'd have to see the actual code for some ideas, but it doesn't seem far fetched. --[[Image:gengar orange 22x22.png]] Fandyllic (talk &middot; contribs) 9:51 AM PST 11 Nov 2010
 * I think the intent is to do something like Shadowmourne to not render an item link. -- 16:54, 11 November 2010 (UTC)
 * ...and most people won't want to go back and do that to a whole raft of links all over the wiki. If like 20 links appear in a section and you want to turn off the formatting for all of them, adding 20 pipes is not going to be desirable. Unless we have a bot to add pipes to everything and then remove them selectively. Both ideas don't sound so good to me. --[[Image:gengar orange 22x22.png]] Fandyllic (talk &middot; contribs) 9:59 AM PST 11 Nov 2010
 * I agree, we probably don't want to use the normal link syntax for just this reason. But an easy syntax to remove all the guesswork would be nice. -- 17:02, 11 November 2010 (UTC)
 * As I've said before, it would be interesting to see specific examples that might cause a problem here. Taking a hypothetical page with lots of character links into consideration, there are a number of questions one might ask -- why does the page have so many character links? what is it actually linking to? does it needlessly repeat links to the same page? do none of those links have captions? In the end, my feeling is that the number of pages where this is a problem is probably minor compared to the number of pages where it is not. Let us suppose, however, that there is a legitimate page that becomes problematic with this formatting, and consider how we might be able to deal with that:
 * The simplest solution is to simply get editors to use piped link syntax (which would not be formatted) where formatting behavior is not desired. We already rely on our editors to make judgements as to what looks best in any specific situation, so this seems like solution that is reasonable in the long term.
 * We can control which pages use the linked formatting, both broadly (through templates used on those pages), or an individual page basis. For instance, Thrall is linked predominantly to refer to the character rather than any specific NPC instance, so it might be wise to avoid formatting those links needlessly. Note that the table above lists a monster as an example; the case for monsters is a bit more clear-cut than for NPCs.
 * We could disable the link formatting functionality on a per-page basis -- if a page suffers horribly from this change and you have no time to fix it, disabling all formatted links on the page is an easy short-term option.
 * Finally, if one just can't stand formatted links on a wiki, it should be possible to disable the formatting through personal CSS.
 * My key point here is that that this change keeps the choice of how a particular link appears in the article firmly in the individual editors' hands -- it is still easy to get a non-formatted link, and it is much easier for editors to create formatted links where they think it would be appropriate. While the transition might be problematic for a small fraction of our existing content, the methods outlined above should make those problems surmountable. We also do not have to push out all of the changes at once -- it might make sense to experiment on particular classes of articles and see what issues (if any) we experience.
 * In my mind, the ease-of-use offered by the change outweigh the costs of updating some pages once. &mdash; foxlit (talk) 21:25, 11 November 2010 (UTC)
 * I think it would be a good idea to consider the comments made in Forum:Abuse of Template:Npc on links before proceeding with this idea. Ddcorkum (talk) 19:10, 11 November 2010 (UTC)
 * The two topics are orthogonal -- it is already possible to misuse our current syntax, and it is equally possible to get desired formatting using the proposed syntax. I do not think it makes sense to conflate enforcement of currently non-existent style guidelines and automatic link style functionality in general. &mdash; foxlit (talk) 20:13, 11 November 2010 (UTC)


 * This would become the worst mess ever if applied. Just imagine those long paragraphs of 100% lore full of useless npclinks.
 * I'm sorry, but no.--Lon-ami (talk) 20:34, 15 November 2010 (UTC)
 * Do you have any specific examples that we couldn't easily fix? -- k_d3 20:49, 15 November 2010 (UTC)
 * Foxlit: the difference between how it is now and with automatic link formatting is that we can now choose where and how we want to make the formatting. With the automatic link formatting you're making this by default, which is against any kind of readability. Do we really want for example normal item links to get formatted into colored links with brackets? That's not at all what I'd like to see.
 * kd3: There's no reason to "fix" it if there's no change in the first place. -- 09:38, 16 November 2010 (UTC)
 * I believe me and g0urra have worked through most on this on IRC; among other things, I really do imagine that every time I type out Nordrassil Wrath-Kilt in article text, I really mean . &mdash; foxlit (talk) 22:28, 18 November 2010 (UTC)

I'd like to thank everyone for the feedback on this. As well as some support, I see a some concerns expressed here: "this stretches internal linking syntax," which I believe is dealt with appropriately by observing that the linking syntax is already used for a wide variety of things, and that the proposed change still fits within the linking semantics; and "this may interfere with existing content," which is a concern that I share. I've outlined several options for dealing with the latter, and, ultimately, believe that those issues will be relatively minor, and resolvable on an individual page basis. However, the lack of responses listing any concrete pages on which this would pose a problem shows that it is difficult to predict what the effects on the actual content would be, so we probably can't get anything useful out of continuing that discussion.

Where do we go from here? I'm planning on deploying the extension when I am confident that it works correctly; by itself, the extension would not change the appearance of any links on the wiki. Following that, we can gradually add link formatting to different classes of pages, watching closely for any problems that this may cause and dealing with them as they arise. There are classes of pages for which I think that this would be easy -- for instance, virtually nothing links to quest pages directly (without using a template or piped link syntax), so modifying how the default links to those appear should not pose a problem. In other cases, like NPCs or monsters, this may prove too drastic a change to deal with -- and I'll be happy to leave those well enough alone if this is the case.

The end goal here is to improve the usability -- the current situation, where the majority of incoming links to some pages use formatting templates, isn't optimal -- you really shouldn't have to remember syntax to produce a formatted link to a quest page, or resort to onlyinclude-hackery to make formatted linking to achievement pages work. &mdash; foxlit (talk) 22:28, 18 November 2010 (UTC)
 * WP:BOLD. I like it. --[[Image:gengar orange 22x22.png]] Fandyllic (talk &middot; contribs) 4:24 PM PST 18 Nov 2010
 * I assume that anything done will be reversible? If so, I support implementing it on a incremental basis... maybe with quests first.  Once we understand the challenges with that, we'll be better prepared for a more complex implementation.  If it isn't reversible, then I would like to see some form of sandbox testing before going into dangerous territory.  I think you have an idea with great potential, but lets approach it cautiously.  D.D. Corkum (T / C) 01:00, 21 November 2010 (UTC)

Сan we get ext. DEFAULTLINK for Russian Wowpedia? Strizh (talk) 07:06, 9 December 2010 (UTC)

Current status
This is currently enabled for quest pages:
 * How does it work? : The quest infobox uses the  parser function to configure formatting for incoming links. Custom link formatting is enabled only for pages in the main namespace; the function argument must contain a link to the article.
 * How do I stop it from affecting a specific link/section/page? : For a single link, provide a caption ( caption ), or prefix the destination with a colon ( Link ).
 * For a block of links, use the ... tag.
 * For all links on a specific page, use the __NODEFAULTLINKS__ magic word.

The usual call for thoughts and problem reports applies. &mdash; foxlit (talk) 21:36, 23 November 2010 (UTC)


 * Appears to be working randomly... one pages have it activated and others not, no matter you make editions or not.--Lon-ami (talk) 13:07, 24 November 2010 (UTC)
 * Links to pages where it does not work would be helpful in determining why that is. &mdash; foxlit (talk) 13:29, 24 November 2010 (UTC)

It doesn't handle self-links very well: Ritual Materials. -- 02:57, 25 November 2010 (UTC)
 * Noted; I'll get that fixed -- it is actually actively avoiding formatting self-links, but that seems like the right thing to do in this case. &mdash; foxlit (talk) 22:21, 25 November 2010 (UTC)
 * Fixed. &mdash; foxlit (talk) 23:02, 26 November 2010 (UTC)

It doesn't handle Group N syntax either. See Amphitheater of Anguish. -- k_d3 03:48, 29 November 2010 (UTC) How'd I never notice that!? -- k_d3 03:54, 29 November 2010 (UTC)
 * Using correct questbox parameters on the quest pages goes a long way to fixing this. ;) -- 03:52, 29 November 2010 (UTC)

Achievements?
Did automatic link formatting get turned on for achievements or am I hallucinating? -- Fandyllic (talk · contribs) 11:50 PM PST 3 Dec 2010
 * Yes it did. -- 14:05, 4 December 2010 (UTC)
 * Yes; I'm keeping to my plan of gradually adding them to more page types. The table at the top of this page illustrates the progress so far. As before, I do want to hear about any problems or inconveniences this causes: if something does not look right, make a note of it here. &mdash; foxlit (talk) 20:26, 4 December 2010 (UTC)
 * Oh yeah, I should have looked at the table for status. --[[Image:gengar orange 22x22.png]] Fandyllic (talk &middot; contribs) 3:18 PM PST 4 Dec 2010

Complaints
I'll keep this real simple: Ashbringer, Frostmourne, and The Skull of Gul'dan should absolutely not be item-linked everywhere. In fact, they should almost never be item-linked anywhere. I even went through and REMOVED all the item links of Ashbringer awhile back once it became clear it would never be player-obtained. -- Dark T Zeratul (talk) 08:26, 7 December 2010 (UTC)
 * Fixed; although The Skull of Gul'dan probably needs a proper, item-specific page. &mdash; foxlit (talk) 14:39, 7 December 2010 (UTC)
 * It would seem appropriate to have Skull of Gul'dan page (currently a redirect) for lore and leave the other page with just in-game info plus disambig and some explanation as to why it isn't the real one. --[[Image:gengar orange 22x22.png]] Fandyllic (talk &middot; contribs) 3:17 PM PST 7 Dec 2010
 * Alright, I made a page for the trinket. -- Dark T Zeratul (talk) 23:23, 7 December 2010 (UTC)

I'd like to mention that this new scheme, of using the (former?) ability spell, achievement links breaks the  method of extending a link. Sorry, but all the above was TL;DR at the moment. Though... I'm with Gourra that I prefer using a shiny template on demand, and specifically not by default. --Eirik Ratcatcher (talk) 19:33, 10 December 2010 (UTC)