Template talk:Ln

From Wikipedia, the free encyclopedia
  (Redirected from Template talk:Lnt)
Jump to: navigation, search

Add an edit beta or vedit link[edit]

I'd like to add another link to the output of this, labelled "edit beta" or "vedit", which would edit the target article using the visual editor. This would be a convenience for those of us who use VE. I proposed this at Template talk:Al but I now see this is a family of templates, so it's probably best discussed here. I posted notes in a couple of other places; I assume I should redirect those pointers here but will wait for comments before doing so in case the conversation needs to happen elsewhere. Mike Christie (talk - contribs - library) 17:26, 28 November 2014 (UTC)

No disagreement above so here's the specific edit request. Currently the {{la}} template produces "Article (edit | talk | history | links | watch | logs | views)" with appropriate links. I would link this changed to "Article (edit | edit beta | talk | history | links | watch | logs | views)", with the "edit beta" link pointing to "?veaction=edit" for the article, to give access to VE. I am not sufficiently familiar with the template to be able to edit it myself, and I see other requests above using [[tl|editprotected}}, so I'll request this edit using that template; if that's not the right way to request this please let me know. Mike Christie (talk - contribs - library) 11:59, 8 December 2014 (UTC)

I oppose adding more links to an already cluttered template which already causes template inclusion expansion limit issues. What I would prefer to see is a little JavaScript gadget to change the edit link into an edit source and add a new edit for ve (to simulate the existing system). I'd be happy to make such a script. — {{U|Technical 13}} (etc) 15:17, 8 December 2014 (UTC)
Yes, it's a cluttered template, but I don't think the script approach is the best way to handle this -- that would mean people would essentially have to opt in to see the link they prefer, by using a script. The right answer, however we do it, should give people the links they prefer to see without needing any script to be loaded in their preferences. Is it possible for the template to test whether the user has opted in to VE, and only show the link in that case? Mike Christie (talk - contribs - library) 15:23, 8 December 2014 (UTC)
That is exactly what Technical13 is proposing, but it can only be done in JavaScript. One would not have to opt in because VisualEditor needs JavaScript anyway, so a default gadget is the best option IMO. -- [[User:Edokter]] {{talk}} 15:39, 8 December 2014 (UTC)
OK, then I misunderstood -- sorry. That sounds perfect -- if the link shows up for VE users and not for non-users that's exactly what's needed. Mike Christie (talk - contribs - library) 16:28, 8 December 2014 (UTC)

Request disabled for now. Technical 13: are you still planning to write this script that you offered? — Martin (MSGJ · talk) 21:21, 9 December 2014 (UTC)

importScript('User:Technical 13/Scripts/Gadget-veditLinks.js');//Backlink [[User:Technical 13/Scripts/Gadget-veditLinks]]
I know that it fails to work on Template:Pagelinks (edit | talk | history | links | watch | logs) when used for non-talk page links, and that is due to the fact that Module:PageLinks (talk · edit · hist · links · doc · subpages · tests (results)) doesn't wrap the links in an lx classed span. I'm working to correct that now. I also am aware that it is likely applying the change to namespaces that don't have VE enabled, such as talk spaces, template/module, etc, and I'll work on a fix for that as well. I figured a good first step was to add the link to everything, and then work on filtering out stuff that shouldn't be after. — {{U|Technical 13}} (etc) 20:55, 27 December 2014 (UTC)
It works well for me. I went to Special:WhatLinksHere/Template:La and tried a few pages; it correctly does not add the edit beta link to category page listings, for example. Thanks! When you're confident that it works correctly in all circumstances, how will it be made a general default? Mike Christie (talk - contribs - library) 21:20, 27 December 2014 (UTC)
  • Not ready to figure that out yet. I'll likely want an opinion from Krenair or another WMF staffer that is working on VE. Then, it'll either be looked over and added as a VE component by the foundation or we can start a proposal/RfC/discussion of some kind to see if the community supports it.
