Template talk:Source

Edit request - pub target
edit protected

Please


 * 1) Copy https://en.wikinews.org/w/index.php?title=Template%3ASource%2Fsandbox&type=revision&diff=4519394&oldid=4517961
 * 2) Protect Template:Source/pub

This change will migrate the handling of linking to the publisher to a new sub template, Template:Source/pub.

Behaviour:


 * If no  is provided, no publisher is shown, and no category is added (same as current behaviour)
 * If  is provided, and either no   is provided, or the one provided is not equal to , a link is generated (same as current behaviour)
 * If, and only if,  is provided and the   parameter is set to , the published field will not link to the publisher using Template:W. Some publishers simply don't have an article on enwiki, and the link is useless. If the link is disabled, the page will also be added to Category:Articles with source templates without publication links, unless the   parameter is provided.

So far, I've found five articles where the publication link should be disabled:


 * 1) Ayatollah Rafsanjani commemorates Iran-Iraq battle victory, w:Red Bolivia
 * 2) Freshwater lakes in Texas show signs of extreme drought, w:Disaster News Network
 * 3) Black spot on Jupiter is impact site, says NASA, w:Jupiter.samba.org
 * 4) Heavy lift Delta IV rocket launch problems, w:EARTHtimes
 * 5) Apple introduces new iPod with video playback capabilities, w:The Mac Observer

Using an example from the first article (with the categorization suppressed):

Current:

produces

Afterwards,



will produce



