Extension:AddPaper
| Language: | English • italiano |
|---|
|
AddPaper Release status: beta |
|||
|---|---|---|---|
| Implementation | Special page, Search, Data extraction, Page action | ||
| Description | Add page with specific custom template about paper data online results | ||
| Author(s) | Alessandra Bilardi (Bilarditalk) | ||
| Last version | 0.1 (2009-10-13) | ||
| MediaWiki | 1.14.0 or higher (tried and true) | ||
| License | GPL | ||
| Download | v0.1 | ||
|
|||
| Check usage and version matrix | |||
Contents |
Introduction [edit]
AddPaper represents a special page that allows to add page with specific custom template about paper data online results. Special:AddPaper is a simple form with choose about paper id types and input text where digit one or more paper ids (monospaced). Extension searches paper id(s) data online and adds one page for each paper id (with a template).
This extension is developed to create specific pages with DPL query about certain papers.
Now it works only with pubmed id: PMID.
Comments & Feedback [edit]
Comments & Feedback discussion page.
Settings [edit]
In LocalSettings.php add the following code:
// add AddPaper $wgAddPaperTemplateName = 'Paper'; #optional: default name is Paper $wgAddPaperCacheDir = '/tmp/file/directory'; require_once("extensions/AddPaper/AddPaper.php");
Example [edit]
You would like add a paper: PMID:17381884. So that, you open Special:AddPaper page, select PMID id type and digit 17381884 and then click Add Paper button. Extension creates a page with title 17381884 and content:
{{Paper
|authors=Vida VL, Angelini A, Ausoni S, Bilardi A, Ori C, Vlassich F,
Zoso V, Milanesi O, Sartore S, della Barbera M, Zaglia T, Thiene G, Stellin G,
|year=2007
|title=Age is a risk factor for maladaptive changes in rats exposed to
increased pressure loading of the right ventricular myocardium.
|journal=Cardiol Young
|volume=17
|issue=2
|pages=202-11
|pmid=17381884
}}
Following there is a simple template to look paper data (copy, paste and delete all newline):
<includeonly>
{|
| {{#if: {{{notauthors|}}}| {{!}} {{{notauthors|}}}. |
{{#if: {{#explode:{{{authors}}}|,|4}}| {{!}}{{#explode:{{{authors}}}|,|0}},
{{#explode:{{{authors}}}|,|1}}, {{#explode:{{{authors}}}|,|2}}, ''et al.'' |
{{#if: {{{authors|}}}| {{!}} {{{authors}}}. }} }} }}
{{#if: {{{year|}}}| ({{{year}}}) }}
{{#if: {{{title|}}}| ''{{{title}}}'' }}
{{#if: {{{journal|}}}| '''{{{journal}}}'''. }}
{{#if: {{{volume|}}}| {{{volume}}}{{#if: {{{issue|}}}| ({{{issue}}})}}
{{#if: {{{pages|}}}|{{Colon}}{{{pages}}}.}}}}
{{#if: {{{pmid|}}}| [[pubmed:{{{pmid}}}|Pubmed]]. }}
|}
</includeonly>