How do I add a button to my website that says "Add this item to Zotero"?
How do I add a button to my website that says "Add this item to Zotero"?
I've having a very rough time figuring out how to make my site Zotero-ready. The lack of examples on this page:
http://www.zotero.org/support/make_your_site_zotero_ready
is not helping. I've figured out how to get Zotero to recognize items on a page using OpenURL COinS, but it seems that users need to click the little Zotero icon in the address bar and then pick from a menu to add items. Our users aren't likely to figure out how to do this.
Our site has a small, searchable document collection. On the search results page I want to have a link or button next to each item that says "Add this item to Zotero".
Can anyone post a simple example?
(Also -- just for reference -- I found this page:
http://www.zotero.org/support/dev/interacting_with_zotero_from_within_firefox
with the javascript to add items. It seems straightforward, but when I include:
<script type="text/javascript" src="chrome://zotero/content/include.js"></script>
in the page, I get:
Security Error: Content at file:///C:/temp/zoterotest/zt.html may not load or link to chrome://zotero/content/include.js.
So it looks like regular web pages can't access Zotero. Or is there another way?)
I've having a very rough time figuring out how to make my site Zotero-ready. The lack of examples on this page:
http://www.zotero.org/support/make_your_site_zotero_ready
is not helping. I've figured out how to get Zotero to recognize items on a page using OpenURL COinS, but it seems that users need to click the little Zotero icon in the address bar and then pick from a menu to add items. Our users aren't likely to figure out how to do this.
Our site has a small, searchable document collection. On the search results page I want to have a link or button next to each item that says "Add this item to Zotero".
Can anyone post a simple example?
(Also -- just for reference -- I found this page:
http://www.zotero.org/support/dev/interacting_with_zotero_from_within_firefox
with the javascript to add items. It seems straightforward, but when I include:
<script type="text/javascript" src="chrome://zotero/content/include.js"></script>
in the page, I get:
Security Error: Content at file:///C:/temp/zoterotest/zt.html may not load or link to chrome://zotero/content/include.js.
So it looks like regular web pages can't access Zotero. Or is there another way?)
If you do have RIS data, you can serve RIS files with the application/x-research-info-systems MIME type and Zotero with default preferences will ingest it automatically. (On many sites such a link says "Export to EndNote", but RIS isn't EndNote-specific.) In the near future Zotero will support the Bibliographic Ontology and will likely be able to automatically ingest BIBO RDF in the same manner, which will allow for higher quality data. Ideally there'll be client libraries in PHP, Python, etc. to easily generate BIBO.
But the address bar icon is still the standard way to save to Zotero.
I can do it if I can get access to Zotero.Items.add() from within a webpage. How can I get around the security restriction?
I can write a custom Firefox plugin, a Zotero plugin, or a translator if necessary. Just point me in the right direction.
But it's probably worth explaining what you're trying to do in a bit more detail before starting work on a plugin.
> right-click? It'll save a link to the page, though not the exact spot on the page.
That might do it, if I can control how the Zotero item is created. Here's the scenario: we have some documents with chapters and line numbers. Users are accustomed to citing parts of the text like this: "book:chapter_name:page_num:line_range:words". For example: "The Book of Foo:Chapter 1:Page 2:Line 3-5:'Hello' to 'World'". (Imagine the word Hello is on line 3 and World is on line 5).
The document is marked up with all of the structure and metadata, so I can know the exact chapter/line/etc. that the user has selected. I could create the reference above in Javascript if necessary. There's also a bit of metadata like author and date that we'd like to preserve. So if there were a way to insert Zotero items and notes in a precisely controlled way then we'd be set.
We can't really change the way users cite text because we have several thousand of them, and they're not going to want to change.
What's the best way to distribute it, assuming we'll have several hundred to a thousand users, all of whom are new to Zotero? Do they have install it separately? Is there any way to make it happen in one go?
Can I put Zotero link on our Library Website? TQ