Skip to Content

My 1st WordPress Plugin: ZoteroFeedWidget

0Coming 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

0Trick 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.

0Here's what it looks like in the Zotero @ UMW

0

0So, if anyone is interested, you can download it below. Enjoy!

0Update: for all you UMWBlogs users, it's already installed and ready to go!

0Update 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.)

0Update 3: Rats...the 1.1 version doesn't quite work right.

0Update 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

0Update 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>

0There's now a CSS file called ZoteroFeedWidget.css, which (fingers crossed!) you should be able to edit to suit taste/styles.

AttachmentSize
ZoteroFeedWidget-1.0.zip126.3 KB
ZoteroFeedWidget-1.1.zip28.07 KB
ZoteroFeedWidget-1.1.1.zip28.09 KB
ZoteroFeedWidget-1.1.2.zip28.1 KB
ZoteroFeedWidget-1.1.3.zip29.21 KB

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

But even in its current

But even in its current incarnation Zotero is easily one of the best bibliographic managers out there. Here are twelve tips and tricks that help you to get the most out of it.
allergy symptoms

Thank you for sharing this

Thank you for sharing this plugin,  Looking forward to read your more posts!
 

deneme yönlendirme

 
was an article I liked. Thanks for sharing.
...
 

Zotero is getting better and

Zotero is getting better and better. In a while, version 1.5 will bring synchronization, online backup of your library, +1100 CSL citation styles, and PDF metadata extraction (for the daring, a sync preview version is available). But even in its current incarnation Zotero is easily one of the best bibliographic managers out there. Here are twelve tips and tricks that help you to get the most out of it.
Paranos D
add url

Thanks! Yeah, I know what you

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.
 
-------------------
<A href="http://emailextractorlite.com/" title="Email Extractor 1.4">Email Extractor</A>

thanks

Thanks for the plug-in - can't wait to try it

thanks

Hi great article. I want to publish this article on my own if allowed. my website estetik

I am going to download it

I am going to download it right now. This is something which my readers will definitely enjoy. by the way is there any option to choose how many feeds to display in this.

I set up a Zotero feed in my

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.
akasya durağı

It really looks a cool

It really looks a cool wordpress plugin for displaying Zotero feeds. I am going to download and try it. By the way can the feed displayed as a full page instead of widget because i have read somewhere in the comment that it does not support full page. Anyways that's not a major issue for me.

Thanks for information.

Thanks for information.

thank

Thanks for the plug-in - can't wait to try it

Feed as a page?

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

This plugin is awesome.I think the second question the answer is no .. but am not sure.

Kia,

I agree with you Jonathan ,

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

Pages and searching

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

Feed for Page

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

Feed for page

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.

PS

And I'm forgetting my manners: thank you. It's a great plugin.

Alison.

more testin'

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! :) :) :)

Yay! And more to come!

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

Rockin!

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. :)

Dates and feed URLs

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!

Great stuff! Now I want more . . .

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.

CSS

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 -

Thanks for the plug-in - can't wait to try it

Great Start!

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!

Many thanks!

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

Only One Item Showing Up

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.

Changing the type for the limit variable.

You might need to edit the _parseFeed function in ZoteroFeedWidget.php code to the following:


$entries = $this->feedDOM->getElementsByTagName('entry');
$limit = intval($instance['limit']);
while($count < $limit) {

The main problem, I think, is that the while loop was trying to compare a
number to a string. So i just created an integer variable called
$limit.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.