Skip to content

Commit

Permalink
MDL-8992 Now only appearing once per page, and XHTML compliant. Also …
Browse files Browse the repository at this point in the history
…removed an ugly browser-sniffing css hack from the quicktime plugin, and applied the same browser detection as for the other plugins
  • Loading branch information
nicolasconnault committed Nov 5, 2007
1 parent 2304f62 commit 0760ba2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
6 changes: 5 additions & 1 deletion filter/mediaplugin/filter.php
Expand Up @@ -20,6 +20,7 @@

function mediaplugin_filter($courseid, $text) {
global $CFG;
static $eolas_fix_applied = false;

include 'defaultsettings.php';

Expand Down Expand Up @@ -86,7 +87,10 @@ function mediaplugin_filter($courseid, $text) {
$newtext = $text;
}

$newtext .= '<script defer="defer" src="' . $CFG->wwwroot . '/filter/mediaplugin/eolas_fix.js" type="text/javascript"></script>';
if (!$eolas_fix_applied) {
$newtext .= '<script defer="defer" src="' . $CFG->wwwroot . '/filter/mediaplugin/eolas_fix.js" type="text/javascript">// <![CDATA[ ]]></script>';
$eolas_fix_applied = true;
}

return $newtext;
}
Expand Down
17 changes: 6 additions & 11 deletions mod/resource/type/file/resource.class.php
Expand Up @@ -545,15 +545,6 @@ function display() {
echo '</div>';

} else if ($resourcetype == "quicktime") {
echo '<style type="text/css">';
echo '/* class to hide nested objects in IE */';
echo '/* hides the second object from all versions of IE */';
echo '* html object.hiddenObjectForIE { display: none; }';
echo '/* display the second object only for IE5 Mac */';
echo '/* IE Mac \*//*/';
echo '* html object.hiddenObjectForIE { display: inline; }';
echo '/**/';
echo '</style>';
echo '<div class="resourcecontent resourceqt">';

echo '<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"';
Expand All @@ -564,13 +555,17 @@ function display() {
echo '<param name="controller" value="true" />';
echo '<param name="scale" value="aspect" />';

echo "<object class=\"hiddenObjectForIE\" type=\"video/quicktime\" data=\"$fullurl\">";
echo '<!--[if !IE]>-->';
echo "<object type=\"video/quicktime\" data=\"$fullurl\">";
echo '<param name="controller" value="true" />';
echo '<param name="autoplay" value="true" />';
echo '<param name="loop" value="true" />';
echo '<param name="scale" value="aspect" />';
echo '</object>';
echo '<!--<![endif]-->';
echo '<a href="' . $fullurl . '">' . $fullurl . '</a>';
echo '<!--[if !IE]>-->';
echo '</object>';
echo '<!--<![endif]-->';
echo '</object>';
echo '</div>';
} else if ($resourcetype == "flash") {
Expand Down

0 comments on commit 0760ba2

Please sign in to comment.