Web Site of Rajiv Pant

Victory is winning others, not defeating others.

Social Graphs API: WordPress Plugin: Blogroll Links

with 19 comments

If you already know what the Social Graph API and XFN are, you can skip the background information and go directly to the Blogroll Links plugin for Wordpress that is designed to work with these.

Social Graph API

Google recently announced the Social Graph API.1 From Google’s Code site:

With so many websites to join, users must decide where to invest significant time in adding their same connections over and over. For developers, this means it is difficult to build successful web applications that hinge upon a critical mass of users for content and interaction. With the Social Graph API, developers can now utilize public connections their users have already created in other web services. It makes information about public connections between people easily available and useful.

We [Google] currently index the public Web for XHTML Friends Network (XFN), Friend of a Friend (FOAF) markup and other publicly declared connections. By supporting open Web standards for describing connections between people, web sites can add to the social infrastructure of the web.

The Google Code site also has a video introduction to the open social graph:

YouTube Preview Image

The Google Code site has some interesting example applications. To see the power of the open social graph, follow these links:

All I did was enter my home page http://www.rajiv.com/ into these applications and got the results linked to above.

XHTML Friends Network, a component of open social networks

XFN (XHTML Friends Network) is a simple way to represent human relationships using hyperlinks. In recent years, blogs and blogrolls have become the fastest growing area of the Web. XFN enables web authors to indicate their relationship(s) to the people in their blogrolls simply by adding a ‘rel‘ attribute to their <a href> tags, e.g.:

<a href="http://www.rajiv.com/" rel="friend met">Home Page: Rajiv Pant</a>

The above link means that the page at http://www.rajiv.com/ belongs to a friend of the person who who owns the page this link is placed on. The met tag specifies that the two friends have met in real life. The link above would not be placed on a page owned by Rajiv Pant. It would be placed by a friend on their page, for example, on http://www.paradox1x.org/

Here is another example:

<a href="http://photos.rajiv.com/" rel="me">Photo Albums: Rajiv Pant</a>

This link states that the page at the URL http://photos.rajiv.com/ belongs to the same person who owns the page this link is placed on. For example, the above link would be placed on http://www.rajiv.com/ telling the Web that the URLs http://photos.rajiv.com/ and http://www.rajiv.com/belong to the same person.

To find out how to write and use XFN, or to write a program to generate or spider it, visit the XFN Web site.

Blogroll Links Plugin for WordPress

For people who maintain their Web site or blog using the WordPress blog content management system, I created an open source plugin called blogroll-links that uses WordPress’ built-in Blogroll feature2 and presents links to friends’ home pages and own pages on social networking sites using XFN in the links.

Features of this plugin

  • It can show the links by category in blog posts and WordPress Pages.
  • It uses WordPress’ standard built-in Blogroll links database. There is no hassle of another list of links to maintain.
  • It can be used to show only the links assigned to a particular category, by stating the category slug as defined in that category’s setting in Wordpress.
  • It honors the Show/Hidden setting as defined for each link in WordPress.
  • It displays the link in the same window or new window, as specified for each link in WordPress.

See this plugin in action

  • http://www.rajiv.com/friends/
    • The two lists, first one of links to my own pages on various social networking sites and the second one of links to some of my friends’ pages are generated by this plugin. Yes, those social networks’ logo pictures are also taken by the plugin from the WordPress standard Blogroll links. Code:
    • <h3>My Pages on Social Networking Sites</h3>
      <!--blogroll-links category-slug="rajiv-web" sort-by="link_name" sort-order="desc"--><!--/blogroll-links-->
      <h3>Web Sites of Some People I Know</h3>
      <!--blogroll-links category-slug="people" sort-by="link_name" sort-order="desc"--><!--/blogroll-links-->
  • http://www.rajiv.com/charity/
    • This list of charitable organizations with brief descriptions is generated by the plugin. Code:
    • <!--blogroll-links category-slug="charity"--><!--/blogroll-links-->
  • http://www.rajiv.com/blog/2004/08/02/search-engines/
    • This list of search engines is maintained as Blogroll links in WordPress. Code:
    • <!--blogroll-links category-slug="search-engines"--><!--/blogroll-links-->
  • http://www.rajiv.com/
    • The featured links shown under the “What’s featured here?” section shows the links I’ve categorized as featured in WordPress’ Blogroll links. Code:
    • <a title="featured" name="featured"></a>
      <h2>What's featured here?</h2>
      <!--blogroll-links category-slug="featured" sort-by="link_name" sort-order="desc"--><!--/blogroll-links-->

Download & install plugin

Share This Page:
  • email
  • PDF
  • Print
  • Twitter
  • Facebook
  • Digg
  • Reddit
  • del.icio.us
  • Google Bookmarks
  • Slashdot
  1. WikiPedia article explaining what an API, or application programming interface is. []
  2. It does not make you maintain yet another list of links []

