function ad_display_image in Advertisement 6.2
Same name and namespace in other branches
- 5.2 ad.module \ad_display_image()
- 5 ad.module \ad_display_image()
- 6.3 ad.module \ad_display_image()
- 6 ad.module \ad_display_image()
- 7 ad.module \ad_display_image()
Builds the necessary HTML to display an image-based impressions counter.
1 call to ad_display_image()
- adserve_cache_display in ./
adcache.inc - Default function for displaying advertisements. This is not generally replaced by ad cache modules.
File
- ./
ad.module, line 1577
Code
function ad_display_image($aid, $css = TRUE) {
global $base_url;
$adserve = variable_get('adserve', '');
$cache = variable_get('ad_cache', 'none');
$variables = "?o=image";
$variables .= "&a={$aid}";
if ($cache != 'none') {
$variables .= '&c=' . $cache . module_invoke('ad_cache_' . $cache, 'adcacheapi', 'display_variables', array());
}
$output = '<img src="' . htmlentities(url($base_url . '/' . $adserve . $variables)) . '" height="0" width="0" alt="view counter" />';
if ($css) {
return '<div class="ad-image-counter">' . $output . '</div>';
}
else {
return $output;
}
}