Relevant Content gets some love

Drupal Icon

I while ago (almost a year!) I released a module called Relevant Content to the community. This module executes a relatively lightweight SQL query which pulls up other nodes and sorts them by how many terms they have in common with the current node you're looking at. This provides a rudimentary method of suggesting other content to visitors to the page. It also provides a way of teaching search engines about other potentially relevant content.

[adsense:468x60:4496506397]

About 3 weeks ago I decided that my project list needed some TLC so I went to work about updating a bunch of my work. GlobalRedirect has recently received some love and the dev versions now at least APPEAR to work with multiple languages. My lightweight, SEO-friendly and mostly-image-free theme, Abessive, has also received some love and has a Drupal 6 release plus a few fixes and updates to bring inline with coding standards.

The last couple of days have been devoted to Relevant Content. This module had a couple of bugs in the Drupal 5 dev release which were mainly born from its original specification for use on the subscribers area of www.pponline.co.uk where we wanted to suggest relevant videos, polls and articles to our subscribers-only area (firewalled unless you want to take up one of the subscriptions on the site).

The latest releases (Version 1.1 for Drupal 5 & 6) of this which I committed today contains a much better admin interface which allows you to define as many relevant content blocks as you wish, each one allowing you to define which content types are used, which vocabularies are used and how many nodes you would like to list in the block itself. There is also an optional header field.

The module as a whole can be seen in use on this site up at the top right of every blog page. I configured it to display the 5 most relevant blog posts. The vocabulary filtering was a little pointless in my case as I only have 1 vocabulary on this site!

I think it works pretty well and the queries themselves really don't seem to add anything noticeable to the page load times.

Comment Icon

4 Comments

The most recent comment was on Wed, 17th Apr 2013 - 13:31

Can we see a real-life example of "Relevant Content"?
Cheers,

Hey was wondering if this could be used to suggest content to users based on terms the content has in common with the users. So for example if both users and a the content fill out the same taxonomy, could you have it suggest the content most closely related to that given user?

In theory, yes. It should match terms between entities. It might need tweaking though.

Add new comment

Filtered HTML

  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <pre> <ul> <ol> <li> <dl> <dt> <dd> <img> <p>
  • You can use BBCode tags in the text. URLs will automatically be converted to links.
  • You can enable syntax highlighting of source code with the following tags: <code>, <pre>, <bash>, <css>, <html>, <js>, <jquery>, <mysql>, <php>. PHP source code can also be enclosed in <?php ... ?> or <% ... %>.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.