mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 04:22:07 +02:00
MDL-26697 multiple media filtering fixes and improvements
Bug fixes: * fixed broken flash resizing via URL * upgraded Flowplayer * fixed invalid context in format_text() * all media related CSS moved from themes to filter and resources * fixed automatic pdf resizing in resources Changes: * reworked filter_mediaplugin system settings - grouped by player type instead of individual extensions, added more information * improved regex url matching * removed old unused players, Eolas fix and UFO embedding * image embedding moved to filter_urltolink * new Flowplayer embedding API * accessibility and compatibility tweaks in Flowplayer * SWF embedding now works only in trusted texts, it is now enabled by default (works everywhere if "Allow EMBED and OBJECT tags" enabled) * new default video width and height New features: * automatic Flash video resizing using information from video metadata * Flash HD video support (*.f4v) * Flash video embedding with HTML5 fallback - compatible with iOS and other mobile devices * Vimeo embedding * no-cookie YouTube site supported * HTML 5 audio and video with multiple source URLs and QuickTime fallback * more video and audio extensions in filelib.php * MP3 player colours customisable via CSS in themes * nomediaplugin class in a tag prevents media embedding
This commit is contained in:
parent
c09604234a
commit
fcd2cbaf1f
47
filter/mediaplugin/db/upgrade.php
Normal file
47
filter/mediaplugin/db/upgrade.php
Normal file
@ -0,0 +1,47 @@
|
||||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Manual authentication plugin upgrade code
|
||||
*
|
||||
* @package filter
|
||||
* @subpackage mediaplugin
|
||||
* @copyright 2011 Petr Skoda (http://skodak.org)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
/**
|
||||
* @param int $oldversion the version we are upgrading from
|
||||
* @return bool result
|
||||
*/
|
||||
function xmldb_filter_mediaplugin_upgrade($oldversion) {
|
||||
global $CFG, $DB, $OUTPUT;
|
||||
|
||||
if ($oldversion < 2011030900) {
|
||||
unset_config('filter_mediaplugin_enable_img'); // migrated to filter_urltolink
|
||||
unset_config('filter_mediaplugin_enable_ram'); // --> rm
|
||||
unset_config('filter_mediaplugin_enable_rpm'); // --> rm
|
||||
unset_config('filter_mediaplugin_enable_ogg'); // --> html5audio
|
||||
unset_config('filter_mediaplugin_enable_ogv'); // --> html5video
|
||||
unset_config('filter_mediaplugin_enable_avi'); // --> wmp
|
||||
unset_config('filter_mediaplugin_enable_wmv'); // --> wmp
|
||||
unset_config('filter_mediaplugin_enable_mov'); // --> qt
|
||||
unset_config('filter_mediaplugin_enable_mpg'); // --> qt
|
||||
upgrade_plugin_savepoint(true, 2011030900, 'filter', 'mediaplugin');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
@ -1,80 +0,0 @@
|
||||
// Documentation & updates available at:
|
||||
// http://codecentre.eplica.is/js/eolasfix/test.htm
|
||||
|
||||
(function( Eolas_Fixed,
|
||||
win, doc,
|
||||
getElementsByTagName,
|
||||
outerHTML,
|
||||
parentNode,
|
||||
tags,
|
||||
elmsToRemoveOnload,
|
||||
x,
|
||||
is_ie,
|
||||
y,z,elm,childNode,HTML,dummy,eolasfix)
|
||||
{
|
||||
// run only once!
|
||||
if (win[Eolas_Fixed]) return;
|
||||
win[Eolas_Fixed] = 1;
|
||||
|
||||
eolasfix = function ()
|
||||
{
|
||||
// for each tag name specified in Array t
|
||||
while (tags[++x])
|
||||
{
|
||||
// find all elements of that type in the document
|
||||
// loop through the elements
|
||||
y = 0;
|
||||
while (elm = doc[getElementsByTagName](tags[x])[y++])
|
||||
{
|
||||
if (is_ie)
|
||||
{
|
||||
HTML = '>';
|
||||
z = 0;
|
||||
// <param> elements don't show up in innerHTML IE
|
||||
// so we need to collect their outerHTML.
|
||||
while (childNode = elm.childNodes[z++])
|
||||
HTML += childNode[outerHTML];
|
||||
|
||||
// create a 'dummy' element
|
||||
dummy = doc.createElement('i');
|
||||
// inject it next to `elm`,
|
||||
elm[parentNode].insertBefore(dummy, elm);
|
||||
// and turn it into an `elm` clone
|
||||
dummy[outerHTML] = elm[outerHTML].replace(/>/, HTML);
|
||||
// increment y to skip over it
|
||||
y++;
|
||||
|
||||
// then hide the original elm
|
||||
elm.style.display = 'none';
|
||||
// and save it in 'The List of Elements to Remove Later'.
|
||||
elmsToRemoveOnload[elmsToRemoveOnload.length] = elm;
|
||||
}
|
||||
else
|
||||
{
|
||||
elm[outerHTML] = elm[outerHTML];
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// For IE run the fix straight away (because the defer="defer"
|
||||
// attribute has delayed execution until the DOM has loaded).
|
||||
// Then assign a window.onload event to purge the old elements.
|
||||
is_ie && !eolasfix() && win.attachEvent('onload', function(){
|
||||
x=0;
|
||||
while(elm = elmsToRemoveOnload[x++])
|
||||
elm[parentNode].removeChild(elm);
|
||||
});
|
||||
// For Opera set an `DOMContentLoaded` event to run the fix.
|
||||
win.opera && doc.addEventListener('DOMContentLoaded', eolasfix, 0);
|
||||
|
||||
})( '__Eolas_Fixed',
|
||||
window, document,
|
||||
'getElementsByTagName',
|
||||
'outerHTML',
|
||||
'parentNode',
|
||||
['object','embed','applet'],
|
||||
[],
|
||||
-1 /*@cc_on,1 @*/
|
||||
);
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,34 +1,50 @@
|
||||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Mediaplugin filter settings
|
||||
*
|
||||
* @package filter
|
||||
* @subpackage mediaplugin
|
||||
* @copyright 2017 Petr Skoda (http://skodak.org)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die;
|
||||
|
||||
if ($ADMIN->fulltree) {
|
||||
|
||||
$settings->add(new admin_setting_configcheckbox('filter_mediaplugin_enable_mp3', get_string('mediapluginmp3','admin'), '', 1));
|
||||
// External services
|
||||
$settings->add(new admin_setting_configcheckbox('filter_mediaplugin_enable_youtube', get_string('siteyoutube','filter_mediaplugin'), get_string('siteyoutube_help','filter_mediaplugin'), 1));
|
||||
$settings->add(new admin_setting_configcheckbox('filter_mediaplugin_enable_vimeo', get_string('sitevimeo','filter_mediaplugin'), get_string('sitevimeo_help','filter_mediaplugin'), 0));
|
||||
|
||||
$settings->add(new admin_setting_configcheckbox('filter_mediaplugin_enable_swf', get_string('mediapluginswf','admin'), get_string('mediapluginswfnote','admin'), 0)); // sorry, this is a big potential security hole (skodak)
|
||||
// these require flash
|
||||
$settings->add(new admin_setting_configcheckbox('filter_mediaplugin_enable_mp3', get_string('mp3audio','filter_mediaplugin'), get_string('mp3audio_help','filter_mediaplugin'), 1));
|
||||
$settings->add(new admin_setting_configcheckbox('filter_mediaplugin_enable_flv', get_string('flashvideo','filter_mediaplugin'), get_string('flashvideo_help','filter_mediaplugin'), 1));
|
||||
$settings->add(new admin_setting_configcheckbox('filter_mediaplugin_enable_swf', get_string('flashanimation','filter_mediaplugin'), get_string('flashanimation_help','filter_mediaplugin'), 1));
|
||||
|
||||
$settings->add(new admin_setting_configcheckbox('filter_mediaplugin_enable_mov', get_string('mediapluginmov','admin'), '', 1));
|
||||
// HTML 5 media
|
||||
$settings->add(new admin_setting_configcheckbox('filter_mediaplugin_enable_html5audio', get_string('html5audio','filter_mediaplugin'), get_string('html5audio_help','filter_mediaplugin'), 0)); // disabled because mp3 is much better choice
|
||||
$settings->add(new admin_setting_configcheckbox('filter_mediaplugin_enable_html5video', get_string('html5video','filter_mediaplugin'), get_string('html5video_help','filter_mediaplugin'), 0)); // disabled because flv with html5 fallback works better
|
||||
|
||||
$settings->add(new admin_setting_configcheckbox('filter_mediaplugin_enable_wmv', get_string('mediapluginwmv','admin'), '', 1));
|
||||
// legacy players
|
||||
$settings->add(new admin_setting_heading('legacymediaformats', get_string('legacyheading', 'filter_mediaplugin'), get_string('legacyheading_help', 'filter_mediaplugin')));
|
||||
|
||||
$settings->add(new admin_setting_configcheckbox('filter_mediaplugin_enable_mpg', get_string('mediapluginmpg','admin'), '', 1));
|
||||
$settings->add(new admin_setting_configcheckbox('filter_mediaplugin_enable_qt', get_string('legacyquicktime','filter_mediaplugin'), get_string('legacyquicktime_help','filter_mediaplugin'), 1));
|
||||
$settings->add(new admin_setting_configcheckbox('filter_mediaplugin_enable_wmp', get_string('legacywmp','filter_mediaplugin'), get_string('legacywmp_help','filter_mediaplugin'), 1));
|
||||
$settings->add(new admin_setting_configcheckbox('filter_mediaplugin_enable_rm', get_string('legacyreal','filter_mediaplugin'), get_string('legacyreal_help','filter_mediaplugin'), 1));
|
||||
|
||||
$settings->add(new admin_setting_configcheckbox('filter_mediaplugin_enable_avi', get_string('mediapluginavi','admin'), '', 1));
|
||||
|
||||
$settings->add(new admin_setting_configcheckbox('filter_mediaplugin_enable_flv', get_string('mediapluginflv','admin'), '', 1));
|
||||
|
||||
$settings->add(new admin_setting_configcheckbox('filter_mediaplugin_enable_ram', get_string('mediapluginram','admin'), '', 1));
|
||||
|
||||
$settings->add(new admin_setting_configcheckbox('filter_mediaplugin_enable_rpm', get_string('mediapluginrpm','admin'), '', 1));
|
||||
|
||||
$settings->add(new admin_setting_configcheckbox('filter_mediaplugin_enable_rm', get_string('mediapluginrm','admin'), '', 1));
|
||||
|
||||
$settings->add(new admin_setting_configcheckbox('filter_mediaplugin_enable_youtube', get_string('mediapluginyoutube','admin'), '', 1));
|
||||
|
||||
$settings->add(new admin_setting_configcheckbox('filter_mediaplugin_enable_ogg', get_string('mediapluginogg','admin'), '', 1));
|
||||
|
||||
$settings->add(new admin_setting_configcheckbox('filter_mediaplugin_enable_ogv', get_string('mediapluginogv','admin'), '', 1));
|
||||
|
||||
$settings->add(new admin_setting_configcheckbox('filter_mediaplugin_enable_img', get_string('mediapluginimg','admin'), '', 1));
|
||||
}
|
||||
|
Binary file not shown.
Binary file not shown.
@ -1,4 +0,0 @@
|
||||
The FLV player is by Jeroen Wijering - www.jeroenwijering.com
|
||||
and included in Moodle by his permission under the GNU GPL version 2 or later.
|
||||
|
||||
Thanks, Jeroen!
|
Binary file not shown.
Binary file not shown.
@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
@ -23,10 +22,31 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
$string['fallbackaudio'] = 'Audio link';
|
||||
$string['fallbackvideo'] = 'Video link';
|
||||
$string['filtername'] = 'Multimedia plugins';
|
||||
$string['flashanimation'] = 'Flash animation';
|
||||
$string['flashanimation_help'] = 'Files with extension *.swf. For security reasons this filter is used only in trusted texts.';
|
||||
$string['flashvideo'] = 'Flash video';
|
||||
$string['flashvideo_help'] = 'Files with extension *.flv and *.f4v. Plays video clips using Flowplayer, requires Flash plugin and javascript. Uses HTML 5 video fallback if multiple sources psecified.';
|
||||
$string['html5audio'] = 'HTML 5 audio';
|
||||
$string['html5audio_help'] = 'Audio files with extension *.ogg, *.acc and others. It is compatible with latest web browsers only, unfortunately there is no format that is supported by all browsers.
|
||||
Workaround is to specify fallbacks separated with # (ex: http://example.org/audio.acc#http://example.org/audio.acc#http://example.org/audio.mp3#), QuickTime player is used as a fallback for old browsers, fallback can be any audio type.';
|
||||
$string['html5video'] = 'HTML 5 video';
|
||||
$string['html5video_help'] = 'Video files with extension *.webm, *.m4v, *.ogv, *.mp4 and others. It is compatible with latest web browsers only, unfortunately there is no format that is supported by all browsers.
|
||||
Workaround is to specify fallbacks sources separated with # (ex: http://example.org/video.m4v#http://example.org/video.acc#http://example.org/video.ogv#d=640x480), QuickTime player is used as a fallback for old browsers.';
|
||||
$string['mp3audio'] = 'MP3 audio';
|
||||
$string['oggaudio'] = 'OGG audio';
|
||||
$string['ogvvideo'] = 'OGV video';
|
||||
$string['unsupportedplugins'] = '(The browser does not support this type of file. {$a})';
|
||||
$string['mp3audio_help'] = 'Files with extension *.mp3. Plays audio using Flowplayer, requires Flash plugin.';
|
||||
$string['legacyquicktime'] = 'QuickTime player';
|
||||
$string['legacyquicktime_help'] = 'Files with extension *.mov, *.mp4, *.m4a, *.mp4 and *.mpg. Requires QuickTime player or codecs.';
|
||||
$string['legacyreal'] = 'Real media player';
|
||||
$string['legacyreal_help'] = 'Files with extension *.rm, *.ra, *.ram, *.rp, *.rv. Requires RealPlayer.';
|
||||
$string['legacywmp'] = 'Windows media player';
|
||||
$string['legacywmp_help'] = 'Files with extension *.avi and *.wmv. Fully compatible with Internet Explorer in Windows, may be problematic in other browsers or operating systems.';
|
||||
$string['legacyheading'] = 'Legacy media players';
|
||||
$string['legacyheading_help'] = 'Following formats are not recommended for general usage, they are usually used in intranet installation with centrally managed clients.';
|
||||
$string['sitevimeo'] = 'Vimeo';
|
||||
$string['sitevimeo_help'] = 'Vimeo video sharing site.';
|
||||
$string['siteyoutube'] = 'YouTube';
|
||||
$string['siteyoutube_help'] = 'YouTube video sharing site, video and playlist links supported.';
|
||||
|
||||
|
Binary file not shown.
Binary file not shown.
14
filter/mediaplugin/styles.css
Normal file
14
filter/mediaplugin/styles.css
Normal file
@ -0,0 +1,14 @@
|
||||
/**
|
||||
* Filters
|
||||
*/
|
||||
.mediaplugin_html5video, .mediaplugin_swf, .mediaplugin_flv, .mediaplugin_real, .mediaplugin_youtube, .mediaplugin_vimeo, .mediaplugin_wmp, .mediaplugin_qt
|
||||
{display:block;margin-top:5px;margin-bottom:5px;text-align: center;}
|
||||
.mediaplugin.mediaplugin_mp3 object {display:inline;height:15px;width:180px;margin-left:0.5em;}
|
||||
|
||||
|
||||
/*
|
||||
* mp3 player colours -this read using JS and applied to swf audio flow player
|
||||
* see http://flowplayer.org/documentation/skinning/controlbar.html?skin=default for more color properties,
|
||||
* any property that ends with '...Color' is supported here.
|
||||
*/
|
||||
.mp3flowplayer_backgroundColor {color: #000000};
|
@ -26,4 +26,4 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2010070900;
|
||||
$plugin->version = 2011030900;
|
||||
|
@ -139,5 +139,31 @@ class filter_urltolink extends moodle_text_filter {
|
||||
$ignoretags = array_reverse($ignoretags); /// Reversed so "progressive" str_replace() will solve some nesting problems.
|
||||
$text = str_replace(array_keys($ignoretags),$ignoretags,$text);
|
||||
}
|
||||
|
||||
if ($this->get_global_config('embedimages')) {
|
||||
// now try to inject the images, this code was originally in the mediapluing filter
|
||||
// this may be useful only if somebody relies on the fact the links in FORMAT_MOODLE get converted
|
||||
// to URLs which in turn change to real images
|
||||
$search = '/<a href="([^"]+\.(jpg|png|gif))" class="_blanktarget">([^>]*)<\/a>/is';
|
||||
$text = preg_replace_callback($search, 'filter_urltolink_img_callback', $text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Change links to images into embedded images.
|
||||
*
|
||||
* This plugin is intended for automatic conversion of image URLs when FORMAT_MOODLE used.
|
||||
*
|
||||
* @param $link
|
||||
* @return string
|
||||
*/
|
||||
function filter_urltolink_img_callback($link) {
|
||||
if ($link[1] !== $link[3]) {
|
||||
// this is not a link created by this filter, because the url does not match the text
|
||||
return $link[0];
|
||||
}
|
||||
return '<img class="filter_urltolink_image" alt="" src="'.$link[1].'" />';
|
||||
}
|
||||
|
||||
|
@ -30,4 +30,9 @@ if ($ADMIN->fulltree) {
|
||||
get_string('settingformats', 'filter_urltolink'),
|
||||
get_string('settingformats_desc', 'filter_urltolink'),
|
||||
array(FORMAT_MOODLE => 1), format_text_menu()));
|
||||
|
||||
$settings->add(new admin_setting_configcheckbox('filter_urltolink/embedimages',
|
||||
get_string('embedimages', 'filter_urltolink'),
|
||||
get_string('embedimages_desc', 'filter_urltolink'),
|
||||
1));
|
||||
}
|
||||
|
@ -26,6 +26,8 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['filtername'] = 'Convert URLs into links';
|
||||
$string['embedimages'] = 'Embed images';
|
||||
$string['embedimages_desc'] = 'Replace image urls with images in selected text formats.';
|
||||
$string['filtername'] = 'Convert URLs into links and images';
|
||||
$string['settingformats'] = 'Apply to formats';
|
||||
$string['settingformats_desc'] = 'The filter will be applied only if the original text was inserted in one of the selected formats.';
|
||||
|
@ -1120,6 +1120,7 @@ function get_mimetypes_array() {
|
||||
static $mimearray = array (
|
||||
'xxx' => array ('type'=>'document/unknown', 'icon'=>'unknown'),
|
||||
'3gp' => array ('type'=>'video/quicktime', 'icon'=>'video'),
|
||||
'aac' => array ('type'=>'audio/aac', 'icon'=>'audio'),
|
||||
'ai' => array ('type'=>'application/postscript', 'icon'=>'image'),
|
||||
'aif' => array ('type'=>'audio/x-aiff', 'icon'=>'audio'),
|
||||
'aiff' => array ('type'=>'audio/x-aiff', 'icon'=>'audio'),
|
||||
@ -1152,6 +1153,7 @@ function get_mimetypes_array() {
|
||||
'eps' => array ('type'=>'application/postscript', 'icon'=>'pdf'),
|
||||
'fdf' => array ('type'=>'application/pdf', 'icon'=>'pdf'),
|
||||
'flv' => array ('type'=>'video/x-flv', 'icon'=>'video'),
|
||||
'f4v' => array ('type'=>'video/mp4', 'icon'=>'video'),
|
||||
'gif' => array ('type'=>'image/gif', 'icon'=>'image'),
|
||||
'gtar' => array ('type'=>'application/x-gtar', 'icon'=>'zip'),
|
||||
'tgz' => array ('type'=>'application/g-zip', 'icon'=>'zip'),
|
||||
@ -1207,6 +1209,7 @@ function get_mimetypes_array() {
|
||||
'odf' => array ('type'=>'application/vnd.oasis.opendocument.formula', 'icon'=>'odf'),
|
||||
'odb' => array ('type'=>'application/vnd.oasis.opendocument.database', 'icon'=>'odb'),
|
||||
'odi' => array ('type'=>'application/vnd.oasis.opendocument.image', 'icon'=>'odi'),
|
||||
'oga' => array ('type'=>'audio/ogg', 'icon'=>'audio'),
|
||||
'ogg' => array ('type'=>'audio/ogg', 'icon'=>'audio'),
|
||||
'ogv' => array ('type'=>'video/ogg', 'icon'=>'video'),
|
||||
|
||||
@ -1233,8 +1236,10 @@ function get_mimetypes_array() {
|
||||
'ram' => array ('type'=>'audio/x-pn-realaudio-plugin', 'icon'=>'audio'),
|
||||
'rhb' => array ('type'=>'text/xml', 'icon'=>'xml'),
|
||||
'rm' => array ('type'=>'audio/x-pn-realaudio-plugin', 'icon'=>'audio'),
|
||||
'rmvb' => array ('type'=>'application/vnd.rn-realmedia-vbr', 'icon'=>'video'),
|
||||
'rtf' => array ('type'=>'text/rtf', 'icon'=>'text'),
|
||||
'rtx' => array ('type'=>'text/richtext', 'icon'=>'text'),
|
||||
'rv' => array ('type'=>'audio/x-pn-realaudio-plugin', 'icon'=>'video'),
|
||||
'sh' => array ('type'=>'application/x-sh', 'icon'=>'text'),
|
||||
'sit' => array ('type'=>'application/x-stuffit', 'icon'=>'zip'),
|
||||
'smi' => array ('type'=>'application/smil', 'icon'=>'text'),
|
||||
@ -1266,6 +1271,7 @@ function get_mimetypes_array() {
|
||||
'tsv' => array ('type'=>'text/tab-separated-values', 'icon'=>'text'),
|
||||
'txt' => array ('type'=>'text/plain', 'icon'=>'text'),
|
||||
'wav' => array ('type'=>'audio/wav', 'icon'=>'audio'),
|
||||
'webm' => array ('type'=>'video/webm', 'icon'=>'video'),
|
||||
'wmv' => array ('type'=>'video/x-ms-wmv', 'icon'=>'avi'),
|
||||
'asf' => array ('type'=>'video/x-ms-asf', 'icon'=>'avi'),
|
||||
'xdp' => array ('type'=>'application/pdf', 'icon'=>'pdf'),
|
||||
|
File diff suppressed because one or more lines are too long
350
lib/flowplayer/README.txt
Normal file
350
lib/flowplayer/README.txt
Normal file
@ -0,0 +1,350 @@
|
||||
Version history:
|
||||
|
||||
3.2.7
|
||||
-----
|
||||
|
||||
- Loads the new controlbar plugin version 3.2.5. No other functional changes.
|
||||
|
||||
3.2.6
|
||||
-----
|
||||
- linkUrl should now work better with popup blockers: http://code.google.com/p/flowplayer-core/issues/detail?id=31
|
||||
- new linkWindow value "_popup" opens the linked page in a popup browser window
|
||||
- added new onClipResized event
|
||||
- Added new onUnload event, can be only listened in Flash and not triggered to JS
|
||||
- API: Added new url property to plugin objects
|
||||
Fixes:
|
||||
- it was not possible to call play() in an onFinish listener
|
||||
- fix to preserve the infoObject for custom netStream and netConnection clients in cases where the infoObject is a
|
||||
primitive object without properties
|
||||
- does not show the error dialog in the debugger player when showErrors: false
|
||||
- fixed to correctly handle xx.ca subdomains when validating the license key
|
||||
- a custom logo is now sized correctly according to the configured size
|
||||
- does not show the buffer animation any more when the player receives the onBufferEmpty message from the netStream.
|
||||
The animation was unnecessarily shown in some situations.
|
||||
- fixed #155. added new urlEncoding property to Clip for url ncoding ut8 urls
|
||||
|
||||
3.2.5
|
||||
-----
|
||||
- added new scaling option 'crop' that resizes to fill all available space, cropping on top/bottom or left/right
|
||||
- improvements to RSS file parsing
|
||||
- Now displays a hand cursor when a linkUrl is used in clips
|
||||
|
||||
3.2.4
|
||||
-----
|
||||
- new flowplayer.js version, with Apple iDevice fixes
|
||||
|
||||
3.2.3
|
||||
-----
|
||||
- a new 'type' clip property exposed to JS
|
||||
- changed the clip type property to better work as a read-write property. Now accepts 'video', 'audio',
|
||||
'image' and 'api' as configuration values.
|
||||
- moved parallel rtmp connection mechanism from the RTMP plugin to Core so other plugins can use it (ie: securestreaming)
|
||||
Fixes:
|
||||
- fixed #112, wrong URL computation when using clip with relative URL on a page with a / after a # in its url
|
||||
- fixed #111, wrong behavior of pre/post roll images with duration 0
|
||||
- fixed multiple license keys logic
|
||||
Fixes:
|
||||
- correct verification of license keys in *.ca domains
|
||||
- fix to make playback to always reach end of video
|
||||
- fixed resuming of live streams
|
||||
|
||||
3.2.2
|
||||
-----
|
||||
Fixes:
|
||||
- Now recognizes following kind of urls as audio clips: 'mp3:audiostreamname' (ulrs with mp3 prefix and no extension)
|
||||
- Now ignores the duration from metadata if we already got one. Fix required for pseudostreaming
|
||||
- Fix to reuse buffered data when replaying a clip
|
||||
|
||||
3.2.1
|
||||
---------
|
||||
- Support for RTMP redirects (tested with Wowza loadbalancing)
|
||||
- Fixed video size when no size info available in clip metadata
|
||||
|
||||
Fixes:
|
||||
- Fix to correctly detect if the player SWF name contains a version number and if it does also use the version number
|
||||
when it automatically loads the controls plugin.
|
||||
|
||||
3.2.0
|
||||
-----
|
||||
- canvas, controlbar and the content plugin backgound color and border color can be now given with rgb() and rgba() CSS style syntax
|
||||
- Added onMouseOver() and onMouseOut() listener registration methods to the Flowplayer API
|
||||
- enhancements to RSS playlist. Converted parsing to E4X, yahoo media and flowplayer namespace support.
|
||||
- added feature to obtain bitrate and dimension information to a new clip custom property "bitrates" for future support for bitrate choosing.
|
||||
- added getter for playerSwfName config
|
||||
- if clip.url has the string "mp3:" in it, the clip.type will report 'audio'
|
||||
- added setKeyboardShortcutsEnabled(), addKeyListener(), removeKeyListener() to FlowplayerBase
|
||||
Fixes:
|
||||
- onSeek() was not fired when seeking while paused and when using RTMP. An extra onStart was fired too.
|
||||
- fireErrorExternal() was not working properly with an error PlayerEvent
|
||||
- countPlugins() was throwing an error when a plugin was not found
|
||||
- external swf files were not scaled properly
|
||||
- the logo was unnecessary shown when going fullscreen if logo.displayTime was being used
|
||||
- added a loadPluginWithConfig method to FlowplayerBase, accessible from javascript. Fixed double onload callback call.
|
||||
- now handles cuepoint parameters injected using the Adobe Media Encoder
|
||||
- showPlugin was not working when config.play was null
|
||||
- handles 3-part duration values included in FLV metadata, like "500.123.123"
|
||||
- player wasn't always reaching end of video
|
||||
- fixed broken buffering: false
|
||||
- fixed event dispatching when embedding flowplayer without flowplayer.js (=without playlist config field)
|
||||
- fixed safari crashes when unloading player
|
||||
- fixed scrubber behaviour with a playlist containing 2 images (or swf) in a row
|
||||
- fixed errors in logs when using an RSS playlist
|
||||
- fixed OverlayPlayButton that was showing even if it shouldn't on some cases
|
||||
- fixed wrong behavior when onBeforeFinish was returning false within playlists
|
||||
- /!\ Don't use the fadeIn / fadeOut controlbar's API while using autoHide.
|
||||
- fixed play state button with images
|
||||
- fixed splash image flickering
|
||||
|
||||
3.1.5
|
||||
-----
|
||||
Fixes:
|
||||
- The player went to a locked state when resuming playback after a period that was long enought to send the
|
||||
netConnection to an invalid state. Now when resuming playback on an invalid connection the clip starts again from
|
||||
the beginning. This is only when using RTMP connections and does not affect progressive download playback.
|
||||
- Custom netConnect and netStream events did not pass the info object to JS listeners
|
||||
|
||||
3.1.4
|
||||
-----
|
||||
Fixes:
|
||||
- player did not initialize if the controlbar plugin was disabled and if the play button overlay was disabled with play: null
|
||||
- works properly without cachebusting on IE
|
||||
- RSS playlist parsing now respects the isDefault attribute used in mRSS media group items
|
||||
- Fixed passing of connection arguments
|
||||
|
||||
3.1.3
|
||||
-----
|
||||
- enhancements to RSS playlist parsing: Now skips all media:content that have unsupported types. Now the type attribute
|
||||
of the media:content element is mandatory and has to be present in the RSS file
|
||||
- Possibility to pass a RSS file name with playFeed("playlist.rss") and setPlaylist("playlist.rss") calls.
|
||||
- changes to the ConnectionProvider and URLResolver APIs
|
||||
- Now automatically uses a plugin that is called 'rtmp' for all clips that have the rtmp-protocol in their URLs.
|
||||
- Added possibility to specify all clip properties in an RSS playlist
|
||||
|
||||
Fixes:
|
||||
- the result of URL resolvers in now cached, and the resolvers will not be used again when a clip is replayed
|
||||
- some style properties like 'backgroundGradient' had no effect in config
|
||||
- video goes tiny on Firefox: http://flowplayer.org/forum/8/23226
|
||||
- RSS playlists: The 'type' attribute value 'audio/mp3' in the media:content element caused an error.
|
||||
- Dispatches onMetadata() if an URL resolver changes the clip URL (changes to a different file)
|
||||
- error codes and error message were not properly passed to onEvent JS listeners
|
||||
|
||||
3.1.2
|
||||
-----
|
||||
- The domain of the logo url must the same domain from where the player SWF is loaded from.
|
||||
- Fullscreen can be toggled by doublclick on the video area.
|
||||
Fixes:
|
||||
- Player was not initialized correctly when instream playlists were used and the provider used in the instream clips was defined in the common clip.
|
||||
- A separator in the Context Menu made the callbacks in the following menu items out of order. Related forum post: http://flowplayer.org/forum/8/22541
|
||||
- the width and height settings of a logo were ignored if the logo was a sWF file
|
||||
- volume control and mute/unmute were not working after an instream clip had been played
|
||||
- now possible to use RTMP for mp3 files
|
||||
- Issue 12: cuepointMultiplier was undefined in the clip object set to JS event listeners
|
||||
- Issue 14: onBeforeStop was unnecessarily fired when calling setPlaylist() and the player was not playing,
|
||||
additionally onStop was never fired even if onBeforeStop was
|
||||
- fixed screen vertical placement problems that reappeared with 3.1.1
|
||||
- The rotating animation now has the same size and position as it has after initialized
|
||||
|
||||
3.1.1
|
||||
-----
|
||||
- External configuration files
|
||||
- Instream playback
|
||||
- Added toggleFullscreen() the API
|
||||
- Possibility to specify controls configuration in clips
|
||||
- Seek target position is now sent in the onBeforeSeek event
|
||||
Fixes:
|
||||
- The screen size was initially too small on Firefox (Mac)
|
||||
- Did not persist a zero volume value: http://www.flowplayer.org/forum/8/18413
|
||||
|
||||
3.1.0
|
||||
-----
|
||||
New features:
|
||||
- clip's can have urlResolvers and connectionProviders
|
||||
- Added new configuration options 'connectionCallbacks' and 'streamCallbacks'. Both accept an Array of event names as a value.
|
||||
When these events get fired on the connection or stream object, corresponding Clip events will be fired by the player.
|
||||
This can be used for example when firing custom events from RTMP server apps
|
||||
- Added new clip event types: 'onConnectionEvent' and 'onStreamEvent' these get fired when the predefined events happen on the connection and stream objects.
|
||||
- Added Security.allowDomain() to allow loaded plugins to script the player
|
||||
- Added addClip(clip, index) to the API, index is optional
|
||||
- Possibility to view videos without metadata, using clip.metaData: false
|
||||
- Now the player's preloader uses the rotating animation instead of a percent text to indicate the progress
|
||||
of loading the player SWF. You can disable the aninamtion by setting buffering: false
|
||||
- calling close() now does not send the onStop event
|
||||
- Clip's custom properties are now present in the root of the clip argument in all clip events that are sent to JS.
|
||||
|
||||
Bug fixes:
|
||||
- The preloader sometimes failed to initialize the player
|
||||
- Allow seeking while in buffering state: http://flowplayer.org/forum/8/16505
|
||||
- Replay of a RTMP stream was failing after the connection had expired
|
||||
- Security error when clicking on the screen if there is an image in the playlist loaded from a foreign domain
|
||||
- loadPlugin() was not working
|
||||
- now fullscreen works with Flash versions older than 9.0.115, in versions that do not support hardware scaling
|
||||
- replaying a RTMP stream with an image in front of the stream in the playlist was not working (video stayed hidden). Happened
|
||||
because the server does not send metadata if replaying the same stream.
|
||||
- the scrubber is disabled if the clip is not seekable in the first frame: http://flowplayer.org/forum/8/16526
|
||||
By default if the clip has one of following extensions (the typical flash video extensions) it is seekable
|
||||
in the first frame: 'f4b', 'f4p', 'f4v', 'flv'. Added new clip property seekableOnBegin that can be used to override the default.
|
||||
|
||||
3.0.6
|
||||
-----
|
||||
- added possibility to associate a linkUrl and linkWindow to the canvas
|
||||
Fixes:
|
||||
- fix for entering fullscreen for Flash versions that don't support the hardware scaled fullscreen-mode
|
||||
- when showing images the duration tracking starts only after the image has been completely loaded: http://flowplayer.org/forum/2/15301
|
||||
- fix for verifying license keys for domains that have more than 4 labels in them
|
||||
- if plugin loading failis because of a IO error, the plugin will be discarded and the player initialization continues:
|
||||
|
||||
3.0.4
|
||||
-----
|
||||
- The "play" pseudo-plugin now supports fadeIn(), fadeOut(), showPlugin(), hidePlugin() and
|
||||
additionally you can configure it like this:
|
||||
// make only the play button invisible (buffering animation is still used)
|
||||
play: { display: 'none' }
|
||||
// disable the play button and the buffering animation
|
||||
play: null
|
||||
// disable the buffering animation
|
||||
buffering: null
|
||||
- Added possibility to seek when in the buffering state: http://flowplayer.org/forum/3/13896
|
||||
- Added copyright notices and other GPL required entries to the user interface
|
||||
|
||||
Fixes:
|
||||
- clip urls were not resolved correctly if the HTML page URL had a query string starting with a question mark (http://flowplayer.org/forum/8/14016#post-14016)
|
||||
- Fixed context menu for with IE (commercial version)
|
||||
- a cuepoint at time zero was fired several times
|
||||
- screen is now arranged correctly even when only bottom or top is defined for it in the configuration
|
||||
- Fixed context menu for with IE (commercial version)
|
||||
- a cuepoint at time zero was fired several times
|
||||
- screen is now arranged correctly even when only bottom or top is defined for it in the configuration
|
||||
- Now possible to call play() in an onError handler: http://flowplayer.org/forum/8/12939
|
||||
- Does not throw an error if the player cannot persist the volume on the client computer: http://flowplayer.org/forum/8/13286#post-13495
|
||||
- Triggering fullscreen does not pause the player in IE
|
||||
- The play button overlay no longer has a gap between it's pieces when a label is used: http://flowplayer.org/forum/8/14250
|
||||
- clip.update() JS call now resets the duration
|
||||
- a label configured for the play button overlay did not work in the commercial version
|
||||
|
||||
3.0.3
|
||||
-----
|
||||
- fixed cuepoint firing: Does not skip cuepoints any more
|
||||
- Plugins can now be loaded from a different domain to the flowplayer.swf
|
||||
- Specifying a clip to play by just using the 'clip' node in the configuration was not working, a playlist definition was required. This is now fixed.
|
||||
- Fixed: A playlist with different providers caused the onMetadata event to fire events with metadata from the previous clip in the playlist. Occurred when moving in the playlist with next() and prev()
|
||||
- the opacity setting now works with the logo
|
||||
- fadeOut() call to the "screen" plugin was sending the listenerId and pluginName arguments in wrong order
|
||||
- stop(), pause(), resume(), close() no longer return the flowplayer object to JS
|
||||
- changing the size of the screen in a onFullscreen listener now always works, there was a bug that caused this to fail occasionally
|
||||
- fixed using arbitrary SWFs as plugins
|
||||
- the API method setPlaylist() no longer starts playing if autoPlay: true, neither it starts buffering if autoBuffering: true
|
||||
- the API method play() now accepts an array of clip objects as an argument, the playlist is replaced with the specified clips and playback starts from the 1st clip
|
||||
|
||||
3.0.2
|
||||
-----
|
||||
- setting play: null now works again
|
||||
- pressing the play again button overlay does not open a linkUrl associated with a clip
|
||||
- now displays a live feed even when the RTMP server does not send any metadata and the onStart method is not therefore dispatched
|
||||
- added onMetaData clip event
|
||||
- fixed 'orig' scaling: the player went to 'fit' scaling after coming back from fullscreen. This is now fixed and the original dimensions are preserved in non-fullscreen mode.
|
||||
- cuepoint times are now given in milliseconds, the firing precision is 100 ms. All cuepoint times are rounded to the nearest 100 ms value (for example 1120 rounds to 1100)
|
||||
- backgroundGradient was drawn over the background image in the canvas and in the content and controlbar plugins. Now it's drawn below the image.
|
||||
- added cuepointMultiplier property to clips. This can be used to multiply the time values read from cuepoint metadata embedded into video files.
|
||||
- the player's framerate was increased to 24 FPS, makes all animations smoother
|
||||
|
||||
3.0.1
|
||||
-----
|
||||
- Fixed negative cuepoints from common clip. Now these are properly propagated to the clips in playlist.
|
||||
- buffering animation is now the same size as the play button overlay
|
||||
- commercial version now supports license keys that allows the use of subdomains
|
||||
- error messages are now automatically hidden after a 4 second delay. They are also hidden when a new clips
|
||||
starts playing (when onBeforeBegin is fired)
|
||||
- added possibility to disable the buffering animation like so: buffering: false
|
||||
- pressing the play button overlay does not open a linkUrl associated with a clip
|
||||
- license key verification failed if a port number was used in the URL (like in this url: http://mydomain.com:8080/video.html)
|
||||
- added audio support, clip has a new "image" property
|
||||
- workaround for missing "NetStream.Play.Start" notfication that was happending with Red5. Because of this issue the video was not shown.
|
||||
- commercial version has the possibility to change the zIndex of the logo
|
||||
|
||||
3.0.0
|
||||
-----
|
||||
- Removed security errors that happened when loading images from foreign domains (domains other than the domain of the core SWF).
|
||||
Using a backgroundImage on canvas, in the content plugin, and for the controls is also possible to be loaded
|
||||
from a foreign domain - BUT backgroundRepeat cannot be used for foreign images.
|
||||
- Now allows the embedding HTML to script the player even if the player is loaded from another domain.
|
||||
- Added a 'live' property to Clips, used for live streams.
|
||||
- A player embedded to a foreign domain now loads images, css files and other resources from the domain where the palyer SWF was loaded from. This is to generate shorter embed-codes.
|
||||
- Added linkUrl and linkWindow properties to the logo, in commercial version you can set these to point to a linked page. The linked page gets opened
|
||||
when the logo is clicked. Possible values for linkWindow:
|
||||
* "_self" specifies the current frame in the current window.
|
||||
* "_blank" specifies a new window.
|
||||
* "_parent" specifies the parent of the current frame.
|
||||
* "_top" specifies the top-level frame in the current window.
|
||||
- Added linkUrl and linkWindow properties to clips. The linked page is opened when the video are is clicked and the corresponding clip has a linkUrl specified.
|
||||
- Made the play button overlay and the "Play again" button slightly bigger.
|
||||
|
||||
RC4
|
||||
---
|
||||
- Now shows a "Play again" button at the end of the video/playlist
|
||||
- Commercial version shows a Flowplayer logo if invalidKey was supplied, but the otherwise the player works
|
||||
- setting play: null in configuration will disable the play button overlay
|
||||
- setting opacity for "play" also sets it for the buffering animation
|
||||
- Fixed firing of cuepoints too early. Cuepoint firing is now based on stream time and does not rely on timers
|
||||
- added onXMPData event listener
|
||||
- Should not stop playback too early before the clip is really completed
|
||||
- The START event is now delayed so that the metadata is available when the event is fired, METADATA event was removed,
|
||||
new event BEGIN that is dispatched when the playback has been successfully started. Metadata is not normally
|
||||
available when BEGIN is fired.
|
||||
|
||||
RC3
|
||||
---
|
||||
- stopBuffering() now dispatches the onStop event first if the player is playing/paused/buffering at the time of calling it
|
||||
- fixed detection of images based on file extensions
|
||||
- fixed some issues with having images in the playlist
|
||||
- made it possible to autoBuffer next video while showing an image (image without a duration)
|
||||
|
||||
RC2
|
||||
---
|
||||
- fixed: setting the screen height in configuration did not have any effect
|
||||
|
||||
RC1
|
||||
-----
|
||||
- better error message if plugin loading fails, shows the URL used
|
||||
- validates our redesigned multidomain license key correctly
|
||||
- fix to prevent the play button going visible when the onBufferEmpty event occurs
|
||||
- the commercial swf now correctly loads the controls using version information
|
||||
- fixed: the play button overlay became invisible with long fadeOutSpeeds
|
||||
|
||||
beta6
|
||||
-----
|
||||
- removed the onFirstFramePause event
|
||||
- playing a clip for the second time caused a doubled sound
|
||||
- pausing on first frame did not work on some FLV files
|
||||
|
||||
beta5
|
||||
-----
|
||||
- logo only uses percentage scaling if it's a SWF file (there is ".swf" in it's url)
|
||||
- context menu now correctly builds up from string entries in configuration
|
||||
-always closes the previous connection before starting a new clip
|
||||
|
||||
beta4
|
||||
-----
|
||||
- now it's possible to load a plugin into the panel without specifying any position/dimensions
|
||||
information, the plugin is placed to left: "50%", top: "50%" and using the plugin DisplayObject's width & height
|
||||
- The Flowplayer API was not fully initialized when onLoad was invoked on Flash plugins
|
||||
|
||||
beta3
|
||||
-----
|
||||
- tweaking logo placement
|
||||
- "play" did not show up after repeated pause/resume
|
||||
- player now loads the latest controls SWF version, right now the latest SWF is called 'flowplayer.controls-3.0.0-beta2.swf'
|
||||
|
||||
beta2
|
||||
-----
|
||||
- fixed support for RTMP stream groups
|
||||
- changed to loop through available fonts in order to find a suitable font also in IE
|
||||
- Preloader was broken on IE: When the player SWf was in browser's cache it did not initialize properly
|
||||
- Context menu now correctly handles menu items that are configured by their string labels only (not using json objects)
|
||||
- fixed custom logo positioning (was moved to the left edge of screen in fullscreen)
|
||||
- "play" now always follows the position and size of the screen
|
||||
- video was stretched below the controls in fullscreen when autoHide: 'never'
|
||||
- logo now takes 6.5% of the screen height, width is scaled so that the aspect ratio is preserved
|
||||
|
||||
beta1
|
||||
-----
|
||||
- First public beta release
|
1577
lib/flowplayer/flowplayer-3.2.6.js
Normal file
1577
lib/flowplayer/flowplayer-3.2.6.js
Normal file
File diff suppressed because it is too large
Load Diff
BIN
lib/flowplayer/flowplayer-3.2.7.swf
Normal file
BIN
lib/flowplayer/flowplayer-3.2.7.swf
Normal file
Binary file not shown.
BIN
lib/flowplayer/flowplayer.audio-3.2.2.swf
Normal file
BIN
lib/flowplayer/flowplayer.audio-3.2.2.swf
Normal file
Binary file not shown.
BIN
lib/flowplayer/flowplayer.controls-3.2.5.swf
Normal file
BIN
lib/flowplayer/flowplayer.controls-3.2.5.swf
Normal file
Binary file not shown.
11
lib/flowplayer/readme_moodle.txt
Normal file
11
lib/flowplayer/readme_moodle.txt
Normal file
@ -0,0 +1,11 @@
|
||||
Description of FlowPlayer import
|
||||
|
||||
Our changes:
|
||||
* we do not load the flow player if flash not present - this is much better
|
||||
for accessibility and flash incompatible devices - they may play mp3 or flv directly
|
||||
* no splashscreens
|
||||
|
||||
TODO:
|
||||
* switch to git repo once flowplayer decides to use real vesion control system
|
||||
|
||||
skodak
|
@ -46,10 +46,6 @@ M.util.image_url = function(imagename, component) {
|
||||
return url;
|
||||
};
|
||||
|
||||
M.util.create_UFO_object = function (eid, FO) {
|
||||
UFO.create(FO, eid);
|
||||
};
|
||||
|
||||
M.util.in_array = function(item, array){
|
||||
for( var i = 0; i<array.length; i++){
|
||||
if(item==array[i]){
|
||||
@ -296,7 +292,6 @@ M.util.init_maximised_embed = function(Y, id) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
var get_htmlelement_size = function(el, prop) {
|
||||
if (Y.Lang.isString(el)) {
|
||||
el = Y.one('#' + el);
|
||||
@ -311,17 +306,17 @@ M.util.init_maximised_embed = function(Y, id) {
|
||||
var resize_object = function() {
|
||||
obj.setStyle('width', '0px');
|
||||
obj.setStyle('height', '0px');
|
||||
var newwidth = get_htmlelement_size('maincontent', 'width') - 15;
|
||||
var newwidth = get_htmlelement_size('maincontent', 'width') - 35;
|
||||
|
||||
if (newwidth > 600) {
|
||||
if (newwidth > 500) {
|
||||
obj.setStyle('width', newwidth + 'px');
|
||||
} else {
|
||||
obj.setStyle('width', '600px');
|
||||
obj.setStyle('width', '500px');
|
||||
}
|
||||
|
||||
var headerheight = get_htmlelement_size('page-header', 'height');
|
||||
var footerheight = get_htmlelement_size('page-footer', 'height');
|
||||
var newheight = parseInt(YAHOO.util.Dom.getViewportHeight()) - footerheight - headerheight - 20;
|
||||
var newheight = parseInt(YAHOO.util.Dom.getViewportHeight()) - footerheight - headerheight - 100;
|
||||
if (newheight < 400) {
|
||||
newheight = 400;
|
||||
}
|
||||
@ -1534,71 +1529,163 @@ M.form.init_smartselect = function(Y, id, options) {
|
||||
});
|
||||
};
|
||||
|
||||
M.util.init_flvflowplayer = function (id, playerpath, fileurl) {
|
||||
$f(id, playerpath, {
|
||||
plugins: {
|
||||
controls: {
|
||||
autoHide: true
|
||||
/** List of flv players to be loaded */
|
||||
M.util.video_players = [];
|
||||
/** List of mp3 players to be loaded */
|
||||
M.util.audio_players = [];
|
||||
|
||||
/**
|
||||
* Add video player
|
||||
* @param id element id
|
||||
* @param fileurl media url
|
||||
* @param width
|
||||
* @param height
|
||||
* @param autosize true means detect size from media
|
||||
*/
|
||||
M.util.add_video_player = function (id, fileurl, width, height, autosize) {
|
||||
M.util.video_players.push({id: id, fileurl: fileurl, width: width, height: height, autosize: autosize, resized: false});
|
||||
};
|
||||
|
||||
/**
|
||||
* Add audio player.
|
||||
* @param id
|
||||
* @param fileurl
|
||||
* @param small
|
||||
*/
|
||||
M.util.add_audio_player = function (id, fileurl, small) {
|
||||
M.util.audio_players.push({id: id, fileurl: fileurl, small: small});
|
||||
};
|
||||
|
||||
/**
|
||||
* Initialise all audio and video player, must be called from page footer.
|
||||
*/
|
||||
M.util.load_flowplayer = function() {
|
||||
if (M.util.video_players.length == 0 && M.util.audio_players.length == 0) {
|
||||
return;
|
||||
}
|
||||
if (typeof(flowplayer) == 'undefined') {
|
||||
var loaded = false;
|
||||
|
||||
var embed_function = function() {
|
||||
if (loaded || typeof(flowplayer) == 'undefined') {
|
||||
return;
|
||||
}
|
||||
loaded = true;
|
||||
|
||||
var controls = {
|
||||
autoHide: true
|
||||
}
|
||||
/* TODO: add CSS color overrides for the flv flow player */
|
||||
|
||||
for(var i=0; i<M.util.video_players.length; i++) {
|
||||
var video = M.util.video_players[i];
|
||||
if (video.width > 0 && video.height > 0) {
|
||||
var src = {src: M.cfg.wwwroot + '/lib/flowplayer/flowplayer-3.2.7.swf', width: video.width, height: video.height};
|
||||
} else {
|
||||
var src = M.cfg.wwwroot + '/lib/flowplayer/flowplayer-3.2.7.swf';
|
||||
}
|
||||
},
|
||||
clip: {
|
||||
url: fileurl,
|
||||
autoPlay: false,
|
||||
autoBuffering: true
|
||||
flowplayer(video.id, src, {
|
||||
plugins: {controls: controls},
|
||||
clip: {
|
||||
url: video.fileurl, autoPlay: false, autoBuffering: true, scaling: 'fit', mvideo: video,
|
||||
onMetaData: function(clip) {
|
||||
if (clip.mvideo.autosize && !clip.mvideo.resized) {
|
||||
clip.mvideo.resized = true;
|
||||
//alert("metadata!!! "+clip.width+' '+clip.height+' '+JSON.stringify(clip.metaData));
|
||||
if (typeof(clip.metaData.width) == 'undefined' || typeof(clip.metaData.height) == 'undefined') {
|
||||
// bad luck, we have to guess - we may not get metadata at all
|
||||
var width = clip.width;
|
||||
var height = clip.height;
|
||||
} else {
|
||||
var width = clip.metaData.width;
|
||||
var height = clip.metaData.height;
|
||||
}
|
||||
var minwidth = 300; // controls are messed up in smaller objects
|
||||
if (width < minwidth) {
|
||||
height = (height * minwidth) / width;
|
||||
width = minwidth;
|
||||
}
|
||||
|
||||
var object = this._api();
|
||||
object.width = width;
|
||||
object.height = height;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
if (M.util.audio_players.length == 0) {
|
||||
return;
|
||||
}
|
||||
var controls = {
|
||||
autoHide: false,
|
||||
fullscreen: false,
|
||||
next: false,
|
||||
previous: false,
|
||||
scrubber: true,
|
||||
play: true,
|
||||
pause: true,
|
||||
volume: true,
|
||||
mute: false,
|
||||
backgroundGradient: [0.5,0,0.3]
|
||||
};
|
||||
|
||||
var rule;
|
||||
for (var j=0; j < document.styleSheets.length; j++) {
|
||||
if (typeof (document.styleSheets[j].rules) != 'undefined') {
|
||||
var allrules = document.styleSheets[j].rules;
|
||||
} else if (typeof (document.styleSheets[j].cssRules) != 'undefined') {
|
||||
var allrules = document.styleSheets[j].cssRules;
|
||||
} else {
|
||||
// why??
|
||||
continue;
|
||||
}
|
||||
for(var i=0; i<allrules.length; i++) {
|
||||
rule = '';
|
||||
if (/^\.mp3flowplayer_.*Color$/.test(allrules[i].selectorText)) {
|
||||
if (typeof(allrules[i].cssText) != 'undefined') {
|
||||
rule = allrules[i].style.cssText;
|
||||
} else if (typeof(allrules[i].style.cssText) != 'undefined') {
|
||||
rule = allrules[i].style.cssText;
|
||||
}
|
||||
if (rule != '' && /.*color\s*:\s*([^;]+).*/gi.test(rule)) {
|
||||
rule = rule.replace(/.*color\s*:\s*([^;]+).*/gi, '$1');
|
||||
var colprop = allrules[i].selectorText.replace(/^\.mp3flowplayer_/, '');
|
||||
controls[colprop] = rule;
|
||||
}
|
||||
}
|
||||
}
|
||||
allrules = false;
|
||||
}
|
||||
|
||||
for(i=0; i<M.util.audio_players.length; i++) {
|
||||
var audio = M.util.audio_players[i];
|
||||
if (audio.small) {
|
||||
controls.controlall = false;
|
||||
controls.height = 15;
|
||||
controls.time = false;
|
||||
} else {
|
||||
controls.controlall = true;
|
||||
controls.height = 25;
|
||||
controls.time = true;
|
||||
}
|
||||
flowplayer(audio.id, M.cfg.wwwroot + '/lib/flowplayer/flowplayer-3.2.7.swf', {
|
||||
plugins: {controls: controls, audio: {url: M.cfg.wwwroot + '/lib/flowplayer/flowplayer.audio-3.2.2.swf'}},
|
||||
clip: {url: audio.fileurl, provider: "audio", autoPlay: false}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
M.util.init_mp3flowplayer = function (id, playerpath, audioplayerpath, fileurl, color) {
|
||||
|
||||
$f(id, playerpath, {
|
||||
|
||||
plugins: {
|
||||
controls: {
|
||||
fullscreen: false,
|
||||
height: 25,
|
||||
autoHide: false,
|
||||
background: '#'+color['bgColour'],
|
||||
buttonColor: '#'+color['btnColour'],
|
||||
sliderColor: '#'+color['handleColour'],
|
||||
volumeSliderColor: '#'+color['handleColour'],
|
||||
volumeColor: '#'+color['trackColour'],
|
||||
durationColor: '#'+color['fontColour'],
|
||||
buttonOverColor: '#'+color['iconOverColour'],
|
||||
progressColor: '#'+color['handleColour']
|
||||
},
|
||||
audio: {url: audioplayerpath}
|
||||
},
|
||||
clip: {url: fileurl,
|
||||
provider: "audio",
|
||||
autoPlay: false
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
M.util.init_mp3flowplayerplugin = function (id, playerpath, audioplayerpath, fileurl, color) {
|
||||
$f(id, playerpath, {
|
||||
plugins: {
|
||||
controls: {
|
||||
all: false,
|
||||
play: true,
|
||||
pause: true,
|
||||
scrubber: true,
|
||||
autoHide: false,
|
||||
height: 15,
|
||||
background: '#'+color['bgColour'],
|
||||
buttonColor: '#'+color['btnColour'],
|
||||
sliderColor: '#'+color['handleColour'],
|
||||
volumeSliderColor: '#'+color['handleColour'],
|
||||
progressColor: '#'+color['handleColour'],
|
||||
volumeColor: '#'+color['trackColour'],
|
||||
buttonOverColor: '#'+color['iconOverColour']
|
||||
},
|
||||
audio: {url: audioplayerpath}
|
||||
},
|
||||
clip: {url: fileurl,
|
||||
provider: "audio",
|
||||
autoPlay: false
|
||||
}
|
||||
});
|
||||
};
|
||||
if (M.cfg.jsrev == -10) {
|
||||
var jsurl = M.cfg.wwwroot + '/lib/flowplayer/flowplayer-3.2.6.js';
|
||||
} else {
|
||||
var jsurl = M.cfg.wwwroot + '/lib/javascript.php?file=/lib/flowplayer/flowplayer-3.2.6.js&rev=' + M.cfg.jsrev;
|
||||
}
|
||||
var fileref = document.createElement('script');
|
||||
fileref.setAttribute('type','text/javascript');
|
||||
fileref.setAttribute('src', jsurl);
|
||||
fileref.onload = embed_function;
|
||||
fileref.onreadystatechange = embed_function;
|
||||
document.getElementsByTagName('head')[0].appendChild(fileref);
|
||||
}
|
||||
}
|
||||
|
@ -224,22 +224,6 @@ class theme_config {
|
||||
*/
|
||||
public $layouts = array();
|
||||
|
||||
/**
|
||||
* With this you can control the colours of the big MP3 player
|
||||
* that is used for MP3 resources.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $resource_mp3player_colors = 'bgColour=000000&btnColour=ffffff&btnBorderColour=cccccc&iconColour=000000&iconOverColour=00cc00&trackColour=cccccc&handleColour=ffffff&loaderColour=ffffff&font=Arial&fontColour=3333FF&buffer=10&waitForPlay=no&autoPlay=yes';
|
||||
|
||||
/**
|
||||
* With this you can control the colours of the small MP3 player
|
||||
* that is used elsewhere.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $filter_mediaplugin_colors = 'bgColour=000000&btnColour=ffffff&btnBorderColour=cccccc&iconColour=000000&iconOverColour=00cc00&trackColour=cccccc&handleColour=ffffff&loaderColour=ffffff&waitForPlay=yes';
|
||||
|
||||
/**
|
||||
* Name of the renderer factory class to use.
|
||||
*
|
||||
@ -414,8 +398,8 @@ class theme_config {
|
||||
}
|
||||
|
||||
$configurable = array('parents', 'sheets', 'parents_exclude_sheets', 'plugins_exclude_sheets', 'javascripts', 'javascripts_footer',
|
||||
'parents_exclude_javascripts', 'layouts', 'resource_mp3player_colors', 'enable_dock', 'enablecourseajax',
|
||||
'filter_mediaplugin_colors', 'rendererfactory', 'csspostprocess', 'editor_sheets', 'rarrow', 'larrow', 'hidefromselector');
|
||||
'parents_exclude_javascripts', 'layouts', 'enable_dock', 'enablecourseajax',
|
||||
'rendererfactory', 'csspostprocess', 'editor_sheets', 'rarrow', 'larrow', 'hidefromselector');
|
||||
|
||||
foreach ($config as $key=>$value) {
|
||||
if (in_array($key, $configurable)) {
|
||||
|
@ -279,6 +279,9 @@ class core_renderer extends renderer_base {
|
||||
$output .= '<meta http-equiv="refresh" content="'.$this->page->periodicrefreshdelay.';url='.$this->page->url->out().'" />';
|
||||
}
|
||||
|
||||
// flow player embedding support
|
||||
$this->page->requires->js_function_call('M.util.load_flowplayer');
|
||||
|
||||
$this->page->requires->js_function_call('setTimeout', array('fix_column_widths()', 20));
|
||||
|
||||
$focus = $this->page->focuscontrol;
|
||||
@ -2464,22 +2467,6 @@ EOD;
|
||||
return $this->page->theme->larrow;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the colours of the small MP3 player
|
||||
* @return string
|
||||
*/
|
||||
public function filter_mediaplugin_colors() {
|
||||
return $this->page->theme->filter_mediaplugin_colors;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the colours of the big MP3 player
|
||||
* @return string
|
||||
*/
|
||||
public function resource_mp3player_colors() {
|
||||
return $this->page->theme->resource_mp3player_colors;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the custom menu if one has been set
|
||||
*
|
||||
|
@ -287,6 +287,7 @@ class page_requirements_manager {
|
||||
'loadingicon' => $renderer->pix_url('i/loading_small', 'moodle')->out(false),
|
||||
'themerev' => theme_get_revision(),
|
||||
'theme' => $page->theme->name,
|
||||
'jsrev' => ((empty($CFG->cachejs) or empty($CFG->jsrev)) ? -1 : $CFG->jsrev),
|
||||
);
|
||||
if (debugging('', DEBUG_DEVELOPER)) {
|
||||
$this->M_cfg['developerdebug'] = true;
|
||||
|
@ -146,7 +146,12 @@ function resourcelib_guess_url_mimetype($fullurl) {
|
||||
global $CFG;
|
||||
require_once("$CFG->libdir/filelib.php");
|
||||
|
||||
if (preg_match("|^(.*)/[a-z]*file.php(\?file=)?(/[^&\?]*)|", $fullurl, $matches)) {
|
||||
if ($fullurl instanceof moodle_url) {
|
||||
$fullurl = $fullurl->out(false);
|
||||
}
|
||||
|
||||
$matches = null;
|
||||
if (preg_match("|^(.*)/[a-z]*file.php(\?file=)?(/[^&\?#]*)|", $fullurl, $matches)) {
|
||||
// remove the special moodle file serving hacks so that the *file.php is ignored
|
||||
$fullurl = $matches[1].$matches[3];
|
||||
}
|
||||
@ -165,10 +170,38 @@ function resourcelib_guess_url_mimetype($fullurl) {
|
||||
|
||||
} else {
|
||||
// ok, this finally looks like a real file
|
||||
return mimeinfo('type', $fullurl);
|
||||
$parts = explode('?', $fullurl);
|
||||
$url = reset($parts);
|
||||
return mimeinfo('type', $url);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Looks for the extension.
|
||||
*
|
||||
* @param string $fullurl
|
||||
* @return string file extension
|
||||
*/
|
||||
function resourcelib_get_extension($fullurl) {
|
||||
|
||||
if ($fullurl instanceof moodle_url) {
|
||||
$fullurl = $fullurl->out(false);
|
||||
}
|
||||
|
||||
$matches = null;
|
||||
if (preg_match("|^(.*)/[a-z]*file.php(\?file=)?(/.*)|", $fullurl, $matches)) {
|
||||
// remove the special moodle file serving hacks so that the *file.php is ignored
|
||||
$fullurl = $matches[1].$matches[3];
|
||||
}
|
||||
|
||||
$matches = null;
|
||||
if (preg_match('/^[^#\?]+\.([a-z0-9]+)([#\?].*)?$/i', $fullurl, $matches)) {
|
||||
return strtolower($matches[1]);
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns image embedding html.
|
||||
* @param string $fullurl
|
||||
@ -192,46 +225,21 @@ function resourcelib_embed_image($fullurl, $title) {
|
||||
* @return string html
|
||||
*/
|
||||
function resourcelib_embed_mp3($fullurl, $title, $clicktoopen) {
|
||||
global $CFG, $OUTPUT, $PAGE;
|
||||
|
||||
$c = $OUTPUT->resource_mp3player_colors(); // You can set this up in your theme/xxx/config.php
|
||||
$colors = explode('&', $c);
|
||||
$playercolors = array();
|
||||
foreach ($colors as $color) {
|
||||
$color = explode('=', $color);
|
||||
$playercolors[$color[0]] = $color[1];
|
||||
if ($fullurl instanceof moodle_url) {
|
||||
$fullurl = $fullurl->out(false);
|
||||
}
|
||||
|
||||
$id = 'filter_mp3_'.time(); //we need something unique because it might be stored in text cache
|
||||
$id = 'resource_mp3_'.time(); //we need something unique because it might be stored in text cache
|
||||
|
||||
$playerpath = $CFG->wwwroot .'/filter/mediaplugin/mp3player.swf';
|
||||
$audioplayerpath = $CFG->wwwroot .'/filter/mediaplugin/flowplayer.audio.swf';
|
||||
// note: size is specified in theme, it can be made as wide as necessary, but the height can not be changed
|
||||
|
||||
$code = <<<OET
|
||||
<div class="resourcecontent resourcemp3">
|
||||
<span class="resourcemediaplugin resourcemediaplugin_mp3" id="$id"></span>
|
||||
<noscript><div>
|
||||
<object width="251" height="25" id="nonjsmp3plugin" name="undefined" data="$playerpath" type="application/x-shockwave-flash">
|
||||
<param name="movie" value="$playerpath" />
|
||||
<param name="allowfullscreen" value="false" />
|
||||
<param name="allowscriptaccess" value="always" />
|
||||
<param name="flashvars" value='config={"plugins": {"controls": {
|
||||
"fullscreen": false,
|
||||
"height": 25,
|
||||
"autoHide": false
|
||||
}
|
||||
},
|
||||
"clip":{"url":"$fullurl",
|
||||
"autoPlay": false},
|
||||
"content":{"url":"$playerpath"}}}' />
|
||||
</object>
|
||||
</div></noscript>
|
||||
</div>
|
||||
OET;
|
||||
$PAGE->requires->js('/lib/flowplayer.js');
|
||||
$code .= $PAGE->requires->js_function_call('M.util.init_mp3flowplayer', array('id'=>$id, 'playerpath'=>$playerpath, 'audioplayerpath'=>$audioplayerpath, 'fileurl'=>$fullurl, 'color'=>$playercolors));
|
||||
$output = '<div class="resourcecontent resourcemp3">';
|
||||
$output .= html_writer::tag('span', $clicktoopen, array('id'=>$id, 'class'=>'resourcemediaplugin resourcemediaplugin_mp3', 'title'=>$title));
|
||||
$output .= html_writer::script(js_writer::function_call('M.util.add_audio_player', array($id, $fullurl, false)));
|
||||
$output .= '</div>';
|
||||
|
||||
return $code;
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -244,29 +252,29 @@ OET;
|
||||
function resourcelib_embed_flashvideo($fullurl, $title, $clicktoopen) {
|
||||
global $CFG, $PAGE;
|
||||
|
||||
$id = 'filter_flv_'.time(); //we need something unique because it might be stored in text cache
|
||||
if ($fullurl instanceof moodle_url) {
|
||||
$fullurl = $fullurl->out(false);
|
||||
}
|
||||
|
||||
$playerpath = $CFG->wwwroot .'/filter/mediaplugin/flvplayer.swf';
|
||||
$id = 'resource_flv_'.time(); //we need something unique because it might be stored in text cache
|
||||
|
||||
$code = <<<EOT
|
||||
<div class="resourcecontent resourceflv">
|
||||
<span class="mediaplugin mediaplugin_flv" id="$id"></span>
|
||||
<noscript><div>
|
||||
<object width="800" height="600" id="undefined" name="undefined" data="$playerpath" type="application/x-shockwave-flash">
|
||||
<param name="movie" value="$playerpath" />
|
||||
<param name="allowfullscreen" value="true" />
|
||||
<param name="allowscriptaccess" value="always" />
|
||||
<param name="flashvars" value='config={"clip":{"url":"$fullurl",
|
||||
"autoPlay": false},
|
||||
"content":{"url":"$playerpath"}}}' />
|
||||
</object>
|
||||
</div></noscript>
|
||||
</div>
|
||||
EOT;
|
||||
//note: nobody should be adding any dimensions to themes!!!
|
||||
|
||||
$PAGE->requires->js('/lib/flowplayer.js');
|
||||
$code .= $PAGE->requires->js_function_call('M.util.init_flvflowplayer', array('id'=>$id, 'playerpath'=>$playerpath, 'fileurl'=>$fullurl));
|
||||
return $code;
|
||||
if (preg_match('/\?d=([\d]{1,4}%?)x([\d]{1,4}%?)/', $fullurl, $matches)) {
|
||||
$width = $matches[1];
|
||||
$height = $matches[2];
|
||||
$autosize = false;
|
||||
} else {
|
||||
$width = 400;
|
||||
$height = 300;
|
||||
$autosize = true;
|
||||
}
|
||||
$output = '<div class="resourcecontent resourceflv">';
|
||||
$output .= html_writer::tag('span', $clicktoopen, array('id'=>$id, 'class'=>'resourcemediaplugin resourcemediaplugin_flv', 'title'=>$title));
|
||||
$output .= html_writer::script(js_writer::function_call('M.util.add_video_player', array($id, $fullurl, $width, $height, $autosize)));
|
||||
$output .= '</div>';
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -406,11 +414,12 @@ EOT;
|
||||
function resourcelib_embed_real($fullurl, $title, $clicktoopen) {
|
||||
$code = <<<EOT
|
||||
<div class="resourcecontent resourcerm">
|
||||
<object classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" width="320" height="240">
|
||||
<object classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" data="$fullurl" width="320" height="240">
|
||||
<param name="src" value="$fullurl" />
|
||||
<param name="controls" value="All" />
|
||||
<!--[if !IE]>-->
|
||||
<object type="audio/x-pn-realaudio-plugin" data="$fullurl" width="320" height="240">
|
||||
<param name="src" value="$fullurl" />
|
||||
<param name="controls" value="All" />
|
||||
<!--<![endif]-->
|
||||
$clicktoopen
|
||||
@ -436,13 +445,15 @@ function resourcelib_embed_pdf($fullurl, $title, $clicktoopen) {
|
||||
|
||||
$code = <<<EOT
|
||||
<div class="resourcecontent resourcepdf">
|
||||
<object id="resourceobject" data="$fullurl" type="application/pdf">
|
||||
<object id="resourceobject" data="$fullurl" type="application/pdf" width="800" height="600">
|
||||
<param name="src" value="$fullurl" />
|
||||
$clicktoopen
|
||||
</object>
|
||||
</div>
|
||||
EOT;
|
||||
//$PAGE->requires->js_init_call('M.util.init_maximised_embed', array('resourceobject'), true);
|
||||
|
||||
// the size is hardcoded in the boject obove intentionally because it is adjusted by the following function on-the-fly
|
||||
$PAGE->requires->js_init_call('M.util.init_maximised_embed', array('resourceobject'), true);
|
||||
|
||||
return $code;
|
||||
}
|
||||
@ -458,6 +469,10 @@ EOT;
|
||||
function resourcelib_embed_general($fullurl, $title, $clicktoopen, $mimetype) {
|
||||
global $CFG, $PAGE;
|
||||
|
||||
if ($fullurl instanceof moodle_url) {
|
||||
$fullurl = $fullurl->out();
|
||||
}
|
||||
|
||||
$iframe = false;
|
||||
// IE can not embed stuff properly if stored on different server
|
||||
// that is why we use iframe instead, unfortunately this tag does not validate
|
||||
@ -481,7 +496,7 @@ EOT;
|
||||
} else {
|
||||
$code = <<<EOT
|
||||
<div class="resourcecontent resourcegeneral">
|
||||
<object id="resourceobject" data="$fullurl" type="$mimetype">
|
||||
<object id="resourceobject" data="$fullurl" type="$mimetype" width="800" height="600">
|
||||
<param name="src" value="$fullurl" />
|
||||
$clicktoopen
|
||||
</object>
|
||||
@ -489,6 +504,7 @@ EOT;
|
||||
EOT;
|
||||
}
|
||||
|
||||
// the size is hardcoded in the boject obove intentionally because it is adjusted by the following function on-the-fly
|
||||
$PAGE->requires->js_init_call('M.util.init_maximised_embed', array('resourceobject'), true);
|
||||
|
||||
return $code;
|
||||
|
@ -85,11 +85,11 @@
|
||||
<licenseversion></licenseversion>
|
||||
</library>
|
||||
<library>
|
||||
<location>mp3player</location>
|
||||
<name></name>
|
||||
<license></license>
|
||||
<version></version>
|
||||
<licenseversion></licenseversion>
|
||||
<location>flowplayer</location>
|
||||
<name>Flowplayer</name>
|
||||
<license>GPL</license>
|
||||
<version>3.2.7</version>
|
||||
<licenseversion>3</licenseversion>
|
||||
</library>
|
||||
<library>
|
||||
<location>overlib</location>
|
||||
|
340
lib/ufo.js
340
lib/ufo.js
@ -1,340 +0,0 @@
|
||||
/* Unobtrusive Flash Objects (UFO) v3.22 <http://www.bobbyvandersluis.com/ufo/>
|
||||
Copyright 2005-2007 Bobby van der Sluis
|
||||
This software is licensed under the CC-GNU LGPL <http://creativecommons.org/licenses/LGPL/2.1/>
|
||||
--
|
||||
Modified by Guy Thomas
|
||||
- made more IE friendly by using better on DOM loaded check
|
||||
|
||||
*/
|
||||
|
||||
var UFO = {
|
||||
req: ["movie", "width", "height", "majorversion", "build"],
|
||||
opt: ["play", "loop", "menu", "quality", "scale", "salign", "wmode", "bgcolor", "base", "flashvars", "devicefont", "allowscriptaccess", "seamlesstabbing", "allowfullscreen", "allownetworking"],
|
||||
optAtt: ["id", "name", "align"],
|
||||
optExc: ["swliveconnect"],
|
||||
ximovie: "ufo.swf",
|
||||
xiwidth: "215",
|
||||
xiheight: "138",
|
||||
ua: navigator.userAgent.toLowerCase(),
|
||||
pluginType: "",
|
||||
fv: [0,0],
|
||||
foList: [],
|
||||
|
||||
create: function(FO, id) {
|
||||
if (!UFO.uaHas("w3cdom") || UFO.uaHas("ieMac")) return;
|
||||
UFO.getFlashVersion();
|
||||
UFO.foList[id] = UFO.updateFO(FO);
|
||||
UFO.createCSS("#" + id, "visibility:hidden;");
|
||||
UFO.domLoad(id);
|
||||
},
|
||||
|
||||
updateFO: function(FO) {
|
||||
if (typeof FO.xi != "undefined" && FO.xi == "true") {
|
||||
if (typeof FO.ximovie == "undefined") FO.ximovie = UFO.ximovie;
|
||||
if (typeof FO.xiwidth == "undefined") FO.xiwidth = UFO.xiwidth;
|
||||
if (typeof FO.xiheight == "undefined") FO.xiheight = UFO.xiheight;
|
||||
}
|
||||
FO.mainCalled = false;
|
||||
return FO;
|
||||
},
|
||||
|
||||
domLoad: function(id) {
|
||||
onDOMComplete(window, function(){UFO.main(id);});
|
||||
},
|
||||
|
||||
main: function(id) {
|
||||
var _fo = UFO.foList[id];
|
||||
if (_fo.mainCalled) return;
|
||||
UFO.foList[id].mainCalled = true;
|
||||
document.getElementById(id).style.visibility = "hidden";
|
||||
if (UFO.hasRequired(id)) {
|
||||
if (UFO.hasFlashVersion(parseInt(_fo.majorversion, 10), parseInt(_fo.build, 10))) {
|
||||
if (typeof _fo.setcontainercss != "undefined" && _fo.setcontainercss == "true") UFO.setContainerCSS(id);
|
||||
UFO.writeSWF(id);
|
||||
}
|
||||
else if (_fo.xi == "true" && UFO.hasFlashVersion(6, 65)) {
|
||||
UFO.createDialog(id);
|
||||
}
|
||||
}
|
||||
document.getElementById(id).style.visibility = "visible";
|
||||
},
|
||||
|
||||
createCSS: function(selector, declaration) {
|
||||
var _h = document.getElementsByTagName("head")[0];
|
||||
var _s = UFO.createElement("style");
|
||||
if (!UFO.uaHas("ieWin")) _s.appendChild(document.createTextNode(selector + " {" + declaration + "}")); // bugs in IE/Win
|
||||
_s.setAttribute("type", "text/css");
|
||||
_s.setAttribute("media", "screen");
|
||||
_h.appendChild(_s);
|
||||
if (UFO.uaHas("ieWin") && document.styleSheets && document.styleSheets.length > 0) {
|
||||
var _ls = document.styleSheets[document.styleSheets.length - 1];
|
||||
if (typeof _ls.addRule == "object") _ls.addRule(selector, declaration);
|
||||
}
|
||||
},
|
||||
|
||||
setContainerCSS: function(id) {
|
||||
var _fo = UFO.foList[id];
|
||||
var _w = /%/.test(_fo.width) ? "" : "px";
|
||||
var _h = /%/.test(_fo.height) ? "" : "px";
|
||||
UFO.createCSS("#" + id, "width:" + _fo.width + _w +"; height:" + _fo.height + _h +";");
|
||||
if (_fo.width == "100%") {
|
||||
UFO.createCSS("body", "margin-left:0; margin-right:0; padding-left:0; padding-right:0;");
|
||||
}
|
||||
if (_fo.height == "100%") {
|
||||
UFO.createCSS("html", "height:100%; overflow:hidden;");
|
||||
UFO.createCSS("body", "margin-top:0; margin-bottom:0; padding-top:0; padding-bottom:0; height:100%;");
|
||||
}
|
||||
},
|
||||
|
||||
createElement: function(el) {
|
||||
return (UFO.uaHas("xml") && typeof document.createElementNS != "undefined") ? document.createElementNS("http://www.w3.org/1999/xhtml", el) : document.createElement(el);
|
||||
},
|
||||
|
||||
createObjParam: function(el, aName, aValue) {
|
||||
var _p = UFO.createElement("param");
|
||||
_p.setAttribute("name", aName);
|
||||
_p.setAttribute("value", aValue);
|
||||
el.appendChild(_p);
|
||||
},
|
||||
|
||||
uaHas: function(ft) {
|
||||
var _u = UFO.ua;
|
||||
switch(ft) {
|
||||
case "w3cdom":
|
||||
return (typeof document.getElementById != "undefined" && typeof document.getElementsByTagName != "undefined" && (typeof document.createElement != "undefined" || typeof document.createElementNS != "undefined"));
|
||||
case "xml":
|
||||
var _m = document.getElementsByTagName("meta");
|
||||
var _l = _m.length;
|
||||
for (var i = 0; i < _l; i++) {
|
||||
if (/content-type/i.test(_m[i].getAttribute("http-equiv")) && /xml/i.test(_m[i].getAttribute("content"))) return true;
|
||||
}
|
||||
return false;
|
||||
case "ieMac":
|
||||
return /msie/.test(_u) && !/opera/.test(_u) && /mac/.test(_u);
|
||||
case "ieWin":
|
||||
return /msie/.test(_u) && !/opera/.test(_u) && /win/.test(_u);
|
||||
case "gecko":
|
||||
return /gecko/.test(_u) && !/applewebkit/.test(_u);
|
||||
case "opera":
|
||||
return /opera/.test(_u);
|
||||
case "safari":
|
||||
return /applewebkit/.test(_u);
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
getFlashVersion: function() {
|
||||
if (UFO.fv[0] != 0) return;
|
||||
if (navigator.plugins && typeof navigator.plugins["Shockwave Flash"] == "object") {
|
||||
UFO.pluginType = "npapi";
|
||||
var _d = navigator.plugins["Shockwave Flash"].description;
|
||||
if (typeof _d != "undefined") {
|
||||
_d = _d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
|
||||
var _m = parseInt(_d.replace(/^(.*)\..*$/, "$1"), 10);
|
||||
var _r = /r/.test(_d) ? parseInt(_d.replace(/^.*r(.*)$/, "$1"), 10) : 0;
|
||||
UFO.fv = [_m, _r];
|
||||
}
|
||||
}
|
||||
else if (window.ActiveXObject) {
|
||||
UFO.pluginType = "ax";
|
||||
try { // avoid fp 6 crashes
|
||||
var _a = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
|
||||
}
|
||||
catch(e) {
|
||||
try {
|
||||
var _a = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
|
||||
UFO.fv = [6, 0];
|
||||
_a.AllowScriptAccess = "always"; // throws if fp < 6.47
|
||||
}
|
||||
catch(e) {
|
||||
if (UFO.fv[0] == 6) return;
|
||||
}
|
||||
try {
|
||||
var _a = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
|
||||
}
|
||||
catch(e) {}
|
||||
}
|
||||
if (typeof _a == "object") {
|
||||
var _d = _a.GetVariable("$version"); // bugs in fp 6.21/6.23
|
||||
if (typeof _d != "undefined") {
|
||||
_d = _d.replace(/^\S+\s+(.*)$/, "$1").split(",");
|
||||
UFO.fv = [parseInt(_d[0], 10), parseInt(_d[2], 10)];
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
hasRequired: function(id) {
|
||||
var _l = UFO.req.length;
|
||||
for (var i = 0; i < _l; i++) {
|
||||
if (typeof UFO.foList[id][UFO.req[i]] == "undefined") return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
|
||||
hasFlashVersion: function(major, release) {
|
||||
return (UFO.fv[0] > major || (UFO.fv[0] == major && UFO.fv[1] >= release)) ? true : false;
|
||||
},
|
||||
|
||||
writeSWF: function(id) {
|
||||
var _fo = UFO.foList[id];
|
||||
var _e = document.getElementById(id);
|
||||
if (UFO.pluginType == "npapi") {
|
||||
if (UFO.uaHas("gecko") || UFO.uaHas("xml")) {
|
||||
while(_e.hasChildNodes()) {
|
||||
_e.removeChild(_e.firstChild);
|
||||
}
|
||||
var _obj = UFO.createElement("object");
|
||||
_obj.setAttribute("type", "application/x-shockwave-flash");
|
||||
_obj.setAttribute("data", _fo.movie);
|
||||
_obj.setAttribute("width", _fo.width);
|
||||
_obj.setAttribute("height", _fo.height);
|
||||
var _l = UFO.optAtt.length;
|
||||
for (var i = 0; i < _l; i++) {
|
||||
if (typeof _fo[UFO.optAtt[i]] != "undefined") _obj.setAttribute(UFO.optAtt[i], _fo[UFO.optAtt[i]]);
|
||||
}
|
||||
var _o = UFO.opt.concat(UFO.optExc);
|
||||
var _l = _o.length;
|
||||
for (var i = 0; i < _l; i++) {
|
||||
if (typeof _fo[_o[i]] != "undefined") UFO.createObjParam(_obj, _o[i], _fo[_o[i]]);
|
||||
}
|
||||
_e.appendChild(_obj);
|
||||
}
|
||||
else {
|
||||
var _emb = "";
|
||||
var _o = UFO.opt.concat(UFO.optAtt).concat(UFO.optExc);
|
||||
var _l = _o.length;
|
||||
for (var i = 0; i < _l; i++) {
|
||||
if (typeof _fo[_o[i]] != "undefined") _emb += ' ' + _o[i] + '="' + _fo[_o[i]] + '"';
|
||||
}
|
||||
_e.innerHTML = '<embed type="application/x-shockwave-flash" src="' + _fo.movie + '" width="' + _fo.width + '" height="' + _fo.height + '" pluginspage="http://www.macromedia.com/go/getflashplayer"' + _emb + '></embed>';
|
||||
}
|
||||
}
|
||||
else if (UFO.pluginType == "ax") {
|
||||
var _objAtt = "";
|
||||
var _l = UFO.optAtt.length;
|
||||
for (var i = 0; i < _l; i++) {
|
||||
if (typeof _fo[UFO.optAtt[i]] != "undefined") _objAtt += ' ' + UFO.optAtt[i] + '="' + _fo[UFO.optAtt[i]] + '"';
|
||||
}
|
||||
var _objPar = "";
|
||||
var _l = UFO.opt.length;
|
||||
for (var i = 0; i < _l; i++) {
|
||||
if (typeof _fo[UFO.opt[i]] != "undefined") _objPar += '<param name="' + UFO.opt[i] + '" value="' + _fo[UFO.opt[i]] + '" />';
|
||||
}
|
||||
var _p = window.location.protocol == "https:" ? "https:" : "http:";
|
||||
_e.innerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + _objAtt + ' width="' + _fo.width + '" height="' + _fo.height + '" codebase="' + _p + '//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=' + _fo.majorversion + ',0,' + _fo.build + ',0"><param name="movie" value="' + _fo.movie + '" />' + _objPar + '</object>';
|
||||
}
|
||||
},
|
||||
|
||||
createDialog: function(id) {
|
||||
var _fo = UFO.foList[id];
|
||||
UFO.createCSS("html", "height:100%; overflow:hidden;");
|
||||
UFO.createCSS("body", "height:100%; overflow:hidden;");
|
||||
UFO.createCSS("#xi-con", "position:absolute; left:0; top:0; z-index:1000; width:100%; height:100%; background-color:#fff; filter:alpha(opacity:75); opacity:0.75;");
|
||||
UFO.createCSS("#xi-dia", "position:absolute; left:50%; top:50%; margin-left: -" + Math.round(parseInt(_fo.xiwidth, 10) / 2) + "px; margin-top: -" + Math.round(parseInt(_fo.xiheight, 10) / 2) + "px; width:" + _fo.xiwidth + "px; height:" + _fo.xiheight + "px;");
|
||||
var _b = document.getElementsByTagName("body")[0];
|
||||
var _c = UFO.createElement("div");
|
||||
_c.setAttribute("id", "xi-con");
|
||||
var _d = UFO.createElement("div");
|
||||
_d.setAttribute("id", "xi-dia");
|
||||
_c.appendChild(_d);
|
||||
_b.appendChild(_c);
|
||||
var _mmu = window.location;
|
||||
if (UFO.uaHas("xml") && UFO.uaHas("safari")) {
|
||||
var _mmd = document.getElementsByTagName("title")[0].firstChild.nodeValue = document.getElementsByTagName("title")[0].firstChild.nodeValue.slice(0, 47) + " - Flash Player Installation";
|
||||
}
|
||||
else {
|
||||
var _mmd = document.title = document.title.slice(0, 47) + " - Flash Player Installation";
|
||||
}
|
||||
var _mmp = UFO.pluginType == "ax" ? "ActiveX" : "PlugIn";
|
||||
var _uc = typeof _fo.xiurlcancel != "undefined" ? "&xiUrlCancel=" + _fo.xiurlcancel : "";
|
||||
var _uf = typeof _fo.xiurlfailed != "undefined" ? "&xiUrlFailed=" + _fo.xiurlfailed : "";
|
||||
UFO.foList["xi-dia"] = { movie:_fo.ximovie, width:_fo.xiwidth, height:_fo.xiheight, majorversion:"6", build:"65", flashvars:"MMredirectURL=" + _mmu + "&MMplayerType=" + _mmp + "&MMdoctitle=" + _mmd + _uc + _uf };
|
||||
UFO.writeSWF("xi-dia");
|
||||
},
|
||||
|
||||
expressInstallCallback: function() {
|
||||
var _b = document.getElementsByTagName("body")[0];
|
||||
var _c = document.getElementById("xi-con");
|
||||
_b.removeChild(_c);
|
||||
UFO.createCSS("body", "height:auto; overflow:auto;");
|
||||
UFO.createCSS("html", "height:auto; overflow:auto;");
|
||||
},
|
||||
|
||||
cleanupIELeaks: function() {
|
||||
var _o = document.getElementsByTagName("object");
|
||||
var _l = _o.length;
|
||||
for (var i = 0; i < _l; i++) {
|
||||
_o[i].style.display = "none";
|
||||
for (var x in _o[i]) {
|
||||
if (typeof _o[i][x] == "function") {
|
||||
_o[i][x] = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
if (typeof window.attachEvent != "undefined" && UFO.uaHas("ieWin")) {
|
||||
window.attachEvent("onunload", UFO.cleanupIELeaks);
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
* DOMComplete - Load Event
|
||||
*
|
||||
* Author: Diego Perini (diego.perini@gmail.com)
|
||||
* Updated: 28/06/2007
|
||||
* Version: 0.99.8
|
||||
* http://javascript.nwbox.com/DOMComplete/
|
||||
* Modified: By Guy Thomas 07/02/2008
|
||||
* Changed to scroll temporary node instead of actual document
|
||||
*/
|
||||
function onDOMComplete(w, f) {
|
||||
var d = w.document, done = false;
|
||||
//create temporary node to check scroll left ( see http://www.hedgerwow.com/360/dhtml/ie-dom-ondocumentready.html)
|
||||
var tempNode = document.createElement('document:ready');
|
||||
wait();
|
||||
if ((/WebKit|KHTML|MSIE/i).test(navigator.userAgent)) {
|
||||
poll();
|
||||
}
|
||||
function load(e) {
|
||||
if (!done) {
|
||||
tempNode = null;
|
||||
done = true; stop(); f(e);
|
||||
}
|
||||
}
|
||||
|
||||
function has(p) { return typeof d[p] != 'undefined'; }
|
||||
|
||||
function poll() {
|
||||
if (d.body !== null && d.getElementsByTagName) {
|
||||
// please see http://javascript.nwbox.com/IEContentLoaded/ for the IE improvement part of DOMComplete
|
||||
// GT modified to use tempNode.doScroll('left') to check DOM loaded (instead of actually scrolling the page)
|
||||
if (has('fileSize')) { try { tempNode.doScroll('left'); load('documentready'); } catch (e) { } }
|
||||
if (has('readyState') && (/loaded|complete/).test(d.readyState)) { load('readyState'); }
|
||||
}
|
||||
if (!done) { setTimeout(poll, 10); }
|
||||
}
|
||||
|
||||
function stop() {
|
||||
if (typeof d.removeEventListener == 'function') {
|
||||
d.removeEventListener('DOMContentLoaded', load, false);
|
||||
}
|
||||
}
|
||||
|
||||
function wait() {
|
||||
if (typeof d.addEventListener == 'function') {
|
||||
d.addEventListener('DOMContentLoaded', load, false);
|
||||
}
|
||||
var oldonload = w.onload;
|
||||
w.onload = function (e) {
|
||||
if (typeof oldonload == 'function') {
|
||||
oldonload();
|
||||
}
|
||||
load(e || this.event);
|
||||
};
|
||||
}
|
||||
}
|
@ -1018,7 +1018,7 @@ function format_text($text, $format = FORMAT_MOODLE, $options = NULL, $courseid_
|
||||
if (is_object($options['context'])) {
|
||||
$context = $options['context'];
|
||||
} else {
|
||||
$context = get_context_instance_by_id($context);
|
||||
$context = get_context_instance_by_id($options['context']);
|
||||
}
|
||||
} else if ($courseid_do_not_use) {
|
||||
// legacy courseid
|
||||
@ -1073,7 +1073,7 @@ function format_text($text, $format = FORMAT_MOODLE, $options = NULL, $courseid_
|
||||
if (!$options['noclean']) {
|
||||
$text = clean_text($text, FORMAT_HTML, $options);
|
||||
}
|
||||
$text = $filtermanager->filter_text($text, $context, array('originalformat' => FORMAT_HTML));
|
||||
$text = $filtermanager->filter_text($text, $context, array('originalformat' => FORMAT_HTML, 'noclean' => $options['noclean']));
|
||||
break;
|
||||
|
||||
case FORMAT_PLAIN:
|
||||
@ -1096,7 +1096,7 @@ function format_text($text, $format = FORMAT_MOODLE, $options = NULL, $courseid_
|
||||
if (!$options['noclean']) {
|
||||
$text = clean_text($text, FORMAT_HTML, $options);
|
||||
}
|
||||
$text = $filtermanager->filter_text($text, $context, array('originalformat' => FORMAT_MARKDOWN));
|
||||
$text = $filtermanager->filter_text($text, $context, array('originalformat' => FORMAT_MARKDOWN, 'noclean' => $options['noclean']));
|
||||
break;
|
||||
|
||||
default: // FORMAT_MOODLE or anything else
|
||||
@ -1104,7 +1104,7 @@ function format_text($text, $format = FORMAT_MOODLE, $options = NULL, $courseid_
|
||||
if (!$options['noclean']) {
|
||||
$text = clean_text($text, FORMAT_HTML, $options);
|
||||
}
|
||||
$text = $filtermanager->filter_text($text, $context, array('originalformat' => $format));
|
||||
$text = $filtermanager->filter_text($text, $context, array('originalformat' => $format, 'noclean' => $options['noclean']));
|
||||
break;
|
||||
}
|
||||
if ($options['filter']) {
|
||||
@ -3277,28 +3277,3 @@ function print_password_policy() {
|
||||
}
|
||||
return $message;
|
||||
}
|
||||
|
||||
function create_ufo_inline($id, $args) {
|
||||
global $CFG;
|
||||
// must not use $PAGE, $THEME, $COURSE etc. because the result is cached!
|
||||
// unfortunately this ufo.js can not be cached properly because we do not have access to current $CFG either
|
||||
$jsoutput = html_writer::script('', $CFG->wwwroot.'/lib/ufo.js');
|
||||
$jsoutput .= html_writer::script(js_writer::function_call('M.util.create_UFO_object', array($id, $args)));
|
||||
return $jsoutput;
|
||||
}
|
||||
|
||||
function create_flowplayer($id, $fileurl, $type='flv', $color='#000000') {
|
||||
global $CFG;
|
||||
|
||||
$playerpath = $CFG->wwwroot.'/filter/mediaplugin/'.$type.'player.swf';
|
||||
$jsoutput = html_writer::script('', $CFG->wwwroot.'/lib/flowplayer.js');
|
||||
|
||||
if ($type == 'flv') {
|
||||
$jsoutput .= html_writer::script(js_writer::function_call('M.util.init_flvflowplayer', array($id, $playerpath, $fileurl)));
|
||||
} else if ($type == 'mp3') {
|
||||
$audioplayerpath = $CFG->wwwroot .'/filter/mediaplugin/flowplayer.audio.swf';
|
||||
$jsoutput .= html_writer::script(js_writer::function_call('M.util.init_mp3flowplayerplugin', array($id, $playerpath, $audioplayerpath, $fileurl, $color)));
|
||||
}
|
||||
|
||||
return $jsoutput;
|
||||
}
|
||||
|
@ -603,6 +603,8 @@ function lesson_get_media_html($lesson, $context) {
|
||||
|
||||
$mimetype = resourcelib_guess_url_mimetype($url);
|
||||
|
||||
$extension = resourcelib_get_extension($url->out(false));
|
||||
|
||||
// find the correct type and print it out
|
||||
if (in_array($mimetype, array('image/gif','image/jpeg','image/png'))) { // It's an image
|
||||
$code = resourcelib_embed_image($url, $title);
|
||||
@ -611,7 +613,7 @@ function lesson_get_media_html($lesson, $context) {
|
||||
// MP3 audio file
|
||||
$code = resourcelib_embed_mp3($url, $title, $clicktoopen);
|
||||
|
||||
} else if ($mimetype == 'video/x-flv') {
|
||||
} else if ($mimetype == 'video/x-flv' or $extension === 'f4v') {
|
||||
// Flash video file
|
||||
$code = resourcelib_embed_flashvideo($url, $title, $clicktoopen);
|
||||
|
||||
|
@ -23,6 +23,8 @@
|
||||
.path-mod-lesson .progress_bar_token {height: 20px;width: 5px;padding: 0;margin: 0;}
|
||||
.path-mod-lesson .edit_pages_box .addlinks {margin:0;margin-bottom:1em;}
|
||||
|
||||
.path-mod-lesson .resourcecontent {text-align: center;}
|
||||
|
||||
/**
|
||||
* Style for view.php
|
||||
**/
|
||||
|
@ -73,38 +73,40 @@ function resource_display_embed($resource, $cm, $course, $file) {
|
||||
$mimetype = $file->get_mimetype();
|
||||
$title = $resource->name;
|
||||
|
||||
$extension = resourcelib_get_extension($file->get_filename());
|
||||
|
||||
if (in_array($mimetype, array('image/gif','image/jpeg','image/png'))) { // It's an image
|
||||
$code = resourcelib_embed_image($fullurl, $title);
|
||||
|
||||
} else if ($mimetype == 'application/pdf') {
|
||||
} else if ($mimetype === 'application/pdf') {
|
||||
// PDF document
|
||||
$code = resourcelib_embed_pdf($fullurl, $title, $clicktoopen);
|
||||
|
||||
} else if ($mimetype == 'audio/mp3') {
|
||||
} else if ($mimetype === 'audio/mp3') {
|
||||
// MP3 audio file
|
||||
$code = resourcelib_embed_mp3($fullurl, $title, $clicktoopen);
|
||||
|
||||
} else if ($mimetype == 'video/x-flv') {
|
||||
} else if ($mimetype === 'video/x-flv' or $extension === 'f4v') {
|
||||
// Flash video file
|
||||
$code = resourcelib_embed_flashvideo($fullurl, $title, $clicktoopen);
|
||||
|
||||
} else if ($mimetype == 'application/x-shockwave-flash') {
|
||||
} else if ($mimetype === 'application/x-shockwave-flash') {
|
||||
// Flash file
|
||||
$code = resourcelib_embed_flash($fullurl, $title, $clicktoopen);
|
||||
|
||||
} else if (substr($mimetype, 0, 10) == 'video/x-ms') {
|
||||
} else if (substr($mimetype, 0, 10) === 'video/x-ms') {
|
||||
// Windows Media Player file
|
||||
$code = resourcelib_embed_mediaplayer($fullurl, $title, $clicktoopen);
|
||||
|
||||
} else if ($mimetype == 'video/quicktime') {
|
||||
} else if ($mimetype === 'video/quicktime') {
|
||||
// Quicktime file
|
||||
$code = resourcelib_embed_quicktime($fullurl, $title, $clicktoopen);
|
||||
|
||||
} else if ($mimetype == 'video/mpeg') {
|
||||
} else if ($mimetype === 'video/mpeg') {
|
||||
// Mpeg file
|
||||
$code = resourcelib_embed_mpeg($fullurl, $title, $clicktoopen);
|
||||
|
||||
} else if ($mimetype == 'audio/x-pn-realaudio') {
|
||||
} else if ($mimetype === 'audio/x-pn-realaudio') {
|
||||
// RealMedia file
|
||||
$code = resourcelib_embed_real($fullurl, $title, $clicktoopen);
|
||||
|
||||
@ -363,7 +365,7 @@ function resource_get_final_display_type($resource) {
|
||||
static $download = array('application/zip', 'application/x-tar', 'application/g-zip'); // binary formats
|
||||
static $embed = array('image/gif', 'image/jpeg', 'image/png', 'image/svg+xml', // images
|
||||
'application/x-shockwave-flash', 'video/x-flv', 'video/x-ms-wm', // video formats
|
||||
'video/quicktime', 'video/mpeg',
|
||||
'video/quicktime', 'video/mpeg', 'video/mp4',
|
||||
'audio/mp3', 'audio/x-realaudio-plugin', 'x-realaudio-plugin', // audio formats
|
||||
'application/pdf', 'text/html',
|
||||
);
|
||||
|
@ -1,11 +1 @@
|
||||
.path-mod-resource .popupnotice {text-align:center;margin:40px;}
|
||||
|
||||
.resourcecontent object {height:600px;width:800px;}
|
||||
.resourcecontent.resourcepdf object{height: 800px;width: 100%;}
|
||||
|
||||
.resourcecontent .resourcemediaplugin_mp3 object {height:25px; }
|
||||
.path-mod-resource .resourcemediaplugin_mp3 {width: 800px;margin:10px auto;}
|
||||
.resourcecontent.resourcemp3 object#nonjsmp3plugin {height:25px;}
|
||||
|
||||
.ie .resourcecontent .resourcemediaplugin_mp3 object {height:34px;}
|
||||
|
||||
.path-mod-resource .resourcecontent {text-align: center;}
|
||||
|
@ -24,7 +24,7 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
$string['clicktoopen'] = 'Click {$a} link to open URL.';
|
||||
$string['clicktoopen'] = 'Click {$a} link to open resource.';
|
||||
$string['configdisplayoptions'] = 'Select all options that should be available, existing settings are not modified. Hold CTRL key to select multiple fields.';
|
||||
$string['configframesize'] = 'When a web page or an uploaded file is displayed within a frame, this value is the height (in pixels) of the top frame (which contains the navigation).';
|
||||
$string['configrolesinparams'] = 'Enable if you want to include localized role names in list of available parameter variables.';
|
||||
|
@ -234,6 +234,8 @@ function url_display_embed($url, $cm, $course) {
|
||||
$link = html_writer::tag('a', $fullurl, array('href'=>str_replace('&', '&', $fullurl)));
|
||||
$clicktoopen = get_string('clicktoopen', 'url', $link);
|
||||
|
||||
$extension = resourcelib_get_extension($url->externalurl);
|
||||
|
||||
if (in_array($mimetype, array('image/gif','image/jpeg','image/png'))) { // It's an image
|
||||
$code = resourcelib_embed_image($fullurl, $title);
|
||||
|
||||
@ -241,7 +243,7 @@ function url_display_embed($url, $cm, $course) {
|
||||
// MP3 audio file
|
||||
$code = resourcelib_embed_mp3($fullurl, $title, $clicktoopen);
|
||||
|
||||
} else if ($mimetype == 'video/x-flv') {
|
||||
} else if ($mimetype == 'video/x-flv' or $extension === 'f4v') {
|
||||
// Flash video file
|
||||
$code = resourcelib_embed_flashvideo($fullurl, $title, $clicktoopen);
|
||||
|
||||
@ -305,7 +307,7 @@ function url_get_final_display_type($url) {
|
||||
'application/pdf', 'text/html'); // these are known to cause trouble for external links, sorry
|
||||
static $embed = array('image/gif', 'image/jpeg', 'image/png', 'image/svg+xml', // images
|
||||
'application/x-shockwave-flash', 'video/x-flv', 'video/x-ms-wm', // video formats
|
||||
'video/quicktime', 'video/mpeg',
|
||||
'video/quicktime', 'video/mpeg', 'video/mp4',
|
||||
'audio/mp3', 'audio/x-realaudio-plugin', 'x-realaudio-plugin', // audio formats,
|
||||
);
|
||||
|
||||
|
1
mod/url/styles.css
Normal file
1
mod/url/styles.css
Normal file
@ -0,0 +1 @@
|
||||
.path-mod-url .resourcecontent {text-align: center;}
|
@ -23,20 +23,6 @@ $THEME->parents = array('base'); // TODO: new themes can not be based on standa
|
||||
|
||||
$THEME->parents_exclude_sheets = array('base'=>array('styles_moz'));
|
||||
|
||||
$THEME->resource_mp3player_colors =
|
||||
'bgColour=000000&btnColour=ffffff&btnBorderColour=cccccc&iconColour=000000&'.
|
||||
'iconOverColour=00cc00&trackColour=cccccc&handleColour=ffffff&loaderColour=ffffff&'.
|
||||
'font=Arial&fontColour=3333FF&buffer=10&waitForPlay=no&autoPlay=yes';
|
||||
/// With this you can control the colours of the "big" MP3 player
|
||||
/// that is used for MP3 resources.
|
||||
|
||||
|
||||
$THEME->filter_mediaplugin_colors =
|
||||
'bgColour=000000&btnColour=ffffff&btnBorderColour=cccccc&iconColour=000000&'.
|
||||
'iconOverColour=00cc00&trackColour=cccccc&handleColour=ffffff&loaderColour=ffffff&'.
|
||||
'waitForPlay=yes';
|
||||
/// ...And this controls the small embedded player
|
||||
|
||||
$THEME->layouts = array(
|
||||
// Most pages - if we encounter an unknown or a missing page type, this one is used.
|
||||
'base' => array(
|
||||
|
@ -190,8 +190,6 @@ $THEME->csspostprocess = 'arialist_process_css';
|
||||
// delivered.
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// $THEME->filter_mediaplugin_colors
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// Used to control the colours used in the small
|
||||
// media player for the filters
|
||||
@ -258,10 +256,4 @@ $THEME->rarrow = '⟩';
|
||||
// theme, used when working with custom renderers.
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// $THEME->resource_mp3player_colors
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// Controls the colours for the MP3 player
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
$THEME->editor_sheets = array('editor');
|
@ -674,14 +674,6 @@ body.tag .managelink {padding: 5px;}
|
||||
*/
|
||||
.ie.dir-rtl .mform .fitem .felement {margin-right:0;text-align:right;float:right;}
|
||||
|
||||
/**
|
||||
* Filters
|
||||
*/
|
||||
.jsenabled .mediaplugin.mediaplugin_mp3 object {height:15px;width:100px; }
|
||||
.jsenabled .mediaplugin.mediaplugin_flv object {height:600px;width:800px;}
|
||||
|
||||
.ie .mediaplugin.mediaplugin_mp3 object{height:20px;}
|
||||
|
||||
/**
|
||||
* Fix for broken YUI images in the menunav component
|
||||
*/
|
||||
@ -704,3 +696,6 @@ body.tag .managelink {padding: 5px;}
|
||||
.mod-indent-14 {margin-left:280px;}
|
||||
.mod-indent-15,
|
||||
.mod-indent-huge {margin-left:300px;}
|
||||
|
||||
/* Resourcelib mp3 player size: only width could be changed here, height hardcoded in JS */
|
||||
.resourcecontent .resourcemediaplugin_mp3 object {height:25px; width: 600px}
|
@ -190,13 +190,6 @@ $THEME->layouts = array(
|
||||
// delivered.
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// $THEME->filter_mediaplugin_colors
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// Used to control the colours used in the small
|
||||
// media player for the filters
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// $THEME->javascripts
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
@ -258,10 +251,4 @@ $THEME->layouts = array(
|
||||
// theme, used when working with custom renderers.
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// $THEME->resource_mp3player_colors
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// Controls the colours for the MP3 player
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
$THEME->editor_sheets = array('editor');
|
@ -164,13 +164,6 @@ $THEME->layouts = array(
|
||||
// delivered.
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// $THEME->filter_mediaplugin_colors
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// Used to control the colours used in the small
|
||||
// media player for the filters
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// $THEME->javascripts
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
@ -232,8 +225,3 @@ $THEME->layouts = array(
|
||||
// theme, used when working with custom renderers.
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// $THEME->resource_mp3player_colors
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// Controls the colours for the MP3 player
|
||||
////////////////////////////////////////////////////
|
||||
|
@ -18,7 +18,7 @@
|
||||
/**
|
||||
* Configuration for Moodle's brick theme.
|
||||
*
|
||||
* DO NOT MODIFY THIS THEME!
|
||||
* DO NOT MODIFY THIS THEME!
|
||||
* COPY IT FIRST, THEN RENAME THE COPY AND MODIFY IT INSTEAD.
|
||||
*
|
||||
* For full information about creating Moodle themes, see:
|
||||
@ -33,7 +33,7 @@ $THEME->name = 'brick';
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// Name of the theme. Most likely the name of
|
||||
// the directory in which this file resides.
|
||||
// the directory in which this file resides.
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
|
||||
@ -44,11 +44,11 @@ $THEME->parents = array(
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
// Which existing theme(s) in the /theme/ directory
|
||||
// do you want this theme to extend. A theme can
|
||||
// extend any number of themes. Rather than
|
||||
// creating an entirely new theme and copying all
|
||||
// of the CSS, you can simply create a new theme,
|
||||
// extend the theme you like and just add the
|
||||
// do you want this theme to extend. A theme can
|
||||
// extend any number of themes. Rather than
|
||||
// creating an entirely new theme and copying all
|
||||
// of the CSS, you can simply create a new theme,
|
||||
// extend the theme you like and just add the
|
||||
// changes you want to your theme.
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
@ -61,7 +61,7 @@ $THEME->sheets = array(
|
||||
);
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// Name of the stylesheet(s) you've including in
|
||||
// Name of the stylesheet(s) you've including in
|
||||
// this theme's /styles/ directory.
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
@ -85,7 +85,7 @@ $THEME->enable_dock = true;
|
||||
// $THEME->editor_sheets
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// An array of stylesheets to include within the
|
||||
// An array of stylesheets to include within the
|
||||
// body of the editor.
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
@ -167,7 +167,7 @@ $THEME->layouts = array(
|
||||
'regions' => array('side-post'),
|
||||
'defaultregion' => 'side-post',
|
||||
),
|
||||
|
||||
|
||||
);
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
@ -181,23 +181,16 @@ $THEME->layouts = array(
|
||||
|
||||
//$THEME->csspostprocess = 'arialist_process_css';
|
||||
////////////////////////////////////////////////////
|
||||
// Allows the user to provide the name of a function
|
||||
// that all CSS should be passed to before being
|
||||
// Allows the user to provide the name of a function
|
||||
// that all CSS should be passed to before being
|
||||
// delivered.
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// $THEME->filter_mediaplugin_colors
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// Used to control the colours used in the small
|
||||
// media player for the filters
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// $THEME->javascripts
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// An array containing the names of JavaScript files
|
||||
// located in /javascript/ to include in the theme.
|
||||
// located in /javascript/ to include in the theme.
|
||||
// (gets included in the head)
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
@ -210,7 +203,7 @@ $THEME->layouts = array(
|
||||
//$THEME->larrow = '⟨';
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// Overrides the left arrow image used throughout
|
||||
// Overrides the left arrow image used throughout
|
||||
// Moodle
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
@ -243,22 +236,17 @@ $THEME->layouts = array(
|
||||
// $THEME->plugins_exclude_sheets
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// An array of plugin sheets to ignore and not
|
||||
// An array of plugin sheets to ignore and not
|
||||
// include.
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// $THEME->renderfactory
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// Sets a custom render factory to use with the
|
||||
// Sets a custom render factory to use with the
|
||||
// theme, used when working with custom renderers.
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// $THEME->resource_mp3player_colors
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// Controls the colours for the MP3 player
|
||||
////////////////////////////////////////////////////
|
||||
$THEME->csspostprocess = 'brick_process_css';
|
||||
//$THEME->rendererfactory = 'theme_overridden_renderer_factory';
|
||||
|
||||
|
||||
|
@ -218,13 +218,6 @@ $THEME->hidefromselector = true;
|
||||
// delivered.
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// $THEME->filter_mediaplugin_colors
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// Used to control the colours used in the small
|
||||
// media player for the filters
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// $THEME->javascripts
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
@ -273,10 +266,4 @@ $THEME->hidefromselector = true;
|
||||
// theme, used when working with custom renderers.
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// $THEME->resource_mp3player_colors
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// Controls the colours for the MP3 player
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
$THEME->editor_sheets = array('editor');
|
@ -58,20 +58,6 @@ $THEME->parents_exclude_sheets = array(
|
||||
),
|
||||
);
|
||||
|
||||
$THEME->resource_mp3player_colors =
|
||||
'bgColour=000000&btnColour=ffffff&btnBorderColour=cccccc&iconColour=000000&'.
|
||||
'iconOverColour=00cc00&trackColour=cccccc&handleColour=ffffff&loaderColour=ffffff&'.
|
||||
'font=Arial&fontColour=3333FF&buffer=10&waitForPlay=no&autoPlay=yes';
|
||||
/// With this you can control the colours of the "big" MP3 player
|
||||
/// that is used for MP3 resources.
|
||||
|
||||
|
||||
$THEME->filter_mediaplugin_colors =
|
||||
'bgColour=000000&btnColour=ffffff&btnBorderColour=cccccc&iconColour=000000&'.
|
||||
'iconOverColour=00cc00&trackColour=cccccc&handleColour=ffffff&loaderColour=ffffff&'.
|
||||
'waitForPlay=yes';
|
||||
/// ...And this controls the small embedded player
|
||||
|
||||
$THEME->layouts = array(
|
||||
// Most pages - if we encounter an unknown or a missing page type, this one is used.
|
||||
'base' => array(
|
||||
|
@ -170,13 +170,6 @@ $THEME->layouts = array(
|
||||
// delivered.
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// $THEME->filter_mediaplugin_colors
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// Used to control the colours used in the small
|
||||
// media player for the filters
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// $THEME->javascripts
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
@ -238,10 +231,4 @@ $THEME->layouts = array(
|
||||
// theme, used when working with custom renderers.
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// $THEME->resource_mp3player_colors
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// Controls the colours for the MP3 player
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
$THEME->editor_sheets = array('editor');
|
@ -191,13 +191,6 @@ $THEME->layouts = array(
|
||||
// delivered.
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// $THEME->filter_mediaplugin_colors
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// Used to control the colours used in the small
|
||||
// media player for the filters
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// $THEME->javascripts
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
@ -259,9 +252,4 @@ $THEME->rarrow = '⟩';
|
||||
// theme, used when working with custom renderers.
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// $THEME->resource_mp3player_colors
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// Controls the colours for the MP3 player
|
||||
////////////////////////////////////////////////////
|
||||
$THEME->csspostprocess = 'fusion_process_css';
|
@ -179,13 +179,6 @@ $THEME->layouts = array(
|
||||
// delivered.
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// $THEME->filter_mediaplugin_colors
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// Used to control the colours used in the small
|
||||
// media player for the filters
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// $THEME->javascripts
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
@ -247,8 +240,3 @@ $THEME->layouts = array(
|
||||
// theme, used when working with custom renderers.
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// $THEME->resource_mp3player_colors
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// Controls the colours for the MP3 player
|
||||
////////////////////////////////////////////////////
|
||||
|
@ -143,13 +143,6 @@ $THEME->layouts = array(
|
||||
// delivered.
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// $THEME->filter_mediaplugin_colors
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// Used to control the colours used in the small
|
||||
// media player for the filters
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// $THEME->javascripts
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
@ -211,9 +204,4 @@ $THEME->layouts = array(
|
||||
// theme, used when working with custom renderers.
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// $THEME->resource_mp3player_colors
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// Controls the colours for the MP3 player
|
||||
////////////////////////////////////////////////////
|
||||
$THEME->csspostprocess = 'magazine_process_css';
|
@ -57,7 +57,7 @@ $THEME->sheets = array(
|
||||
'core',
|
||||
'pagelayout',
|
||||
'colors',
|
||||
'menu',
|
||||
'menu',
|
||||
);
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
@ -191,13 +191,6 @@ $THEME->layouts = array(
|
||||
// delivered.
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// $THEME->filter_mediaplugin_colors
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// Used to control the colours used in the small
|
||||
// media player for the filters
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// $THEME->javascripts
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
@ -259,10 +252,4 @@ $THEME->rarrow = '⟩';
|
||||
// theme, used when working with custom renderers.
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// $THEME->resource_mp3player_colors
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// Controls the colours for the MP3 player
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
$THEME->csspostprocess = 'nimble_process_css';
|
||||
|
@ -190,13 +190,6 @@ $THEME->csspostprocess = 'nonzero_process_css';
|
||||
// delivered.
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// $THEME->filter_mediaplugin_colors
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// Used to control the colours used in the small
|
||||
// media player for the filters
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// $THEME->javascripts
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
@ -258,8 +251,3 @@ $THEME->csspostprocess = 'nonzero_process_css';
|
||||
// theme, used when working with custom renderers.
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// $THEME->resource_mp3player_colors
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// Controls the colours for the MP3 player
|
||||
////////////////////////////////////////////////////
|
||||
|
@ -18,7 +18,7 @@
|
||||
/**
|
||||
* Configuration for Moodle's overlay theme.
|
||||
*
|
||||
* DO NOT MODIFY THIS THEME!
|
||||
* DO NOT MODIFY THIS THEME!
|
||||
* COPY IT FIRST, THEN RENAME THE COPY AND MODIFY IT INSTEAD.
|
||||
*
|
||||
* For full information about creating Moodle themes, see:
|
||||
@ -33,7 +33,7 @@ $THEME->name = 'overlay';
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// Name of the theme. Most likely the name of
|
||||
// the directory in which this file resides.
|
||||
// the directory in which this file resides.
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
|
||||
@ -44,11 +44,11 @@ $THEME->parents = array(
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
// Which existing theme(s) in the /theme/ directory
|
||||
// do you want this theme to extend. A theme can
|
||||
// extend any number of themes. Rather than
|
||||
// creating an entirely new theme and copying all
|
||||
// of the CSS, you can simply create a new theme,
|
||||
// extend the theme you like and just add the
|
||||
// do you want this theme to extend. A theme can
|
||||
// extend any number of themes. Rather than
|
||||
// creating an entirely new theme and copying all
|
||||
// of the CSS, you can simply create a new theme,
|
||||
// extend the theme you like and just add the
|
||||
// changes you want to your theme.
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
@ -60,7 +60,7 @@ $THEME->sheets = array(
|
||||
);
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// Name of the stylesheet(s) you've including in
|
||||
// Name of the stylesheet(s) you've including in
|
||||
// this theme's /styles/ directory.
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
@ -84,7 +84,7 @@ $THEME->enable_dock = true;
|
||||
$THEME->editor_sheets = array('editor');
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// An array of stylesheets to include within the
|
||||
// An array of stylesheets to include within the
|
||||
// body of the editor.
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
@ -180,23 +180,16 @@ $THEME->layouts = array(
|
||||
$THEME->csspostprocess = 'overlay_process_css';
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// Allows the user to provide the name of a function
|
||||
// that all CSS should be passed to before being
|
||||
// Allows the user to provide the name of a function
|
||||
// that all CSS should be passed to before being
|
||||
// delivered.
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// $THEME->filter_mediaplugin_colors
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// Used to control the colours used in the small
|
||||
// media player for the filters
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// $THEME->javascripts
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// An array containing the names of JavaScript files
|
||||
// located in /javascript/ to include in the theme.
|
||||
// located in /javascript/ to include in the theme.
|
||||
// (gets included in the head)
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
@ -209,7 +202,7 @@ $THEME->csspostprocess = 'overlay_process_css';
|
||||
// $THEME->larrow
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// Overrides the left arrow image used throughout
|
||||
// Overrides the left arrow image used throughout
|
||||
// Moodle
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
@ -242,19 +235,14 @@ $THEME->csspostprocess = 'overlay_process_css';
|
||||
// $THEME->plugins_exclude_sheets
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// An array of plugin sheets to ignore and not
|
||||
// An array of plugin sheets to ignore and not
|
||||
// include.
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// $THEME->renderfactory
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// Sets a custom render factory to use with the
|
||||
// Sets a custom render factory to use with the
|
||||
// theme, used when working with custom renderers.
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// $THEME->resource_mp3player_colors
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// Controls the colours for the MP3 player
|
||||
////////////////////////////////////////////////////
|
||||
|
@ -4,7 +4,7 @@ $THEME->name = 'serenity';
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// Name of the theme. Most likely the name of
|
||||
// the directory in which this file resides.
|
||||
// the directory in which this file resides.
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
|
||||
@ -12,11 +12,11 @@ $THEME->parents = array('canvas','base');
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
// Which existing theme(s) in the /theme/ directory
|
||||
// do you want this theme to extend. A theme can
|
||||
// extend any number of themes. Rather than
|
||||
// creating an entirely new theme and copying all
|
||||
// of the CSS, you can simply create a new theme,
|
||||
// extend the theme you like and just add the
|
||||
// do you want this theme to extend. A theme can
|
||||
// extend any number of themes. Rather than
|
||||
// creating an entirely new theme and copying all
|
||||
// of the CSS, you can simply create a new theme,
|
||||
// extend the theme you like and just add the
|
||||
// changes you want to your theme.
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
@ -24,7 +24,7 @@ $THEME->parents = array('canvas','base');
|
||||
$THEME->sheets = array('core');
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// Name of the stylesheet(s) you've including in
|
||||
// Name of the stylesheet(s) you've including in
|
||||
// this theme's /styles/ directory.
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
@ -39,53 +39,46 @@ $THEME->enable_dock = true;
|
||||
$THEME->editor_sheets = array('editor');
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// An array of stylesheets to include within the
|
||||
// An array of stylesheets to include within the
|
||||
// body of the editor.
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// $THEME->csspostprocess
|
||||
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// Allows the user to provide the name of a function
|
||||
// that all CSS should be passed to before being
|
||||
// Allows the user to provide the name of a function
|
||||
// that all CSS should be passed to before being
|
||||
// delivered.
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// $THEME->filter_mediaplugin_colors
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// Used to control the colours used in the small
|
||||
// media player for the filters
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// $THEME->javascripts
|
||||
// $THEME->javascripts
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// An array containing the names of JavaScript files
|
||||
// located in /javascript/ to include in the theme.
|
||||
// located in /javascript/ to include in the theme.
|
||||
// (gets included in the head)
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// $THEME->javascripts_footer
|
||||
// $THEME->javascripts_footer
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// As above but will be included in the page footer.
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// $THEME->larrow
|
||||
// $THEME->larrow
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// Overrides the left arrow image used throughout
|
||||
// Overrides the left arrow image used throughout
|
||||
// Moodle
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// $THEME->rarrow
|
||||
// $THEME->rarrow
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// Overrides the right arrow image used throughout Moodle
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// $THEME->layouts
|
||||
// $THEME->layouts
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// An array setting the layouts for the theme
|
||||
@ -98,7 +91,7 @@ $THEME->editor_sheets = array('editor');
|
||||
// the themes parents
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// $THEME->parents_exclude_sheets
|
||||
// $THEME->parents_exclude_sheets
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// An array of stylesheets not to inherit from the
|
||||
@ -108,19 +101,14 @@ $THEME->editor_sheets = array('editor');
|
||||
// $THEME->plugins_exclude_sheets
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// An array of plugin sheets to ignore and not
|
||||
// An array of plugin sheets to ignore and not
|
||||
// include.
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// $THEME->renderfactory
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// Sets a custom render factory to use with the
|
||||
// Sets a custom render factory to use with the
|
||||
// theme, used when working with custom renderers.
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// $THEME->resource_mp3player_colors
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// Controls the colours for the MP3 player
|
||||
////////////////////////////////////////////////////
|
||||
|
@ -189,13 +189,6 @@ $THEME->csspostprocess = 'sky_high_process_css';
|
||||
// delivered.
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// $THEME->filter_mediaplugin_colors
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// Used to control the colours used in the small
|
||||
// media player for the filters
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// $THEME->javascripts
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
@ -257,8 +250,3 @@ $THEME->csspostprocess = 'sky_high_process_css';
|
||||
// theme, used when working with custom renderers.
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// $THEME->resource_mp3player_colors
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// Controls the colours for the MP3 player
|
||||
////////////////////////////////////////////////////
|
||||
|
@ -2,7 +2,7 @@ html, body#tinymce {background-color:#FAFAFA;}
|
||||
body {font-family:Arial, Verdana, Helvetica, sans-serif;padding: 4px;}
|
||||
body.lang-vi {font-family:Arial, Verdana, Helvetica, sans-serif !important;}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Links
|
||||
*/
|
||||
a {text-decoration:none;color:#0000FF;}
|
||||
@ -15,7 +15,7 @@ a:hover {text-decoration:underline;color:#FF0000;}
|
||||
.homelink a {color: #000;text-decoration: none;border-top: 1px solid #cecece;border-bottom: 2px solid #4a4a4a;border-left: 1px solid #cecece;border-right: 2px solid #4a4a4a;}
|
||||
.homelink a:hover {text-decoration: none;border-bottom: 1px solid #cecece;border-top: 2px solid #4a4a4a;border-right: 1px solid #cecece;border-left: 2px solid #4a4a4a;}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Headings
|
||||
*/
|
||||
h1.main,
|
||||
@ -92,13 +92,13 @@ table.formtable tbody th {background-color: transparent;background-image: none;}
|
||||
|
||||
.mod_introbox {border-color:#DDDDDD;}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Docs
|
||||
*/
|
||||
#doc-contents h1 {font-size: 0.9em;}
|
||||
#doc-contents ul {font-size: 0.8em;}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Login
|
||||
*/
|
||||
#page-login-index #content {font-size: 0.85em;}
|
||||
@ -219,10 +219,6 @@ form.popupform label {margin-right: 0.5em;}
|
||||
/**
|
||||
* Filters
|
||||
*/
|
||||
.mediaplugin {display:block;clear:both;margin-top:5px;margin-bottom:5px;}
|
||||
.mediaplugin_mp3,
|
||||
.mediaplugin_swf,
|
||||
.mediaplugin_flv {display:inline;clear:none;margin:0px;margin-left:0.5em;}
|
||||
.texrender {border:0px;vertical-align:middle;}
|
||||
|
||||
/**
|
||||
@ -282,7 +278,7 @@ h2.tag-heading {text-align:center;margin-left:auto;margin-right:auto;width:95%;}
|
||||
.tag .managelink {text-align:right;}
|
||||
table#tag-management-list {margin: 10px auto;width: 80%;}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Overriding base
|
||||
*/
|
||||
#page-header .headermain {font-size:1.5em;}
|
||||
|
Loading…
x
Reference in New Issue
Block a user