Jump to content

Erweiterung:BibManager/Admin-Handbuch

From mediawiki.org
This page is a translated version of the page Extension:BibManager/Admin manual and the translation is 80% complete.

Die "BibManager"-Erweiterung erlaubt MediaWiki, bibliografische Daten zu verwalten. Diese Dokumentation beschreibt die Installation und Konfiguration dieser Erweiterung.

Installation und Konfiguration

Copy the folders "BibManager" into the <mediawiki>/extensions directory. You will have to make a few modifications to the LocalSettings.php of your MediaWiki installation:

At first you have to create a custom namespace for the articles describing the bib entry. You can choose a different numeric id for the namespace if you want to.

define("NS_CITATION", 800);
define("NS_CITATION_TALK", 801);
$wgExtraNamespaces[NS_CITATION] = "Cit";
$wgExtraNamespaces[NS_CITATION_TALK] = "Cit_talk";

Afterwards you have to include the extension.

wfLoadExtension("BibManager");

The next step is to register the namspace with the BibManager extension. You can also choose an alternative existing namespace. If you choose this, you drop out the first four lines.

$wgBibManagerCitationArticleNamespace = NS_CITATION;

Additional configuration variables (with their default values): To disable the (few) JavaScripts of the extension.

$wgBibManagerUseJS = false;

For future development there is the posibility to change the repository in which BibManager stores its data. At the moment only the local MediaWiki database is a valid repository. (To develop a new repository one would hvae to extend the BibManagerRepository class and implement the abstract methods):

$wgBibManagerRepoClass = 'BibManagerLocalMWDatabaseRepo';

To change the output format a mapping between reference type and desired format extists ("-" is the fallback format if the reference type was not recognized):

$wgBibManagerCitationFormats = array (
    '-'             => '%author%: %title%, %year%',
    'article'       => '%author% (%year%): %title%. <em>%journal%</em>, %volume%, %pages%',
    'book'          => '%author% (%year%): %title%. (%edition%). <em>%publisher%</em>, %address%, %pages%',
    'booklet'       => '%title%',
    'conference'    => '%author% (%year%): %title%. %booktitle%',
    'inbook'        => '%author% (%year%): %title%. (%edition%). <em>%publisher%</em>, %address%, %pages%, %editor%, %chapter%',
    'incollection'  => '%author% (%year%): %title%.  %booktitle%',
    'inproceedings' => '%author% (%year%): %title%. <em>%publisher%</em>, %booktitle%',
    'manual'        => '%title%',
    'masterthesis'  => '%author% (%year%): %title%. %school%',
    'misc'          => '%author%: %title%, %year%',
    'phdthesis'     => '%author% (%year%): %title%. %school%',
    'proceedings'   => '%title% (%year%)',
    'techreport'    => '%author% (%year%): %title%. %institution%.',
    'unpublished'   => '%author%: %title%. %note%.'
);

The following placeholder are valid within the configuration:

  • %address%
  • %annote%
  • %author%
  • %booktitle%
  • %chapter%
  • %crossref%
  • %edition%
  • %editor%
  • %eprint%
  • %howpublished%
  • %institution%
  • %journal%
  • %key%
  • %month%
  • %note%
  • %number%
  • %organization%
  • %pages%
  • %publisher%
  • %school%
  • %series%
  • %title%
  • %type%
  • %url%
  • %volume%
  • %year%

Google scholar a search engine by Google Inc. and serves for literature research. To change the way the link to google scholar is rendered you may adapt the $wgBibManagerScholarLink variable:

$wgBibManagerScholarLink = 'http://scholar.google.com/scholar?q=%title%';

To limit access to BibManager SpecialPages the following permissions are available:

bibmanageredit
Access to "Special:BibManager Edit entry" and "BibManager Import".
bibmanagercreate
Access to "Special:BibManager Create entry".
bibmanagerdelete
Access to "Special:BibManager Delete entry". Visibility of deletion link.

Example:

$wgGroupPermissions['*']['bibmanageredit']	= false;
$wgGroupPermissions['author']['bibmanageredit']	= true;
$wgGroupPermissions['editor']['bibmanageredit']	= true;

First bracket contains user group, second the permission.

To complete installation run update.php from the commandline. The file can be found in <mediawiki>/maintenance:

php update.php

By this action the required tables will be created automatically.

Import and export of a repo

The BibManager extension provides two maintenance scripts, to export and import a whole repository.

To export the full repository to BibTeX run the following command:

php <mediawiki>/extensions/BibManager/maintenance/BibManagerExportRepo.php --filename export.bibtex

The export file (export.bibtex) will be placed within the present working directory.

Such a export file can be imported using the following command:

php <mediawiki>/extensions/BibManager/maintenance/BibManagerImportRepo.php --filename export.bibtex