Index: janode.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/janode/Attic/janode.module,v retrieving revision 1.9.2.2 diff -u -p -r1.9.2.2 janode.module --- janode.module 1 Mar 2007 10:06:31 -0000 1.9.2.2 +++ janode.module 6 Oct 2007 15:18:42 -0000 @@ -619,6 +619,50 @@ function _janode_redirect() { } /* }}} */ +/** + * Implementation of "contrib module views" hook_views_tables() + */ +function janode_views_tables() { + $tables['janode'] = array( + 'name' => 'janode', + 'join' => array( + 'left' => array( + 'table' => 'node', + 'field' => 'nid', + ), + 'right' => array( + 'field' => 'nid', + ), + ), + 'fields' => array( + 'http_link' => array( + 'name' => t('The actual link'), + 'help' => t('The URL to which this link will send the user'), + 'sortable' => FALSE, + 'handler' => '_janode_views_handler_string', + ), + 'http_anchor' => array( + 'name' => t('The link\'s "anchor" text'), + 'help' => t('This is the text placed between the <a href> and </a> tags'), + 'sortable' => FALSE, + 'handler' => '_janode_views_handler_string', + ), + 'http_click' => array( + 'name' => t('The click through counter'), + 'help' => t('The number of times that users clicked this link (only works if "inward redirection" is enabled'), + 'sortable' => TRUE, + 'handler' => 'views_handler_field_int', + ), + ), + + ); + return $tables; +} + +function _janode_views_handler_string($fieldinfo, $fielddata, $value, $data) { + return check_plain($value); +} + /* {{{ _janode_local_settings() */ /** * _janode_local_settings($name = FALSE)