function ad_external_node_view in Advertisement 7
Same name and namespace in other branches
- 5.2 external/ad_external.module \ad_external_node_view()
- 5 external/ad_external.module \ad_external_node_view()
- 6.3 external/ad_external.module \ad_external_node_view()
- 6 external/ad_external.module \ad_external_node_view()
- 6.2 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 165 - 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('ad_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,
);
}