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)); }
Recent comments
11 hours 9 min ago
1 day 7 hours ago
1 day 16 hours ago
2 days 9 hours ago
2 days 20 hours ago
4 days 6 hours ago
4 days 6 hours ago
4 days 6 hours ago
4 days 6 hours ago
4 days 6 hours ago