Related posts:

Written by Rajiv Pant

February 10th, 2008 at 7:01 pm

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

19 Responses to 'Social Graphs API: WordPress Plugin: Blogroll Links'

Subscribe to comments with RSS or TrackBack to 'Social Graphs API: WordPress Plugin: Blogroll Links'.

  1. The plug-in sounds great! Any idea when it might be available for download? I tried the Wordpress Plugins Directory but could not find it yet.

    -John @ FireEducator.com

    FireEducator

    24 Mar 08 at 3:33 pm

  2. Hi John,

    It is now available via the WordPress Plugins Directory at
    http://wordpress.org/extend/plugins/blogroll-links/

    Thank you for your interest. Your feedback is welcome.

    Best regards,

    Rajiv Pant

    2 Apr 08 at 7:45 pm

  3. Helllo, Rajiv.

    Thanks for this plugin. I’d been looking for one that would do exactly this.

    I am not a programmer, so some things get by me, and I wonder if you’d expand your plugin’s documentation. For example, when I see:

    sort-by=”link_name” sort-order=”desc”

    in your examples, I wonder what other value(s) would sort-by accept, and how do I reverse the sort-order (ascending)?

    Again, thanks for the plugin.

    weathervane

    29 Apr 08 at 8:10 am

  4. [...] using Blogroll Links. Works fine with 1.3.1. Linki HTML [...]

  5. A couple of questions!

    1) Is there an option to have a link category open by default? If so, what is it?

    2) Is it possible to update the plugin so as the user can define how the link is displayed? As an example, rather than have the description alongside the link, have it appear on the next line. Or another example remove the list item style and substitute a heading style.

    I am quite surprised with the limited number of blogroll plugins and how some plugins over complicate the process.

    Your plugin is very functional with very little effort required to get it setup and working.

    Reagards

    GaryO

    15 Dec 08 at 5:21 am

  6. really love this plugin but was wondering what the easiest way would be to change the display from

  7. to simple line breaks after each link?

    the page i'm trying to replicate is http://www.elizabethannedesigns.com/blog/links which is currently just a manual page, but would love to use this plugin instead! thank you so much!

ami

15 Mar 09 at 6:25 pm

  • never mind – was able to "fiddle with it" and found it. :) thank you for an awesome plugin!

    ami

    15 Mar 09 at 8:36 pm

  • Ami,

    Glad you like the plugin. Thank you for your feedback. I'll also add this as a built-in feature to a future version.

    Best wishes, — Rajiv

    rajivpant

    18 Mar 09 at 10:29 am

  • Is there a way to show all categories?

    matt

    7 Apr 09 at 3:07 pm

  • Hi, I really like your plugin.

    I would like to know if there is a way to limit the number of link display on a page and automaticaly generate a page #2, 3, 4, 5… for the extra links.

    I have a categorie with more than 300 links and I would like to display them on multiples pages…

    ps. sorry about my english, I'm french…

    Thanks for this cool plugins!

    David

    David

    9 Apr 09 at 8:17 pm

  • Thanks for this plugin ! It helped me to start a custom plugin for http://www.2omg.com. Might share it with the world one day, if I can make it less application specific.
    Thanks for sharing !

    EngineHere

    22 Apr 09 at 11:18 pm

  • How did you fiddle with yours. I too love the plugin but really would enjoy a way to change the display styling. Maybe a way to toggle ul and li formatting on or off within a plugin option screen would be overkill but any sort of flexibility would be a plus.

    Kat

    16 May 09 at 4:29 pm

  • Thanks for a great plugin and all the work that goes into creating and maintaining it! Much appreciated.

    Susan

    13 Jul 09 at 2:43 am

  • hi kat! pretty sure i just edited the php file to do line breaks instead. hope this helps!

    Ami

    18 Jul 09 at 2:02 pm

  • hi rajiv! does the plugin accept sort-by then sort-by? ie, sort by name and then description? if so, what would the code be? thanks!

    ami

    18 Jul 09 at 2:04 pm

  • Hi Ami, It does not have a feature to sort that way yet, but it would not be difficult to add that feature. I’ll add that to the list. Thank you for using this plugin.

    Rajiv Pant

    25 Jul 09 at 10:26 am

  • [...] Blogroll Links [...]

  • Thanks for sharing.have a great day!

    Mariskha

    19 Oct 09 at 4:14 am

  • [...] BLOGROLL LINKS – Pulls a configurable number of links and their categories from the WordPress Link Manager and gives you more control of your blogroll. Just see this plugin in action at my Link Directory page. Developed by Rajiv Pant and you can add Blogroll Links by visit the plugin site here [...]

  • Leave a Reply

    You must be logged in to post a comment.