Plugin Directory

Changeset 789360


Ignore:
Timestamp:
10/17/2013 03:50:45 PM (12 years ago)
Author:
rjune
Message:

Finish modifications, add all day fix from David

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gcal-sidebar/trunk/gcal-sidebar.php

    r789356 r789360  
    457457 *
    458458 */
    459     function display_feed( $calGroup, $instance) {
     459    function display_feed( $calGroup, $instance, $display = true) {
     460    $rval = "";
    460461        $map_url     = "http://maps.google.com/maps";
    461462/*
     
    510511        $after_title = '';
    511512
    512         echo '<' . $lt . ' id="events">';
     513        $rval .= echo '<' . $lt . ' id="events">';
    513514
    514515        $date = '';
     
    537538                 (date("g:ia", $event['endTime']   - date("Z")) == "12:00am") &&
    538539                 ($event['endTime'] - $event['startTime']) == (60 * 60 * 24)) {
    539                   $body = "All Day on " . date("l, F j", $event['startTime']);
     540                  $body = "All Day on " . date("l, F j", $event['startTime'] - date("Z"));
    540541              }
    541542              else {
     
    548549
    549550            if(($show_date != "none" ) && ($date != $olddate))
    550                 echo '  <li class="date"><h4>' . date($dFormat, $event['startTime']) . "</h4></li>";
    551 
    552             echo '  <' . $li . ' class="event vevent">';
    553             echo $link;
     551                $rval .= '  <li class="date"><h4>' . date($dFormat, $event['startTime']) . "</h4></li>";
     552
     553            $rval .= '  <' . $li . ' class="event vevent">';
     554            $rval .= $link;
    554555            if($map_link == 1) {
    555556                $map_href = $map_url . "?view=map&iwloc=A&q=" . urlencode($event['location']);
    556                 printf("<a class='map' title='Map near %s' href='%s'>map</a>", $event['location'], $map_href);
     557                $rval .= sprintf("<a class='map' title='Map near %s' href='%s'>map</a>", $event['location'], $map_href);
    557558            }
    558559
    559560            //$body = $event['description'];
    560561            $isostart = date("c", $event['startTime']);
    561             printf("<p class='event_time dtstart value-title' title='%s'>%s</p></%s>", $isostart, $body, $li);
     562            $rval .= sprintf("<p class='event_time dtstart value-title' title='%s'>%s</p></%s>", $isostart, $body, $li);
    562563            $olddate = $date;
    563564        }
    564         echo '  </' . $lt . '>';
     565        $rval .= '  </' . $lt . '>';
    565566    }
    566567} // class GcalSidebar
Note: See TracChangeset for help on using the changeset viewer.