You are here

function radioactivity_node_radioactivity_info in Radioactivity 6

File

plugins/radioactivity_node.module, line 25
Node radioactivity

Code

function radioactivity_node_radioactivity_info() {

  // Get node types as node subclasses.
  $subclasses = array();

  // This code purposefully doesn't use node_get_types and doesn't
  // use db_rewrite_sql so it works on cached pages with i18n.
  $types = db_query('SELECT type FROM {node_type}');
  while ($node_type = db_fetch_object($types)) {
    $subclasses[$node_type->type] = array();
  }
  return array(
    'targets' => array(
      'node' => array(
        'subclass_resolver' => '_radioactivity_node_resolve_node_type',
        'subclasses' => $subclasses,
      ),
    ),
    'sources' => array(
      'node' => array(
        'view' => array(
          'title_placeholder' => 'node view',
          'description' => 'Energy for node page view request by any client.',
        ),
        'view_auth' => array(
          'title_placeholder' => 'node view by authenticated user',
          'description' => 'Energy for node page view request by authenticated client. ' . 'Note that this is in addition to <em>node view</em>.',
        ),
        'node_create' => array(
          'title_placeholder' => 'submitted node',
          'description' => 'Initial energy for submitted node.',
        ),
        'comment_insert' => array(
          'title_placeholder' => 'submitted comment',
          'description' => 'Energy for submitted comment.',
        ),
        'comment_publish' => array(
          'title_placeholder' => 'published comment',
          'description' => 'Energy for published comment. Added also for submitted ' . 'comment when the user has <em>post comments without approval</em> ' . 'access.',
        ),
      ),
    ),
  );
}