Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vkareh/4156475 to your computer and use it in GitHub Desktop.
Save vkareh/4156475 to your computer and use it in GitHub Desktop.
Simple views field handler for radioactivity.
/**
* Field handler to provide simple renderer that calls function to record
* radioactivity of the node being viewed.
*/
class mcard_handler_field_node_radioactivity extends views_handler_field_node {
function render($values) {
if (module_exists('radioactivity')) {
radioactivity_node_user_node_view($values->nid);
}
return $this->render_link(check_plain($values->{$this->field_alias}), $values);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment