1
0
mirror of https://github.com/e107inc/e107.git synced 2025-06-08 03:45:03 +02:00

Enable audio file types (MM)

This commit is contained in:
SecretR 2014-11-03 16:13:27 +02:00
parent 47b4338ac9
commit 7858a1f93b

View File

@ -29,7 +29,7 @@ class e_media
'text' => e_MEDIA_FILE, 'text' => e_MEDIA_FILE,
'multipart' => e_MEDIA_FILE, 'multipart' => e_MEDIA_FILE,
'application' => e_MEDIA_FILE, 'application' => e_MEDIA_FILE,
// 'audio' => e_MEDIA_AUDIO, 'audio' => e_MEDIA_FILE,
'image' => e_MEDIA_IMAGE, 'image' => e_MEDIA_IMAGE,
'video' => e_MEDIA_VIDEO, 'video' => e_MEDIA_VIDEO,
'other' => e_MEDIA_FILE 'other' => e_MEDIA_FILE
@ -602,8 +602,8 @@ class e_media
{ {
parse_str($att,$option); // grab 'onclick' . parse_str($att,$option); // grab 'onclick' .
} }
else { else {
$option = $att; $option = $att;
} }
$frm = varset($option['from']) ? $option['from'] : 0; $frm = varset($option['from']) ? $option['from'] : 0;
@ -750,8 +750,8 @@ class e_media
$img_url = ($cat !='_icon') ? e107::getParser()->thumbUrl($im['media_url'], $thumbAtt) : $media_path; $img_url = ($cat !='_icon') ? e107::getParser()->thumbUrl($im['media_url'], $thumbAtt) : $media_path;
$text .= "<a data-toggle='context' class='thumbnail {$class} e-tip' data-id='{$im['media_id']}' data-width='{$w}' data-height='{$h}' data-src='{$media_path}' data-bbcode='{$data_bb}' data-target='{$tagid}' data-path='{$im['media_url']}' data-preview='{$realPath}' title=\"".$diz."\" style='float:left' href='#' onclick=\"{$onclicki}\" >"; $text .= "<a data-toggle='context' class='thumbnail {$class} e-tip' data-id='{$im['media_id']}' data-width='{$w}' data-height='{$h}' data-src='{$media_path}' data-bbcode='{$data_bb}' data-target='{$tagid}' data-path='{$im['media_url']}' data-preview='{$realPath}' title=\"".$diz."\" style='float:left' href='#' onclick=\"{$onclicki}\" >";
$text .= "<img class='image-rounded' src='".$img_url."' alt=\"".$im['media_title']."\" title=\"{$diz}\" />"; $text .= "<img class='image-rounded' src='".$img_url."' alt=\"".$im['media_title']."\" title=\"{$diz}\" />";
$text .= "</a>\n\n"; $text .= "</a>\n\n";
} }
@ -899,9 +899,9 @@ class e_media
// print_a($subject); // print_a($subject);
} }
elseif($type == 'fa3') elseif($type == 'fa3')
{ {
$pattern = '/\.(icon-(?:\w+(?:-)?)+):before/'; $pattern = '/\.(icon-(?:\w+(?:-)?)+):before/';
$subject = file_get_contents(e_WEB_JS.'font-awesome/css/font-awesome.css'); $subject = file_get_contents(e_WEB_JS.'font-awesome/css/font-awesome.css');
} }
preg_match_all($pattern, $subject, $matches, PREG_SET_ORDER); preg_match_all($pattern, $subject, $matches, PREG_SET_ORDER);