You are here

function ad_text_display_ad in Advertisement 5.2

Same name and namespace in other branches
  1. 5 text/ad_text.module \ad_text_display_ad()
  2. 6.3 text/ad_text.module \ad_text_display_ad()
  3. 6 text/ad_text.module \ad_text_display_ad()
  4. 6.2 text/ad_text.module \ad_text_display_ad()
  5. 7 text/ad_text.module \ad_text_display_ad()

Function used to display the selected ad.

2 calls to ad_text_display_ad()
ad_text_node_form in text/ad_text.module
Adapi helper function for displaying a node form.
ad_text_node_view in text/ad_text.module

File

text/ad_text.module, line 14
Enhances the ad module to support static text ads.

Code

function ad_text_display_ad($ad) {
  $ad_text = "<div class=\"text-advertisement\" id=\"ad-{$ad->aid}\"><div class=\"ad-header\"><a href=\"{$ad->redirect}/@HOSTID___\"" . ad_link_attributes() . '>' . ad_text_display_prepare($ad->adheader) . "</a></div><div class=\"ad-body\">" . ad_text_display_prepare($ad->adbody) . "</div></div>";
  if (variable_get('ad_filter', 0)) {
    $ad_text = check_markup($ad_text, $ad->format, FALSE);
  }
  return $ad_text;
}