WordPress BibSonomy Plugin

This plugin embeds BibSonomy in your WordPress blog. These are some of it’s features

  • post your blog entries with a few clicks to BibSonomy
  • include your tag cloud from BibSonomy inside a post/page
  • include a list of posts

Want to see this in action? Have a look at the examples.

Installation

Download the plugin, unzip it into the wp-content/plugins directory and activate it. After that, you’ll have to configure the plugin in the settings menu:

Username
Enter your username.
API key
Copy and paste it from here.
Default tags
If you post your blog entries to BibSonomy they’ll have these tags attached by default.

If you don’t enter these values, the sky will fall on your head and the plugin might not work.

Usage

You can either use the macros and include content from BibSonomy inside a post/page or use the admin menu to post your blog entries to your BibSonomy profile.

Post blog entries

Posting your blog entries to BibSonomy is as easy as clicking on SettingsBibSonomy in the admin menu, choosing Show posts, selecting some posts and clicking on Post selection. Depending on the number of blog posts you’d like to send to BibSonomy this’ll take some time.

To get the most out of this feature you should:

  • add sensible categories and tags to your blog entries
  • supply an excerpt for every post/page, since this will be used as a description. For pages you may use a custom field named excerpt.

Finally, don’t try to spam BibSonomy – it’s not worth the hassle.

Macros

Since WordPress 2.5 and the Shortcode API it’s very easy to supply the user with powerful macros. You simply add them to a post/page and they’ll be replaced with some content.

The macros will be evaluated every time the page loads, so now may be the time to think about caching.

Tags

To show a tag cloud inside a page you may use the bibsonomy-tags macro. Because the plugin doesn’t want to include the CSS for the tag cloud on each and every page of your website you’ll have to add a custom field named bibsonomy to the page you’d like to use the shortcode on.
You may supply a value for minusercount, i.e. the amount of posts a tag has been used on; defaults to 10. Example:

[bibsonomy-tags minusercount="5"]

To learn more about the attributes for the bibsonomy-tags macro have a look at the reference.

The plugin uses the Google Chart API to generate charts with statistical information about your tags. You can use the bibsonomy-tags macro along with the nested bibsonomy-chart macro to produce a graph that shows the overall occurrence of your tags:

[bibsonomy-tags style="occurrence" minusercount="1"]
[bibsonomy-chart color="#6699cc" xlabels="6"]
[/bibsonomy-tags]

To learn more about the attributes for the bibsonomy-chart macro have a look at the reference.

Posts

This feature is very powerful because you’re able to include posts from BibSonomy inside a post/page. You’re able to define the resource type, add tags and restrict the number of posts.

The following would include the four most recent bookmarks, tagged with myTag while skipping the first two posts:

[bibsonomy-posts tags="myTag" start="2" end="6"]

To learn more about the attributes for the bibsonomy-posts macro have a look at the reference.

Macro reference

Here you can find all the attributes for the macros. Hint: if you want to keep the default value, you don’t have to include the attribute in the macro.

bibsonomy-tags

Option Description Possible values
minusercount You used this tag this many times Integer greater than 0; defaults to 5
style Layout style cloud, occurrence; defaults to cloud

bibsonomy-chart

This macro must be nested inside bibsonomy-tags to be useful.

Option Description Possible values
color The color for the graph RGB color string like #123 or #aaccee
xlabels Shows every n’th label on the x axis. Useful if you’re having a lot of labels. Integer greater than 0; defaults to 5
width Width for the chart Integer greater than 0; defaults to 550
height Height for the chart Integer greater than 0; defaults to 200

bibsonomy-posts

Option Description Possible values
resourcetype The resource type attached to a post bookmark or bibtex; defaults to bookmark
tags Include posts with these tags only Space separated list of tags
start The offset in the result set Integer greater than 0; defaults to 0
end The limit in the result set Integer greater than start; defaults to 20
style Layout style list, publ-bibsonomy; defaults to list

Troubleshooting

This plugin makes extensive use of PHP 5.x and WordPress 2.5. Earlier version of PHP or WordPress won’t work.

For this plugin to work your theme needs the wp_head() function in the HTML header. Otherwise the CSS will not work and there’ll be just a list and not a cloud of tags.

Message from Certkiller Our latest brain dumps is the best sources to get information about Wordpress. We offer professional 642-642 training for developers and designers so they will pass 640-863 exam and become master of their field.

11 comments ↓