Template:JournalAuthor: Difference between revisions

From VOC Wiki
Jump to navigation Jump to search
imported>George
No edit summary
imported>George
No edit summary
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>https://www.ubc-voc.com/author/{{#replace:{{{Name}}}| |_}} {{{Name}}}</includeonly><noinclude>{{JournalAuthor|Name=Birgit Rogalla}}This template should be used within tables on VOC Journal Pages to link the author to their author archive on the main website https://www.ubc-voc.com/author/firstname_lastname.  
<includeonly>[https://www.ubc-voc.com/author/{{#replace:{{#replace:{{{Name}}}| |_}}|'|/'}}{{#if:{{{Num|}}}|-{{{Num}}}|}} {{{Name}}}]</includeonly><noinclude>{{JournalAuthor|Name=Birgit Rogalla}}
{{JournalAuthor|Name=George Hill|Num=2}}
This template should be used within tables on VOC Journal Pages to link the author to their author archive on the main website https://www.ubc-voc.com/author/firstname_lastname. Apostrophe's are changed from ' to /'. Sometimes the name of a person is not unique and there is a number after a persons name in the hyperlink (this is what the "Num" field is used for).
 
''$wgPFEnableStringFunctions = true; needs to be set in the LocalSettings.php in order for this template to work. The two functions below are two string functions affected by this setting. When enabled, it should show "striw" and "6".
{{#replace:string|g|w}}
{{#len:string}}''


Empty:
Empty:
<pre><nowiki>
<pre><nowiki>
{{JournalAuthor
{{JournalAuthor|Name=}}
| Name=
{{JournalAuthor|Name=|Num=}}
}}
</nowiki></pre>
</nowiki></pre>


Filled Out:
Filled Out:
<pre><nowiki>
<pre><nowiki>
{{JournalAuthor
{{JournalAuthor|Name=Birgit Rogalla}}
| Name=Birgit Rogalla
{{JournalAuthor|Name=George Hill|Num=2}}
}}
</nowiki></pre>
</nowiki></pre>




</noinclude>
</noinclude>

Latest revision as of 08:01, 27 April 2019

Rogalla| |_}}|'|/'}} Birgit Rogalla Hill| |_}}|'|/'}}-2 George Hill This template should be used within tables on VOC Journal Pages to link the author to their author archive on the main website https://www.ubc-voc.com/author/firstname_lastname. Apostrophe's are changed from ' to /'. Sometimes the name of a person is not unique and there is a number after a persons name in the hyperlink (this is what the "Num" field is used for).

$wgPFEnableStringFunctions = true; needs to be set in the LocalSettings.php in order for this template to work. The two functions below are two string functions affected by this setting. When enabled, it should show "striw" and "6". {{#replace:string|g|w}} {{#len:string}}

Empty:

{{JournalAuthor|Name=}}
{{JournalAuthor|Name=|Num=}}

Filled Out:

{{JournalAuthor|Name=Birgit Rogalla}}
{{JournalAuthor|Name=George Hill|Num=2}}