Jump to content

User talk:Ark25/RefScript

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by JohnCD (talk | contribs) at 22:16, 4 July 2014 (Oldmfd). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

More about the script:

If the script doesn't work with a particular link from a website it knows, it doesn't mean the script doesn't work for all that website. The problem is that the big newspapers/websites have more than just one way to create their webpages and the script doesn't know all those different formatings. From what I noticed, big websites like BBC or New York Times have at least three or four different ways of formatting their news. In this case, report the link here, so I can improve it.

Reference names

If you want to personalize the reference names, so they don't mix with references added by someone else using this script in the same article in the same day, then change the second line in the script from var User_Prefix == ""; into var User_Prefix = "MyPrefix";

Where MyPrefix can be your user name for example, or some other distinct signature of yours.

An then, the reference will look like this:

<ref name="MyPrefix_BBC_2013-09-19c">{{cite web |url=http://www.bbc.co.uk/news/science-environment-23814524 |title=Sea otter return boosts ailing seagrass in California |newspaper=BBC |date= 26 August 2013 |last=Suzi Gage |accessdate=2013-09-19}}</ref>

instead of looking like this:

<ref name="BBC_2013-09-19c">{{cite web |url=http://www.bbc.co.uk/news/science-environment-23814524 |title=Sea otter return boosts ailing seagrass in California |newspaper=BBC |date= 26 August 2013 |last=Suzi Gage |accessdate=2013-09-19}}</ref>

Date formatting

If you need the "accessdate" to look like "September 19, 2013" (US style) instead of "2013-09-19", then you have to change the third line in the script from var Date_Format = ""; into var Date_Format = "US";

And then, the reference will look like this:

<ref name="BBC_2013-09-19c">{{cite web |url=http://www.bbc.co.uk/news/science-environment-23814524 |title=Sea otter return boosts ailing seagrass in California |newspaper=BBC |date= 26 August 2013 |last=Suzi Gage |accessdate=September 19, 2013}}</ref>


If you need the "accessdate" to look like "19 September 2013" (UK style) instead of "2013-09-19", then you have to change the third line in the script from var Date_Format = ""; into var Date_Format = "UK";

And then, the reference will look like this:

<ref name="BBC_2013-09-19c">{{cite web |url=http://www.bbc.co.uk/news/science-environment-23814524 |title=Sea otter return boosts ailing seagrass in California |newspaper=BBC |date= 26 August 2013 |last=Suzi Gage |accessdate=19 September 2013}}</ref>

BBC

no author:

one author:

others:

comma in date:

Daily Mail

no author:

one author:

two authors:

four authors:

Daily Mirror

no author:

one author:

Daily Telegraph

no author:

one author:

videos:

Huffington Post

one author:


Huffington Post Canada

no author:

one author:

New York Times

no author:

one author:

The Washington Post

one author:

to work at:

The Boston Globe

one author:

two authors:

The Times of India

no author:

one author:

Business Week

one author:

two authors:

Financial Times

on Financial Times you can only read a few articles for free, then you must pay

one author:

three authors:

The Economist

on The Economist you can only read a few articles for free, then you must pay

Series of articles: http://www.economist.com/topics/aquatic-animals?page=4

Ars Technica

one author

two authors:

three authors:

TG Daily


YouTube

Other samples

posted, updated:

First Posted: 09/16/11 03:51 PM ET - Updated: 11/16/11 05:12 AM ET

Sample references generated

Here's a few examples of generated references:

  • Reference generated with default settings:

<ref name="MyUser_The_Washington_Post_May_12_2014c">{{cite web |url=http://www.washingtonpost.com/wp-dyn/content/article/2008/07/18/AR2008071803258.html |title=Whale Advocates Gain Victory |newspaper=The Washington Post |date= July 19, 2008 |author=David A. Fahrenthold |accessdate=May 12, 2014}}</ref>

David A. Fahrenthold (July 19, 2008). "Whale Advocates Gain Victory". The Washington Post. Retrieved May 12, 2014.
  • UK-style date: - (var Date_Format = "UK";)

<ref name="MyUser_The_Washington_Post_12_May_2014c">{{cite web |url=http://www.washingtonpost.com/wp-dyn/content/article/2008/07/18/AR2008071803258.html |title=Whale Advocates Gain Victory |newspaper=The Washington Post |date= 19 July 2008 |author=David A. Fahrenthold |accessdate=12 May 2014}}</ref>

David A. Fahrenthold (19 July 2008). "Whale Advocates Gain Victory". The Washington Post. Retrieved 12 May 2014.
  • Date in YYYY-MM-DD format: - (var Date_Format = "YMD";)

<ref name="MyUser_The_Washington_Post_2014-05-12c">{{cite web |url=http://www.washingtonpost.com/wp-dyn/content/article/2008/07/18/AR2008071803258.html |title=Whale Advocates Gain Victory |newspaper=The Washington Post |date= 2008-07-19 |author=David A. Fahrenthold |accessdate=2014-05-12}}</ref>

David A. Fahrenthold (2008-07-19). "Whale Advocates Gain Victory". The Washington Post. Retrieved 2014-05-12.
Article publication date into the reference name - (var Ref_Name_Date_Publication_Date="Yes";)
  • US-style date: - (var Date_Format = "US";)

<ref name="MyUser_The_Washington_Post_July_19_2008c">{{cite web |url=http://www.washingtonpost.com/wp-dyn/content/article/2008/07/18/AR2008071803258.html |title=Whale Advocates Gain Victory |newspaper=The Washington Post |date= July 19, 2008 |author=David A. Fahrenthold |accessdate=May 12, 2014}}</ref>

David A. Fahrenthold (July 19, 2008). "Whale Advocates Gain Victory". The Washington Post. Retrieved May 12, 2014.
  • UK-style date: - (var Date_Format = "UK";)

<ref name="MyUser_The_Washington_Post_19_July_2008c">{{cite web |url=http://www.washingtonpost.com/wp-dyn/content/article/2008/07/18/AR2008071803258.html |title=Whale Advocates Gain Victory |newspaper=The Washington Post |date= 19 July 2008 |author=David A. Fahrenthold |accessdate=12 May 2014}}</ref>

David A. Fahrenthold (19 July 2008). "Whale Advocates Gain Victory". The Washington Post. Retrieved 12 May 2014.
  • Date in YYYY-MM-DD format: - (var Date_Format = "YMD";)

<ref name="MyUser_The_Washington_Post_2008-07-19c">{{cite web |url=http://www.washingtonpost.com/wp-dyn/content/article/2008/07/18/AR2008071803258.html |title=Whale Advocates Gain Victory |newspaper=The Washington Post |date= 2008-07-19 |author=David A. Fahrenthold |accessdate=2014-05-12}}</ref>

David A. Fahrenthold (2008-07-19). "Whale Advocates Gain Victory". The Washington Post. Retrieved 2014-05-12.
Short reference name - (var Ref_Name_Short = "Yes";)

<ref name="MyUser_TWP_May_12_2014c">{{cite web |url=http://www.washingtonpost.com/wp-dyn/content/article/2008/07/18/AR2008071803258.html |title=Whale Advocates Gain Victory |newspaper=The Washington Post |date= July 19, 2008 |author=David A. Fahrenthold |accessdate=May 12, 2014}}</ref>

David A. Fahrenthold (July 19, 2008). "Whale Advocates Gain Victory". The Washington Post. Retrieved May 12, 2014.

Date contained in "<meta>" tags

<meta  name="DISPLAYDATE" content="May 31, 2007">

Nice tags

<span class='byline-text'>July 12, 2012</span>
<span class="time">May 19, 2010 7:10 pm</span>
<span class="date" data-time="1334669580">Apr 17, 2012 1:33 pm UTC</span>
<span class="meta-date">Posted <time datetime="2011-07-12T14:43Z">July 12, 2011 - 10:43</time></span>

See also