-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the MendeleyMwExtension page. The following explains on how to configure your MediaWiki to make profit of your Mendeley library inside your Wiki.
## Features * Reference Mendeley documents of your private Mendeley library inside your private MediaWiki. * List references, defined on a wiki page. * Define Reference Sets on a wiki page, to group references on a single page. ## Installation ### NoteBefore installing and using this extension, make a backup of your MediaWiki, especially of the database. Here you can read how to perform the important steps. Notice, that this extension is in an early development state, so there is no warranty that everything runs bugfree and nothing is destroyed.
### Get Mendeley API access.To use the Mendeley MediaWiki extension, you need access to the Mendeley API. To obtain a "Consumer Key" and "Consumer Secret" you have to go to http://dev.mendeley.com/applications/register/ and register an application. Prerequisite is, that you own a valid mendeley account.
### Integration into MediaWikiFirst, you have to download the Mendeley MediaWiki extension. The preferred way is to clone the git repository into your MediaWiki extensions directory. So, go to your MediaWiki root, enter the extension directory and type the following on command line:
git clone https://github.com/astahlhofen/MendeleyMwExtension.git
Another alternative is to download the zip-Archive and unzip it into the MediaWiki extension directory. In this case, rename the unpacked directory from "MendeleyMwExtension-master" to "MendeleyMwExtension".
Next step is to publish the extension inside your MediaWiki. Todo this, go to the MediaWiki configuration file called "LocalSettings.php" inside your MediaWiki root directory. Insert the following at the end of the file:
# Mendeley extension
require_once ( "$IP/extensions/MendeleyMwExtension/Mendeley.php" );
$wgMendeleyConsumerKey = "<your-consumer-key>";
$wgMendeleyConsumerSecret = "<your-consumer-secret>";
After this, your MediaWiki knows about the Mendeley extension. But we're not finished. The last step is to extend the MediaWiki database for a single table, called "mw_mendeley_id_mappings'. Just go to the root of your MediaWiki, enter the directory "maintenance" and call the script "update.php" via the command line:
php update.php
To verify your installation, go to the SpecialPages of your MediaWiki, look for the link to "Version". Following this link, you'll see a list of installed extensions. There should also be an entry called "Mendeley".
## Usage ### First use of the Mendeley MediaWiki extension The first time you use the Mendeley MediaWiki extension, you will be asked, if this application is allowed to access your private Mendeley library. You have to enter your Mendeley account credentials. This credentials are stored inside a global cache. So if it's not a private wiki, you'll give all other wiki user access to the respective account library. So be sure, only you or trusted people uses the wiki. In a future version of this extension, it's planned to link the mendeley account to a specific wiki user or don't cache the credentials. ### Generate mappings The MediaWiki Mendeley extension uses mappings from internal MediaWiki ids to the external Mendeley ids. The current version does not support to manually create/edit/delete such mappings. Only an auto-generation is available. The manual configuration of such mappings is planned for a future version of this extension. To perform a automapping, create a new Wiki page, e.g. called "Mendeley". Insert the following text to the page: ``` {{#mendeley:auto_mapping}} {{#mendeley:mapping_info}} ```The first time you enter this functions, it will take a few seconds to do the stuff for your complete Mendeley library. Each entry stands for a document inside your Mendeley library. But then you see a list with your library entries. A list entry has the following syntax:
<title> ( <mendeleyId> ) -> ( <mediaWikiId>+ )
Each mendeleyId can be referenced by multiple mediaWikiIds. General, a mediaWikiId looks like this:
<firstAuthor><year of publication>
If no author is available, the literal "NoAuthor" is used instead. The mediaWikiIds are important for referencing your documents inside a wiki page.
Important: Every time you update your Mendeley library, you have to visit this page to generate the mappings for your new library entries.
### References To reference a document on a wiki page, you just have to add the following to your wiki text:``
The mediaWikiId is the id, which links to the mendeleyId. To generate a mediaWikiId for a document, please read [how to generate mappings](#generate-mappings). To list all references of a wiki page, enter the following e.g. at the end of the page:
`` ### Reference Sets Sometimes, it is necessary to group the references of a wiki page, e.g. you want to list on each section the references of this section. For this purpose, you can define *Reference Sets*. To do this, just add the attribute *refset* to your Mendeley tags.
```
<mendeley:references refset="refset1" />
In this case, the references block only lists the documents related to the Reference Set called "refset1".
*Notice: If you do not specify a refset, eveything is added to the default Reference Set called "default". So the follwing commands are equals:*
<mendeley:ref="..." refset="default"/> mendeley:ref="..."/
*and*
<mendeley:references refset="default"/> mendeley:references/
<a name="screenshots"/>
## Screenshots
<a name="screenshot-automapping-in-action"/>
### Screenshot - Automapping in action
![Screenshot: Automapping Screenshot.](https://raw.github.com/astahlhofen/MendeleyMwExtension/master/doc/img/auto-mapping.png)
----
<a name="screenshot-example"/>
### Screenshot - Example
![Screenshot: Example.](https://raw.github.com/astahlhofen/MendeleyMwExtension/master/doc/img/example.png)