@Jackmcbarn, Mr. Stradivarius, MSGJ, and Anomie: can one of you help me with fixing Module:PageLinks/sandbox so that it passes an argument to Module:Toolbar to add the lx class to the span since I've little experience with Lua? Thanks. — {{U|Technical 13}} (etc) 21:30, 27 December 2014 (UTC)
@Technical 13: Yes check.svg Done Jackmcbarn (talk) 05:37, 28 December 2014 (UTC)
  • Mike, I believe I've found all templates that make the hlist of links and got them to work, and I've applied filters so that only links to pages in namespaces that VE is enabled add the "edit beta" link. The rest just change the text to "edit source" but don't add the link. What do you think? Did I miss anything? Feedback would be appreciated. :) — {{U|Technical 13}} (etc) 19:18, 29 December 2014 (UTC)
    Just tried {{article|radiocarbon dating}} and I get this: Radiocarbon dating (edit | talk | history | links | watch | logs | views). Shouldn't that include the edit beta link? Or is the {{article}} template a different beast? Or do I need to update the script I'm including in my .js? Mike Christie (talk - contribs - library) 19:59, 29 December 2014 (UTC)
    • Where is this broken usage because I used it in my sandbox and got Radiocarbon dating (edit source | edit beta | talk | history | links | watch | logs | views). — {{U|Technical 13}} (etc) 17:50, 30 December 2014 (UTC)
      It was here on this page in preview mode, but I just tried it again and it's working now. Mike Christie (talk - contribs - library) 18:04, 30 December 2014 (UTC)
    An additional note: a page that provides a fairly stiff test of the response time of the gadget is WP:GAN. It works extremely well. On my machine it takes about 2-3 seconds to add the "edit beta" link to over 500 templates. Mike Christie (talk - contribs - library) 16:51, 30 December 2014 (UTC)
    • I'm guessing most of that time is waiting its turn to run. There are a lot of other scripts that Wikipedia itself runs for various things (including VE itself) that have to complete before the script can run. bits.wikimedia (the site that holds all of the code for the software) has been kind of slow lately. I'm glad you're enjoying it. :) — {{U|Technical 13}} (etc) 17:50, 30 December 2014 (UTC)
  • The code for this script is on GitHub for those interested. — {{U|Technical 13}} (etc) 18:38, 30 December 2014 (UTC)
    @Technical 13: this is now working well for me (thank you again). Is it time to think about making it a general default yet? Mike Christie (talk - contribs - library) 02:16, 13 January 2015 (UTC)
    • Probably not default yet. It will need more users to test different environments like various browser, skin, and OS combinations. A good idea is to bring up the script and a few places and try to get more people using it. The first thing to do is to add it to the list of userscripts. I'll do that now. It takes quite a while to make something a gadget. — {{U|Technical 13}} (etc) 14:41, 13 January 2015 (UTC)


Why does this template show up so often as having a disambiguation link to Article? It seems to show up even without any changes in "Article". The Banner talk 01:08, 25 December 2014 (UTC)

The article La (a disambiguation page) is not he same as Template:La. -- [[User:Edokter]] {{talk}} 09:56, 25 December 2014 (UTC)
Sorry, off course I mean the template. The Banner talk 12:40, 25 December 2014 (UTC)
@The Banner: The problem is not with the template but its doc page; specifically, at Template:Ln#Examples, fifth and sixth rows after the header (the ones beginning {{la|Article}} and {{lat|Article}}), column 2. --Redrose64 (talk) 20:14, 26 December 2014 (UTC)
Okay, identified the problem. But how to solve it? The Banner talk 23:39, 26 December 2014 (UTC)
  • I'm not sure on this, but does this change solve the issue? If not, actually subst:ing should fix it even if the result is messy looking code in the /doc page. Otherwise, I'm not understanding what you are saying is the problem, which is entirely likely as my brain is slightly burnt-out from the holidays. — {{U|Technical 13}} (etc) 01:25, 27 December 2014 (UTC)
  • The problem was that the template showed up quite often at Templates with disambiguation links. Most of the links showing up there I can fix, but this one I could not. I could not even find where the problem was. (And I am an experienced link-to-disambiguation-page-solver, I have seen some difficult tricks along the way) But for now, the page is out of the list, thank you for that! The Banner talk 11:57, 27 December 2014 (UTC)