From: nicolasconnault Date: Wed, 14 Mar 2007 05:27:13 +0000 (+0000) Subject: MDL-8870 - Added support for embedded flash, as well as css hooks for different embed... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=bc79dd3116ba8c8c0274b7a3a22e2bfc301d96ed;p=moodle.git MDL-8870 - Added support for embedded flash, as well as css hooks for different embedded files (e.g. class="resourceswf") --- diff --git a/mod/resource/type/file/resource.class.php b/mod/resource/type/file/resource.class.php index 9e4195bc21..26a3d466b6 100644 --- a/mod/resource/type/file/resource.class.php +++ b/mod/resource/type/file/resource.class.php @@ -233,6 +233,10 @@ function display() { $resourcetype = "quicktime"; $embedded = true; + } else if ($mimetype == "application/x-shockwave-flash") { // It's a Quicktime file + $resourcetype = "flash"; + $embedded = true; + } else if ($mimetype == "text/html") { // It's a web page $resourcetype = "html"; } @@ -405,7 +409,7 @@ function display() { } if ($resourcetype == "image") { - echo '
'; + echo '
'; echo "name,true))."\" class=\"resourceimage\" src=\"$fullurl\" alt=\"\" />"; echo '
'; @@ -419,7 +423,7 @@ function display() { } $c .= '&volText='.get_string('vol', 'resource').'&panText='.get_string('pan','resource'); $c = htmlentities($c); - echo '
'; + echo '
'; echo '
'; echo ''; - + echo '
'; echo ''; -// Old non-compliant code (but used to work with Opera/Safari) -// echo ''; echo ''; echo ''; echo ""; echo ''; -// Old non-compliant code -// echo "\n'; -// echo ''; echo "$fullurl"; echo ''; - echo ''; } else if ($resourcetype == "quicktime") { - echo '
'; + echo '
'; echo ''; @@ -474,7 +465,6 @@ function display() { echo ''; echo ''; echo ''; - // New compliant code echo ''; echo ""; echo ''; @@ -483,16 +473,31 @@ function display() { echo ''; echo ''; echo ''; - -// Old non-compliant code -// echo "\n'; -// echo ''; echo ''; echo '
'; - } + } else if ($resourcetype == "flash") { + + echo '
'; + echo ''; + echo ""; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ""; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo '

Your browser does not support Embedded Flash

'; + echo ''; + echo '
'; + echo ''; + echo '
'; + echo '
'; + } if (trim($resource->summary)) { print_simple_box(format_text($resource->summary, FORMAT_MOODLE, $formatoptions, $course->id), "center");