(and obviously, if the nocat parameter weren't passed, the page would be categorized). The category is provided so that users can check from time to time if an article has been created, and if so remove the  parameter.

Let me know if there are any questions. Pinging. Thanks, --DannyS712 (talk) 21:44, 6 October 2019 (UTC)
 * Also, please ping me once is this implemented (or declined) - I have another feature to add --DannyS712 (talk) 00:54, 12 October 2019 (UTC)
 * Well... I did deploy this. Two notes, though.
 * I changed the subtemplate to use  instead of  .  It's not too late to change, of course.  But in all the cases I recall where we've had a field specifying a link with a non-blank special value to suppress the link, the special value has been , and it seemed like a good idea to use the same convention everywhere.  (The ones I can think of atm are on topic cat.)
 * I'm glad there's a tracking cat; I'm not entirely sure whether this is a good idea, as there's a certain logic in insisting on a link and thus strongly motivating folks to find a suitable target.
 * --Pi zero (talk) 14:26, 21 October 2019 (UTC)
 * thanks - can you apply the  parameter to the 5 sources listed about where the publisher doesn't have an article? Thanks, --DannyS712 (talk) 17:30, 21 October 2019 (UTC)
 * Yeah, I did those five. And yet I still feel we're missing something here, some reason why perhaps we shouldn't be delinking these.  (Well, if there is a reason, or something subtly different we should be doing, we've now got the infrastructure for it.) --Pi zero (talk) 18:55, 21 October 2019 (UTC)
 * I've isolated the  case in source/pub/no, and for the moment I've got it wired to link despite the request not to. It just doesn't feel right to not link those, like we're cutting ourselves off from things; a diminishing of situational awareness, the opposite of what we should be striving for.  We've always managed in the past; but, it's wired now so we can request no-link, and the handling of such requests can be adjusted (in whatever way we can imagine) without affecting articles that don't make such a request. --Pi zero (talk) 17:15, 6 November 2019 (UTC)

Edit request - cleanup
edit protected

Please copy this edit made to Template:Source/sandbox2. The results (testcases) can be seen at Template talk:Source/sandbox2; there is no difference to the functionality or output of the template. The change simply removes 2 extra template calls (1 to the `if` parser function, and 1 to the `author` parameter) by combining the two parts that depend on if an author is provided.

Ping can you take a look? Unlike the request above, this change makes the template less complicated, and has no effect on the template's result, so it should be pretty easy to examine. Thanks, --DannyS712 (talk) 03:53, 17 October 2019 (UTC)
 * Done. --Pi zero (talk) 15:11, 21 October 2019 (UTC)

Edit request - parser function cleanup
edit protected

Please copy Special:Diff/4524098 from the sandbox. This replace

with

which functions to switch the order of checks. Since it is far more likely that a url (or a nocat) parameter will be provided than that the template will be used in template space, it reduces the number of parser calls needed:


 * Currently: If not in template space, then check if parameters are passed, then add the category
 * New: If parameters are not passed, then check namespace, then add the category

There should be no functional change in the template's output. can you take a look? Thanks, --DannyS712 (talk) 17:35, 21 October 2019 (UTC)


 * Done. --Pi zero (talk) 19:11, 21 October 2019 (UTC)

Edit request - subscription required
edit protected Please


 * Copy the differences shown here: https://en.wikinews.org/wiki/Special:ComparePages?page1=&rev1=4524117&page2=&rev2=4524667&action=&diffonly=&unhide=
 * Protect Template:Source/subscription

Behaviour:

Current:  parameter doesn't exist

New: If  is provided, and it equals "required", a new sub-template, Template:Source/subscription, is transcluded.

The sub template's output is just:

The creation of a separate sub-template, however, rather than implementing this within the source template itself, is to mirror the point of Template:Source/fixauthor - to also create a way to track the use of the parameter - only articles that cite sources that require subscriptions will transclude the sub-template.

Test cases are available at Template talk:Source/sandbox - most of the examples was taken from a currently published article, demonstrating the variety of methods that "subscription required" was conveyed - this will also serve to standardize the practice.

can you take a look? Thanks, --DannyS712 (talk) 18:09, 23 October 2019 (UTC)


 * I don't think we should do this, because we don't want to support subscription-only sources. All of those articles are extremely ancient; we have had an explicit policy against pay-to-read sources for a very, very long time. --Pi zero (talk) 01:23, 24 October 2019 (UTC)
 * I understand that that is the current policy, but we should have a (standard) way of noting that a subscription is needed (eg I have cited the NYT, which generally requires one) - including it would also serve as a flag for reviewers that the source is paywalled --DannyS712 (talk) 01:26, 24 October 2019 (UTC)
 * We're not talking about some minor technicality here. There should not be a way to indicate this; it's not okay, and we must not imply otherwise. --Pi zero (talk) 01:39, 24 October 2019 (UTC)
 * Okay --DannyS712 (talk) 01:41, 24 October 2019 (UTC)
 * ❌ withdrawn --DannyS712 (talk) 02:27, 24 October 2019 (UTC)

Edit request - ucauthor
editprotected

Please add  as an allowed all caps author. See Celtics lose, extend streak, where it is converted to "Nba" rather than rendering as "NBA". Thanks, --DannyS712 (talk) 07:02, 4 March 2020 (UTC)


 * ✅ --Pi zero (talk) 00:19, 7 March 2020 (UTC)

Edit request - broken source templates
Please copy Special:Diff/4549661 so that only articles are categorized as "Articles with broken source templates", rather than all non-template namespaces. Category:Articles with broken source templates is less useful when there are more user pages in it. Thanks, --DannyS712 (talk) 07:18, 4 March 2020 (UTC)


 * Perhaps we should take a moment to consider this. The purpose of the category is to locate pages with this problem.  Should we perhaps have a list of namespaces where it isn't to be reported?  Just eliminating userspace would cut out a lot of permanent entries.  I also note that a DPL can easily list all pages in the category in a particular namespace (such as ns:0). --Pi zero (talk) 00:33, 7 March 2020 (UTC)
 * If we want the category to not be just articles, it should be renamed --DannyS712 (talk) 00:39, 7 March 2020 (UTC)
 * Renaming seems a lot of trouble for just a few odd cases; I would expect most such pages to be "articles", in a broad sense. The ones in userspace are mostly "articles", broadly speaking. --Pi zero (talk) 00:52, 7 March 2020 (UTC)
 * I'm planning to factor out a subtemplate  for this case, so subsequent changes to handling of that case won't affect twenty thousand pages. --Pi zero (talk) 21:05, 7 March 2020 (UTC)
 * Did that. source/nourl --Pi zero (talk) 21:35, 7 March 2020 (UTC)
 * thanks, but can you change  to be 2 separate lines so that its clearer? --DannyS712 (talk) 23:23, 7 March 2020 (UTC)
 * Tweaked. --Pi zero (talk) 23:30, 7 March 2020 (UTC)
 * pretty sure the default needs to go last --DannyS712 (talk) 23:31, 7 March 2020 (UTC)
 * Does it? There was some documentation I was looking at today that said using the   notation it could go anywhere; which doesn't necessarily mean it's true, of course.  I thought it might be clearer that it doesn't apply to those other spaces if it wasn't below them. --Pi zero (talk) 23:35, 7 March 2020 (UTC)
 * Trying an experiment on the side, it seems to work. --Pi zero (talk) 23:38, 7 March 2020 (UTC)

Although I don't think the name of the category should be considered a problem for other pages showing up there, it would be nice to get permanent items off the list somehow. Without creating some other sort of potential later problem. Further thought is indicated. --Pi zero (talk) 02:50, 8 March 2020 (UTC)
 * Having taken a look at an item on the list, I found another problem. something really quick --DannyS712 (talk) 02:54, 8 March 2020 (UTC)
 * if you look at A 1-year long strike against FMC Novamed: Women workers allege unfair treatment, the last reference is missing a url. But, the template still tries to render a link. So, please: protect Template:Source/notbroken, and then copy Special:Diff/4550519. This moves all handling of non-broken links to a new subtemplate
 * If a url is provided, render the current
 * If a url is not provided, render
 * If a url is not provided, and nocat is not provided, call Template:Source/nourl.
 * Thanks, --DannyS712 (talk) 03:03, 8 March 2020 (UTC)
 * I'd noticed that problematic format. Separating the handling into a subtemplate is an interesting approach, though it increases the number of template calls for something that substantially every source citation uses; it's awfully tempting though, to sort out separate logical concerns.  For the actual handling by the subtemplate, though, I'm dubious.  I'd suggest, in most cases a missing url is an error and should look wrong.  There are a few cases where it's deliberate and should look neat.  And then I'm also unsure whether there's something else we're missing here. --Pi zero (talk) 03:33, 8 March 2020 (UTC)
 * I agree that it should display an error or something, but until we decide what to do, the proposed is better than the status quo (imo) --DannyS712 (talk) 04:16, 8 March 2020 (UTC)
 * My hesitation is in precaution lest there should be some measure that, on due consideration, would call for some different arrangement of things and thus require some untangling downstream. If we can anticipate suitable infrastructure to support future measures, we can allow for it now; part of the purpose of moving the logic into a subtemplate is, after all, is to avoid later changes to the main template.  The current arrangement has been in place for many years, so we can presumably afford a moment to consider before acting. --Pi zero (talk) 12:51, 8 March 2020 (UTC)