Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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