Template talk:Source

From Wikinews, the free news source you can write!
Jump to: navigation, search

Linking to Wikipedia for the agency/source[edit]

I removed the Wikipedia link, since people can look at the source link itself and see who it is easily Cap'n Refsmmat 22:15, 30 Nov 2004 (UTC).

Wikipedia's articles often give valuable information on history, controversies, circulation numbers, and so on. Also, there are more news organizations in the world than any one person has heard of... It's no inconvenience to have the link, it requires nothing of the author and appears as just another link, so why not give people more information? I am putting the link back. --119 22:36, 30 Nov 2004 (UTC)
What happens if Wikipedia doesn't have the article? You said there are so many news organizations... Wikipedia is not going to have all of them. The casual Wikinews user doesn't want to have to create the article for his own reference. Cap'n Refsmmat 23:39, 3 Dec 2004 (UTC)
I think that with the existing articles on Wikipedia, this is more useful than not, and is enough to justify by itself. But also, as this is a wiki, one of the best ways to encourage new articles to be created is to show a demand for something by linking to a nonexistant article. 119 00:00, 4 Dec 2004 (UTC)

Articles with no author credited[edit]

A lot of news services do not credit articles to specific writiers; this template currently has no clean way of dealing with that. Right now I just put "No author credited", but there's got to be a better way.Kurt Weber 05:18, 12 Dec 2004 (UTC)

Using author=|' produces a blank display where author goes. 119 05:22, 12 Dec 2004 (UTC)
This is no longer a problem, and this issue can be ignored. If there is no author credited on the source, simply remove the "author" parameter. irid:t 18:02, 22 August 2007 (UTC)

Author comma[edit]

There should be a comma after the author's name when displayed. But then there will be a comma after nothing when there is no author's name used. Anyone know how to make the comma conditional? --216.237.179.238 23:30, 7 December 2005 (UTC)

Add it when you add an author. e.g. author=Nina Totenberg,
- Amgine | talk 23:32, 7 December 2005 (UTC)
sort of defeats the purpose of a template, dunnit? --216.237.179.238 19:50, 9 December 2005 (UTC)
I agree. *Soner Arıkanoğlu. "Pasaportlar barkodlanacak - Passports will have barcodes" — Radikal, November 4, 2006 should look like *Soner Arıkanoğlu,. "Pasaportlar barkodlanacak - Passports will have barcodes" — Radikal, November 4, 2006 Towsonu2003 06:38, 4 December 2006 (UTC)

This could be fixed:

{{#if:{{{author|}}}|{{{author}}}, }}

but I think would make old articles kept for archiving look silly, since some of them have added the comma manually. Wikicode could be written to check for a comma, but that's just getting ridiculous. irid:t 18:07, 22 August 2007 (UTC)

Protected from editing[edit]

Seeing as this template is used in over 5000 pages on Wikinews, I've decided to protect it from any vandalism. Per the page-protection policy, "permanent protection is used for... protecting high visibility pages such as the Main Page from vandalism." If you want edits to be made and you don't have administrator access, you can ask me or any other administrator, or ask on this talk page or on admin alerts. —THIS IS MESSEDR with umlaut.pngOCKER (TALK) 21:19, 4 July 2006 (UTC)

Empty Wikipedia link[edit]

When you don't have a publication name, you get an empty [[w:|]] artifact in the source line. The template should be written not to generate this link if pub= is blank, but that's beyond my ability. See Jackson County, Oregon rejects tax to reopen libraries for an example. —The preceding unsigned comment was added by Demi (talkcontribs) 23:11, 16 May 2007

We could do it, but we want the publishers name. Bawolff 23:30, 16 May 2007 (UTC)
It is just a matter of thinking about who the publisher is. In this case it is Jackson County, Oregon. I also switched it to the source-pr template since the county is not a news organization, but do release items to the press. --SVTCobra 23:49, 16 May 2007 (UTC)

Easy fix of author problem[edit]

Can someone please add a | to the author parameter? So that when one doesn't use |author= in the template, it doesn't break. Change {{{author}}} to . Jon Harald Søby 17:53, 22 August 2007 (UTC)

Brianmc took care of it. Thank you for pointing this out. irid:t 18:03, 22 August 2007 (UTC)

Proper capitalization of author parameter[edit]

This should blow your mind.

{{#if:{{{author|}}}|{{#ifeq:{{{author}}}|{{uc:{{{author}}}}}|{{ucfirst:{{lc:{{{author}}}}}}}|{{{author}}}}}}}

In English, this says: "If the author field is blank, don't put anything for the author. Otherwise, if the author field is in all capital letters, convert it completely into lowercase letters, then make the first letter capitalized. If the author field wasn't in all capital letters, leave it the way it was." Phew. irid:t 20:48, 22 August 2007 (UTC)

Which would make a complete line of...

{{#if:{{{author|}}}|{{#ifeq:{{{author}}}|{{uc:{{{author}}}}}|{{ucfirst:{{lc:{{{author}}}}}}}|{{{author}}}}}}} "[{{{url}}} {{{title}}}]". ''[[w:{{{pub}}}|{{{pub}}}]]'', {{{date}}}

Examples of this usage are here: User:Ironiridis/AuthorFieldCapitalization irid:t 20:32, 22 August 2007 (UTC)

This screws up capitalization for instances where author is a news agency known by initials. Like when author=AP or author=AFP.--SVTCobra 10:41, 28 August 2007 (UTC)
This problem is still present on articles where author is listed as AFP. --Brian McNeil / talk 11:52, 16 January 2008 (UTC)
Okay, I reverted my attempt to fix the author bit for ITN, it was messing up somewhere.
At the moment this will fail for AFP, AAP, ITN, CNN, and CP - all are valid agency initials. --Brian McNeil / talk 09:56, 3 July 2008 (UTC)
Should work for the following acroynoms (job que - 134 to 11,762): AP,AFP,CNN,CBC,AAP,BBC,NBC,ABC,MSN,MSNBC,CBS,APP,VOA,IHN,AHN,ITN,CP. However as pointed out to me on IRC, aren't these publishers, not authors? Bawolff 23:37, 10 July 2008 (UTC)

Sources without URLs[edit]

So if we cite a source that doesn't have a public URL, should we not use this template and just manually format it? --Pmsyyz 22:44, 13 November 2007 (UTC)

No, you can use {{apasource}}: {{apasource|author= |title= |year= |volisspage= |pub= |url= }}. See Wikinews:Template messages/Citations for articles. --Steven Fruitsmaak (Reply) 23:00, 13 November 2007 (UTC)

Note[edit]

This is a very minor issue but wouldn't it be better if, Note:You should always use more than one source linked to the policy or said "except in local stories and breaking news situations" --User:Anonymous101 Talk 08:59, 6 January 2008 (UTC)

Category improvement[edit]

{{editprotected}}
"Category:Citation templates" should be "Category:Citation templates|Source", so it will sort correctly in the category list. Van der Hoorn (talk) 12:39, 17 March 2009 (UTC)

Done Tempo di Valse ♪ 22:23, 17 March 2009 (UTC)

Edit request[edit]

{{editprotected}}

Please add [[ja:Template:Source-en]].--Game-M (talk) 10:56, 28 April 2009 (UTC)

Done'tempodivalse' 13:15, 28 April 2009 (UTC)

Edit request[edit]

{{editprotected}}

Add an extra variable, archive. Add (archived ) then after URL, linking to a permenant version. EG, allow links to link to both the current version and an archive.org or webcite version to avoid linkrot. Computerjoe's talk 22:57, 13 June 2009 (UTC)

Not done I wouldn't say consensus has been established yet, in any rate, an account for WebCite will have to be created first. Let's get that out of the way, then move on to getting the coding done. I wouldn't be opposed to a Template:Source/Sandbox being created to test this new code. Calebrw (talk) 22:50, 14 June 2009 (UTC)
If we do make any edits, perhaps we should also add {{#formatdate:{{{date}}}|mdy}} This will make the date auto-formatted into Monthname day, year unless the user has changed their settings, in which case it will follow special:preferences. As it stands we have a wide variety of date formating used in the source template. Bawolff 20:35, 15 June 2009 (UTC)

Bracket in Title parameter[edit]

I just noticed that after adding a closing (right) bracket "]" in the title field, it breaks the link and appends an extra "]". See this diff for an example. Calebrw (talk) 22:00, 25 June 2009 (UTC)

publisher fallback for pub parameter[edit]

{{Editprotected}} I think the template should be changed to allow falling back to publisher if publisher is entered but pub is not. Others have suggested this, including SVTCobra recently. It is confusing that pub is the only abbreviated param, particularly as this is not true for English Wikipedia. Of course, using pub-only or neither would continue to work.

This can be accomplished using the tested (see [1]) code at [2] . Essentially:

{{#if:{{{pub|{{{publisher|}}}}}}| ''[[w:{{{pub|{{{publisher}}}}}}{{!}}{{{pub|{{{publisher}}}}}}]]'',|}}

Superm401 | Talk 22:20, 4 October 2009 (UTC)

  • Done and awaiting screams of horror as people find places this breaks something. ;-) --Brian McNeil / talk 11:03, 6 January 2010 (UTC)
The following discussion has been moved to WN:Water cooler/proposals. Please continue discussion there.

COinS and hCalendar[edit]

Since BarkingFish doesn't seem to like my edits to this template very much, I'll try for consensus or something, although I doubt it's an issue anyone feels very strongly about.

Basically, I'd like to add COinS and hCalendar microformats to this template. The former has been used for this exact same purpose on Wikipedia for ages, and it's been in {{Date}} for a good few months, with no ill effects. It simply makes citation easier for some users, without changing anything for the rest.

The latter is recommended for anything that can be defined as an "event", with a summary (in this case, the title of the article, which I had in the format "Title" — Publisher, although that may not be the best way to express it) and a date/time (the publication date of the article). It makes our articles easier to parse for bots and software, and lets the user do semi-useful things like export the sources as events to be easily imported into a calendar or timeline. This does even less to the users for whom it isn't useful, being simply elements that wrap around what was already there.

I don't expect many people are watching this page, but I don't think it's really important enough for the water cooler, so I'll flag this discussion for a while, in the hopes of getting consensus either way. Personally, I don't feel particularly strongly, although I certainly see this as a net benefit to readers and the project. DENDODGE 15:56, 29 June 2011 (UTC)

This was discussed on the water cooler a while back, iirc. (Probably wrt {{date}}.) We should find that and provide a link to it here. --Pi zero (talk) 16:24, 29 June 2011 (UTC)
Found it! That was about {{Source}} and {{Date}}, but the source part got pretty much ignored, so we never got around to implementing it. Since then, I've learnt to use other formats, too, and I'd say hCalendar will be about as useful as COinS would, so if we do one, we might as well go for them both. DENDODGE 17:32, 29 June 2011 (UTC)
Oppose implementation - I dislike your changes, dendodge, because they are frankly utterly utterly unnecessary. As unnecessary as COinS is. You said it earlier on IRC - "it makes various tasks easier for a few people" - maybe it does, wonderful. How many people? Are we even sure people know what the fuck this is? Who uses it, why do we need it, what does it do, is there any real point in us inserting potentially useless crap into our pages? I know the answer to the last part of that, and it's NO. Unless you can actually justify what it does and why it's beneficial to us having it, I say that we do not use this, or any other "microformat". Get justifying. BarkingFish (talk) 23:09, 29 June 2011 (UTC)
I find it useful. Evidently, the editors over at The Other Place agree with me (and amazingly they had, AFAICT, little to no controversy). If somebody wants to cite one of our articles, they have an easy way to do so. If somebody wants to plot our articles on a timeline (which would be useful for a set of articles in a series of events, such as an uprising against some dictatorship), they have an easy way to do so. If someone wants to index all our articles using a bot, they have an easy way to do so. Personally, I find the COinS on Wikipedia useful when citing works for college essays; I have not yet had to cite a news article linked from WN, but I expect I, or somebody else, will need to. The hCalendar is a nice additional thing that has not been directly useful to me, and would be primarily useful to automated tools, but there are a number of end-user applications around the corner (the Firefox Operator extension being an example). The number of users it will help is small, but it is growing, and it's a hell of a lot bigger than the number of users it will hinder - none. If I hadn't told you about it, and you didn't have RC, you wouldn't even know it was there. But microformats are one of the first things I notice when I load a web page (because they put a handy little icon in my address bar), and I do use them for a variety of purposes. Other people do as well. DENDODGE 23:18, 29 June 2011 (UTC)
You know straight away what my answer is to that. We're not the Other Place - and this sounds like at the moment, it's about you. You find it useful. They're one of the first things You notice. And whether you told me about it or not, I can read recent changes and would have found this eventually. I'm not blind. BarkingFish (talk) 23:23, 29 June 2011 (UTC)
I specifically said "and you didn't have RC". And I'm talking about myself because you asked for proof that it was useful. I find it useful. I can't speak for anyone else, but the chances of me being completely unique in using microformats are very slim. They exist for a reason, and lots of people use them. And I know we're not The Other Place, but the fact that even they implemented these things with no noticeable controversy has to say something, as does the fact that they use them at all. So we have established that some people, such as me, find it useful - the next question would be, How is your experience impacted by these microformats? You don't like them, but what do they actually do to reduce usability or aesthetics? "Absolutely nothing" is the answer to that question. At most loading times might be slowed down by a millisecond for people on slow connections, but since all we're doing is wrapping spans around elements that are already there, even that is unlikely. DENDODGE 23:48, 29 June 2011 (UTC)
So why the "and you didn't have RC"? How could you use that as part of an argument when EVERYBODY here has access to RC. Come on, den, use some sense. And my main reason for you not doing the fiddling with the templates, barring the fact that I actually think this entire POS is utterly worthless, is that you're doing it on very high use templates, and regardless of what you think, those kind of changes should not be done without consensus amongst users (which is why you're now here :D ). You don't just go and change something for the sake of it without speaking to others about it. Implementing stuff because you implemented other similar stuff (I'd say hCalendar will be about as useful as COinS would, so if we do one, we might as well go for them both.) isn't a good reason to just go ahead. Discuss, decide, despatch. Anyway, I'm done, time to let others vote to do this, so I can look like a dick for not wanting it :P BarkingFish (talk) 00:05, 30 June 2011 (UTC)
I was simply pointing out that it doesn't change anything for the people it doesn't help - it wasn't supposed to imply that I was trying to hide it from you. And, yeah, of course I'm all for consensus - I just figured people wouldn't really mind. Had you been around to raise your objection at the time, I would have brought it here first. DENDODGE 00:27, 30 June 2011 (UTC)
The preceding discussion has been moved to WN:Water cooler/proposals. Please continue discussion there.

lang parameter?[edit]

Hi. I've seen many times the EzPR gadget failing because the sources templates have languages templates appended; this may be fixed if we add a {{#if:{{lang|}}||lang={{{{{lang}}}}}}} thingy (not sure if it's quite right, I haven't done ParserFunctions for some time...); it should be linking to a template like {{es}}, {{tpi}}, etc. What do you think? アンパロ Io ti odio! 15:31, 27 July 2011 (UTC)

I think what you mean is {{#if:{{{lang|}}}| {{{{{lang}}}}}|}}. I'm not entirely sure if templates and parameters can be nested that way, but I don't really see why not. That would go directly after the code we currently have, without a space (hence the  ).
FWIW, I don't care either way about the proposal, but if we're going to do it, we should do it right ;-) DENDODGE 00:08, 28 July 2011 (UTC)
Should be a breaking space.
{{#if:{{{lang|}}}|<nowiki/> {{{{{lang}}}}}}}  should work. --Pi zero (talk) 01:32, 28 July 2011 (UTC)
What's the <nowiki/> for? And I always end the ParserFunctions with |}} just in case, even though it technically isn't required. I'm not entirely sure why I used a non-breaking space, TBH. DENDODGE 08:38, 28 July 2011 (UTC)
#if trims leading and trailing whitespace from its parameters, so
{{#if:{{{lang|}}}| {{{{{lang}}}}}}}
{{#if:{{{lang|}}}|{{{{{lang}}}}}}}
do exactly the same thing. <nowiki/> doesn't get trimmed, so the space after it isn't leading or trailing.
A non-breaking space doesn't get trimmed either, so you might have seen it used in a similar situation. --Pi zero (talk) 11:47, 28 July 2011 (UTC)
Ah, right, yeah, I knew &nbsp; didn't get trimmed - that was why I put it there. I'd never seen the <nowiki/> trick before. I'll have to remember that. DENDODGE 12:23, 28 July 2011 (UTC)

Switch to “proper” double quotes?[edit]

BTW, is there any reason for this template to use ASCII (typewriter’s) symmetric U+0022 double quotes, instead of the “proper” Unicode ones? — Ivan Shmakov (dc) 10:06, 29 November 2013 (UTC)

Use of non-ascii punctuation messes up string searches. We generally change non-ascii quotes and apostrophes to ascii ones when we find them. --Pi zero (talk) 13:40, 29 November 2013 (UTC)
While I don’t seem to understand what kind of string searches is meant here, I’d like to note that the very same argument is very likely to apply to the Unicode em dash (or en dash) vs. ASCII hyphen-minus case. As in, for instance:
Hello, world! -- was what it said.
And as for the software, – it just gets improved day by day. I was surprised to find, for instance, that when searching for a space, Emacs 24 finds all the varieties thereof. My guess is that, eventually, it will be taught to behave similarly for the quotes, etc.
Ivan Shmakov (dc) 15:13, 29 November 2013 (UTC)
The practice of not using them also greatly assists in detecting reporter plagiarism, because it generally means the contributor has been copying and pasting from the source, and isn't particularly familiar with how articles look enough to think to change them. --LauraHale (talk) 16:43, 29 November 2013 (UTC)