You are here

friendlist_activity.module in Heartbeat 6.2

File

user_activity/modules/friendlist_activity/friendlist_activity.module
View source
<?php

// by Jochen Stals - ONE-agency - www.one-agency.be

/**
 * Implementation of hook_views_api()
 *
 * This hook will tell views2 that friendlist_activiy is available
 */
function friendlist_activiy_views_api() {
  return array(
    'api' => 2,
    'path' => drupal_get_path('module', 'friendlist_activiy'),
  );
}

/**
 * Implementation of hook_heartbeat_message_info()
 */
function friendlist_activity_heartbeat_message_info() {
  $info = array(
    0 => array(
      'message' => '!username1_profile_link is now !relation_type with !username2_profile_link.',
      'message_concat' => '!username1_profile_link is now !relation_type with %others%.',
      'concat_args' => array(
        'type' => 'summary',
        'target' => 'others',
        'separator' => ', ',
      ),
      'event' => 'event_friendlist_add',
      'module' => 'friendlist_activity',
      'karma_index' => 1,
      'description' => t('Message to use when one user becomes related to another user.'),
      'variables' => array(
        '@username1' => '[user1:user]',
        '@username2' => '[user2:user]',
        '#relation_type' => '[rtid:name]',
        // # indicates that pre translation is needed
        '#relation_type_plural' => '[rtid:name_p]',
        '@username1_account_url' => '[user1:account-url]',
        '@username1_profile_link' => '[user1:user-profile-url]',
        '@username1_link' => '[user1:user-name-url]',
        '@username2_account_url' => '[user2:account-url]',
        '@username2_profile_link' => '[user2:user-profile-url]',
        '@username2_link' => '[user2:user-name-url]',
      ),
    ),
  );
  return $info;
}

Functions

Namesort descending Description
friendlist_activity_heartbeat_message_info Implementation of hook_heartbeat_message_info()
friendlist_activiy_views_api Implementation of hook_views_api()