You are here

function ad_image_node_view in Advertisement 5.2

Same name and namespace in other branches
  1. 5 image/ad_image.module \ad_image_node_view()
  2. 6.3 image/ad_image.module \ad_image_node_view()
  3. 6 image/ad_image.module \ad_image_node_view()
  4. 6.2 image/ad_image.module \ad_image_node_view()
1 call to ad_image_node_view()
ad_image_adapi in image/ad_image.module
Adapi implementation.

File

image/ad_image.module, line 435
Enhances the ad module to support banner ads.

Code

function ad_image_node_view(&$node) {
  $node->content['ad'] = array(
    '#value' => ad_image_display_ad($node),
    '#weight' => -1,
  );
  if ($node->url) {
    $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' => 0,
    );
  }
}