d7+heratbeat version = "7.x-1.1"

I have a module named "love.module"
in love.module

/**
     * Implement hook_ctools_plugin_api().
     *
     * This hook is needed to let ctools know about exportables.
     * @see heartbeat_og_ctools_plugin_api
     */
    function love_ctools_plugin_api($module, $api) {

      if ($module == 'love' && $api == 'love') {
        return array('version' => 1);
      }
    }

and I have a file name love.heartbeat.inc,

    /**
     * Implements hook_heartbeat_template_info().
     */
    function love_heartbeat_template_info() {
      watchdog('-call', 'message', array(), WATCHDOG_NOTICE, 'link');
    $heartbeatmessagetemplate = new HeartbeatMessageTemplate();
    $heartbeatmessagetemplate->disabled = FALSE; /* Edit this to true to make a default heartbeatmessagetemplate disabled initially */
    $heartbeatmessagetemplate->api_version = 1;
    $heartbeatmessagetemplate->message_id = 'heartbeat_add_comment2';
    $heartbeatmessagetemplate->description = 'user replied on some content';
    $heartbeatmessagetemplate->message = '<span>!username replied on !title:</span><blockquote><div>!comment</div></blockquote>';
    $heartbeatmessagetemplate->message_concat = '%username% replied on !title.';
    $heartbeatmessagetemplate->perms = 2;
    $heartbeatmessagetemplate->group_type = 'summary';
    $heartbeatmessagetemplate->concat_args = array(
      'group_by' => 'node',
      'group_target' => 'username',
      'group_by_target' => 'title',
      'group_num_max' => '5',
      'merge_separator' => ', ',
      'merge_end_separator' => ' and ',
      'roles' => array(
        1 => 0,
        2 => 0,
        3 => 0,
        4 => 0,
        5 => 0,
      ),
    );
    $heartbeatmessagetemplate->variables = array(
      '!username' => '',
      '!title' => '',
      '!comment' => '',
    );
    $heartbeatmessagetemplate->attachments = array(
      'buttons' => array(
        'weight' => array(
          'activitycomments' => '-9',
          'flagattachment:like' => '0',
        ),
        'settings' => array(
          'activitycomments' => array(
            'activitycomments_node' => 0,
          ),
        ),
        'enabled' => array(
          'activitycomments' => 0,
          'flagattachment:like' => 0,
        ),
      ),
      'content' => array(
        'weight' => array(
          'activitycomments' => '-9',
          'flagattachment:like' => '0',
        ),
        'enabled' => array(
          'activitycomments' => 0,
          'flagattachment:like' => 0,
        ),
      ),
    );
    
    
      return $heartbeatmessagetemplate;
    }

but the hook didn't called.who can help me?
did I miss somthing?

Comments

bluesky_still’s picture

Issue summary: View changes

php

bluesky_still’s picture

resolved

  if ($module == '<strong>heartbeat</strong>' && $api == '<strong>heartbeat</strong>') {
        return array('version' => 1);
      }
bluesky_still’s picture

Issue summary: View changes

php