From MediaWiki.org
Jump to: navigation, search

Other languages:
English • ‎italiano • ‎日本語
MediaWiki extensions manual
Crystal Clear action run.png

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)
Latest version 0.1 (2009-10-13)
MediaWiki 1.14+
Database changes No
License GNU General Public License 2.0 or later
Download v0.1
  • $wgAddPaperTemplateName
  • $wgAddPaperCacheDir

Translate the AddPaper extension if it is available at translatewiki.net

Check usage and version matrix; code metrics

The AddPaper extension provides 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 a pubmed id: PMID.


In LocalSettings.php add the following code:

// add AddPaper
$wgAddPaperTemplateName = 'Paper'; #optional: default name is Paper 
$wgAddPaperCacheDir = '/tmp/file/directory';


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:

 |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, 
 |title=Age is a risk factor for maladaptive changes in rats exposed to
 increased pressure loading of the right ventricular myocardium.
 |journal=Cardiol Young

Following there is a simple template to look paper data (copy, paste and delete all newline):

 | {{#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]]. }}