Quantcast
Viewing all articles
Browse latest Browse all 7

Module showcase: Radioactivity

Radioactivity is a Drupal module for providing hotness metrics for content. The module is originally developed for and sponsored by Uusi Suomi to replace the Drupal built-in node counter. The node counter records node loads for a certain node (a news item, a blog post etc.) and resets the daily counter at midnight. This has obvious limitations if you want more information than just the node counts per day.

Uusi Suomi uses this module to build six different hotness lists: most popular content -lists (most popular now, most popular today, and most popular this week) and most commented content lists (now, this week and this month). The module has proved to be very useful for these purposes and you can even use it for a ton of different cases.

What does this "hotness" mean and what does it have to do with radioactivity?

You've all heard the term half-life in school or in the news. It is usually used to explain how long it takes for radioactive material to radiate away its energy. It could, for example, take a year for the radioactivity level to drop in half after a nuclear accident. After two years the radioactivity level would have become one fourth of the original level. This is the basic mathematical idea behind this module, too. When you cause a piece of content to gain radioactivity (by reading it, commenting on it or voting), the radioactivity starts to decrease immediately. You can create different decay profiles for different purposes. As explained above, Uusi Suomi uses a profile to create different lists for most popular now and most popular today. These are basically identical lists with the difference that the first-mentioned halves in 7,5 minutes and the latter in 12 hours.

Possible uses for the module:

  • Most popular (read) content
  • Most commented content
  • Most active forum topics
  • Content voted as best (a great hands-on screencast available here: http://bit.ly/dpbVzq) – or worst.
  • Hybrid cases (see the video linked above)

Will it kill my site performance?

No. Without even going into detail, the module is quite lightweight and counts the radioactivity decay transactions as a cron event. For a slight additional performance boost, the module supports memcached for storing the changes in radioactivity between cron runs.

What about caching?

The module supports Drupal page caching so it won't kill your performance. However, as well as with a bunch of other modules, aggressive caching mode is out of the picture, because the module needs a hook_init() invocation to add the energy.

Conclusion

When you need informative and configurable hotness metrics for your site, Radioactivity is the right module for the challenge. Since its first launch two years ago, the module has become very rich in features and is currently used by over 350 sites worldwide. Join the bandwagon!

And oh yes, you can use views to create lists of content ordered by their radioactivity.

Links

http://drupal.org/project/radioactivity– Project page for the module
http://drupal.org/project/usage/radioactivity– Usage statistics for the module
http://bit.ly/dpbVzq– A great how-to screencast by Greg Knaddison
http://www.uusisuomi.fi/#section6– Radioactivity lists at Uusi Suomi


Viewing all articles
Browse latest Browse all 7

Trending Articles