390 lines
12 KiB
HTML
390 lines
12 KiB
HTML
![]() |
{$myAccountLinks = $userquery->my_account_links()}
|
||
|
{$leftMenuLinks = array_slice($myAccountLinks, 7)}
|
||
|
{lang code='channel' assign='object_type'}
|
||
|
<div class="clearfix custom-container">
|
||
|
{include file="$style_dir/blocks/view_channel/channel_header.html"}
|
||
|
</div>
|
||
|
|
||
|
|
||
|
<div id="main" class="clearfix">
|
||
|
<div class="cb-tabs channel-tabs custom-container clearfix">
|
||
|
<div class="tune-tabs clearfix">
|
||
|
<ul class="nav nav-tabs">
|
||
|
<li class="active">
|
||
|
<a href="#default-tab" data-toggle="tab">Home</a>
|
||
|
</li>
|
||
|
{if isSectionEnabled('videos') && $u_control.show_my_videos == 'yes'}
|
||
|
<li>
|
||
|
<a href="#user-videos" data-toggle="tab">{lang code='videos'}</a>
|
||
|
</li>
|
||
|
{/if}
|
||
|
|
||
|
<li>
|
||
|
<a href="#user-playlist" data-toggle="tab">{lang code='Playlists'}</a>
|
||
|
</li>
|
||
|
|
||
|
<li>
|
||
|
<a href="#usersub-channels" data-toggle="tab">{lang code='Channels'}</a>
|
||
|
</li>
|
||
|
|
||
|
<li>
|
||
|
<a href="#about_info" data-toggle="tab">{lang code='About'}</a>
|
||
|
</li>
|
||
|
</ul>
|
||
|
|
||
|
{if $user.userid != userid()}
|
||
|
<div class="btn-channel-actions">
|
||
|
<a href="private_message.php?mode=new_msg&to={$user.username}" class="btn btn-sm"><i class="fa fa-envelope-o"></i>
|
||
|
</a>
|
||
|
</div>
|
||
|
{/if}
|
||
|
</div>
|
||
|
|
||
|
<div class="clearfix row ch-body">
|
||
|
<div class="col-md-8 col-sm-8 col-xs-12 clearfix">
|
||
|
<div class="tab-content clearfix">
|
||
|
<div class="tab-pane clearfix active" id="default-tab">
|
||
|
<div class="clearfix player-area">
|
||
|
{if $firstVideo.title}
|
||
|
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-12">
|
||
|
<div id="cb_player" class="clearfix">
|
||
|
{FlashPlayer vdetails=$firstVideo width='100%' height='355'}
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 ch-vid-details">
|
||
|
<h2>{$firstVideo.title}</h2>
|
||
|
<span>{$firstVideo.username}</span>
|
||
|
<div class="clearfix views-date">
|
||
|
<span><i class="fa fa-eye"></i> {$firstVideo.views|number_format}</span>
|
||
|
<span><i class="fa fa-clock-o"></i> {$firstVideo.datecreated|niceTime}</span>
|
||
|
</div>
|
||
|
</div>
|
||
|
{/if}
|
||
|
</div>
|
||
|
<section class="clearfix">
|
||
|
{*pr($user, true)*}
|
||
|
<h1>{$user.username}'s videos</h1>
|
||
|
<div class="clearfix ch-user-vids">
|
||
|
{$uservideos=get_videos(["user"=>$user.userid,"limit"=>6])}
|
||
|
{if $uservideos}
|
||
|
{foreach $uservideos as $video}
|
||
|
<div class="video-block col-lg-4 col-md-4 col-sm-6 col-xs-12">
|
||
|
{include file="$style_dir/blocks/videos/video.html" display_type='homeVideos'}
|
||
|
</div>
|
||
|
{/foreach}
|
||
|
{else}
|
||
|
<div class="well well-info">No videos from this user !</div>
|
||
|
{/if}
|
||
|
</div>
|
||
|
</section>
|
||
|
</div>
|
||
|
<div class="tab-pane" id="user-videos">
|
||
|
<section class="clearfix">
|
||
|
<h1>{$user.username}'s videos</h1>
|
||
|
<div class="clearfix ch-user-vids">
|
||
|
{$uservideos=get_videos(["user"=>$user.userid])}
|
||
|
{if $uservideos}
|
||
|
{foreach $uservideos as $video}
|
||
|
<div class="video-block col-lg-4 col-md-4 col-sm-6 col-xs-12">
|
||
|
{include file="$style_dir/blocks/videos/video.html" display_type='homeVideos'}
|
||
|
</div>
|
||
|
{/foreach}
|
||
|
{else}
|
||
|
<div class="well well-info">No Videos Found !</div>
|
||
|
{/if}
|
||
|
</div>
|
||
|
</section>
|
||
|
</div>
|
||
|
|
||
|
<div class="tab-pane" id="user-playlist">
|
||
|
<section class="clearfix ch-playlists">
|
||
|
<h1>{$user.username}'s Playlists</h1>
|
||
|
<div class="clearfix row">
|
||
|
{*$u.userid*}
|
||
|
{$playlists = $cbvid->action->get_playlists(["user"=>$u.userid,"order"=>"date_added DESC","limit"=>""])}
|
||
|
|
||
|
{if $playlists}
|
||
|
{*pr($playlists,true)*}
|
||
|
|
||
|
{foreach $playlists as $playlist}
|
||
|
<div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
|
||
|
{include file="$style_dir/blocks/playlist/playlist-block.html"}
|
||
|
</div>
|
||
|
{/foreach}
|
||
|
|
||
|
{else}
|
||
|
<div class="well well-info">no playlist found</div>
|
||
|
{/if}
|
||
|
</div>
|
||
|
</section>
|
||
|
</div>
|
||
|
|
||
|
<div class="tab-pane" id="usersub-channels">
|
||
|
<section class="clearfix channels">
|
||
|
<h1>{$user.username}'s Subscriptions</h1>
|
||
|
<div class="clearfix row">
|
||
|
|
||
|
{assign var="user_subscribers" value=get_user_subscibers($user.userid)}
|
||
|
{if $user_subscribers}
|
||
|
|
||
|
{foreach from=$user_subscribers item=subscriber}
|
||
|
<div class="item_channel col-lg-4 col-md-4 col-sm-4 col-xs-12">
|
||
|
{include file="$style_dir/blocks/channels.html" block_type = 'subscribedby_channel'}
|
||
|
</div>
|
||
|
{/foreach}
|
||
|
|
||
|
|
||
|
{else}
|
||
|
<div class="well well-info">No Subscription Found !</div>
|
||
|
{/if}
|
||
|
|
||
|
</div>
|
||
|
</section>
|
||
|
</div>
|
||
|
|
||
|
<div class="tab-pane" id="about_info">
|
||
|
<section class="clearfix infotable inner-block">
|
||
|
<header class="heading clearfix">
|
||
|
<h1>{lang code='user_activity'} <i class="icon-arrow-right"></i></h1>
|
||
|
</header>
|
||
|
<table class="table">
|
||
|
<tr>
|
||
|
<td>{lang code='joined'}</td>
|
||
|
<td>{$u.doj|niceTime}</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>{lang code='user_last_login'}</td>
|
||
|
<td>{$u.last_logged|niceTime}</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>{lang code='online_status'}</td>
|
||
|
<td>
|
||
|
{if $userquery->isOnline($u.last_active,$p.online_status)}
|
||
|
<span style="color:#060">{lang code='online'}</span>
|
||
|
{else}
|
||
|
<span style="color:#ed0000">{lang code='offline'}</span>
|
||
|
{/if}
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
{assign var='channel_profile_fields' value=$userquery->load_user_fields($p,'profile')}
|
||
|
{foreach from=$channel_profile_fields item=field_group name=profile_groups}
|
||
|
{if $smarty.foreach.profile_groups.iteration==2}
|
||
|
<div id="moreDetailsDIV" style="display:none">
|
||
|
{/if}
|
||
|
{if $field_group.channel_view !='no'}
|
||
|
<div class="channelFieldset clearfix">
|
||
|
<header class="heading clearfix">
|
||
|
<h2>{$field_group.group_name}</h2>
|
||
|
</header>
|
||
|
<table class="table">
|
||
|
{if $field_group.group_id=='profile_location'}
|
||
|
<tr>
|
||
|
<td>{lang code='country'}</td>
|
||
|
<td>{$u.country|country}</td>
|
||
|
</tr>
|
||
|
{/if}
|
||
|
|
||
|
{foreach from=$field_group.fields item=field}
|
||
|
{if $field.auto_view=='yes' && $field.value}
|
||
|
<tr>
|
||
|
{if $field.type !='textarea' && $field.type !='text' && $field.type !='textfield'}
|
||
|
<td>{$field.title}</td>
|
||
|
<td>{input_value input=$field}</td>
|
||
|
{elseif $field.type =='textarea'}
|
||
|
<td>{$field.title}</td>
|
||
|
<td>{$field.value|nl2br}</td>
|
||
|
{else}
|
||
|
<td>{$field.title}</td>
|
||
|
<td>{input_value input=$field}</td>
|
||
|
{/if}
|
||
|
</tr>
|
||
|
{/if}
|
||
|
{if $field_group.group_id=='profile_basic_info'
|
||
|
&& $field.name=='relation_status'
|
||
|
&& $p.show_dob!='no'}
|
||
|
<tr>
|
||
|
<td>{lang code='user_date_of_birth'}</td>
|
||
|
<td>{$u.dob}</td>
|
||
|
</tr>
|
||
|
{/if}
|
||
|
{/foreach}
|
||
|
</table>
|
||
|
</div>
|
||
|
{/if}
|
||
|
{if $smarty.foreach.profile_groups.last}
|
||
|
</div>
|
||
|
{/if}
|
||
|
{/foreach}
|
||
|
<div id="moreDetails" class="channelFieldset">
|
||
|
<a class="btn btn-primary btn-sm channelLegend" href="javascript:void(0)" onClick="$('#moreDetails').hide(); $('#moreDetailsDIV').show();">{lang code='more'}</a>
|
||
|
</div>
|
||
|
</section>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="col-md-4 col-sm-4 col-xs-12 ch-right">
|
||
|
<div class="adbox-holder widget clearfix hidden-xs">
|
||
|
{AD place='ad_300x250'}
|
||
|
</div>
|
||
|
<div class="clearfix widget ch-rating" id="rating_container">
|
||
|
{show_video_rating rating=$p.rating ratings=$p.rated_by total='10' id=$p.userid type=user}
|
||
|
</div>
|
||
|
|
||
|
<div class="clearfix widget">
|
||
|
<h2>Playlists</h2>
|
||
|
{$playlists = $cbvid->action->get_playlists(["user"=>$u.userid,"order"=>"date_added DESC","limit"=>"8"])}
|
||
|
|
||
|
{if $playlists}
|
||
|
{foreach $playlists as $playlist}
|
||
|
{include file="$style_dir/blocks/playlist/playlist.html"}
|
||
|
{/foreach}
|
||
|
{else}
|
||
|
<div class="well well-info">no playlist found</div>
|
||
|
{/if}
|
||
|
</div>
|
||
|
<div class="widget clearfix">
|
||
|
<h2>Subscriptions</h2>
|
||
|
<div class="clearfix">
|
||
|
{assign var="user_subscribers" value=get_user_subscibers($user.userid, 12)}
|
||
|
{if $user_subscribers}
|
||
|
<ul class="subscription-list">
|
||
|
{foreach from=$user_subscribers item=subscriber}
|
||
|
<li>
|
||
|
{include file="$style_dir/blocks/channels.html" block_type = 'subscribedby_list'}
|
||
|
</li>
|
||
|
{/foreach}
|
||
|
</ul>
|
||
|
|
||
|
{else}
|
||
|
<div class="well well-info">No Subscription Found !</div>
|
||
|
{/if}
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<script>
|
||
|
/*$('#changeCover').on("click", function(){
|
||
|
|
||
|
$('#cover_info').show();
|
||
|
|
||
|
});*/
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
(function(window){
|
||
|
$(document).ready(function(){
|
||
|
$("#reportVideo").on({
|
||
|
click : function(e){
|
||
|
e.preventDefault();
|
||
|
$("#flag_item").show();
|
||
|
}
|
||
|
});
|
||
|
var extensions = "{$extensions}";
|
||
|
var baseurl = '{$baseurl}';
|
||
|
var channelId = "{$user['userid']}";
|
||
|
extensions = (extensions.substring(0, extensions.length - 1)) + ",png,jpeg";
|
||
|
$.get("{$theme}/js/plupload/js/plupload.full.min.js", function(e){
|
||
|
var uploader = new plupload.Uploader({
|
||
|
browse_button: 'changeCover',
|
||
|
runtimes : 'html5,flash,silverlight,html4',
|
||
|
url : baseurl + "/edit_account.php?mode=avatar_bg",
|
||
|
file_data_name : "coverPhoto",
|
||
|
filters: {
|
||
|
mime_types : [
|
||
|
{ title : "Image files", extensions : extensions },
|
||
|
],
|
||
|
max_file_size: "2mb",
|
||
|
prevent_duplicates: false,
|
||
|
}
|
||
|
});
|
||
|
window.uploader = uploader;
|
||
|
uploader.init();
|
||
|
uploader.bind("FilesAdded", function(up, uploadedFiles){
|
||
|
$(".cb-live-background").attr("src",baseurl+'/images/loading.png');
|
||
|
up.start();
|
||
|
});
|
||
|
uploader.bind('UploadComplete', function(plupload, files, response){
|
||
|
|
||
|
});
|
||
|
|
||
|
uploader.bind("FileUploaded", function(plupload, files, response){
|
||
|
var response = $.parseJSON(response.response);
|
||
|
if(response.status == true){
|
||
|
$(".cb-live-background").attr("src",response.url);
|
||
|
}else{
|
||
|
$(".cb-live-background").attr("src",response.url);
|
||
|
alert(response.msg);
|
||
|
}
|
||
|
});
|
||
|
|
||
|
uploader.bind("Error", function(plupload, error){
|
||
|
alert(error.message);
|
||
|
});
|
||
|
});
|
||
|
$("#coverContainer").hover(function(e){
|
||
|
//$("#changeCover").removeClass("sr-only");
|
||
|
$("#changeCover").show();
|
||
|
}, function(e){
|
||
|
// $("#changeCover").addClass("sr-only");
|
||
|
$("#changeCover").hide();
|
||
|
});
|
||
|
$("#channelVoteUp, #channelVoteDown").one({
|
||
|
click: function(e){
|
||
|
var vote = "";
|
||
|
var id = "" + this.id;
|
||
|
var likes = parseInt($("#likes").text());
|
||
|
var totalVotes = parseInt($("#totalVotes").text()) + 1;
|
||
|
if(this.id == "channelVoteDown"){
|
||
|
vote = "no";
|
||
|
likes = likes - 1;
|
||
|
|
||
|
}else{
|
||
|
vote = "yes";
|
||
|
likes = likes + 1;
|
||
|
}
|
||
|
$.ajax({
|
||
|
type: "POST",
|
||
|
url: "{$baseurl}/actions/vote_channel.php",
|
||
|
data: { vote: vote, channelId : channelId}
|
||
|
}).success(function(data){
|
||
|
$("#likes").text(likes);
|
||
|
$("#totalVotes").text(totalVotes);
|
||
|
});
|
||
|
}
|
||
|
})
|
||
|
});
|
||
|
})(window);
|
||
|
|
||
|
$(document).ready(function (){
|
||
|
var id ='{$user.userid}';
|
||
|
$('#subscribe_channel').on({
|
||
|
click: function(e){
|
||
|
e.preventDefault();
|
||
|
_cb.subscribeToChannel(id,'subscribe_user','video_detail_result_cont');
|
||
|
|
||
|
}
|
||
|
});
|
||
|
});
|
||
|
|
||
|
$('#myTab a, #reportTab a').click(function (e) {
|
||
|
e.preventDefault()
|
||
|
$(this).tab('show')
|
||
|
});
|
||
|
$('#load_more_playlist').click(function()
|
||
|
{
|
||
|
var limit = $(this).attr("limit");
|
||
|
var mode = 'load_more';
|
||
|
var inner_mode = 'load_more_playlist';
|
||
|
var append_id = 'load_more_channel_playlist';
|
||
|
var attrb = $(this);
|
||
|
var cat_id = $(this).attr("cat-id");
|
||
|
var total = $(this).attr("total");
|
||
|
load_more(limit,mode,inner_mode,append_id,attrb,cat_id,total);
|
||
|
});
|
||
|
</script>
|