Renaming function generate_mp3_preview to generate_media_preview

skala
Julio Montoya 14 years ago
parent 2a12222ea0
commit 9456f82789
  1. 4
      main/document/document.inc.php
  2. 20
      main/inc/lib/document.lib.php

@ -266,7 +266,7 @@ function create_document_link($document_data, $show_as_icon = false, $counter =
if ( preg_match('/mp3$/i', urldecode($url)) ||
preg_match('/wav$/i', urldecode($url)) ||
preg_match('/ogg$/i', urldecode($url))) {
$sound_preview = DocumentManager::generate_mp3_preview($counter);
$sound_preview = DocumentManager::generate_media_preview($counter);
return $sound_preview ;
} elseif (
//Show preview sith yoxview
@ -288,7 +288,7 @@ function create_document_link($document_data, $show_as_icon = false, $counter =
if ( preg_match('/mp3$/i', urldecode($url)) ||
preg_match('/wav$/i', urldecode($url)) ||
preg_match('/ogg$/i', urldecode($url))) {
$sound_preview = DocumentManager::generate_mp3_preview($counter);
$sound_preview = DocumentManager::generate_media_preview($counter);
return $sound_preview ;
} elseif (
//Show preview sith yoxview

@ -2423,11 +2423,17 @@ return 'application/octet-stream';
return true;
}
function generate_mp3_preview($i) {
/**
*
* Shows a play icon next to the document title in the document list
* @param int
* @return string html content
*/
function generate_media_preview($i) {
$i = intval($i);
//shows all the player
$html = ' <div id="jquery_jplayer_'.$i.'" class="jp-jplayer"></div>
/*//shows all the player
$html = '<div id="jquery_jplayer_'.$i.'" class="jp-jplayer"></div>
<div class="jp-audio">
<div class="jp-type-single">
<div id="jp_interface_'.$i.'" class="jp-interface">
@ -2450,7 +2456,7 @@ return 'application/octet-stream';
<div class="jp-duration"></div>
</div>
</div>
</div>';
</div>';*/
//Shows only the play button
$html = ' <div id="jquery_jplayer_'.$i.'" class="jp-jplayer"></div>
@ -2466,9 +2472,5 @@ return 'application/octet-stream';
</div>';
return $html;
}
}
//end class DocumentManager
//end class DocumentManager
Loading…
Cancel
Save