source: extensions/gvideo/gvideo.php @ 7792

Last change on this file since 7792 was 7792, checked in by patdenice, 13 years ago

Minor corrections

File size: 1.2 KB
Line 
1<?php
2
3if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
4
5$params = unserialize($conf['PY_GVideo']);
6
7$idvideo = file_get_contents($picture['current']['path']);
8$sp = explode("/", $idvideo);
9
10$template->assign(array(
11  'ID_GVIDEO' => $sp[0],
12  'AUTO_GVIDEO' => $params[$extension][2],
13  'HEIGHT_IMG' => !empty($sp[1]) ? $sp[1] : $params[$extension][0],
14  'WIDTH_IMG' => !empty($sp[1]) ? $sp[1] : $params[$extension][0],
15  ));
16
17if ($extension == 'gvideo')
18{
19  $template->assign(array(
20    'LANG_GVIDEO' => $params[$extension][3],
21    'START_GVIDEO' => !empty($sp[3]) ? "initialTime=" . $sp[3] : ''));
22}
23
24// bouton de telechargement
25unset($template->smarty->_tpl_vars['current']['U_DOWNLOAD']);
26$pi = pathinfo($picture['current']['path']);
27$location = get_filename_wo_extension($pi['dirname'] . '/pwg_high/' . $pi['basename']);
28foreach(array('.asf', '.wmv', '.divx', '.xvid', '.avi', '.AVI', '.qt', '.mov', '.mpg', '.mpeg', '.mp4', '.flv', '.zip', '.rar') as $high_ext)
29{
30  if (file_exists($location . $high_ext))
31  {
32    $template->smarty->_tpl_vars['current']['U_DOWNLOAD'] = $location . $high_ext;
33  }
34}
35
36$template->set_filenames(array('py_content' => dirname(__FILE__) . '/template/pywaie_' . $extension . '.tpl'));
37$content = $template->parse('py_content', true);
38
39?>
Note: See TracBrowser for help on using the repository browser.