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)) || if ( preg_match('/mp3$/i', urldecode($url)) ||
preg_match('/wav$/i', urldecode($url)) || preg_match('/wav$/i', urldecode($url)) ||
preg_match('/ogg$/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 ; return $sound_preview ;
} elseif ( } elseif (
//Show preview sith yoxview //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)) || if ( preg_match('/mp3$/i', urldecode($url)) ||
preg_match('/wav$/i', urldecode($url)) || preg_match('/wav$/i', urldecode($url)) ||
preg_match('/ogg$/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 ; return $sound_preview ;
} elseif ( } elseif (
//Show preview sith yoxview //Show preview sith yoxview

@ -2423,11 +2423,17 @@ return 'application/octet-stream';
return true; 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); $i = intval($i);
//shows all the player /*//shows all the player
$html = ' <div id="jquery_jplayer_'.$i.'" class="jp-jplayer"></div> $html = '<div id="jquery_jplayer_'.$i.'" class="jp-jplayer"></div>
<div class="jp-audio"> <div class="jp-audio">
<div class="jp-type-single"> <div class="jp-type-single">
<div id="jp_interface_'.$i.'" class="jp-interface"> <div id="jp_interface_'.$i.'" class="jp-interface">
@ -2450,7 +2456,7 @@ return 'application/octet-stream';
<div class="jp-duration"></div> <div class="jp-duration"></div>
</div> </div>
</div> </div>
</div>'; </div>';*/
//Shows only the play button //Shows only the play button
$html = ' <div id="jquery_jplayer_'.$i.'" class="jp-jplayer"></div> $html = ' <div id="jquery_jplayer_'.$i.'" class="jp-jplayer"></div>
@ -2466,9 +2472,5 @@ return 'application/octet-stream';
</div>'; </div>';
return $html; return $html;
} }
} }
//end class DocumentManager //end class DocumentManager
Loading…
Cancel
Save