function theme_ad_text_ad in Advertisement 6.3
Same name and namespace in other branches
- 6 text/ad_text.module \theme_ad_text_ad()
- 6.2 text/ad_text.module \theme_ad_text_ad()
- 7 text/ad_text.module \theme_ad_text_ad()
Return a themed ad of type ad_text.
Parameters
@ad: The ad object.
Return value
A string containing the ad markup.
1 theme call to theme_ad_text_ad()
- ad_text_display_ad in text/
ad_text.module - Function used to display the selected ad.
File
- text/
ad_text.module, line 26 - Enhances the ad module to support static text ads.
Code
function theme_ad_text_ad($ad) {
if (isset($ad->aid)) {
if (!isset($ad->adheader)) {
$ad = node_load($ad->aid);
}
$output = '<div class="text-advertisement" id="ad-' . $ad->aid . '">';
if (isset($ad->url) && !empty($ad->url)) {
$output .= theme('ad_text_text', ad_text_display_prepare($ad->adheader, $ad->format), ad_text_display_prepare($ad->adbody, $ad->format), $ad->redirect . '/@HOSTID___');
}
else {
$output .= theme('ad_text_text', ad_text_display_prepare($ad->adheader, $ad->format), ad_text_display_prepare($ad->adbody, $ad->format));
}
$output .= '</div>';
return $output;
}
}