Commit f0cc3908 authored by nagendra016's avatar nagendra016

added copyright info,error handlers,admin page,prefrences, menu

parent 66109d1c
......@@ -3741,6 +3741,7 @@ templates/tiki-admin-include-general.tpl -text
templates/tiki-admin-include-gmap.tpl -text
templates/tiki-admin-include-i18n.tpl -text
templates/tiki-admin-include-intertiki.tpl -text
templates/tiki-admin-include-kaltura.tpl -text
templates/tiki-admin-include-list-sections.tpl -text
templates/tiki-admin-include-login.tpl -text
templates/tiki-admin-include-look.tpl -text
......@@ -4168,6 +4169,7 @@ tests/testfile.txt -text
/tiki-admin_include_gmap.php -text
/tiki-admin_include_i18n.php -text
/tiki-admin_include_intertiki.php -text
/tiki-admin_include_kaltura.php -text
/tiki-admin_include_login.php -text
/tiki-admin_include_look.php -text
/tiki-admin_include_maps.php -text
......
......@@ -43,7 +43,7 @@
{/if}
{if $prefs.feature_kaltura eq 'y'}
{self_link page="Kaltura" _class="icon"}{icon _id="pics/large/kaltura48x48.png" alt="{tr}Kaltura{/tr}" class="reflect" style="vertical-align: middle" width="32" height="32"}{/self_link}
{self_link page="kaltura" _class="icon"}{icon _id="pics/large/kaltura48x48.png" alt="{tr}Kaltura{/tr}" class="reflect" style="vertical-align: middle" width="32" height="32"}{/self_link}
{* TODO resize icon *}
{/if}
......
<form action="tiki-admin.php?page=kaltura" method="post">
<br/>
<fieldset class="admin">
<legend>{tr}Kaltura Parnter Settings{/tr}</legend>
<div class="adminoptionlabel">
<label for="partnerId">{tr}Partner Id{/tr}: </label><input type="text" name="partnerId" id="partnerId" value="{$partnerId|escape}" /></div>
<div class="adminoptionlabel">
<label for="secret">{tr}Secret{/tr}: </label><input type="text" name="secret" id="secret" value="{$secret|escape}" /></div>
<div class="adminoptionlabel">
<label for="adminSecret">{tr}Admin Secret{/tr}: </label><input type="text" name="adminSecret" id="adminSecret" value="{$adminSecret|escape}" /></div>
</fieldset>
<br/>
<fieldset class="admin">
<legend>{tr}Kaltura Dynacmic Player{/tr}</legend>
<div class="adminoptionlabel">
<label for="kdpUIConf">{tr}KDP UI Configuration Id{/tr}: </label><input type="text" name="kdpUIConf" id="kdpUIConf" value="{$kdpUIConf|escape}" /></div>
<div class="adminoptionlabel">
<label for="kdpWidget">{tr}KDP Widget Id{/tr}: </label><input type="text" name="kdpWidget" id="kdpWidget" value="{$kdpWidget|escape}" /></div>
</fieldset>
<br/>
<fieldset class="admin">
<legend>{tr}Kaltura Contribution Wizard{/tr}</legend>
<div class="adminoptionlabel">
<label for="kcwUIConf">{tr}KCW UI Configuration Id{/tr}: </label><input type="text" name="kcwUIConf" id="kcwUIConf" value="{$kcwUIConf|escape}" /></div>
</fieldset>
<br/>
<fieldset class="admin">
<legend>{tr}Kaltura Remix Editors{/tr}</legend>
<div class="adminoptionlabel">
<label for="kseUIConf">{tr}Kaltura Simple Editor UI Configuration Id{/tr}: </label><input type="text" name="kseUIConf" id="kseUIConf" value="{$kseUIConf|escape}" /></div>
<div class="adminoptionlabel">
<label for="kaeUIConf">{tr}Kaltura Advance Editor UI Configuration Id{/tr}: </label><input type="text" name="kaeUIConf" id="kaeUIConf" value="{$kaeUIConf|escape}" /></div>
</fieldset>
<br/>
<div align="center" style="padding:1em;"><input type="submit" name="kaltura" value="{tr}Save{/tr}" /></div>
</form>
......@@ -43,7 +43,7 @@ Add a value in first check when you create a new admin page. *}
"gal", "fgal", "cms", "polls", "search", "blogs", "forums", "faqs",
"trackers", "webmail", "rss", "directory", "userfiles", "maps",
"metatags", "wikiatt","score", "community", "messages",
"calendar","intertiki","freetags","gmap",
"calendar","intertiki","kaltura","freetags","gmap",
"i18n","wysiwyg","copyright","category", "module", "look", "textarea",
"multimedia", "ads", "profiles", "semantic", "plugins", "webservices",
'sefurl', 'workspaces'))}
......
......@@ -35,12 +35,11 @@
<table width="100%">
<tr>
<td width="50%">
<object name="kaltura_player" id="kaltura_player" type="application/x-shockwave-flash" allowScriptAccess="always" allowNetworking="all" allowFullScreen="true" height="365" width="400" data="http://www.kaltura.com/index.php/kwidget/wid/_23929/uiconf_id/48411/entry_id/{$videoInfo.id}">
<object name="kaltura_player" id="kaltura_player" type="application/x-shockwave-flash" height="365" width="400" data="http://www.kaltura.com/index.php/kwidget/wid/{$prefs.kdpWidget}/uiconf_id/{$prefs.kdpUIConf}/entry_id/{$videoInfo.id}">
<param name="allowScriptAccess" value="always" />
<param name="allowNetworking" value="all" />
<param name="allowFullScreen" value="true" />
<param name="bgcolor" value="#000000" />
<param name="movie" value="http://www.kaltura.com/index.php/kwidget/wid/_23929/uiconf_id/48411/entry_id/{$videoInfo.id}"/>
<param name="movie" value="http://www.kaltura.com/index.php/kwidget/wid/{$prefs.kdpWidget}/uiconf_id/{$prefs.kdpUIConf}/entry_id/{$videoInfo.id}"/>
<param name="flashVars" value="entry_id={$videoInfo.id}"/>
<param name="wmode" value="opaque"/>
</object>
......@@ -140,16 +139,16 @@
{/capture}
{capture name=upload_video assign=kcw}
<object id="kaltura_contribution_wizard" type="application/x-shockwave-flash" allowScriptAccess="always" allowNetworking="all" height="360" width="680" data="http://www.kaltura.com/kcw/ui_conf_id/36200">
<object id="kaltura_contribution_wizard" type="application/x-shockwave-flash" allowScriptAccess="always" allowNetworking="all" height="360" width="680" data="http://www.kaltura.com/kcw/ui_conf_id/{$prefs.kcwUIConf}">
<param name="allowScriptAccess" value="always" />
<param name="allowNetworking" value="all" />
<param name="movie" value="http://www.kaltura.com/kcw/ui_conf_id/36200"/>
<param name="movie" value="http://www.kaltura.com/kcw/ui_conf_id/{$prefs.kcwUIConf}"/>
<param name="flashVars" value="{$cwflashVars}" />
</object>
{/capture}
{capture name=remix_video assign=edit_remix}
<object name="kaltura_player" id="kaltura_player" type="application/x-shockwave-flash" data="http://www.kaltura.com/{if $editor eq 'kae'}kae/ui_conf_id/1000865" height="672" width="825" {else}kse/ui_conf_id/36300" height="546" width="890"{/if}>
<object name="kaltura_player" id="kaltura_player" type="application/x-shockwave-flash" data="http://www.kaltura.com/{if $editor eq 'kae'}kae/ui_conf_id/{$prefs.kaeUIConf}" height="672" width="825" {else}kse/ui_conf_id/{$prefs.kseUIConf}" height="546" width="890"{/if}>
<param name="allowScriptAccess" value="always" />
<param name="allowNetworking" value="all" />
<param name="allowFullScreen" value="true" />
......
<?php
// (c) Copyright 2002-2009 by authors of the Tiki Wiki/CMS/Groupware Project
//
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
//this script may only be included - so its better to die if called directly.
if (strpos($_SERVER["SCRIPT_NAME"], basename(__FILE__)) !== false) {
header("location: index.php");
exit;
}
if (!isset($_REQUEST['partnerId'])) $_REQUEST['partnerId'] = $prefs['partnerId'];
if (!isset($_REQUEST['secret'])) $_REQUEST['secret'] = $prefs['secret'];
if (!isset($_REQUEST['adminSecret'])) $_REQUEST['adminSecret'] = $prefs['adminSecret'];
if (!isset($_REQUEST['kdpUIConf'])) $_REQUEST['kdpUIConf'] = $prefs['kdpUIConf'];
if (!isset($_REQUEST['kdpWidget'])) $_REQUEST['kdpWidget'] = $prefs['kdpWidget'];
if (!isset($_REQUEST['kcwUIConf'])) $_REQUEST['kcwUIConf'] = $prefs['kcwUIConf'];
if (!isset($_REQUEST['kseUIConf'])) $_REQUEST['kseUIConf'] = $prefs['kseUIConf'];
if (!isset($_REQUEST['kaeUIConf'])) $_REQUEST['kaeUIConf'] = $prefs['kaeUIConf'];
$tikilib->set_preference("partnerId", $_REQUEST['partnerId']);
$tikilib->set_preference("secret", $_REQUEST['secret']);
$tikilib->set_preference("adminSecret", $_REQUEST['adminSecret']);
$tikilib->set_preference("kdpUIConf", $_REQUEST['kdpUIConf']);
$tikilib->set_preference("kdpWidget", $_REQUEST['kdpWidget']);
$tikilib->set_preference("kcwUIConf", $_REQUEST['kcwUIConf']);
$tikilib->set_preference("kseUIConf", $_REQUEST['kseUIConf']);
$tikilib->set_preference("kaeUIConf", $_REQUEST['kaeUIConf']);
$smarty->assign('partnerId', $_REQUEST['partnerId']);
$smarty->assign('secret', $_REQUEST['secret']);
$smarty->assign('adminSecret', $_REQUEST['adminSecret']);
$smarty->assign('kdpUIConf', $_REQUEST['kdpUIConf']);
$smarty->assign('kdpWidget', $_REQUEST['kdpWidget']);
$smarty->assign('kcwUIConf', $_REQUEST['kcwUIConf']);
$smarty->assign('kseUIConf', $_REQUEST['kseUIConf']);
$smarty->assign('kaeUIConf', $_REQUEST['kaeUIConf']);
<?php
// (c) Copyright 2002-2009 by authors of the Tiki Wiki/CMS/Groupware Project
//
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
require_once ('tiki-setup.php');
ob_start();
if ($prefs['feature_kaltura'] != 'y') {
......@@ -22,13 +25,26 @@ $kaltura_conf = kaltura_init_config();
$kaltura_client = new KalturaClient($kaltura_conf);
$kres = $kaltura_client->startSession($kuser, $kaltura_conf->secret,'',"edit:*",'');
$kaltura_client->setKS($kres['result']['ks']);
if(!isset($kres["result"]["ks"])) {
$smarty->assign('msg', tra("Could not establish Kaltura session. Try again"));
$smarty->display('error.tpl');
die;
}
if (isset($_REQUEST["kcw"])) {
$entries = $_REQUEST["entryId"];
for($i=0; $i < count($entries); $i++) {
$kres= $client->getEntry ( $kuser,$entries[$i],1);
$kres= $kaltura_client->getEntry ( $kuser,$entries[$i],1);
if(!isset($kres['result']['entry'])){
$smarty->assign('msg', tra("Could not get newly added media information"));
$smarty->display('error.tpl');
die;
}
$videoEntries[$i] = $kres['result']['entry'];
}
$smarty->assign('mode','new_entries');
......@@ -42,7 +58,12 @@ if (isset($_REQUEST["update"])){
$entry->name= $_REQUEST['name'];
$entry->description = $_REQUEST['description'];
$entry->tags = $_REQUEST['tags'];
$kres= $kaltura_client->updateEntry($kuser,$_REQUEST['videoId'],$entry);
$kres= $kaltura_client->updateEntry($kuser,$_REQUEST['videoId'],$entry);
if(!isset($kres['result']['entry'])){
$smarty->assign('msg', tra("Failed to update information. Try again"));
$smarty->display('error.tpl');
die;
}
header ('Location: tiki-list_kaltura_entries.php');
die;
}else{
......@@ -89,16 +110,31 @@ if(!empty($_REQUEST['videoId']) && isset($_REQUEST['action'])){
if($mediaType == 6 ){
$roughcutId =$videoId[0];
if($mode == 'dupl') {
$kres = $kaltura_client->startAdminSession($kuser, $kaltura_conf->adminSecret,'1',"edit:*",3600);
$kres = $kaltura_client->startAdminSession($kuser, $kaltura_conf->adminSecret,'1',"edit:*",'');
if(!isset($kres["result"]["ks"])) {
$smarty->assign('msg', tra("Could not establish Kaltura session. Try again"));
$smarty->display('error.tpl');
die;
}
$kaltura_client->setKs($kres['result']['ks']);
$kres = $kaltura_client->cloneRoughcut($kuser,$videoId[0]);
$roughtcutId = $kres['result']['id'];
if(!isset($kres["result"]["entry"]["id"])) {
$smarty->assign('msg', tra("Failed to duplicate the remix. Try again"));
$smarty->display('error.tpl');
die;
}
$roughtcutId = $kres['result']['result']['id'];
}
$seflashVars = $seflashVars.
'&kshow_id=entry-' . $roughcutId.
'&entry_id='. $roughcutId;
}else{
$kres = $kaltura_client->addRoughcutEntry($kuser,-2);
if(!isset($kres["result"]["entry"]["id"])) {
$smarty->assign('msg', tra("Failed to start the remix. Try again"));
$smarty->display('error.tpl');
die;
}
$roughcutId = $kres['result']['entry']['id'];
$kres = $kaltura_client->appendEntryToRoughcut($kuser,$videoId[0],'entry-'.$roughcutId,$roughcutId);
$seflashVars = $seflashVars.
......@@ -107,6 +143,11 @@ if(!empty($_REQUEST['videoId']) && isset($_REQUEST['action'])){
}
}else{
$kres = $kaltura_client->addRoughcutEntry($kuser,-2);
if(!isset($kres["result"]["id"])) {
$smarty->assign('msg', tra("Failed to start the remix. Try again"));
$smarty->display('error.tpl');
die;
}
$roughcutId = $kres['result']['entry']['id'];
for ($i=0; $i < count($videoId); $i++){
$kres = $kaltura_client->appendEntryToRoughcut($kuser,$videoId[$i],'entry-'.$roughcutId,$roughcutId);
......@@ -129,6 +170,11 @@ if(!empty($_REQUEST['videoId']) && isset($_REQUEST['action'])){
die;
} else {
$kres= $kaltura_client->getEntry($kuser,$videoId[0],1);
if(empty($kres["result"]["entry"])) {
$smarty->assign('msg', tra("Could not get media information"));
$smarty->display('error.tpl');
die;
}
$videoInfo = $kres['result']['entry'];
if (!$videoInfo) {
$smarty->assign('msg', tra("Incorrect param"));
......@@ -150,9 +196,12 @@ if(!empty($_REQUEST['videoId']) && isset($_REQUEST['action'])){
if ($prefs['feature_ticketlib2'] != 'y' or (isset($_POST['daconfirm']) and isset($_SESSION["ticket_$area"]))) {
key_check($area);
for($i=0; $i < count($videoId); $i++) {
$res= $kaltura_client->deleteEntry($kuser,$videoId[$i]);
$kres = $kaltura_client->startAdminSession($kuser, $kaltura_conf->adminSecret,1,"edit:*",null);
$kaltura_client->setKS($kres['result']['ks']);
$kres= $kaltura_client->deleteEntry($kuser,$videoId[$i]);
}
} else {
} else {
key_get($area);
}
......@@ -169,11 +218,8 @@ if(!empty($_REQUEST['videoId']) && isset($_REQUEST['action'])){
die;
} else {
$kres = $kaltura_client->addDownload($kuser,$videoId[0],'flv');
print_r($kres);
$kres = $kaltura_client->getEntry($kuser,$videoId[0],1);
print_r($kres);
//header ('Location: tiki-list_kaltura_entries.php');
//die;
header ('Location: tiki-list_kaltura_entries.php');
die;
}
break;
case 'default':
......
<?php
// (c) Copyright 2002-2009 by authors of the Tiki Wiki/CMS/Groupware Project
//
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
require_once ('tiki-setup.php');
if ($prefs['feature_kaltura'] != 'y') {
......@@ -25,6 +29,12 @@ $kaltura_client = new KalturaClient($kaltura_conf);
$kres =$kaltura_client->startSession($kuser, $kaltura_conf->secret,false,"");
$kaltura_client->setKS($kres["result"]["ks"]);
if(!isset($kres["result"]["ks"])) {
$smarty->assign('msg', tra("Could not establish Kaltura session. Try again"));
$smarty->display('error.tpl');
die;
}
$filter = new KalturaEntryFilter();
$sort_mode = '';
if($_REQUEST['sort_mode']){
......@@ -61,6 +71,12 @@ if($_REQUEST['offset']){
$res = $kaltura_client->listMyEntries($kuser,$filter,true,$page_size,$page,null);
if(!isset($res['result']['entries'])){
$smarty->assign('msg', tra("Could not get required results. Try again"));
$smarty->display('error.tpl');
die;
}
$entries['cant'] = $res['result']['count'];
//echo $entries['cant'];
......@@ -71,7 +87,6 @@ $smarty->assign_by_ref('cant',$entries['cant']);
$smarty->assign_by_ref('offset',$offset);
$smarty->assign_by_ref('maxRecords',$res['result']['page_size']);
//print_r($res);
// Display the template
$smarty->assign('mid', 'tiki-list_kaltura_entries.tpl');
$smarty->display("tiki.tpl");
\ No newline at end of file
$smarty->display("tiki.tpl");
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment