Fixed : my account stats

Added : Category in view channel
Added : New phrases
Added : Conversion lab
Added : Repair Videos Duration
This commit is contained in:
Arslan Hassan 2011-02-10 11:15:01 +00:00
parent 7a7dbcab66
commit 08703213f6
6 changed files with 111 additions and 13 deletions

View file

@ -57,7 +57,8 @@ var labRUrl = '{$smarty.const.ADMIN_BASEURL}/lab_resources';
</style>
{/literal}
<h2>Conversion lab - BETA</h2><img src="{$imageurl}/botal.png"><br />
<h2>Conversion lab - <strong>&alpha;</strong>lpha</h2>
<img src="{$imageurl}/botal.png"><br />
<div style="margin:10px 0px">
Conversion environment for clipbucket users so they can test why their videos are not converting.
This test is in early beta stages, we are hopeful to get best outcome results.</div>

View file

@ -291,6 +291,8 @@ class ClipBucket
'Server Modules Info' => 'cb_mod_check.php',
'Conversion Queue Manager' => 'cb_conversion_queue.php',
'ReIndexer' => 'reindex_cb.php',
'Conversion Lab &alpha;' => 'conversion_lab.php',
'Repair video duration' => 'repair_vid_duration.php',
//'View Encoding Status'=>'',
),

View file

@ -535,9 +535,27 @@ class CBvideo extends CBCategory
//uid
if($params['user'])
{
if($cond!='')
$cond .= ' AND ';
$cond .= " ".tbl("video.userid")."='".$params['user']."'";
if(!is_array($params['user']))
{
if($cond!='')
$cond .= ' AND ';
$cond .= " ".tbl("video.userid")."='".$params['user']."'";
}else
{
if($cond!='')
$cond .= ' AND (';
$uQu = 0;
foreach($params['user'] as $user)
{
if($uQu>0)
$cond .= ' OR ';
$cond .= " ".tbl("video.userid")."='".$user."'";
$uQu++;
}
$cond .=" ) ";
}
}
@ -634,18 +652,87 @@ class CBvideo extends CBCategory
//VIDEO KEY
if($params['videokey'])
{
if($cond!='')
$cond .= ' AND ';
$cond .= " ".tbl("video.videokey")." = '".$params['videokey']."' ";
if(!is_array($params['videokey']))
{
if($cond!='')
$cond .= ' AND ';
$cond .= " ".tbl("video.videokey")." = '".$params['videokey']."' ";
}else
{
if($cond!='')
$cond .= ' AND (';
$vkeyQue = 0;
foreach($params['videokey'] as $videokey)
{
if($vkeyQue>0)
$cond .= ' OR ';
$cond .= " ".tbl("video.videokey")." = '".$videokey."' ";
$vkeyQue++;
}
$cond .=" ) ";
}
}
//Exclude Vids
if($params['exclude'])
{
if(!is_array($params['exclude']))
{
if($cond!='')
$cond .= ' AND ';
$cond .= " ".tbl('video.videoid')." <> '".$params['exclude']."' ";
}else
{
foreach($params['exclude'] as $exclude)
{
if($cond!='')
$cond .= ' AND ';
$cond .= " ".tbl('video.videoid')." <> '".$exclude."' ";
}
}
}
//Duration
if($params['duration'])
{
$duration_op = $params['duration_op'];
if(!$duration_op) $duration_op = "=";
if($cond!='')
$cond .= ' AND ';
$cond .= " ".tbl('video.videoid')." <> '".$params['exclude']."' ";
$cond .= " ".tbl('video.duration')." ".$duration_op." '".$params['duration']."' ";
}
//Filename
if($params['filename'])
{
if(!is_array($params['filename']))
{
if($cond!='')
$cond .= ' AND ';
$cond .= " ".tbl('video.file_name')." <> '".$params['filename']."' ";
}else
{
if($cond!='')
$cond .= ' AND (';
$fileNameQue = 0;
foreach($params['filename'] as $filename)
{
if($fileNameQue>0)
$cond .= ' OR ';
$cond .= " ".tbl("video.file_name")." = '".$filename."' ";
$fileNameQue++;
}
$cond .=" ) ";
}
}
if($params['cond'])

File diff suppressed because one or more lines are too long

View file

@ -6,13 +6,19 @@
<span class="account_stat">{lang code='username'} : <strong>{$user.username}</strong></span>
<span class="account_stat">{lang code='joined'} : <strong>{$user.doj|date_format}</strong></span>
<span class="account_stat">{lang code='last_logged_in'} : <strong>{$user.last_logged|nicetime}</strong></span>
<span class="account_stat">{lang code='last_active'} : <strong>{$user.last_active|nicetime}</strong></span>
<span class="account_stat">{lang code='total_logins'} : <strong>{$user.num_visits|number_format}</strong></span>
<span class="account_stat">{lang code='profile_views'}: <strong>{$user.profile_hits|number_format}</strong></span>
<span class="account_stat">{lang code='total_videos'}: <strong>{$user.total_videos|number_format}</strong></span>
<span class="account_stat">{lang code='total_videos_watched'} <strong>{$user.total_watched|number_format}</strong></span>
<span class="account_stat">{lang code='total_videos_watched'}: <strong>{$user.total_watched|number_format}</strong></span>
<span class="account_stat">{lang code='total_collections'}: <strong>{$user.total_collections|number_format}</strong></span>
<span class="account_stat">{lang code='total_photos'}: <strong>{$user.total_photos|number_format}</strong></span>
<span class="account_stat">{lang code='comments_made'}: <strong>{$user.total_comments|number_format}</strong></span>
<span class="account_stat">{lang code='subscribers'} : <strong>{$user.subscribers|number_format}</strong></span>
<span class="account_stat">country: <strong>{$user.country|country}</strong></span>
{assign var=category value=$userquery->get_category($user.category)}
<span class="account_stat">{lang code='category'}: <strong>{$category.category_name}</strong></span>
</div>
<div class="account_head_right">
<div class="pm_box">

View file

@ -1,6 +1,8 @@
<div class="clearfix channelBox">
<div class="viewChannelProfileThumb_outline"><div class="channelHeading" style="margin:0 0 5px 0;"><a href="{$userquery->profile_link($u)}">{$u.username}</a></div><div class="viewChannelProfileThumb" align="center"><a href="{$userquery->profile_link($u)}">
<div class="viewChannelProfileThumb_outline"><div class="channelHeading" style="margin:0 0 5px 0;"><a href="{$userquery->profile_link($u)}">
{assign var=category value=$userquery->get_category($u.category)}
{$u.username}</a> ({$category.category_name})</div><div class="viewChannelProfileThumb" align="center"><a href="{$userquery->profile_link($u)}">
<img src="{avatar details=$u}" style="border:1px solid #ccc; padding:1px; margin-right:5px;" /></a></div></div>
{assign var=isSubscribed value=$userquery->is_subscribed($u.userid)}