Module:Citation/CS1: Difference between revisions

set AccessDate + <span class="reference-accessdate">; fixed url when deadurl=no.
m>Wikid77
(shifted Format to follow Language, and Others to follow Volume)
m>Wikid77
(set AccessDate + <span class="reference-accessdate">; fixed url when deadurl=no.)
Line 333: Line 333:
     local Transcript = args.transcript
     local Transcript = args.transcript
     local TranscriptURL = args["transcript-url"] or args.transcripturl
     local TranscriptURL = args["transcript-url"] or args.transcripturl
    if ( DeadURL == nil ) then DeadURL = "no" end


     -- At this point fields may be nil if they weren't specified in the template use.  We can use that fact.
     -- At this point fields may be nil if they weren't specified in the template use.  We can use that fact.
Line 487: Line 488:
     if ( PublicationDate == Date or PublicationDate == Year ) then PublicationDate = nil end
     if ( PublicationDate == Date or PublicationDate == Year ) then PublicationDate = nil end
     if ( ArchiveURL and "" < ArchiveURL ) then
     if ( ArchiveURL and "" < ArchiveURL ) then
         local temp = URL
         if ( DeadURL ~= "no" ) then
        URL = ArchiveURL
          local temp = URL
          URL = ArchiveURL
        end
     end
     end
     if ( TransTitle and "" < TransTitle ) then TransTitle = " [" .. TransTitle .. "&#93;." else TransTitle = "" end
     if ( TransTitle and "" < TransTitle ) then TransTitle = " [" .. TransTitle .. "&#93;." else TransTitle = "" end
Line 594: Line 597:
     if ( Date ~= nil ) then Date = Date else Date = "" end
     if ( Date ~= nil ) then Date = Date else Date = "" end
     if ( Via ~= nil ) then Via = " &mdash; via " .. Via .. "." else Via = "" end
     if ( Via ~= nil ) then Via = " &mdash; via " .. Via .. "." else Via = "" end
     if ( AccessDate ~= nil ) then AccessDate = " Retrieved " .. AccessDate .. "." else AccessDate = "" end
     if ( AccessDate ~= nil )
    then AccessDate = '<span class="reference-accessdate"> Retrieved ' .. AccessDate .. '.</span>'
    else AccessDate = "" end
     if ( SubscriptionRequired ~= nil ) then
     if ( SubscriptionRequired ~= nil ) then
         SubscriptionRequired = " " .. z.mw.text.tag({name="span", contents="(subscription required)", params={style="font-size:0.95em; font-size: 90%; color: #555"}})
         SubscriptionRequired = " " .. z.mw.text.tag({name="span", contents="(subscription required)", params={style="font-size:0.95em; font-size: 90%; color: #555"}})
Line 1,000: Line 1,005:
--20Feb2013 If class "journal" shows Publisher after Periodical/Series.
--20Feb2013 If class "journal" shows Publisher after Periodical/Series.
--20Feb2013 Shifted Format to after Language, and Others after Volume.
--20Feb2013 Shifted Format to after Language, and Others after Volume.
--20Feb2013 Set AccessDate + <span class="reference-accessdate">
--20Feb2013 Fixed url when deadurl=no.
--
--
--End
--End
Anonymous user