|
From: <wis...@us...> - 2012-01-29 14:46:36
|
Revision: 8826
http://xoops.svn.sourceforge.net/xoops/?rev=8826&view=rev
Author: wishcraft
Date: 2012-01-29 14:46:28 +0000 (Sun, 29 Jan 2012)
Log Message:
-----------
VOD 1.17 Beta - Install Fix and Date Fixes - see changelog.txt
Modified Paths:
--------------
XoopsModules/vod/releases/1.17/htdocs/modules/vod/class/log.php
XoopsModules/vod/releases/1.17/htdocs/modules/vod/class/sessions.php
XoopsModules/vod/releases/1.17/htdocs/modules/vod/class/videos.php
XoopsModules/vod/releases/1.17/htdocs/modules/vod/cron/notify.php
XoopsModules/vod/releases/1.17/htdocs/modules/vod/docs/changelog.txt
XoopsModules/vod/releases/1.17/htdocs/modules/vod/include/formobjects.vod.php
XoopsModules/vod/releases/1.17/htdocs/modules/vod/include/forms.vod.php
XoopsModules/vod/releases/1.17/htdocs/modules/vod/index.php
XoopsModules/vod/releases/1.17/htdocs/modules/vod/language/english/forms.php
XoopsModules/vod/releases/1.17/htdocs/modules/vod/language/english/modinfo.php
XoopsModules/vod/releases/1.17/htdocs/modules/vod/sql/mysql.sql
XoopsModules/vod/releases/1.17/htdocs/modules/vod/templates/vod_index_videos_list.html
XoopsModules/vod/releases/1.17/htdocs/modules/vod/xoops_version.php
XoopsModules/vod/trunk/htdocs/modules/vod/class/log.php
XoopsModules/vod/trunk/htdocs/modules/vod/class/sessions.php
XoopsModules/vod/trunk/htdocs/modules/vod/class/videos.php
XoopsModules/vod/trunk/htdocs/modules/vod/cron/notify.php
XoopsModules/vod/trunk/htdocs/modules/vod/docs/changelog.txt
XoopsModules/vod/trunk/htdocs/modules/vod/include/formobjects.vod.php
XoopsModules/vod/trunk/htdocs/modules/vod/include/forms.vod.php
XoopsModules/vod/trunk/htdocs/modules/vod/index.php
XoopsModules/vod/trunk/htdocs/modules/vod/language/english/forms.php
XoopsModules/vod/trunk/htdocs/modules/vod/language/english/modinfo.php
XoopsModules/vod/trunk/htdocs/modules/vod/sql/mysql.sql
XoopsModules/vod/trunk/htdocs/modules/vod/templates/vod_index_videos_list.html
XoopsModules/vod/trunk/htdocs/modules/vod/xoops_version.php
Modified: XoopsModules/vod/releases/1.17/htdocs/modules/vod/class/log.php
===================================================================
--- XoopsModules/vod/releases/1.17/htdocs/modules/vod/class/log.php 2012-01-29 11:32:49 UTC (rev 8825)
+++ XoopsModules/vod/releases/1.17/htdocs/modules/vod/class/log.php 2012-01-29 14:46:28 UTC (rev 8826)
@@ -21,7 +21,7 @@
function VodLog($fid = null)
{
$this->initVar('log_id', XOBJ_DTYPE_INT, null, false);
- $this->initVar('class', XOBJ_DTYPE_ENUM, 'unknown', false, false, false, array('cart','sessions','currency','category','mimetypes','video','external','unknown'));
+ $this->initVar('class', XOBJ_DTYPE_ENUM, 'unknown', false, false, false, array('cart','sessions','currency','category','mimetypes','videos','external','unknown'));
$this->initVar('file', XOBJ_DTYPE_TXTBOX, null, false, 64);
$this->initVar('path', XOBJ_DTYPE_TXTBOX, null, false, 128);
$this->initVar('line', XOBJ_DTYPE_INT, null, false);
Modified: XoopsModules/vod/releases/1.17/htdocs/modules/vod/class/sessions.php
===================================================================
--- XoopsModules/vod/releases/1.17/htdocs/modules/vod/class/sessions.php 2012-01-29 11:32:49 UTC (rev 8825)
+++ XoopsModules/vod/releases/1.17/htdocs/modules/vod/class/sessions.php 2012-01-29 14:46:28 UTC (rev 8826)
@@ -228,7 +228,7 @@
unset($_COOKIE['cart']);
}
}
- if (is_object($GLOBALS['xoopsUser'])&&!is_object($session)) {
+ if (is_object($GLOBALS['xoopsUser'])&&!isset($session)) {
$criteria = new CriteriaCompo(new Criteria('uid', $GLOBALS['xoopsUser']->getVar('uid')));
$criteria->add(new Criteria('`mode`', '_VOD_ENUM_UNINVOICED'));
if ($this->getCount($criteria)>0) {
@@ -238,7 +238,7 @@
}
}
$user = vod_getIPData();
- if (!is_object($session)) {
+ if (!isset($session)) {
$criteria = new CriteriaCompo(new Criteria('`ip`', $user['ip']));
$criteria->add(new Criteria('netaddy', $user['network-addy']));
$criteria->add(new Criteria('`mode`', '_VOD_ENUM_UNINVOICED'));
@@ -249,7 +249,7 @@
}
}
- if (!is_object($session)) {
+ if (!isset($session)) {
unset($session);
unset($_SESSION['vod']['cart']);
unset($_COOKIE['cart']);
Modified: XoopsModules/vod/releases/1.17/htdocs/modules/vod/class/videos.php
===================================================================
--- XoopsModules/vod/releases/1.17/htdocs/modules/vod/class/videos.php 2012-01-29 11:32:49 UTC (rev 8825)
+++ XoopsModules/vod/releases/1.17/htdocs/modules/vod/class/videos.php 2012-01-29 14:46:28 UTC (rev 8826)
@@ -130,14 +130,16 @@
function toArray($preview=false, $state='list') {
$ret = parent::toArray();
+
if ($this->getVar('mid')>0) {
$mimetypes_handler = xoops_getmodulehandler('mimetypes', 'vod');
$mimetype = $mimetypes_handler->get($this->getVar('mid'));
if (is_object($mimetype))
$ret['mimetype'] = $mimetype->toArray();
}
+
$fields = array('width', 'height', 'autoplay', 'control');
- switch ($this->getSpecialWithUserAgent("")) {
+ switch ($this->getSpecialWithUserAgent($_SERVER["HTTP_USER_AGENT"])) {
case "A":
foreach($fields as $field) {
$ret[$field] = $ret['speciala_'.$field];
@@ -151,6 +153,7 @@
default:
break;
}
+
$ele = vod_videos_get_form($this, true);
foreach($ele as $key => $field)
$ret['form'][$key] = $field->render();
@@ -179,22 +182,22 @@
$sessions_handler = xoops_getmodulehandler('sessions', 'vod');
static $_session = null;
- if (!is_array($_SESSION['vod']['cart'])||!isset($_SESSION['vod']['cart'])) {
- $ret['incart'] = false;
- } else {
- if (!is_object($_session))
+ if (isset($_SESSION['vod']['cart']['sessid'])) {
+ if (!is_object($_session))
$_session = $sessions_handler->get($_SESSION['vod']['cart']['sessid']);
$ret['incart'] = $_session->inCart($this);
- }
-
- if (strlen($this->getVar('avata'))>0&&file_exists($GLOBALS['xoops']->path($this->getVar('path').$this->getVar('avata')))) {
+ } else {
+ $ret['incart'] = false;
+ }
+
+ if (strlen($this->getVar('avata'))>0&&file_exists($GLOBALS['xoops']->path($this->getVar('path').$this->getVar('avata')))) {
$ret['avata_url'] = $this->getImage('avata');
$ret['hasavata'] = true;
} else
$ret['hasavata'] = false;
-
+
$mode = $this->getModeWithUserAgent($_SERVER['HTTP_USER_AGENT']);
- $prev = array('width' => $this->getVar('width'), 'height' => $this->getVar('height'), 'id' => $this->getReference(false, $preview), 'source' => '');
+ $prev = array('width' => $this->getVar('width'), 'height' => $this->getVar('height'), 'id' => $this->getReference(false, $preview), 'source' => $this->getSource($mode, $preview));
if (strlen($this->getSource($mode, $preview))>0) {
$ret['haspreview'] = true;
$prev['mode'] = $mode;
@@ -210,7 +213,7 @@
$prev['height'] = $GLOBALS['vodModuleConfig']['video_height_'.$state];
$prev['source'] = $this->getSource($mode, $preview);
$prev['id'] = $this->getReference(false, $preview);
- $html = $this->getHTML(false, $data['width'], $data['height'], '', '', $preview, $state);
+ $html = $this->getHTML(false, $prev['width'], $prev['height'], '', '', $preview, $state);
if ($GLOBALS['vodModuleConfig'][$mode.'_secure']==true) {
$prev['contents'] = '';
$GLOBALS['xoTheme']->addScript('', array('type'=>'text/javascript'), $this->getJS(false, $prev['width'], $prev['height'], $preview, $state));
@@ -224,7 +227,7 @@
$prev['height'] = $GLOBALS['vodModuleConfig']['video_height_'.$state];
$prev['source'] = $this->getSource($mode, $preview);
$prev['id'] = $this->getReference(true, $preview);
- $html = $this->getHTML(true, $data['width'], $data['height'], '', '', $preview, $state);
+ $html = $this->getHTML(true, $prev['width'], $prev['height'], '', '', $preview, $state);
if ($GLOBALS['vodModuleConfig'][$mode.'_secure']==true) {
$prev['contents'] = '';
$GLOBALS['xoTheme']->addScript('', array('type'=>'text/javascript'), $this->getJS(true, $prev['width'], $prev['height'], $preview, $state));
@@ -237,46 +240,50 @@
} else {
$ret['haspreview'] = false;
}
- foreach($prev as $key => $value) {
- $ret['preview_data_'.$key] = $value;
- }
+
if ($GLOBALS['vodModuleConfig']['tags']&&file_exists($GLOBALS['xoops']->path("/modules/tag/include/tagbar.php"))) {
include_once XOOPS_ROOT_PATH."/modules/tag/include/tagbar.php";
$ret['tagbar'] = tagBar($this->getVar('vid'), $this->getVar('cid'));
}
+
return $ret;
}
function getHTML($block = false, $width=0, $height=0, $agent = '', $ip = '', $preview = false, $state = 'list') {
+
if (empty($ip))
$ip = $this->getIP();
if (empty($agent))
$agent = $_SERVER['HTTP_USER_AGENT'];
+
$mode = $this->getModeWithUserAgent($agent);
include_once ($GLOBALS['xoops']->path('class/template.php'));
- if (!isset($GLOBALS['xoopsTpl']))
- $GLOBALS['xoopsTpl'] = new XoopsTpl();
+ $GLOBALS['vodTpl'] = new XoopsTpl();
+
$videos = array();
- $videos = $this->toArray($preview, $state);
+ $videos = parent::toArray();
$videos['mode'] = $mode;
$videos['source'] = $this->getSource($mode, $preview);
$videos['id'] = $this->getReference($block, $preview);
$videos['width'] = (!empty($height)&&!empty($width)&&$width&&$height?$width:($this->getSpecialWithUserAgent($agent)=='A'?$this->getVar('speciala_width'):($this->getSpecialWithUserAgent($agent)=='B'?$this->getVar('specialb_width'):($this->getVar('width')))));
$videos['height'] = (!empty($height)&&!empty($height)&&$height&&$height?$height:($this->getSpecialWithUserAgent($agent)=='A'?$this->getVar('speciala_height'):($this->getSpecialWithUserAgent($agent)=='B'?$this->getVar('specialb_height'):($this->getVar('height')))));
- $GLOBALS['xoopsTpl']->assign('videos', $videos);
+
+ $GLOBALS['vodTpl']->assign('videos', $videos);
if (isset($videos['mimetype']))
- $GLOBALS['xoopsTpl']->assign('mimetype', $videos['mimetype']);
- $GLOBALS['xoopsTpl']->assign('xoConfig', $this->_ModConfig);
- $GLOBALS['xoopsTpl']->assign('iframe', isset($_REQUEST['iframe']));
- $GLOBALS['xoopsTpl']->assign('preview', $preview);
- $GLOBALS['xoopsTpl']->assign('state', $state);
+ $GLOBALS['vodTpl']->assign('mimetype', $videos['mimetype']);
+ $GLOBALS['vodTpl']->assign('xoConfig', $this->_ModConfig);
+ $GLOBALS['vodTpl']->assign('iframe', isset($_REQUEST['iframe']));
+ $GLOBALS['vodTpl']->assign('preview', $preview);
+ $GLOBALS['vodTpl']->assign('state', $state);
+
ob_start();
if ($block == false)
- $GLOBALS['xoopsTpl']->display('db:vod_json_'.$mode.'_videos.html');
+ $GLOBALS['vodTpl']->display('db:vod_json_'.$mode.'_videos.html');
else
- $GLOBALS['xoopsTpl']->display('db:vod_json_block_'.$mode.'_videos.html');
+ $GLOBALS['vodTpl']->display('db:vod_json_block_'.$mode.'_videos.html');
$data = ob_get_contents();
ob_end_clean();
+
return $data;
}
Modified: XoopsModules/vod/releases/1.17/htdocs/modules/vod/cron/notify.php
===================================================================
--- XoopsModules/vod/releases/1.17/htdocs/modules/vod/cron/notify.php 2012-01-29 11:32:49 UTC (rev 8825)
+++ XoopsModules/vod/releases/1.17/htdocs/modules/vod/cron/notify.php 2012-01-29 14:46:28 UTC (rev 8826)
@@ -36,7 +36,7 @@
$xoopsMailer->setHTML(true);
$xoopsMailer->setTemplateDir($GLOBALS['xoops']->path('/modules/vod/language/'.$GLOBALS['xoopsConfig']['language'].'/mail_templates/'));
$xoopsMailer->setTemplate('vod_video_available_cart.html');
- $xoopsMailer->setSubject(sprintf(_VOD_EMAIL_VIDEO_AVAILABLE_SUBJECT, $videos[$cart->getVar('vid')]->getVar('name'), date(_DATESTRING, time().$GLOBALS['vodModuleConfig']['purchase_expires'])));
+ $xoopsMailer->setSubject(sprintf(_VOD_EMAIL_VIDEO_AVAILABLE_SUBJECT, $videos[$cart->getVar('vid')]->getVar('name'), date(_DATESTRING, time()+$GLOBALS['vodModuleConfig']['purchase_expires'])));
$xoopsMailer->setToEmails($sessions[$cart->getVar('sessid')]->getVar('email'));
@@ -51,7 +51,8 @@
$xoopsMailer->assign("SUMMARY", $videos[$cart->getVar('vid')]->getVar('summary'));
$xoopsMailer->assign("CATEGORY", $categories[$cart->getVar('cid')]->getVar('name'));
$xoopsMailer->assign("URL", $videos[$cart->getVar('vid')]->getViewingURL($sessions[$cart->getVar('sessid')], $cart));
- $xoopsMailer->assign("EXPIRES", date(_DATESTRING, time().$GLOBALS['vodModuleConfig']['purchase_expires']));
+ $xoopsMailer->assign("EXPIRES", date(_DATESTRING, time()+$GLOBALS['vodModuleConfig']['purchase_expires']));
+ $xoopsMailer->assign("EXPIRE", date(_DATESTRING, time()+$GLOBALS['vodModuleConfig']['purchase_expires']));
$xoopsMailer->assign("INVURL", $sessions[$cart->getVar('sessid')]->getVar('url'));
if ($GLOBALS['vodModuleConfig']['matrixstream']==true&&$sessions[$cart->getVar('sessid')]->getVar('uid')>0&&$cart->getVar('pid')>0) {
@@ -69,7 +70,7 @@
if ($subscribed_handler->insert($subscription, true)) {
if($xoopsMailer->send() ){
$cart->setVar('notified', time());
- $cart->setVar('expires', time().$GLOBALS['vodModuleConfig']['purchase_expires']);
+ $cart->setVar('expires', time()+$GLOBALS['vodModuleConfig']['purchase_expires']);
$cart_handler->insert($cart);
}
}
Modified: XoopsModules/vod/releases/1.17/htdocs/modules/vod/docs/changelog.txt
===================================================================
--- XoopsModules/vod/releases/1.17/htdocs/modules/vod/docs/changelog.txt 2012-01-29 11:32:49 UTC (rev 8825)
+++ XoopsModules/vod/releases/1.17/htdocs/modules/vod/docs/changelog.txt 2012-01-29 14:46:28 UTC (rev 8826)
@@ -1,4 +1,15 @@
==========================================
+ 2011/01/30 01:26:01 Version 1.17 BETA
+==========================================
+ - Added /tag/plugin/vod.php Tag Module Plugin code added (wishcraft)
+ - Added /xpayment/plugin/vod.php XPayment Module Plugin code added (wishcraft)
+ - Changed /class/cart.php restructing and debugged code added for cart & cart session (wishcraft)
+ - Changed /class/sessions.php restructing and debugged code added for cart & cart session (wishcraft)
+ - Changed /class/log.php restructing and debugged code added for videos class (wishcraft)
+ - Changed /index.php restructing and debugged code added for cart & cart session (wishcraft)
+ - Changed /xoops_version.php Support for New Variables, Constants & Templates; version updated of Application (wishcraft)
+
+==========================================
2011/01/27 5:48:01 Version 1.16 ALPHA
==========================================
- Added /cron/notify.php Notification Cron Added & Matrixstream code added (wishcraft)
Modified: XoopsModules/vod/releases/1.17/htdocs/modules/vod/include/formobjects.vod.php
===================================================================
--- XoopsModules/vod/releases/1.17/htdocs/modules/vod/include/formobjects.vod.php 2012-01-29 11:32:49 UTC (rev 8825)
+++ XoopsModules/vod/releases/1.17/htdocs/modules/vod/include/formobjects.vod.php 2012-01-29 14:46:28 UTC (rev 8826)
@@ -4,8 +4,9 @@
$config_handler = xoops_gethandler('config');
if (!isset($GLOBALS['vodModule']))
$GLOBALS['vodModule'] = $module_handler->getByDirname('vod');
- if (!isset($GLOBALS['vodModuleConfig']))
- $GLOBALS['vodModuleConfig'] = $config_handler->getConfigList($GLOBALS['vodModule']->getVar('mid'));
+ if (is_object($GLOBALS['vodModule']))
+ if (!isset($GLOBALS['vodModuleConfig']))
+ $GLOBALS['vodModuleConfig'] = $config_handler->getConfigList($GLOBALS['vodModule']->getVar('mid'));
require_once($GLOBALS['xoops']->path('class/xoopsformloader.php'));
require_once($GLOBALS['xoops']->path('class/pagenav.php'));
Modified: XoopsModules/vod/releases/1.17/htdocs/modules/vod/include/forms.vod.php
===================================================================
--- XoopsModules/vod/releases/1.17/htdocs/modules/vod/include/forms.vod.php 2012-01-29 11:32:49 UTC (rev 8825)
+++ XoopsModules/vod/releases/1.17/htdocs/modules/vod/include/forms.vod.php 2012-01-29 14:46:28 UTC (rev 8826)
@@ -400,7 +400,7 @@
$ele['parent'] = new VodFormSelectCategory(($as_array==false?_FRM_VOD_FORM_CATEGORY_PARENT:''), $id.'[parent]', $object->getVar('parent'), 1, false, $object->getVar('cid'));
$ele['parent']->setDescription(($as_array==false?_FRM_VOD_FORM_CATEGORY_PARENT_DESC:''));
- $ele['prefix'] = new XoopsFormText(($as_array==false?_FRM_VOD_FORM_CATEGORY_PREFIX:''), $id.'[catno]', ($as_array==false?16:8),32, $object->getVar('prefix'));
+ $ele['prefix'] = new XoopsFormText(($as_array==false?_FRM_VOD_FORM_CATEGORY_PREFIX:''), $id.'[prefix]', ($as_array==false?16:8),32, $object->getVar('prefix'));
$ele['prefix']->setDescription(($as_array==false?_FRM_VOD_FORM_CATEGORY_PREFIX_DESC:''));
$ele['name'] = new XoopsFormText(($as_array==false?_FRM_VOD_FORM_CATEGORY_NAME:''), $id.'[name]', ($as_array==false?55:21),128, $object->getVar('name'));
$ele['name']->setDescription(($as_array==false?_FRM_VOD_FORM_CATEGORY_NAME_DESC:''));
Modified: XoopsModules/vod/releases/1.17/htdocs/modules/vod/index.php
===================================================================
--- XoopsModules/vod/releases/1.17/htdocs/modules/vod/index.php 2012-01-29 11:32:49 UTC (rev 8825)
+++ XoopsModules/vod/releases/1.17/htdocs/modules/vod/index.php 2012-01-29 14:46:28 UTC (rev 8826)
@@ -27,8 +27,13 @@
$sessions_handler =& xoops_getmodulehandler('sessions', 'vod');
$sessions = $sessions_handler->intialiseCart();
- if (is_array($_SESSION['vod']['cart'])&&$_SESSION['vod']['cart']!=false) {
- setcookie('cart', serialize($_SESSION['vod']['cart']), 3600*24*30);
+ if (isset($_SESSION['vod']['cart'])) {
+ if (is_array($_SESSION['vod']['cart'])&&$_SESSION['vod']['cart']!=false) {
+ setcookie('cart', serialize($_SESSION['vod']['cart']), 3600*24*30);
+ } else {
+ $cart = false;
+ setcookie('cart', '', 3600*24*30);
+ }
} else {
$cart = false;
setcookie('cart', '', 3600*24*30);
@@ -36,11 +41,13 @@
$xoopsOption['template_main'] = 'vod_index.html';
include($GLOBALS['xoops']->path('/header.php'));
- $GLOBALS['xoopsTpl']->assign('numincart', $_SESSION['vod']['cart']['videos']);
+ if (isset($_SESSION['vod']['cart']))
+ $GLOBALS['xoopsTpl']->assign('numincart', $_SESSION['vod']['cart']['videos']);
$GLOBALS['xoopsTpl']->assign('php_self', $_SERVER['PHP_SELF']);
$GLOBALS['xoopsTpl']->assign('back_url', $uri);
$GLOBALS['xoopsTpl']->assign('uri', urlencode($_SERVER['REQUEST_URI']));
$cathits=false;
+
if ($vid>0) {
$video = $videos_handler->get($vid);
$video->setVar('hits', $video->getVar('hits')+1);
@@ -53,6 +60,7 @@
}
$GLOBALS['xoopsTpl']->assign('video', $video->toArray($preview, 'main'));
}
+
if ($cid>0) {
$category = $category_handler->get($cid);
if ($cathits==false) {
@@ -61,6 +69,7 @@
}
$GLOBALS['xoopsTpl']->assign('category', $category->toArray());
}
+
$categories = array();
$criteria = new Criteria('parent', $cid);
$i = 0;
@@ -86,6 +95,7 @@
$categories[$cidb]['trend'] = false;
}
}
+
if ($i<>0)
$GLOBALS['xoopsTpl']->assign('trcolspan', ($GLOBALS['vodModuleConfig']['cat_per_row']-$ie));
$GLOBALS['xoopsTpl']->assign('categories', $categories);
@@ -99,7 +109,7 @@
break;
default:
case "list":
-
+
include_once $GLOBALS['xoops']->path( "/class/pagenav.php" );
$criteria = $videos_handler->getFilterCriteria($filter);
@@ -130,12 +140,14 @@
$videos = $videos_handler->getObjects($criteria, true);
foreach($videos as $vid => $video) {
if (is_object($video))
- $GLOBALS['xoopsTpl']->append('videos', $video->toArray($preview, 'list'));
+ $GLOBALS['xoopsTpl']->append('pageofvideos', $video->toArray($preview, 'list'));
}
+
if ($GLOBALS['vodModuleConfig']['force_jquery']&&!isset($GLOBALS['loaded_jquery'])) {
$GLOBALS['xoTheme']->addScript(XOOPS_URL._MI_VOD_JQUERY, array('type'=>'text/javascript'));
$GLOBALS['loaded_jquery']=true;
}
+
break;
}
case 'cart':
Modified: XoopsModules/vod/releases/1.17/htdocs/modules/vod/language/english/forms.php
===================================================================
--- XoopsModules/vod/releases/1.17/htdocs/modules/vod/language/english/forms.php 2012-01-29 11:32:49 UTC (rev 8825)
+++ XoopsModules/vod/releases/1.17/htdocs/modules/vod/language/english/forms.php 2012-01-29 14:46:28 UTC (rev 8826)
@@ -1,5 +1,25 @@
<?php
+ // Currency Form
+ define('_FRM_VOD_FORM_CURRENCY_NAME', 'Currency Name');
+ define('_FRM_VOD_FORM_DESC_CURRENCY_NAME', '');
+ define('_FRM_VOD_FORM_CURRENCY_ALIAS', 'Currency Alias');
+ define('_FRM_VOD_FORM_DESC_CURRENCY_ALIAS', '');
+ define('_FRM_VOD_FORM_CURRENCY_CODE', 'Currency ISO Code');
+ define('_FRM_VOD_FORM_DESC_CURRENCY_CODE', '3 Characters');
+ define('_FRM_VOD_FORM_CURRENCY_LEFT', 'Currency Symbol on Left');
+ define('_FRM_VOD_FORM_DESC_CURRENCY_LEFT', '');
+ define('_FRM_VOD_FORM_CURRENCY_RIGHT', 'Currency Symbol on Right');
+ define('_FRM_VOD_FORM_DESC_CURRENCY_RIGHT', '');
+ define('_FRM_VOD_FORM_CURRENCY_DECIMALS', 'Currency Decimal Places');
+ define('_FRM_VOD_FORM_DESC_CURRENCY_DECIMALS', '');
+ define('_FRM_VOD_FORM_CURRENCY_RATE', 'Currency Exchange Rate');
+ define('_FRM_VOD_FORM_DESC_CURRENCY_RATE', 'Based on Default Currency');
+ define('_FRM_VOD_FORM_CURRENCY_DEFAULT', 'Default Currency');
+ define('_FRM_VOD_FORM_DESC_CURRENCY_DEFAULT', '');
+ define('_FRM_VOD_EDIT_CURRENCY', 'Edit this currency - %s');
+ define('_FRM_VOD_NEW_CURRENCY', 'New currency');
+
define('_FRM_VOD_FORM_ISNEW_VOD', 'New Videos');
define('_FRM_VOD_FORM_EDIT_VOD', 'Edit Existing Videos');
define('_FRM_VOD_FORM_VOD_NAME', 'Name of Video');
Modified: XoopsModules/vod/releases/1.17/htdocs/modules/vod/language/english/modinfo.php
===================================================================
--- XoopsModules/vod/releases/1.17/htdocs/modules/vod/language/english/modinfo.php 2012-01-29 11:32:49 UTC (rev 8825)
+++ XoopsModules/vod/releases/1.17/htdocs/modules/vod/language/english/modinfo.php 2012-01-29 14:46:28 UTC (rev 8826)
@@ -112,16 +112,16 @@
define('_MI_VOD_HTML5_VIDEOS_DESC', 'This is the HTML5 videos selected when a useragent is specified');
define('_MI_VOD_OTHER_VIDEOS', 'Other Videos');
define('_MI_VOD_OTHER_VIDEOS_DESC', 'This is the Other videos selected when a useragent is specified');
- define('_MI_VOD_LOAD_VOD', 'Load Vod in these videos sessions');
+ define('_MI_VOD_LOAD_VOD', 'Load Flowplayer in these videos sessions');
define('_MI_VOD_LOAD_VOD_DESC', 'This is the intances that load vod (Do not change unless you know what you are doing)');
define('_MI_VOD_LOAD_VIDEOJS', 'Load Video-js in these videos sessions');
define('_MI_VOD_LOAD_VIDEOJS_DESC', 'This is the intances that load HTML5 Video-js (Do not change unless you know what you are doing)');
//Enumerators
- define('_MI_VOD_FLASH', 'Flash Videos (Vod)');
+ define('_MI_VOD_FLASH', 'Flash Videos (Flowplayer)');
define('_MI_VOD_HTML5', 'HTML5 Videos (Video-js)');
define('_MI_VOD_IOS', 'Apple OS Videos (Video-js)');
- define('_MI_VOD_RTMP', 'RTMP Stream Videos (Vod)');
+ define('_MI_VOD_RTMP', 'RTMP Stream Videos (Flowplayer)');
define('_MI_VOD_RTSP', 'RTSP Stream Videos (Video-js)');
define('_MI_VOD_OTHER', 'Other Videos');
define('_MI_VOD_SILVERLIGHT', 'Silverlight Videos');
Modified: XoopsModules/vod/releases/1.17/htdocs/modules/vod/sql/mysql.sql
===================================================================
--- XoopsModules/vod/releases/1.17/htdocs/modules/vod/sql/mysql.sql 2012-01-29 11:32:49 UTC (rev 8825)
+++ XoopsModules/vod/releases/1.17/htdocs/modules/vod/sql/mysql.sql 2012-01-29 14:46:28 UTC (rev 8826)
@@ -198,7 +198,7 @@
CREATE TABLE `vod_log` (
`log_id` bigint(25) unsigned NOT NULL AUTO_INCREMENT,
- `class` enum('cart','sessions','currency','category','mimetypes','video','external','unknown') DEFAULT 'unknown',
+ `class` enum('cart','sessions','currency','category','mimetypes','videos','external','unknown') DEFAULT 'unknown',
`file` varchar(64) DEFAULT NULL,
`path` varchar(128) DEFAULT NULL,
`line` int(15) unsigned DEFAULT '0',
Modified: XoopsModules/vod/releases/1.17/htdocs/modules/vod/templates/vod_index_videos_list.html
===================================================================
--- XoopsModules/vod/releases/1.17/htdocs/modules/vod/templates/vod_index_videos_list.html 2012-01-29 11:32:49 UTC (rev 8825)
+++ XoopsModules/vod/releases/1.17/htdocs/modules/vod/templates/vod_index_videos_list.html 2012-01-29 14:46:28 UTC (rev 8826)
@@ -52,7 +52,7 @@
<th> </th>
<th> </th>
</tr>
- <{foreach item=item from=$videos}>
+ <{foreach item=item from=$pageofvideos}>
<tr class="<{cycle values="even,odd"}>">
<td rowspan='2' align='center'><{if $item.hasavata}><img src='<{$item.avata_url}>' width='95px'><{else}> <{/if}></td>
<td><{$item.cid}></td>
Modified: XoopsModules/vod/releases/1.17/htdocs/modules/vod/xoops_version.php
===================================================================
--- XoopsModules/vod/releases/1.17/htdocs/modules/vod/xoops_version.php 2012-01-29 11:32:49 UTC (rev 8825)
+++ XoopsModules/vod/releases/1.17/htdocs/modules/vod/xoops_version.php 2012-01-29 14:46:28 UTC (rev 8826)
@@ -92,11 +92,11 @@
// Tables created by sql file (without prefix!)
$i=0;
$modversion['tables'][$i++] = "vod_cart";
+$modversion['tables'][$i++] = "vod_cart_sessions";
$modversion['tables'][$i++] = "vod_category";
$modversion['tables'][$i++] = "vod_currency";
$modversion['tables'][$i++] = "vod_log";
$modversion['tables'][$i++] = "vod_mimetypes";
-$modversion['tables'][$i++] = "vod_sessions";
$modversion['tables'][$i++] = "vod_videos";
// Blocks
Modified: XoopsModules/vod/trunk/htdocs/modules/vod/class/log.php
===================================================================
--- XoopsModules/vod/trunk/htdocs/modules/vod/class/log.php 2012-01-29 11:32:49 UTC (rev 8825)
+++ XoopsModules/vod/trunk/htdocs/modules/vod/class/log.php 2012-01-29 14:46:28 UTC (rev 8826)
@@ -21,7 +21,7 @@
function VodLog($fid = null)
{
$this->initVar('log_id', XOBJ_DTYPE_INT, null, false);
- $this->initVar('class', XOBJ_DTYPE_ENUM, 'unknown', false, false, false, array('cart','sessions','currency','category','mimetypes','video','external','unknown'));
+ $this->initVar('class', XOBJ_DTYPE_ENUM, 'unknown', false, false, false, array('cart','sessions','currency','category','mimetypes','videos','external','unknown'));
$this->initVar('file', XOBJ_DTYPE_TXTBOX, null, false, 64);
$this->initVar('path', XOBJ_DTYPE_TXTBOX, null, false, 128);
$this->initVar('line', XOBJ_DTYPE_INT, null, false);
Modified: XoopsModules/vod/trunk/htdocs/modules/vod/class/sessions.php
===================================================================
--- XoopsModules/vod/trunk/htdocs/modules/vod/class/sessions.php 2012-01-29 11:32:49 UTC (rev 8825)
+++ XoopsModules/vod/trunk/htdocs/modules/vod/class/sessions.php 2012-01-29 14:46:28 UTC (rev 8826)
@@ -228,7 +228,7 @@
unset($_COOKIE['cart']);
}
}
- if (is_object($GLOBALS['xoopsUser'])&&!is_object($session)) {
+ if (is_object($GLOBALS['xoopsUser'])&&!isset($session)) {
$criteria = new CriteriaCompo(new Criteria('uid', $GLOBALS['xoopsUser']->getVar('uid')));
$criteria->add(new Criteria('`mode`', '_VOD_ENUM_UNINVOICED'));
if ($this->getCount($criteria)>0) {
@@ -238,7 +238,7 @@
}
}
$user = vod_getIPData();
- if (!is_object($session)) {
+ if (!isset($session)) {
$criteria = new CriteriaCompo(new Criteria('`ip`', $user['ip']));
$criteria->add(new Criteria('netaddy', $user['network-addy']));
$criteria->add(new Criteria('`mode`', '_VOD_ENUM_UNINVOICED'));
@@ -249,7 +249,7 @@
}
}
- if (!is_object($session)) {
+ if (!isset($session)) {
unset($session);
unset($_SESSION['vod']['cart']);
unset($_COOKIE['cart']);
Modified: XoopsModules/vod/trunk/htdocs/modules/vod/class/videos.php
===================================================================
--- XoopsModules/vod/trunk/htdocs/modules/vod/class/videos.php 2012-01-29 11:32:49 UTC (rev 8825)
+++ XoopsModules/vod/trunk/htdocs/modules/vod/class/videos.php 2012-01-29 14:46:28 UTC (rev 8826)
@@ -130,14 +130,16 @@
function toArray($preview=false, $state='list') {
$ret = parent::toArray();
+
if ($this->getVar('mid')>0) {
$mimetypes_handler = xoops_getmodulehandler('mimetypes', 'vod');
$mimetype = $mimetypes_handler->get($this->getVar('mid'));
if (is_object($mimetype))
$ret['mimetype'] = $mimetype->toArray();
}
+
$fields = array('width', 'height', 'autoplay', 'control');
- switch ($this->getSpecialWithUserAgent("")) {
+ switch ($this->getSpecialWithUserAgent($_SERVER["HTTP_USER_AGENT"])) {
case "A":
foreach($fields as $field) {
$ret[$field] = $ret['speciala_'.$field];
@@ -151,6 +153,7 @@
default:
break;
}
+
$ele = vod_videos_get_form($this, true);
foreach($ele as $key => $field)
$ret['form'][$key] = $field->render();
@@ -179,22 +182,22 @@
$sessions_handler = xoops_getmodulehandler('sessions', 'vod');
static $_session = null;
- if (!is_array($_SESSION['vod']['cart'])||!isset($_SESSION['vod']['cart'])) {
- $ret['incart'] = false;
- } else {
- if (!is_object($_session))
+ if (isset($_SESSION['vod']['cart']['sessid'])) {
+ if (!is_object($_session))
$_session = $sessions_handler->get($_SESSION['vod']['cart']['sessid']);
$ret['incart'] = $_session->inCart($this);
- }
-
- if (strlen($this->getVar('avata'))>0&&file_exists($GLOBALS['xoops']->path($this->getVar('path').$this->getVar('avata')))) {
+ } else {
+ $ret['incart'] = false;
+ }
+
+ if (strlen($this->getVar('avata'))>0&&file_exists($GLOBALS['xoops']->path($this->getVar('path').$this->getVar('avata')))) {
$ret['avata_url'] = $this->getImage('avata');
$ret['hasavata'] = true;
} else
$ret['hasavata'] = false;
-
+
$mode = $this->getModeWithUserAgent($_SERVER['HTTP_USER_AGENT']);
- $prev = array('width' => $this->getVar('width'), 'height' => $this->getVar('height'), 'id' => $this->getReference(false, $preview), 'source' => '');
+ $prev = array('width' => $this->getVar('width'), 'height' => $this->getVar('height'), 'id' => $this->getReference(false, $preview), 'source' => $this->getSource($mode, $preview));
if (strlen($this->getSource($mode, $preview))>0) {
$ret['haspreview'] = true;
$prev['mode'] = $mode;
@@ -210,7 +213,7 @@
$prev['height'] = $GLOBALS['vodModuleConfig']['video_height_'.$state];
$prev['source'] = $this->getSource($mode, $preview);
$prev['id'] = $this->getReference(false, $preview);
- $html = $this->getHTML(false, $data['width'], $data['height'], '', '', $preview, $state);
+ $html = $this->getHTML(false, $prev['width'], $prev['height'], '', '', $preview, $state);
if ($GLOBALS['vodModuleConfig'][$mode.'_secure']==true) {
$prev['contents'] = '';
$GLOBALS['xoTheme']->addScript('', array('type'=>'text/javascript'), $this->getJS(false, $prev['width'], $prev['height'], $preview, $state));
@@ -224,7 +227,7 @@
$prev['height'] = $GLOBALS['vodModuleConfig']['video_height_'.$state];
$prev['source'] = $this->getSource($mode, $preview);
$prev['id'] = $this->getReference(true, $preview);
- $html = $this->getHTML(true, $data['width'], $data['height'], '', '', $preview, $state);
+ $html = $this->getHTML(true, $prev['width'], $prev['height'], '', '', $preview, $state);
if ($GLOBALS['vodModuleConfig'][$mode.'_secure']==true) {
$prev['contents'] = '';
$GLOBALS['xoTheme']->addScript('', array('type'=>'text/javascript'), $this->getJS(true, $prev['width'], $prev['height'], $preview, $state));
@@ -237,46 +240,50 @@
} else {
$ret['haspreview'] = false;
}
- foreach($prev as $key => $value) {
- $ret['preview_data_'.$key] = $value;
- }
+
if ($GLOBALS['vodModuleConfig']['tags']&&file_exists($GLOBALS['xoops']->path("/modules/tag/include/tagbar.php"))) {
include_once XOOPS_ROOT_PATH."/modules/tag/include/tagbar.php";
$ret['tagbar'] = tagBar($this->getVar('vid'), $this->getVar('cid'));
}
+
return $ret;
}
function getHTML($block = false, $width=0, $height=0, $agent = '', $ip = '', $preview = false, $state = 'list') {
+
if (empty($ip))
$ip = $this->getIP();
if (empty($agent))
$agent = $_SERVER['HTTP_USER_AGENT'];
+
$mode = $this->getModeWithUserAgent($agent);
include_once ($GLOBALS['xoops']->path('class/template.php'));
- if (!isset($GLOBALS['xoopsTpl']))
- $GLOBALS['xoopsTpl'] = new XoopsTpl();
+ $GLOBALS['vodTpl'] = new XoopsTpl();
+
$videos = array();
- $videos = $this->toArray($preview, $state);
+ $videos = parent::toArray();
$videos['mode'] = $mode;
$videos['source'] = $this->getSource($mode, $preview);
$videos['id'] = $this->getReference($block, $preview);
$videos['width'] = (!empty($height)&&!empty($width)&&$width&&$height?$width:($this->getSpecialWithUserAgent($agent)=='A'?$this->getVar('speciala_width'):($this->getSpecialWithUserAgent($agent)=='B'?$this->getVar('specialb_width'):($this->getVar('width')))));
$videos['height'] = (!empty($height)&&!empty($height)&&$height&&$height?$height:($this->getSpecialWithUserAgent($agent)=='A'?$this->getVar('speciala_height'):($this->getSpecialWithUserAgent($agent)=='B'?$this->getVar('specialb_height'):($this->getVar('height')))));
- $GLOBALS['xoopsTpl']->assign('videos', $videos);
+
+ $GLOBALS['vodTpl']->assign('videos', $videos);
if (isset($videos['mimetype']))
- $GLOBALS['xoopsTpl']->assign('mimetype', $videos['mimetype']);
- $GLOBALS['xoopsTpl']->assign('xoConfig', $this->_ModConfig);
- $GLOBALS['xoopsTpl']->assign('iframe', isset($_REQUEST['iframe']));
- $GLOBALS['xoopsTpl']->assign('preview', $preview);
- $GLOBALS['xoopsTpl']->assign('state', $state);
+ $GLOBALS['vodTpl']->assign('mimetype', $videos['mimetype']);
+ $GLOBALS['vodTpl']->assign('xoConfig', $this->_ModConfig);
+ $GLOBALS['vodTpl']->assign('iframe', isset($_REQUEST['iframe']));
+ $GLOBALS['vodTpl']->assign('preview', $preview);
+ $GLOBALS['vodTpl']->assign('state', $state);
+
ob_start();
if ($block == false)
- $GLOBALS['xoopsTpl']->display('db:vod_json_'.$mode.'_videos.html');
+ $GLOBALS['vodTpl']->display('db:vod_json_'.$mode.'_videos.html');
else
- $GLOBALS['xoopsTpl']->display('db:vod_json_block_'.$mode.'_videos.html');
+ $GLOBALS['vodTpl']->display('db:vod_json_block_'.$mode.'_videos.html');
$data = ob_get_contents();
ob_end_clean();
+
return $data;
}
Modified: XoopsModules/vod/trunk/htdocs/modules/vod/cron/notify.php
===================================================================
--- XoopsModules/vod/trunk/htdocs/modules/vod/cron/notify.php 2012-01-29 11:32:49 UTC (rev 8825)
+++ XoopsModules/vod/trunk/htdocs/modules/vod/cron/notify.php 2012-01-29 14:46:28 UTC (rev 8826)
@@ -36,7 +36,7 @@
$xoopsMailer->setHTML(true);
$xoopsMailer->setTemplateDir($GLOBALS['xoops']->path('/modules/vod/language/'.$GLOBALS['xoopsConfig']['language'].'/mail_templates/'));
$xoopsMailer->setTemplate('vod_video_available_cart.html');
- $xoopsMailer->setSubject(sprintf(_VOD_EMAIL_VIDEO_AVAILABLE_SUBJECT, $videos[$cart->getVar('vid')]->getVar('name'), date(_DATESTRING, time().$GLOBALS['vodModuleConfig']['purchase_expires'])));
+ $xoopsMailer->setSubject(sprintf(_VOD_EMAIL_VIDEO_AVAILABLE_SUBJECT, $videos[$cart->getVar('vid')]->getVar('name'), date(_DATESTRING, time()+$GLOBALS['vodModuleConfig']['purchase_expires'])));
$xoopsMailer->setToEmails($sessions[$cart->getVar('sessid')]->getVar('email'));
@@ -51,7 +51,8 @@
$xoopsMailer->assign("SUMMARY", $videos[$cart->getVar('vid')]->getVar('summary'));
$xoopsMailer->assign("CATEGORY", $categories[$cart->getVar('cid')]->getVar('name'));
$xoopsMailer->assign("URL", $videos[$cart->getVar('vid')]->getViewingURL($sessions[$cart->getVar('sessid')], $cart));
- $xoopsMailer->assign("EXPIRES", date(_DATESTRING, time().$GLOBALS['vodModuleConfig']['purchase_expires']));
+ $xoopsMailer->assign("EXPIRES", date(_DATESTRING, time()+$GLOBALS['vodModuleConfig']['purchase_expires']));
+ $xoopsMailer->assign("EXPIRE", date(_DATESTRING, time()+$GLOBALS['vodModuleConfig']['purchase_expires']));
$xoopsMailer->assign("INVURL", $sessions[$cart->getVar('sessid')]->getVar('url'));
if ($GLOBALS['vodModuleConfig']['matrixstream']==true&&$sessions[$cart->getVar('sessid')]->getVar('uid')>0&&$cart->getVar('pid')>0) {
@@ -69,7 +70,7 @@
if ($subscribed_handler->insert($subscription, true)) {
if($xoopsMailer->send() ){
$cart->setVar('notified', time());
- $cart->setVar('expires', time().$GLOBALS['vodModuleConfig']['purchase_expires']);
+ $cart->setVar('expires', time()+$GLOBALS['vodModuleConfig']['purchase_expires']);
$cart_handler->insert($cart);
}
}
Modified: XoopsModules/vod/trunk/htdocs/modules/vod/docs/changelog.txt
===================================================================
--- XoopsModules/vod/trunk/htdocs/modules/vod/docs/changelog.txt 2012-01-29 11:32:49 UTC (rev 8825)
+++ XoopsModules/vod/trunk/htdocs/modules/vod/docs/changelog.txt 2012-01-29 14:46:28 UTC (rev 8826)
@@ -1,4 +1,15 @@
==========================================
+ 2011/01/30 01:26:01 Version 1.17 BETA
+==========================================
+ - Added /tag/plugin/vod.php Tag Module Plugin code added (wishcraft)
+ - Added /xpayment/plugin/vod.php XPayment Module Plugin code added (wishcraft)
+ - Changed /class/cart.php restructing and debugged code added for cart & cart session (wishcraft)
+ - Changed /class/sessions.php restructing and debugged code added for cart & cart session (wishcraft)
+ - Changed /class/log.php restructing and debugged code added for videos class (wishcraft)
+ - Changed /index.php restructing and debugged code added for cart & cart session (wishcraft)
+ - Changed /xoops_version.php Support for New Variables, Constants & Templates; version updated of Application (wishcraft)
+
+==========================================
2011/01/27 5:48:01 Version 1.16 ALPHA
==========================================
- Added /cron/notify.php Notification Cron Added & Matrixstream code added (wishcraft)
Modified: XoopsModules/vod/trunk/htdocs/modules/vod/include/formobjects.vod.php
===================================================================
--- XoopsModules/vod/trunk/htdocs/modules/vod/include/formobjects.vod.php 2012-01-29 11:32:49 UTC (rev 8825)
+++ XoopsModules/vod/trunk/htdocs/modules/vod/include/formobjects.vod.php 2012-01-29 14:46:28 UTC (rev 8826)
@@ -4,8 +4,9 @@
$config_handler = xoops_gethandler('config');
if (!isset($GLOBALS['vodModule']))
$GLOBALS['vodModule'] = $module_handler->getByDirname('vod');
- if (!isset($GLOBALS['vodModuleConfig']))
- $GLOBALS['vodModuleConfig'] = $config_handler->getConfigList($GLOBALS['vodModule']->getVar('mid'));
+ if (is_object($GLOBALS['vodModule']))
+ if (!isset($GLOBALS['vodModuleConfig']))
+ $GLOBALS['vodModuleConfig'] = $config_handler->getConfigList($GLOBALS['vodModule']->getVar('mid'));
require_once($GLOBALS['xoops']->path('class/xoopsformloader.php'));
require_once($GLOBALS['xoops']->path('class/pagenav.php'));
Modified: XoopsModules/vod/trunk/htdocs/modules/vod/include/forms.vod.php
===================================================================
--- XoopsModules/vod/trunk/htdocs/modules/vod/include/forms.vod.php 2012-01-29 11:32:49 UTC (rev 8825)
+++ XoopsModules/vod/trunk/htdocs/modules/vod/include/forms.vod.php 2012-01-29 14:46:28 UTC (rev 8826)
@@ -400,7 +400,7 @@
$ele['parent'] = new VodFormSelectCategory(($as_array==false?_FRM_VOD_FORM_CATEGORY_PARENT:''), $id.'[parent]', $object->getVar('parent'), 1, false, $object->getVar('cid'));
$ele['parent']->setDescription(($as_array==false?_FRM_VOD_FORM_CATEGORY_PARENT_DESC:''));
- $ele['prefix'] = new XoopsFormText(($as_array==false?_FRM_VOD_FORM_CATEGORY_PREFIX:''), $id.'[catno]', ($as_array==false?16:8),32, $object->getVar('prefix'));
+ $ele['prefix'] = new XoopsFormText(($as_array==false?_FRM_VOD_FORM_CATEGORY_PREFIX:''), $id.'[prefix]', ($as_array==false?16:8),32, $object->getVar('prefix'));
$ele['prefix']->setDescription(($as_array==false?_FRM_VOD_FORM_CATEGORY_PREFIX_DESC:''));
$ele['name'] = new XoopsFormText(($as_array==false?_FRM_VOD_FORM_CATEGORY_NAME:''), $id.'[name]', ($as_array==false?55:21),128, $object->getVar('name'));
$ele['name']->setDescription(($as_array==false?_FRM_VOD_FORM_CATEGORY_NAME_DESC:''));
Modified: XoopsModules/vod/trunk/htdocs/modules/vod/index.php
===================================================================
--- XoopsModules/vod/trunk/htdocs/modules/vod/index.php 2012-01-29 11:32:49 UTC (rev 8825)
+++ XoopsModules/vod/trunk/htdocs/modules/vod/index.php 2012-01-29 14:46:28 UTC (rev 8826)
@@ -27,8 +27,13 @@
$sessions_handler =& xoops_getmodulehandler('sessions', 'vod');
$sessions = $sessions_handler->intialiseCart();
- if (is_array($_SESSION['vod']['cart'])&&$_SESSION['vod']['cart']!=false) {
- setcookie('cart', serialize($_SESSION['vod']['cart']), 3600*24*30);
+ if (isset($_SESSION['vod']['cart'])) {
+ if (is_array($_SESSION['vod']['cart'])&&$_SESSION['vod']['cart']!=false) {
+ setcookie('cart', serialize($_SESSION['vod']['cart']), 3600*24*30);
+ } else {
+ $cart = false;
+ setcookie('cart', '', 3600*24*30);
+ }
} else {
$cart = false;
setcookie('cart', '', 3600*24*30);
@@ -36,11 +41,13 @@
$xoopsOption['template_main'] = 'vod_index.html';
include($GLOBALS['xoops']->path('/header.php'));
- $GLOBALS['xoopsTpl']->assign('numincart', $_SESSION['vod']['cart']['videos']);
+ if (isset($_SESSION['vod']['cart']))
+ $GLOBALS['xoopsTpl']->assign('numincart', $_SESSION['vod']['cart']['videos']);
$GLOBALS['xoopsTpl']->assign('php_self', $_SERVER['PHP_SELF']);
$GLOBALS['xoopsTpl']->assign('back_url', $uri);
$GLOBALS['xoopsTpl']->assign('uri', urlencode($_SERVER['REQUEST_URI']));
$cathits=false;
+
if ($vid>0) {
$video = $videos_handler->get($vid);
$video->setVar('hits', $video->getVar('hits')+1);
@@ -53,6 +60,7 @@
}
$GLOBALS['xoopsTpl']->assign('video', $video->toArray($preview, 'main'));
}
+
if ($cid>0) {
$category = $category_handler->get($cid);
if ($cathits==false) {
@@ -61,6 +69,7 @@
}
$GLOBALS['xoopsTpl']->assign('category', $category->toArray());
}
+
$categories = array();
$criteria = new Criteria('parent', $cid);
$i = 0;
@@ -86,6 +95,7 @@
$categories[$cidb]['trend'] = false;
}
}
+
if ($i<>0)
$GLOBALS['xoopsTpl']->assign('trcolspan', ($GLOBALS['vodModuleConfig']['cat_per_row']-$ie));
$GLOBALS['xoopsTpl']->assign('categories', $categories);
@@ -99,7 +109,7 @@
break;
default:
case "list":
-
+
include_once $GLOBALS['xoops']->path( "/class/pagenav.php" );
$criteria = $videos_handler->getFilterCriteria($filter);
@@ -130,12 +140,14 @@
$videos = $videos_handler->getObjects($criteria, true);
foreach($videos as $vid => $video) {
if (is_object($video))
- $GLOBALS['xoopsTpl']->append('videos', $video->toArray($preview, 'list'));
+ $GLOBALS['xoopsTpl']->append('pageofvideos', $video->toArray($preview, 'list'));
}
+
if ($GLOBALS['vodModuleConfig']['force_jquery']&&!isset($GLOBALS['loaded_jquery'])) {
$GLOBALS['xoTheme']->addScript(XOOPS_URL._MI_VOD_JQUERY, array('type'=>'text/javascript'));
$GLOBALS['loaded_jquery']=true;
}
+
break;
}
case 'cart':
Modified: XoopsModules/vod/trunk/htdocs/modules/vod/language/english/forms.php
===================================================================
--- XoopsModules/vod/trunk/htdocs/modules/vod/language/english/forms.php 2012-01-29 11:32:49 UTC (rev 8825)
+++ XoopsModules/vod/trunk/htdocs/modules/vod/language/english/forms.php 2012-01-29 14:46:28 UTC (rev 8826)
@@ -1,5 +1,25 @@
<?php
+ // Currency Form
+ define('_FRM_VOD_FORM_CURRENCY_NAME', 'Currency Name');
+ define('_FRM_VOD_FORM_DESC_CURRENCY_NAME', '');
+ define('_FRM_VOD_FORM_CURRENCY_ALIAS', 'Currency Alias');
+ define('_FRM_VOD_FORM_DESC_CURRENCY_ALIAS', '');
+ define('_FRM_VOD_FORM_CURRENCY_CODE', 'Currency ISO Code');
+ define('_FRM_VOD_FORM_DESC_CURRENCY_CODE', '3 Characters');
+ define('_FRM_VOD_FORM_CURRENCY_LEFT', 'Currency Symbol on Left');
+ define('_FRM_VOD_FORM_DESC_CURRENCY_LEFT', '');
+ define('_FRM_VOD_FORM_CURRENCY_RIGHT', 'Currency Symbol on Right');
+ define('_FRM_VOD_FORM_DESC_CURRENCY_RIGHT', '');
+ define('_FRM_VOD_FORM_CURRENCY_DECIMALS', 'Currency Decimal Places');
+ define('_FRM_VOD_FORM_DESC_CURRENCY_DECIMALS', '');
+ define('_FRM_VOD_FORM_CURRENCY_RATE', 'Currency Exchange Rate');
+ define('_FRM_VOD_FORM_DESC_CURRENCY_RATE', 'Based on Default Currency');
+ define('_FRM_VOD_FORM_CURRENCY_DEFAULT', 'Default Currency');
+ define('_FRM_VOD_FORM_DESC_CURRENCY_DEFAULT', '');
+ define('_FRM_VOD_EDIT_CURRENCY', 'Edit this currency - %s');
+ define('_FRM_VOD_NEW_CURRENCY', 'New currency');
+
define('_FRM_VOD_FORM_ISNEW_VOD', 'New Videos');
define('_FRM_VOD_FORM_EDIT_VOD', 'Edit Existing Videos');
define('_FRM_VOD_FORM_VOD_NAME', 'Name of Video');
Modified: XoopsModules/vod/trunk/htdocs/modules/vod/language/english/modinfo.php
===================================================================
--- XoopsModules/vod/trunk/htdocs/modules/vod/language/english/modinfo.php 2012-01-29 11:32:49 UTC (rev 8825)
+++ XoopsModules/vod/trunk/htdocs/modules/vod/language/english/modinfo.php 2012-01-29 14:46:28 UTC (rev 8826)
@@ -112,16 +112,16 @@
define('_MI_VOD_HTML5_VIDEOS_DESC', 'This is the HTML5 videos selected when a useragent is specified');
define('_MI_VOD_OTHER_VIDEOS', 'Other Videos');
define('_MI_VOD_OTHER_VIDEOS_DESC', 'This is the Other videos selected when a useragent is specified');
- define('_MI_VOD_LOAD_VOD', 'Load Vod in these videos sessions');
+ define('_MI_VOD_LOAD_VOD', 'Load Flowplayer in these videos sessions');
define('_MI_VOD_LOAD_VOD_DESC', 'This is the intances that load vod (Do not change unless you know what you are doing)');
define('_MI_VOD_LOAD_VIDEOJS', 'Load Video-js in these videos sessions');
define('_MI_VOD_LOAD_VIDEOJS_DESC', 'This is the intances that load HTML5 Video-js (Do not change unless you know what you are doing)');
//Enumerators
- define('_MI_VOD_FLASH', 'Flash Videos (Vod)');
+ define('_MI_VOD_FLASH', 'Flash Videos (Flowplayer)');
define('_MI_VOD_HTML5', 'HTML5 Videos (Video-js)');
define('_MI_VOD_IOS', 'Apple OS Videos (Video-js)');
- define('_MI_VOD_RTMP', 'RTMP Stream Videos (Vod)');
+ define('_MI_VOD_RTMP', 'RTMP Stream Videos (Flowplayer)');
define('_MI_VOD_RTSP', 'RTSP Stream Videos (Video-js)');
define('_MI_VOD_OTHER', 'Other Videos');
define('_MI_VOD_SILVERLIGHT', 'Silverlight Videos');
Modified: XoopsModules/vod/trunk/htdocs/modules/vod/sql/mysql.sql
===================================================================
--- XoopsModules/vod/trunk/htdocs/modules/vod/sql/mysql.sql 2012-01-29 11:32:49 UTC (rev 8825)
+++ XoopsModules/vod/trunk/htdocs/modules/vod/sql/mysql.sql 2012-01-29 14:46:28 UTC (rev 8826)
@@ -198,7 +198,7 @@
CREATE TABLE `vod_log` (
`log_id` bigint(25) unsigned NOT NULL AUTO_INCREMENT,
- `class` enum('cart','sessions','currency','category','mimetypes','video','external','unknown') DEFAULT 'unknown',
+ `class` enum('cart','sessions','currency','category','mimetypes','videos','external','unknown') DEFAULT 'unknown',
`file` varchar(64) DEFAULT NULL,
`path` varchar(128) DEFAULT NULL,
`line` int(15) unsigned DEFAULT '0',
Modified: XoopsModules/vod/trunk/htdocs/modules/vod/templates/vod_index_videos_list.html
===================================================================
--- XoopsModules/vod/trunk/htdocs/modules/vod/templates/vod_index_videos_list.html 2012-01-29 11:32:49 UTC (rev 8825)
+++ XoopsModules/vod/trunk/htdocs/modules/vod/templates/vod_index_videos_list.html 2012-01-29 14:46:28 UTC (rev 8826)
@@ -52,7 +52,7 @@
<th> </th>
<th> </th>
</tr>
- <{foreach item=item from=$videos}>
+ <{foreach item=item from=$pageofvideos}>
<tr class="<{cycle values="even,odd"}>">
<td rowspan='2' align='center'><{if $item.hasavata}><img src='<{$item.avata_url}>' width='95px'><{else}> <{/if}></td>
<td><{$item.cid}></td>
Modified: XoopsModules/vod/trunk/htdocs/modules/vod/xoops_version.php
===================================================================
--- XoopsModules/vod/trunk/htdocs/modules/vod/xoops_version.php 2012-01-29 11:32:49 UTC (rev 8825)
+++ XoopsModules/vod/trunk/htdocs/modules/vod/xoops_version.php 2012-01-29 14:46:28 UTC (rev 8826)
@@ -92,11 +92,11 @@
// Tables created by sql file (without prefix!)
$i=0;
$modversion['tables'][$i++] = "vod_cart";
+$modversion['tables'][$i++] = "vod_cart_sessions";
$modversion['tables'][$i++] = "vod_category";
$modversion['tables'][$i++] = "vod_currency";
$modversion['tables'][$i++] = "vod_log";
$modversion['tables'][$i++] = "vod_mimetypes";
-$modversion['tables'][$i++] = "vod_sessions";
$modversion['tables'][$i++] = "vod_videos";
// Blocks
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|