If there's a setting or patch for this, I didn't find it.

In the upcoming events block, any events for the current day get rotated off after the countdown. Is there a way that you could have an event taking place on current day to show:

Title of our big event (today)
A later event (3 days)

Comments

jdmquin’s picture

I'm a beginner at PHP Programming but I made the following changes to the theme_event_upcoming_list function in the event.module to add the month and date to the beginning of the title in the upcoming event block and to change the # of hours to simply today

      /* if ($minutesleft < 0) {
        $timeleft = t('NOW');
      }
      else if ($minutesleft < 60) {
        $timeleft = format_plural($minutesleft, '1 minute', '%count minutes');
      }
      else if ($minutesleft >= 60 && $minutesleft < (24*60)) {
        $timeleft = format_plural(floor($minutesleft/60), '1 hour', '%count hours');
      }
      else */ if ($minutesleft >= (24*60)) {
        $days = floor($minutesleft / (24*60));
        // hours remainder
        $hours = ($minutesleft % (24*60)) / 60;
        // hours left in the day
        $hours_left = ((time() / 60) % (24*60)) / 60;
        // see if the remainder of hours on the event date is greater than the hours left in today, if so increase the days by one so that the days remaining mimics the date rather than how many 24 hour periods there are between now and then.
        if($hours>$hours_left) {
          $days++;
        }
        $timeleft = format_plural($days, '1 day', '%count days');
      } else { $timeleft = 'today'; }

      $day = _event_date('j', $node->start);
      $month = _event_date('M', $node->start);
      $shortdate = $month. " ". $day. ": ". $node->title;

      $items[] = l($shortdate, "node/$node->nid", array("title" => $node->title)) . " ($timeleft)";

Note: I have the event.module from CivicSpace 0.8.0.3

thanks

crunchywelch’s picture

killes@www.drop.org’s picture

Version: » 5.x-2.x-dev
Status: Active » Closed (duplicate)

this is a dupliacte of another issue I am too lazy to look for.