You are here

function ad_text_node_view in Advertisement 5

Same name and namespace in other branches
  1. 5.2 text/ad_text.module \ad_text_node_view()
  2. 6.3 text/ad_text.module \ad_text_node_view()
  3. 6 text/ad_text.module \ad_text_node_view()
  4. 6.2 text/ad_text.module \ad_text_node_view()
1 call to ad_text_node_view()
ad_text_adapi in text/ad_text.module

File

text/ad_text.module, line 202
Enhances the ad module to support static text ads.

Code

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