Using time remaining, ongoing for event titles

When you use the dynamic display block module to showcase events and want to show how long till the events starts or show ongoing if the event is happening at this time you can do the following:

Add a date field to CCK with a start date and an end date. Add this field to the view you use and use the following code to make the title in the content preprocess function:

    // add slide_title variable
    if (isset($result->node_title)) {
      date_default_timezone_set('Europe/London');
      $vars['slider_item']['slide_title'] =  $result->node_title .
      '<br />' .
      theme_date_time_ago(date_create($result->node_data_field_pager_item_text_field_startdate_value), date_create($result->node_data_field_pager_item_text_field_startdate_value2));
    }

Comments

cost-accounting-assignment-help

I’m sharing my experience with leading online assignment providing service, GoAssignmentHelp. They have panel of experts who work for our assignment requirement. I have used their service for several times and I’m very impressed with the outcomes. I have scored high grades for my (Keyword). I have always received very good quality assignments every time and they deliver them on time. Try at least once their service and get your assignments done from PHD experts.
cost-accounting-assignment-help