User:Harrystein/sandbox/template/MIA citation: Difference between revisions

From Leftypedia
Jump to navigation Jump to search
mNo edit summary
Tag: Reverted
mNo edit summary
 
(85 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>* [[Joseph Stalin]] (1938). [https://www.marxists.org/reference/archive/stalin/works/1938/09.htm ''Dialectical and Historical Materialism''] at the [[Marxists Internet Archive]]
<noinclude>implemented at [[template:MIA citation]]</noinclude>{{#tag:ref|<!--
 
#0: Check for special cases using sub-template. This section currently (6/1/24) only works with capital vol 1.
* [[Joseph Stalin|Stalin, J.V.]] (1938). [https://www.marxists.org/reference/archive/stalin/works/1938/09.htm ''Dialectical and Historical Materialism''] at the [[Marxists Internet Archive]]
-->{{if then show|{{#switch:<!--
 
#0.1: The following returns codes that are then used by the switch function.
Param 1 = Link.
-->{{switch by pattern|_input={{string split|{{{link|{{{1|}}}}}}|/archive/|2}}
 
  | capital = marx/works/18%d%d%-c%d
Param 2 = Author name.
  | _default = NO SPECIAL CASE
 
  }}<!--
Param 3 = Year.
This converts the code from the above into a sub-template or direct formatting to output for each given special case.
 
Param 4 = Title.
<nowiki>{{miae citation|https://www.marxists.org/reference/archive/stalin/works/1938/09.htm}}
{{miae|https://www.marxists.org/archive/marx/works/1867-c1/ch03.htm#S1|marx|1867|Capital or some shit.}}
</nowiki>
==References==
{{reflist}}</noinclude><!--
-->
-->
{{#tag:ref|<!--
| capital =
  {{User:Harrystein/sandbox/template/MIA citation/5
  | work = capital
  | volume = {{switch by pattern|_input={{{link|{{{1|}}}}}}|_returncaptures=y|marx/works/18%d%d%-c([1-3])|_default=1}}
  | chapter = {{switch by pattern|_input={{{link|{{{1|}}}}}}|_returncaptures=y|marx/works/18%d%d%-c[1-3]/ch0?(%d%d?)}}
  | link = {{{link|{{{1|}}}}}}
  }}
|
}}|<!--
End of special case section.
#1: Author name
#1: Author name
-->{{#switch: {{replace|{{replace|{{lc:{{{2|{{{author|{{first word|{{string split|{{{link|{{{1|}}}}}}|/archive/|2}}|sep=/}}<!--shitty hack because i'm not a conputer geinius-->}}} }}} }}|,|}}|.|}}
-->{{#switch: {{replace|{{replace|{{lc:{{{2|{{{author|{{first word|{{string split|{{{link|{{{1|}}}}}}|/archive/|2}}|sep=/}}<!--shitty hack because i'm not a conputer geinius-->}}} }}} }}|,|}}|.|}}
Line 34: Line 36:
  | smith-adam
  | smith-adam
  | smith adam = [[Adam Smith|Smith, Adam]]
  | smith adam = [[Adam Smith|Smith, Adam]]
| mao
| zedong
| mao zedong = [[Mao Zedong|Mao, Zedong]]
  | trotsky
  | trotsky
  | trotsky leon
  | trotsky leon
Line 41: Line 46:
  | bronstein lev = [[Leon Trotsky|Trotsky, Leon]]
  | bronstein lev = [[Leon Trotsky|Trotsky, Leon]]
  | {{{author|[Author missing]}}}
  | {{{author|[Author missing]}}}
}}<!--
}} (<!--
#2: Year
#2: Year
-->{{#if:{{{year|{{{3|}}}}}}| (|}}({{{year|{{{3|{{isnumeric|{{first word|{{string split|{{{link|{{{1|}}}}}}|/works/|2}}|sep=/}}}}}}}}}}{{#if:{{{year|{{{3|}}}}}}|)|}}.<!--
Check for year param:
#3: Link & Title.
-->{{if then show
--> ''[{{{1|{{{link|}}}}}} {{ucfirst:{{{4|{{{title|<includeonly>Source[[category:Pages incorrectly using the MIAE citation template]]</includeonly>}}}}}}}}]'' at the [[Marxists Internet Archive]]
  | {{{year|{{{3|}}}}}}
  |<!--
If the year is not provided, check the URL for a four-digit year:
-->{{switch by pattern|_input={{{link|{{{1|}}}}}}|_returncaptures=y|/(%d%d%d%d)/|_default=No year found}}}}). <!--
#3: Title with wikilink.
-->{{#if:{{{title|{{{4|}}}}}}|<includeonly>''[[{{title case|{{{title|{{{4|}}}}}}}}]]''. </includeonly>|<includeonly>[[category:pages incorrectly using the MIA citation template]]</includeonly>}}<!--
#4: Hyperlink.
--> [{{{1|{{{link|<includeonly>[[category:pages incorrectly using the MIA citation template]]</includeonly>}}}}}} Available online]}} at the [[Marxists Internet Archive]]
}}
}}

Latest revision as of 21:21, 5 June 2024

implemented at template:MIA citation[1]

  1. [Author missing] (). [ Available online] at the Marxists Internet Archive