You are here

function simpleads_campaigns_simpleads_stats_info in SimpleAds 7

Implements hook_simpleads_stats_info().

File

modules/simpleads_campaigns/simpleads_campaigns.module, line 170

Code

function simpleads_campaigns_simpleads_stats_info($node, $op) {
  $campaign_link = "";
  if (isset($node->field_adcamp_list[$node->language]) && is_numeric($node->field_adcamp_list[$node->language][0]['safe_value'])) {
    $campaign = node_load($node->field_adcamp_list[$node->language][0]['safe_value']);
    $campaign_link = t('This ad participates in !link campaign', array(
      '!link' => l($campaign->title, 'admin/content/simpleads_campaigns/' . $campaign->nid),
    ));
  }
  if ($op == 'list') {
    return array(
      $campaign_link,
    );
  }
  if ($op == 'ad_status_detail') {
    return array(
      $campaign_link,
    );
  }
}