Table of Contents
Zotero Plugin
Compatible with DokuWiki
Angua
This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.
Similar to bibtex4dw
Download and Installation
Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.
Configuration
- Enter your Zotero username, key, and user ID into config.ini.
- Create a new wiki page for the cached Zotero entries and enter its name into config.ini (e.g. zotero:sources).
- Enter your Zotero entries into the cache file (the newly created wiki page or ZoteroEntries.txt if you don't want to use the wiki page). This can be automated by calling importAllEntries.php from the command line.
- If you cite a source that is not already in the cache, the plugin will automatically download your latest Zotero entries and add them to the cache. For this to work you have to set autoupdating in config.ini to 1.
Screenshots
See my wiki for a live example of the plugin's functionality.
Syntax and Usage
You can cite your Zotero sources by using the syntax known from LaTeX:
\cite[p.123]{ShortName123}
Prerequisites
- You need to have your Zotero database synchronized with the Zotero server.
- Every source you would like to cite needs a “short name” in the Zotero database.
- You need to make your Zotero reference list public and configure a “key” for access to the RSS feed.
History
- 2013-03-02: Notes and attachments are now ignored.
- 2012-03-04: Complete rewrite.
- The plugin now uses Zotero's API instead of parsing the website.
- Problems with Zotero entries are now displayed in a separate column on the wiki page containing the sources.
- 2010-06-02: Release of initial version
Discussion
- Is it possible to add a functionnality to list all references cited at the end of the document, like with the latex command: \nocite{*} or \bibliography{zotero_biblio} ?
- I am obtaining the same error of your implementation here: http://wiki.stefan-macke.com/doku.php/buecher:hectorsreise
ERROR: No ID found in string http://zotero.org/stefanmacke/items/QVKUKNIB
. I really would appreciate any advice about it, since I am not being able to run zotero plugin properly- Might it be that you did not define a “short title” for this item?
- How to refer to a group library instead of that of an individual? group libraries have as well RSS feeds so it shoudn't be too difficult but I can't hack your code properly. — berteh, April 2011
- I'd really like this plugin if it could access a local Zotero database.
- Thanks for this plugin – it looks promising! Unfortunately, I couldn't get it working (using the 2012-03-04 release). First I tried uploading the plugin files to my server and following the instructions. When I ran importAllEntries.php it seemed to grab the data from Zotero correctly but finished with the following error message:
Catchable fatal error: Object of class stdClass could not be converted to string in /Volumes/Shared/www/rikblok/wiki/lib/plugins/zotero/FeedZoteroRepository.php on line 95
Then I couldn't load any pages: I had to delete the plugin and reset the cache to get it working again. Thinking it might be a file permission issue, I also tried using the plugin manager to install but I got stuck because I didn't have permission to edit config.ini. Any suggestions/ideas? Thanks. — Rik Blok 2012/03/06 07:58
- –> Open FeedZoteroRepository.php and modify as belows
if (count($data->creators) == 0) { //throw new ZoteroParserException("Author could not be found in data " . $data); $authorName = "AuthorNotSpecified"; return $authorName; }
- Thanks, that helped. The other thing I had to do was run
importAllEntries.php
from my browser. Due to a file permission issue I got the following error when running from the command-line:Warning: file_put_contents(/Volumes/Shared/www/rikblok/wiki/data/pages/zotero/so urces.txt): failed to open stream: Permission denied in /Volumes/Shared/www/rikb lok/wiki/lib/plugins/zotero/TextZoteroRepository.php on line 98
But browsing to http://myserver/wiki/lib/plugins/zotero/importAllEntries.php worked. Thanks again! — Rik Blok 2012/03/25 04:24
User Accounts Only
- Not working on Weatherwax
'importAllEntries.php PHP Warning: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0 PHP Warning: set_time_limit(): Cannot set time limit in safe mode ..importAllEntries.php on line 4 Downloading https://api.zotero.org/users/../items?content=json&itemType=-attachment&key=... 0 entries imported into file'
- UPDATE: Does not work on Zotero Group libraries. All entries must be in Zotero Users Library –Mat Witts
Patch for New API
- I might be doing things wrong but the URL back to Zotero reads something like https://www.zotero.org/stefanmacke/items/BIKPH5Z3 and at least for my library it should read https://www.zotero.org/stefanmacke/items/itemKey/BIKPH5Z3 (note the extra “itemKey”). What should I change?
- Edit file
/lib/plugins/zotero/ZoteroConfig.php
around about line eight. Modify
const ENTRY_URL = "http://www.zotero.org/USERNAME/items/ENTRYID";
to
const ENTRY_URL = "https://www.zotero.org/USERNAME/items/itemKey/ENTRYID";
Title Format Causes Error
You need to ensure all your reference titles do not contain the pipe symbol (|) to avoid extra columns being generated on the cache page and causing the parser to break –Mat Witts