Coming up on September 11, UMW will be very fortunate to have a visit from Trevor Owens and Dan Cohen for a Zotero-fest, with Trevor talking about Zotero and Dan talking about the future of the digital university. For the event, and for ongoing resources for students and faculty, I've started putting up a site about it in UMWBlogs
Trick was, I wanted to have an example of using Zotero's server storage with the feeds. The feeds work great, but didn't really show up as well as I would have liked when put into the sidebar widgets. And so, I had to suck it up and dive into WordPress code for the first time. I was surprised to see that there are now real classes and methods and everything, so I just slapped together something really simple to add the widget.
Here's what it looks like in the Zotero @ UMW

So, if anyone is interested, you can download it below. Enjoy!
Update: for all you UMWBlogs users, it's already installed and ready to go!
Update 2: Added features requested by Mark Sample, below. (Well, sorta. I didn't see icons specifically for Patent and Document, so those go to a default.)
Update 3: Rats...the 1.1 version doesn't quite work right.
Update 4:Sometimes, I'm an enormous muffin-head. v. 1.1.1 should clear up the problem Mark had with it only showing 1 item
Update 5:Draft of updates based on Amanda French's suggestions is up as v. 1.1.3. Hopefully we'll test things out and get it right. This is untested as of 9 pm Aug 31 2009, but the HTML should look like so:
<div class="zotero-feed-widget-item">
<img
src="http://localhost/workspace/wordpress/wp-content/plugins/ZoteroFeedWidget/ZoteroImages/treeitem-journalArticle.png"
class="zotero-feed-icon" title="journalArticle" alt="journalArticle"/>
<p>
<a target="_blank"
href="http://zotero.org/marksample/items/52322088"
class="zotero-feed-widget-title">Drawing on Modernism in Alison Bechdel’s Fun Home
</a>
<span class="zotero-feed-widget-published">August 31, 2009</span>
<a href="http://zotero.org/marksample"
target="_blank"
class="zotero-feed-widget-user">marksample
</a>
</p>
</div>
There's now a CSS file called ZoteroFeedWidget.css, which (fingers crossed!) you should be able to edit to suit taste/styles.
| Attachment | Size |
|---|---|
| ZoteroFeedWidget-1.0.zip | 126.3 KB |
| ZoteroFeedWidget-1.1.zip | 28.07 KB |
| ZoteroFeedWidget-1.1.1.zip | 28.09 KB |
| ZoteroFeedWidget-1.1.2.zip | 28.1 KB |
| ZoteroFeedWidget-1.1.3.zip | 29.21 KB |
Thanks for the plug-in - can't wait to try it
Great plugin -- I have a couple of questions:
1) Is there a way I can have the feed as a page, rather than a sidebar widget?
2) Is there any way to get the metadata searchable by the wordpress search engine?
Thanks!
--j
This plugin is awesome.I think the second question the answer is no .. but am not sure.
Kia,
I agree with you Jonathan , This is a great plugin , but i think is not a way to get the metadata searchable.
thanks,
------
email extractor
Glad you like it!
Right now, it's not set up to produce a page, per se. But, I'll see if I can whip up a modification that would produce more general HTML. Then, you could use the plugin that let's you use PHP (I think it's called Samsarin) to produce the PHP. Might work on a page version of it in the future, though. It's a great idea!
The searching is probably iffier, since that would mean putting it right into the WP database. That, I suppose, would be an extended version of producing a page. Basically, it means producing a native WP page. That's a layer that, unfortunately, I can't anticipate being able to get to soon.
Thanks!
Patrick
I would be interested in this as well. I've been looking for a plugin that would allow the feed to create one page per item.
Thanks,
Mike
Add me to the chorus of voices, please. It worked first time in the sidebar, but I'd like to be able to embed the feeds from individual Zotero folders in pages on the subject. I've been trying to call the plugin from a page using a couple of the plugins that allow the execution of PHP in posts and pages. But I only know enough to know that I probably have to pass some arguments in the call, and not to work out which arguments those are.
And I'm forgetting my manners: thank you. It's a great plugin.
Alison.
Hey Patrick, thx for the tweet -- despite what's in the Flickr photo, I'm sure I did put in the RSS feed!! I'm not *that* much of a n00b! Best I remember I messed around with it for awhile and still couldn't get it to work, then took the photo just for PHP date-display purposes. Weird. Sorry for confusion.
In any case, for whatever reason, PEBCAC or otherwise, it's working now, and working beautifully -- check it out at http://aphdigital.org. Happy faces! :) :) :)
Amanda,
Yay! I wonder if somehow, somewhere, the url you typed in didn't stick somewhere -- I kinda didn't think it'd be such a n00b thing! The error message you got was consistent with the plugin still thinking the feed url was Feed URL. Very weird.
Anyway, I'm working on what Mark suggested, too -- WP is not playing nice with my Javascript, but there should be something new soon!
The site looks fabulous, BTW!
Patrick
Thanks so much for making the changes! I can't get the revised version to work, though. I get this error:
Warning: DOMDocument::load() [domdocument.load]: I/O warning : failed to load external entity "/home/aphdigitaluser/aphdigital.org/Feed URL" in /home/aphdigitaluser/aphdigital.org/wp-content/plugins/ZoteroFeedWidget/ZoteroFeedWidget.php on line 113
I think it might be to do with the date, because I'm not entirely sure what "PHP format" it's looking for. Based on my limited experience (and some Googling), I put in "M d, Y" but that could be wrong. Here's an image of what the plugin looks like in my install. (Notice weird text wrapping, too.)
I've got on my "Someday, maybe" list to write a Firefox plugin that'll add a bookmark to Delicious and Zotero at the same time. That'll be *my* first plugin. :)
I hope these will be quick and easy. The Feed URL wants to be the URL of the RSS feed from Zotero, the same one you are using the RSS widget.
Here's the page documenting the date formats -- looks like ur doin' it right to me!
Hey Patrick, thanks so much for the Zotero plugin! Love it. It's just what I need for the site I'm building at http://aphdigitial.org -- except for the ways in which it isn't. :) I set up a Zotero feed in my sidebar with the RSS widget, and that shows the date the item was posted as well as the username of the person who posted it. Since I've put in a Group RSS feed, I particularly like the latter, so I'm gonna use the RSS widget instead.
Any chance you could put some display options into your plugin? Also, can you put a CSS class into the or the element so that items can be styled with RSS? That way I could have the nifty Zotero icons that your plugin generates!
But great job, and thanks so much.
Thanks!
Yeah, I know what you mean about wanting to show the date and username. That's something I'd like -- just didn't like the way the mouseover showed the table (and liked the icons).
I'll see about config options for showing user and id. I suspect that'll be relatively straightforward.
I started putting in CSS stuff, but bailed when I was having difficulty figuring out how to tell the plugin to add the CSS file. Basically, just got lazy and wanted to push it out (darn deadlines!). But I'll dive back in and see what I can do.
Thanks for the plug-in - can't wait to try it
Patrick, this is a great application of something I could only hack together with Yahoo Pipes. I wonder if you can add a feature to limit how many titles are listed (say, the most recent 5 or 10)? Also, does the widget make use of the complete Zotero icon set? It looks like the document and patent icons are missing. Other than that, I really like the look and idea of this widget!
I'll see about limiting the number...shouldn't be too complicated.
Hmm...curious about the missing icons. I thought that I had them all. Might also be something I'm missing in how to select them from the feed.
Thanks for the feedback! It's much appreciated!
Patrick
Thanks for the quick turnover time! Now only one time is showing up in my sidebar, no matter how many I specify in the widget setup. You can see it on my site under the "Recently Zoteroed (Test)" sidebar.
Leave it to me to be a problem child.
Post new comment