function ad_text_node_view in Advertisement 6.3
Same name and namespace in other branches
- 5.2 text/ad_text.module \ad_text_node_view()
- 5 text/ad_text.module \ad_text_node_view()
- 6 text/ad_text.module \ad_text_node_view()
- 6.2 text/ad_text.module \ad_text_node_view()
Adapi helper function for displaying ad itself.
1 call to ad_text_node_view()
- ad_text_adapi in text/
ad_text.module - Implementation of hook_adapi().
File
- text/
ad_text.module, line 303 - Enhances the ad module to support static text ads.
Code
function ad_text_node_view(&$node) {
$node->content['ad'] = array(
'#value' => theme('box', '', preg_replace('&@HOSTID___&', '0', ad_text_display_ad($node))),
'#weight' => -1,
);
if (!empty($node->url)) {
$link = t('Links to !url.', array(
'!url' => $node->url,
));
$link = check_plain($link, $node->format, FALSE);
$node->content['ad-link'] = array(
'#value' => "<div class=\"links-to\">{$link}</div>",
'#weight' => 1,
);
}
}