You are here

function theme_ed_classified_category_list_ad_row in Classified Ads 6.2

Same name and namespace in other branches
  1. 5.2 ed_classified_themefuncs.inc \theme_ed_classified_category_list_ad_row()
  2. 5 ed_classified_themefuncs.inc \theme_ed_classified_category_list_ad_row()
  3. 7.2 ed_classified_themefuncs.inc \theme_ed_classified_category_list_ad_row()
1 theme call to theme_ed_classified_category_list_ad_row()
theme_ed_classified_taxonomy_ads in ./ed_classified_themefuncs.inc

File

./ed_classified_themefuncs.inc, line 164
$ Simple text-based classified ads module.

Code

function theme_ed_classified_category_list_ad_row($ad, $rowcount) {
  module_load_include('inc', 'ed_classified', 'ed_classified_utils');
  $content = '<li';
  if ($ad->sticky) {
    $content .= ' class="sticky"';
  }
  $content .= ">\n";
  $content .= '<h3>' . l($ad->title, drupal_get_path_alias('node/' . $ad->nid), array(
    'attributes' => array(
      'title' => 'Description here!',
    ),
  )) . "</h3>";
  if (_ed_classified_variable_get('show_body_in_ad_list', EDI_CLASSIFIED_VAR_DEF_SHOW_BODY_IN_AD_LIST)) {
    $content .= '<div class=\'classified-description\'>' . check_markup($ad->body, $ad->format, FALSE) . '</div>';
    if (theme_get_setting('toggle_node_info_' . $ad->type)) {
      $content .= '<div class="classified-author">' . t('Posted by: !name', array(
        '!name' => theme('username', $ad),
      )) . "</div>\n";
      if ($ad->created > 0) {
        $content .= '<div class="classified-date">' . t('Created on ') . format_date($ad->created) . "</div>\n";
      }
      $expires = ed_classified_get_ad_expiration($ad);
      if ($expires > 0) {
        $content .= '<div class="classified-date">' . theme('ed_classified_ending_date', $expires) . "</div>\n";
      }
    }
  }
  $content .= "</li>\n";
  return $content;
}