2016-03-16 17:30:07 +05:00
{$myAccountLinks = $userquery->my_account_links()}
{$leftMenuLinks = array_slice($myAccountLinks, 7)}
{lang code='channel' assign='object_type'}
2016-04-04 14:32:18 +05:00
{$uservideos=get_videos(["user"=>$user.userid, "order"=>"date_added DESC","limit" =>10])}
2016-04-01 11:30:05 +05:00
{$first_video = $uservideos.0}
2016-04-04 14:32:18 +05:00
{$total_videos = $user.total_videos}
2016-03-31 20:12:59 +05:00
< div id = "main" class = "container clearfix" >
< div class = "clearfix" >
{include file="$style_dir/blocks/view_channel/channel_header.html"}
< / div >
< div class = "clearfix" >
< section id = "content" class = "clearfix" >
2016-04-05 20:06:32 +05:00
< div class = "player-items" >
< div class = "clearfix player-holder" >
< div id = "cb_player" class = "clearfix cb_player" >
{FlashPlayer vdetails=$first_video width='100%' height='355'}
< / div >
2016-03-31 20:12:59 +05:00
< / div >
2016-04-05 16:42:44 +05:00
< img src = "{$theme}/images/player-ratio.png" class = "playerRatio" >
2016-03-16 17:30:07 +05:00
< / div >
2016-03-31 20:12:59 +05:00
< div id = "messageFav" class = "alert alert-info marginTop" style = "display:none" > < / div >
2016-04-01 11:05:19 +05:00
< div class = "channel-tabs flat-tabs clearfix" >
2016-03-31 20:12:59 +05:00
< ul class = "clearfix nav nav-tabs" >
2016-04-04 12:19:33 +05:00
< li >
2016-03-31 20:12:59 +05:00
< a href = "#user-info" data-toggle = "tab" > {lang code='Info'}< / a >
< / li >
{if isSectionEnabled('videos') & & $u_control.show_my_videos == 'yes'}
2016-04-04 12:19:33 +05:00
< li class = "active" >
2016-03-31 20:12:59 +05:00
< a href = "#user-videos" data-toggle = "tab" > {lang code='videos'}< / a >
< / li >
{/if}
< li >
< a href = "#user-photos" data-toggle = "tab" > {lang code='Photos'}< / a >
< / li >
< li >
< a href = "#user-playlist" data-toggle = "tab" > {lang code='Playlists'}< / a >
< / li >
< / ul >
2016-03-16 17:30:07 +05:00
< div class = "tab-content clearfix" >
2016-04-01 11:05:19 +05:00
< div class = "tab-pane fade in clearfix" id = "user-info" >
2016-03-31 20:12:59 +05:00
< div class = "clearfix watch-vid-details" >
< h2 > {lang code='user_activity'}< / h2 >
< ul class = "clearfix desc-list" >
< li >
< strong > {lang code='joined'}< / strong > : {$u.doj|niceTime}
< / li >
< li >
< strong > {lang code='user_last_login'}< / strong > :{$u.last_logged|niceTime}
< / li >
< li >
< strong > {lang code='online_status'}< / strong > :
{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}
< / li >
< / ul >
{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 = "clearfix" >
< h2 > {$field_group.group_name}< / h2 >
< ul class = "clearfix desc-list" >
{if $field_group.group_id=='profile_location'}
< li >
< strong > {lang code='country'}< / strong > : {$u.country|country}
< / li >
{/if}
{foreach from=$field_group.fields item=field}
{if $field.auto_view=='yes' & & $field.value}
< li >
{if $field.type !='textarea' & & $field.type !='text' & & $field.type !='textfield'}
< strong > {$field.title}< / strong > : {input_value input=$field}
{elseif $field.type =='textarea'}
< strong > {$field.title}< / strong > : {$field.value|nl2br}
{else}
< strong > {$field.title}< / strong > : {input_value input=$field}
{/if}
< / li >
{/if}
{if $field_group.group_id=='profile_basic_info'
& & $field.name=='relation_status'
& & $p.show_dob!='no'}
< li >
< strong > {lang code='user_date_of_birth'}< / strong > : {$u.dob}
< / li >
{/if}
{/foreach}
< / ul >
2016-03-16 17:30:07 +05:00
< / div >
2016-03-31 20:12:59 +05:00
{/if}
{if $smarty.foreach.profile_groups.last}
2016-03-16 17:30:07 +05:00
< / div >
{/if}
2016-03-31 20:12:59 +05:00
{/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 >
2016-03-16 17:30:07 +05:00
< / div >
2016-03-31 20:12:59 +05:00
< / div >
2016-04-01 11:05:19 +05:00
< div class = "tab-pane videos fade in clearfix active" id = "user-videos" >
2016-04-04 14:32:18 +05:00
< div class = "clearfix row user_vids" >
2016-04-01 11:05:19 +05:00
{if $uservideos}
2016-04-04 18:13:06 +05:00
< div id = "usr-vids" class = "clearfix" >
2016-04-01 11:05:19 +05:00
{foreach $uservideos as $video}
< div class = "item-video col-lg-4 col-md-4 col-sm-6 col-xs-12" >
{include file="$style_dir/blocks/videos/video.html" display_type='homeVideos'}
2016-03-31 20:12:59 +05:00
< / div >
2016-04-01 11:05:19 +05:00
{/foreach}
2016-04-04 16:13:56 +05:00
< / div >
< div class = "clearfix text-center" >
< button id = "more-view-channel" class = "btn btn-loadmore" dataLimit = "10" dataHit = "2" > Load More< / button >
< / div >
2016-04-01 11:05:19 +05:00
{else}
< div class = "well well-info" > No Videos Found !< / div >
{/if}
< / div >
2016-03-16 17:30:07 +05:00
< / div >
2016-04-01 11:05:19 +05:00
< div class = "tab-pane" id = "user-photos" >
< div class = "clearfix row" >
2016-04-08 14:24:43 +05:00
{$photos=get_photos(["user"=>$user.userid,"limit" =>5])}
2016-04-01 11:05:19 +05:00
{if $photos}
{foreach from=$photos item=p_list}
2016-04-07 15:22:30 +05:00
< div class = "item-photo col-lg-4 col-md-4 col-sm-6 col-xs-12" >
2016-04-04 17:42:51 +05:00
{include file="$style_dir/blocks/photo.html" photo=$p_list display_type = "default_photo"}
2016-03-16 17:30:07 +05:00
< / div >
2016-04-01 11:05:19 +05:00
{/foreach}
2016-03-16 17:30:07 +05:00
{else}
2016-04-01 11:05:19 +05:00
< div class = "well well-info" > {lang code='no_results_found'}< / div >
2016-03-16 17:30:07 +05:00
{/if}
2016-04-01 11:05:19 +05:00
< / div >
< / div >
< div class = "tab-pane fade in clearfix" id = "user-playlist" >
< div class = "clearfix row ch-playlists" >
{*$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 = "playlist-item col-lg-4 col-md-4 col-sm-6 col-xs-12" >
{include file="$style_dir/blocks/playlist/playlist-block.html"}
2016-03-16 17:30:07 +05:00
< / div >
2016-04-01 11:05:19 +05:00
{/foreach}
{else}
< div class = "well well-info" > no playlist found< / div >
{/if}
< / div >
2016-03-16 17:30:07 +05:00
< / div >
< / div >
< / div >
2016-03-31 20:12:59 +05:00
< / section >
< aside id = "sidebar" >
< h2 > {lang code="Recent Activities"}< / h2 >
< div id = "userFeeds" class = "user-activities clearfix sidebar-items" >
{assign var=userFeeds value=$cbfeeds->getUserFeeds($u)}
{if $userFeeds}
{foreach from=$userFeeds item=userFeed}
{include file="$style_dir/blocks/feed.html" feed=$userFeed}
{/foreach}
{else}
< div class = "well well-info clearfix" >
{lang code='no_activity' assign=no_activity} {$no_activity|sprintf:$u.username}
2016-03-16 17:30:07 +05:00
< / div >
2016-03-31 20:12:59 +05:00
{/if}
< / div >
2016-04-01 11:05:19 +05:00
{$popular = get_users(['order'=>'profile_hits DESC limit 5'])}
{if $popular}
< h2 > {lang code="Popular Users"}< / h2 >
2016-03-31 20:12:59 +05:00
< div class = "clearfix sidebar-channels" >
2016-04-01 11:05:19 +05:00
{foreach $popular as $user}
2016-03-31 20:12:59 +05:00
< div class = "clearfix channel-item" >
< a href = "{$userquery->profile_link($user)}" class = "avatar" >
< img src = "{$userquery->getuserthumb($user,'small')}" width = "50" height = "50" class = "cb-rounded" >
< / a >
< div class = "channel-info" >
< h3 > < a href = "{$userquery->profile_link($user)}" > {$user.username}< / a > < / h3 >
< div class = "clearfix views-videos" >
< span > {$user.profile_hits|number_format} {lang code='views'}< / span >
< span > {$user.total_videos|number_format} {lang code='Videos'}< / span >
< / div >
2016-03-16 17:30:07 +05:00
< / div >
< / div >
2016-03-31 20:12:59 +05:00
{/foreach}
2016-03-16 17:30:07 +05:00
< / div >
2016-03-31 20:12:59 +05:00
{/if}
< / aside >
2016-03-16 17:30:07 +05:00
< / div >
2016-03-31 20:12:59 +05:00
2016-03-16 17:30:07 +05:00
< / 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);
});
2016-04-04 14:32:18 +05:00
$('#container').on("click","#more-view-channel",function(){
loadHit = $(this).attr('dataHit');
loadLimit = $(this).attr('dataLimit');
user = "{$smarty.get.user}";
totalVids = "{$total_videos}";
nextHit = parseInt(loadHit) + 1;
$.ajax({
url: baseurl + "/ajax/view_channel.php",
type: "post",
dataType: "html",
data: {
"mode":'channelMore',
"loadHit":loadHit,
"loadLimit":loadLimit,
"totalVids":totalVids,
"userid":user,
},
2016-04-05 12:10:32 +05:00
beforeSend: function() {
$(document).find('#more-view-channel').text('Loading videos..')
},
2016-04-04 14:32:18 +05:00
success: function(data) {
$('#more-view-channel').remove();
if (data.length > 1) {
2016-04-04 18:13:06 +05:00
$(data).appendTo('#usr-vids').fadeIn('slow');
2016-04-04 16:13:56 +05:00
$('< div class = "clearfix text-center" > < button id = "more-view-channel" class = "btn btn-loadmore" dataLimit = "'+loadLimit+'" dataHit = "'+nextHit+'" > Load More< / button > < / div > ').appendTo('.user_vids').fadeIn('slow');
2016-04-05 12:10:32 +05:00
} else {
$('< div class = "clearfix text-center" > < button id = "more-view-channel" class = "btn btn-loadmore" disabled = "disabled" > End of videos< / button > < / div > ').appendTo('.user_vids').fadeIn('slow');
2016-04-04 14:32:18 +05:00
}
}
});
});
2016-04-05 16:42:44 +05:00
/**/
/* player height and editerpick activities height */
var WinWidHome = "";
function editpickVideos(){
WinWidHome = $(window).width();
if(WinWidHome > 991)
{
console.log("height "+WinWidHome);
2016-04-05 20:06:32 +05:00
var bannerHeight = $(".player-items").height();
2016-04-05 16:42:44 +05:00
bannerHeight = bannerHeight - 43;
console.log("height "+bannerHeight);
$(".user-activities").css({
"max-height" : bannerHeight+"px",
"overflow-y" : "auto"
});
}
else
{
console.log("height "+WinWidHome);
$(".user-activities").css("max-height","auto");
}
}
$('.playerRatio').load(function(){
editpickVideos();
});
$(window).resize(function() {
editpickVideos();
});
2016-04-04 16:13:56 +05:00
< / script >