You are here

function ad_external_node_view in Advertisement 6.3

Same name and namespace in other branches
  1. 5.2 external/ad_external.module \ad_external_node_view()
  2. 5 external/ad_external.module \ad_external_node_view()
  3. 6 external/ad_external.module \ad_external_node_view()
  4. 6.2 external/ad_external.module \ad_external_node_view()
  5. 7 external/ad_external.module \ad_external_node_view()

Adapi helper function for displaying ad itself.

1 call to ad_external_node_view()
ad_external_adapi in external/ad_external.module
Implementation of hook_adapi().

File

external/ad_external.module, line 172
Enhances the ad module to support externally hosted ads, served via IFrames. It is recommended that you configure "Administer >> Content management >> Ads >> Settings >> Global settings >> Display type" to…

Code

function ad_external_node_view(&$node) {
  $node->content['ad'] = array(
    '#value' => theme('box', '', stripslashes(ad_external_display_ad($node))),
    '#weight' => -1,
  );
  $link = t('Links to !url.', array(
    '!url' => $node->url,
  ));
  if (variable_get('ad_filter', 0)) {
    $link = check_markup($link, $node->format, FALSE);
  }
  $node->content['ad-link'] = array(
    '#value' => "<div class=\"links-to\">{$link}</div>",
    '#weight' => 1,
  );
}