[svn r21787] FS#2867 - Removing previously (SVN#21786) introduced constants, because they have been already defined. Addind empty index.html to some directories. Introducing a new (tiny at the moment) static class Media in the system's library . It is intended to manage the multi-media features.

skala
Ivan Tcholakov 17 years ago
parent 3891ed4e8c
commit f223a520a2
  1. 8
      main/inc/lib/fckeditor/editor/plugins/flvPlayer/swfobject_source/index.html
  2. 2
      main/inc/lib/fckeditor/fckeditor.php
  3. 9
      main/inc/lib/main_api.lib.php
  4. 38
      main/inc/lib/media.lib.php
  5. 8
      main/inc/lib/swfobject/index.html
  6. 8
      main/inc/lib/swfobject/swfobject_source/index.html

@ -0,0 +1,8 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
</head>
<body>
<br />
</body>
</html>

@ -34,6 +34,8 @@
* @return boolean
*/
require_once api_get_path(LIBRARY_PATH).'/media.lib.php';
// Configuration constants.
// For debugging purposes the editor may run using original source version of its javascripts, not "compressed" versions.

@ -83,17 +83,12 @@ define('SUBSCRIBE_NOT_ALLOWED', 0);
define('UNSUBSCRIBE_ALLOWED', 1);
define('UNSUBSCRIBE_NOT_ALLOWED', 0);
//COMMON CONSTANTS FOR SPECIFYING PATH TYPE
define('WEB_PATH', 'WEB_PATH');
define('REL_PATH', 'REL_PATH');
define('SYS_PATH', 'SYS_PATH');
//CONSTANTS FOR api_get_path FUNCTION
define('WEB_SERVER_ROOT_PATH', 'WEB_SERVER_ROOT_PATH');
define('SYS_SERVER_ROOT_PATH', 'SYS_SERVER_ROOT_PATH');
define('WEB_PATH', 'WEB_PATH');
define('SYS_PATH', 'SYS_PATH');
define('REL_PATH', 'REL_PATH');
define('WEB_SERVER_ROOT_PATH', 'WEB_SERVER_ROOT_PATH');
define('SYS_SERVER_ROOT_PATH', 'SYS_SERVER_ROOT_PATH');
define('WEB_COURSE_PATH', 'WEB_COURSE_PATH');
define('SYS_COURSE_PATH', 'SYS_COURSE_PATH');
define('REL_COURSE_PATH', 'REL_COURSE_PATH');

@ -0,0 +1,38 @@
<?php
// These constants specify multi-media related resource files (scripts, players, etc.).
define('FLASH_PLAYER_AUDIO', 'FLASH_PLAYER_AUDIO');
define('FLASH_PLAYER_VIDEO', 'FLASH_PLAYER_VIDEO');
define('SCRIPT_SWFOBJECT', 'SCRIPT_SWFOBJECT');
/**
* A static class for serving the Dokeos system's multi-media features.
* @author Ivan Tcholakov, July 2009.
*/
class Media {
/**
* This method returns the path (location) of a specified multi-media resource file.
* @param string $media_resource The identificator of the requested resource: FLASH_PLAYER_AUDIO, FLASH_PLAYER_VIDEO, SCRIPT_SWFOBJECT
* @param string $path_type (optional) Type (or base) of the returned path, it can be: WEB_PATH, SYS_PATH, REL_PATH (default)
* @return string Path to access the requeted media-related file.
* Note: At the moment returned paths are based on hard-coded data. Configuration data may be used in the future.
*/
public function get_path($media_resource, $path_type = REL_PATH) {
switch ($media_resource) {
case FLASH_PLAYER_AUDIO:
$relative_path = 'main/inc/lib/mediaplayer/player.swf';
break ;
case FLASH_PLAYER_VIDEO:
$relative_path = 'main/inc/lib/mediaplayer/player.swf';
break;
case SCRIPT_SWFOBJECT:
$relative_path = 'main/inc/lib/swfobject/swfobject.js';
break;
default:
$relative_path = '';
}
return api_get_path($path_type).$relative_path;
}
}

@ -0,0 +1,8 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
</head>
<body>
<br />
</body>
</html>

@ -0,0 +1,8 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
</head>
<body>
<br />
</body>
</html>
Loading…
Cancel
Save