You are here

function theme_ed_classified_ending_date in Classified Ads 5

Same name and namespace in other branches
  1. 5.2 ed_classified_themefuncs.inc \theme_ed_classified_ending_date()
  2. 6.2 ed_classified_themefuncs.inc \theme_ed_classified_ending_date()
  3. 7.2 ed_classified_themefuncs.inc \theme_ed_classified_ending_date()

Get a formatted div with a readable, friendly ad expiration date.

4 theme calls to theme_ed_classified_ending_date()
ed_classified_form in ./ed_classified.module
Implementation of hook_form().
theme_ed_classified_body in ./ed_classified_themefuncs.inc
theme_ed_classified_category_list_ad_row in ./ed_classified_themefuncs.inc
theme_ed_classified_teaser in ./ed_classified_themefuncs.inc

File

./ed_classified_themefuncs.inc, line 219
$ Simple text-based classified ads module. Michael Curry, Exodus Development, Inc. exodusdev@gmail.com for more information, please visit http://exodusdev.com/drupal/modules/classified.module Copyright (c) 2006, 2007 Exodus Development, Inc. All…

Code

function theme_ed_classified_ending_date($ad_expiration_date) {
  module_load_include('inc', 'ed_classified', 'ed_classified_utils');
  $class = 'classified-expiration-info';

  // standard expiration formatting
  $str = _ed_classified_get_ending_date_string($ad_expiration_date);

  // set style for ending soon
  if (_ed_classified_ad_expires_soon($ad_expiration_date)) {
    $class = 'classified-expiration-expires_soon';

    // TODO: crappy name, fix this
  }
  if (_ed_classified_ad_expired_already($ad_expiration_date)) {
    $class = 'classified-expiration-expired';

    // TODO: crappy name, fix this
  }
  return "<span class='{$class}'>" . $str . '</span>';
}