Permalink
Browse files

MDL-30740 skydrive: improve repo metadata

* Add manage link
* Use realthumbnail for lazy loading images
* Add image height/width info
* Add author information to files
  • Loading branch information...
danpoltawski committed Jul 15, 2013
1 parent c893448 commit f6ef724650f063497fbe602c09868fd39c91bf96
Showing with 11 additions and 2 deletions.
  1. +1 −0 repository/skydrive/lib.php
  2. +10 −2 repository/skydrive/microsoftliveapi.php
@@ -95,6 +95,7 @@ public function get_listing($path='', $page = '') {
$ret = array();
$ret['dynload'] = true;
$ret['nosearch'] = true;
$ret['manage'] = 'https://skydrive.live.com/';
$ret['list'] = $this->skydrive->get_file_list($path);
// Generate path bar, always start with the plugin name.
@@ -182,19 +182,25 @@ public function get_file_list($path = '') {
'title' => $file->name,
'size' => $file->size,
'date' => strtotime($file->updated_time),
'thumbnail' => $file->picture,
'thumbnail' => $OUTPUT->pix_url(file_extension_icon($file->name, 90))->out(false),
'realthumbnail' => $file->picture,
'source' => $file->id,
'url' => $file->link,
'image_height' => $file->height,
'image_width' => $file->width,
'author' => $file->from->name,
);
break;
case 'video':
$files[] = array(
'title' => $file->name,
'size' => $file->size,
'date' => strtotime($file->updated_time),
'thumbnail' => $file->picture,
'thumbnail' => $OUTPUT->pix_url(file_extension_icon($file->name, 90))->out(false),
'realthumbnail' => $file->picture,
'source' => $file->id,
'url' => $file->link,
'author' => $file->from->name,
);
break;
case 'audio':
@@ -205,6 +211,7 @@ public function get_file_list($path = '') {
'thumbnail' => $OUTPUT->pix_url(file_extension_icon($file->name, 90))->out(false),
'source' => $file->id,
'url' => $file->link,
'author' => $file->from->name,
);
break;
case 'file':
@@ -215,6 +222,7 @@ public function get_file_list($path = '') {
'thumbnail' => $OUTPUT->pix_url(file_extension_icon($file->name, 90))->out(false),
'source' => $file->id,
'url' => $file->link,
'author' => $file->from->name,
);
break;
}

0 comments on commit f6ef724

Please sign in to comment.