Changeset 223507
- Timestamp:
- 03/31/2010 01:18:28 PM (16 years ago)
- Location:
- gcal-sidebar
- Files:
-
- 3 added
- 2 edited
-
tags/2.2 (added)
-
tags/2.2/gcal-sidebar.php (added)
-
tags/2.2/readme.txt (added)
-
trunk/gcal-sidebar.php (modified) (8 diffs)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
gcal-sidebar/trunk/gcal-sidebar.php
r221960 r223507 4 4 Plugin URI: http://www.oriontechnologysolutions.com/gcal-sidebar/ 5 5 Description: Pulls a Google Calendar feed and displays it in your sidebar. 6 Version: 2. 16 Version: 2.2 7 7 Author: Orion Technology Solutions 8 8 Author URI: http://www.oriontechnologysolutions.com … … 209 209 ?> 210 210 <div> 211 <h4> Core</h4>211 <h4>Required</h4> 212 212 <p><label for="<?php echo $this->get_field_id('feed_id'); ?>"><?php _e('Feed ID:'); ?> <input class="widefat" id="<?php echo $this->get_field_id('feed_id'); ?>" name="<?php echo $this->get_field_name('feed_id'); ?>" type="text" value="<?php echo $feed_id; ?>" /></label> 213 213 </p> 214 214 215 <h4>Optional</h4> 216 <hr /> 215 217 <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Calendar Title:'); ?> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" /></label> 216 218 </p> … … 226 228 </p> 227 229 <p><label for="<?php echo $this->get_field_id('max_results'); ?>"><?php _e('Max Results:'); ?> <input class="widefat" id="<?php echo $this->get_field_id('max_results'); ?>" name="<?php echo $this->get_field_name('max_results'); ?>" type="text" value="<?php echo $max_results; ?>" /></label></p> 228 </div> 229 <hr /> 230 <div> 231 <h4>Optional</h4> 230 231 <p><label for="<?php echo $this->get_field_id('rs_offset'); ?>"><?php _e('Results Offset:'); ?> <input class="widefat" id="<?php echo $this->get_field_id('rs_offset'); ?>" name="<?php echo $this->get_field_name('rs_offset'); ?>" type="text" value="<?php echo $rs_offset; ?>" /></label></p> 232 232 233 <p><label for="<?php echo $this->get_field_id('map_link'); ?>"><?php _e('Display link to map:'); ?> 233 234 <select name="<?php echo $this->get_field_name('map_link'); ?>" id="<?php echo $this->get_field_id('map_link'); ?>" > … … 244 245 <input class="widefat" id="<?php echo $this->get_field_id('static_url'); ?>" name="<?php echo $this->get_field_name('static_url'); ?>" type="text" value="<?php echo $static_url; ?>" /> 245 246 </p> 246 247 <p><label for="<?php echo $this->get_field_id('rs_offset'); ?>"><?php _e('Results Offset:'); ?> <input class="widefat" id="<?php echo $this->get_field_id('rs_offset'); ?>" name="<?php echo $this->get_field_name('rs_offset'); ?>" type="text" value="<?php echo $rs_offset; ?>" /></label></p>248 247 249 248 <p><label for="<?php echo $this->get_field_id('pub_or_priv'); ?>"><?php _e('Public or Private:'); ?> … … 331 330 foreach(explode(",", $instance['feed_id']) as $feed_id) { 332 331 if(esc_attr($instance['pub_or_priv']) && trim(esc_attr($instance['priv_id']))) 333 $feedUrl = $feedUrlBase . $feed_id . "/private-" . $priv_id. $feedUrlOpt . "max-results=" . $max_results;332 $feedUrl = $feedUrlBase . $feed_id . "/private-" . trim(esc_attr($instance['priv_id'])) . $feedUrlOpt . "max-results=" . $max_results; 334 333 else 335 334 $feedUrl = $feedUrlBase . $feed_id . "/public" . $feedUrlOpt . "max-results=" . $max_results; … … 370 369 $link = sprintf("%s&ctz=%s", $entry->link->attributes()->href, $calGroup['timezone']); 371 370 371 if($entry->title == ''){ 372 $title = "Busy"; 373 } else { 374 $title = sprintf("%s", $entry->title); 375 } 372 376 $event = array( 373 'title' => sprintf("%s", $entry->title),377 'title' => $title, 374 378 'location' => $where, 375 379 'description' => $description, … … 425 429 $event = $eventList[$iter]; 426 430 427 $eventUrl = $event['link'];428 431 if($pub_or_priv == 0) { 429 $ link = sprintf("<a title='%s - %s' href='%s'>%s</a>\n", $event['location'], $event['description'], $eventUrl, $event['title']);432 $href = "href='".$event['link']."'"; 430 433 } 431 434 else { 432 $link = sprintf("<a title='%s - %s'>%s</a>\n", $event['location'], $event['description'], $event['title']); 433 } 435 $href= ''; 436 } 437 $link = sprintf("<a class='summary url' title='%s - %s' %s>%s</a>\n", $event['location'], $event['description'], $href, $event['title']); 434 438 435 $start = date("l, F j \\f\\r\o\m g:ia", strtotime($event['startTime'])); 436 $end = date("g:ia", strtotime($event['endTime'])); 437 438 echo ' <li class="event">'; 439 440 echo ' <li class="event vevent">'; 439 441 echo $link; 440 442 if($map_link == 1) { … … 442 444 printf("<a class='map' title='Map near %s' href='%s'>map</a>", $event['location'], $map_href); 443 445 } 444 printf("<p class='event_time'>%s to %s</p>", date("l, F j \\f\\r\o\m g:ia", $event['startTime']), date("g:ia", $event['endTime'])); 446 447 if((gmdate("g:ia", $event['startTime']) == "12:00am") && 448 (gmdate("g:ia", $event['endTime']) == "12:00am") && 449 ($event['endTime'] - $event['startTime']) == (60 * 60 * 24)) { 450 $timeFrame = "All Day on " . gmdate("l, F j", $event['startTime']); 451 } 452 else { 453 $timeFrame = sprintf("%s to %s", date("l, F j \\f\\r\o\m g:ia", $event['startTime']), date("g:ia", $event['endTime'])); 454 } 455 456 $isostart = date("c", $event['startTime']); 457 printf("<p class='event_time dtstart value-title' title='$isostart'>%s</p>", $timeFrame); 445 458 echo ' </li>'; 446 459 } -
gcal-sidebar/trunk/readme.txt
r221960 r223507 33 33 34 34 == Changelog == 35 36 = 2.2 = 37 * Fixed bug with private calendars 38 * Implemented "All day" idea from brady8(your patch was an old version) 39 * Added patch from Ned for richsnippets support 40 * Properly sorted required / optional configs in the widget config 35 41 36 42 = 2.1 =
Note: See TracChangeset
for help on using the changeset viewer.