Zotpress for Wordpress
This is an old discussion that has not been active in a long time. Before commenting here, you should strongly consider starting a new discussion instead. If you think the content of this discussion is still relevant, you can link to it from your new discussion.
Zotpress 2.5 has been released. I've re-written a chunk of the code. When I wrote the original code, I was self-teaching myself the ways of PHP and XML, and I went about it the wrong way. But now the app should no longer be making HTTP calls to itself. I've also extended the "check" time to one hour. Again, once I can check for 304 status I will remove this completely. It's in there right now for the reason ajlyon explained: in case a Zotero user or group updates their citation repository.
I've also fixed up the update table code. I've tested it on my server, but if anyone is still encountering difficulties, please let me know.
I'm not sure if the private key security issue has been resolved. If not, please let me know. I'm open to suggestions on how to make the script more secure. Feel free to suggest e.g. approaches or PHP functions.
There actually was a point – I think before version 2 – when Zotpress would display the data correctly.
Error: jQuery is not a function
Source File: http://www.simifilm.ch/wordpress/wp-content/plugins/sexybookmarks/js/sexy-bookmarks-public.js?ver=3.3.2
Line: 2
Can you try deactivating this plugin? I see that jQuery is loaded, so I'm wondering if it's this plugin ...
Error: jQuery is undefined
Source File: http://www.simifilm.ch/wordpress/wp-content/plugins/wp-prettyphoto/js/jquery.prettyPhoto.js?ver=2.5.6
Line: 8
Are these other plugins working for you? Is it just Zotpress that's not working? Maybe you could try deactivating Zotpress and seeing if there's still a JavaScript error. Or take ajlyon's suggestion and drop the tables in MySQL (although the Wordpress code I've used is supposed to take care of that...)
API responses include rel="enclosure" links for attachment items. Append the API key to those and you have a download link. (It's possible the API should append the key to those automatically, which would allow them to work in feed readers without modification, but it doesn't currently.)
How would I append the API Key to the URL while ensuring security? (Since exposed keys are a security breach, right?)
It would be possible to proxy the file requests through Zotpress, but that'd be a mess and expensive.
One more option might be to have file requests hit Zotpress, which could send a request to the URL at zotero.org and get an actual URL for the underlying item in S3 (see http://forums.zotero.org/discussion/16523). I think that the S3 URLs contain only temporary authentication tokens, so exposing them to your client (with a Location: header) would probably be safe.
But tread carefully here, and maybe wait for Dan to chip in.
Amazon URLs are generated on-demand and have a 60-second timeout, so it's important that you do this only when a user is downloading a file—the Amazon URL should be presented to the user only in a 302 redirect from a Zotpress URL for that file.
It's worth considering whether this is a good idea at all, though. It's mostly/entirely the user's problem, but you do run the risk of enabling users to expose files they don't have the rights to distribute. The Zotero website doesn't allow file sharing in public groups for this reason. At the very least, this should be an optional setting in Zotpress, and possibly off by default.
The reason I ask is because security is paramount, and there is another option for those who wish to provide files publicly: uploading these files to their own servers (or the servers they're renting), in the same way that Zotpress already allows users to upload and link images as thumbnails to citations.
http://www.lassanamagassa.com/me/about/general-exam-progress-update/
How shall i proceed?
Zotpress is a really great WP PlugIn. May I come up with two minor issues?
1) The Sort-Function isn't sorting my displayed collection, I tried Author, Date
2) The Download Function also doesn't seem to work at all
Can you check and make sure that your downloads are publicly available on Zotero? If the download links aren't showing up, that's the only non-bug reason I can think of. If all is good on the Zotero side, Iet me know, and I'll follow up with troubleshooting on the Zotpress side.