function _ad_image_node_view in Advertisement 7
Adapi helper function for displaying ad itself.
1 call to _ad_image_node_view()
- ad_image_adapi in image/
ad_image.module - Implementation of hook_adapi().
File
- image/
ad_image.module, line 597 - Enhances the ad module to support banner ads.
Code
function _ad_image_node_view(&$node) {
$node->content['ad'] = array(
'#value' => preg_replace('&@HOSTID___&', '0', ad_image_display_ad($node)),
'#weight' => -1,
);
if (!empty($node->url)) {
$link = t('Links to !url.', array(
'!url' => $node->url,
));
$link = check_markup($link, 'full_html');
$node->content['ad-link'] = array(
'#value' => "<div class=\"links-to\">{$link}</div>",
'#weight' => 0,
);
}
}