Cheetah
ChVideosConfig.php
Go to the documentation of this file.
1 <?php
2 
8 require_once(CH_DIRECTORY_PATH_CLASSES . 'ChWsbFilesConfig.php');
9 require_once(CH_DIRECTORY_PATH_ROOT . "flash/modules/video/inc/constants.inc.php");
10 
12 {
16  function __construct (&$aModule)
17  {
18  parent::__construct($aModule);
19 
20  // only image files can added/removed here, changing list of video files requires source code modification
21  // image files support square resizing, just specify 'square' => true
22  $this->aFilesConfig = array (
23  'poster' => array('postfix' => IMAGE_EXTENSION, 'image' => true), // first image must be not square
24  'browse' => array('postfix' => THUMB_FILE_NAME . IMAGE_EXTENSION, 'image' => true, 'w' => 240, 'h' => 240, 'square' => true),
25  'browse2x' => array('postfix' => THUMB_FILE_NAME . '_2x' . IMAGE_EXTENSION, 'image' => true, 'w' => 480, 'h' => 480, 'square' => true),
26  'main' => array('postfix' => FLV_EXTENSION),
27  'mpg' => array('postfix' => '.mpg'),
28  'file' => array('postfix' => MOBILE_EXTENSION),
29  'm4v' => array('postfix' => M4V_EXTENSION),
30  );
31 
32  $this->aGlParams = array(
33  'mode_top_index' => 'ch_videos_mode_index',
34  'category_auto_approve' => 'category_auto_activation_ch_videos',
35  );
36 
37  $sProto = ch_proto();
38 
39  if(!defined("YOUTUBE_VIDEO_PLAYER"))
40  define("YOUTUBE_VIDEO_PLAYER", '<iframe width="100%" height="315" src="' . $sProto . '://www.youtube-nocookie.com/embed/#video#?rel=0&amp;showinfo=0#autoplay#" frameborder="0" allowfullscreen></iframe>');
41 
42  if(!defined("YOUTUBE_VIDEO_EMBED"))
43  define("YOUTUBE_VIDEO_EMBED", '<iframe width="560" height="315" src="' . $sProto . '://www.youtube-nocookie.com/embed/#video#?rel=0&amp;showinfo=0" frameborder="0" allowfullscreen></iframe>');
44 
45  $this->initConfig();
46  }
47 
48  function getFilesPath ()
49  {
50  return CH_DIRECTORY_PATH_ROOT . 'flash/modules/video/files/';
51  }
52 
53  function getFilesUrl ()
54  {
55  return CH_WSB_URL_ROOT . 'flash/modules/video/files/';
56  }
57 }
$aModule
$aModule
Definition: classifieds.php:21
php
ChVideosConfig\getFilesPath
getFilesPath()
Definition: ChVideosConfig.php:48
ChVideosConfig
Definition: ChVideosConfig.php:12
ch_proto
ch_proto($sUrl=CH_WSB_URL_ROOT)
Definition: utils.inc.php:1848
ChWsbFilesConfig\initConfig
initConfig()
Definition: ChWsbFilesConfig.php:41
ChVideosConfig\__construct
__construct(&$aModule)
Definition: ChVideosConfig.php:16
ChWsbFilesConfig
Definition: ChWsbFilesConfig.php:11
ChVideosConfig\getFilesUrl
getFilesUrl()
Definition: ChVideosConfig.php:53