Skip to content

Instantly share code, notes, and snippets.

View vkareh's full-sized avatar

Victor Kareh vkareh

View GitHub Profile
/**
* Hook to register the CKEditor plugin - it would appear in the plugins list on the profile setting page.
*/
function hook_ckeditor_plugin() {
return array(
'plugin_name' => array(
// Name of the plugin used to write it.
'name' => 'plugin_name',
// Description of the plugin - it would be displayed in the plugins management section of profile settings.
'desc' => t('Plugin description'),
@vkareh
vkareh / mcard_handler_field_node_radioactivity.inc
Created November 27, 2012 19:34 — forked from kevinchampion/mcard_handler_field_node_radioactivity.inc
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);