2014-05-09 14:38:00 +00:00
{include file="$style_dir/global_header.html"}
{include file="$style_dir/header.html" }
{$myAccountLinks = $userquery->my_account_links()}
{$leftMenuLinks = array_slice($myAccountLinks, 7)}
{lang code='channel' assign='object_type'}
2014-07-09 04:51:37 +00:00
{include file="$style_dir/blocks/view_channel/channel_global.html" }
2014-07-05 07:23:44 +00:00
2014-05-09 14:38:00 +00:00
< div id = "container" class = "container" >
2014-07-07 05:28:22 +00:00
2014-05-09 14:38:00 +00:00
{include file="$style_dir/blocks/manage/account_menu.html"}
< div class = "row cb-box" >
2014-07-07 05:28:22 +00:00
< div class = "relative1" id = "coverConainer" style = "background: url({$coverPhoto}) center #000000 no-repeat;" >
2014-05-09 14:38:00 +00:00
{if $user.userid == userid()}
< a href = "#" class = "btn btn-primary btn-sm changeCover sr-only" id = "changeCover" > {lang code="Update Cover"}< / a >
{/if}
< div class = "row" >
< div align = "center" class = "col-md-4 pull-right btn-group" style = "padding-left: 40px; padding-top: 5px; margin-right: -27px;" >
2014-07-09 06:26:29 +00:00
< a href = "javascript:void(0)" style = "display: inline; background-color: #000000" class = "btn btn-primary btn-sm new1"
onclick="add_friend('{$user.userid}','result_cont')">
< i class = "glyphicon glyphicon-plus-sign white" > < / i >
{lang code="Add as Friend"}
< / a >
2014-05-09 14:38:00 +00:00
2014-07-09 06:26:29 +00:00
2014-07-16 07:26:16 +00:00
< a href = "private_message.php?mode=new_msg&to={$user.username}" style = "display: inline; background-color: #000000" class = "btn btn-primary btn-sm new1" > < i class = "glyphicon glyphicon-envelope white" > < / i > {lang code="Send Message"}< / a >
2014-07-09 06:26:29 +00:00
2014-07-05 07:23:44 +00:00
< button style = "display: inline; background-color: #000000" id = "subscribe_channel" class = "btn btn-primary btn-sm new1" > < i class = "icon-rss icon-spin white" > < / i > {lang code="Subscribe"}< / button >
2014-05-09 14:38:00 +00:00
< / div >
< / div >
< div class = "row" >
< div class = "col-md-2" >
< a class = "navbar-brand" href = "#" >
< img class = "relative2" src = "{$userquery->getUserThumb($user)}" width = "140" height = "140" >
< / a >
< / div >
< div class = "col-md-4 padding33" >
< h3 class = "cname" > {$user.username}< / h3 >
< / div >
< div class = "col-md-4 pull-right padding34" style = "padding-top: 115px; margin-right: -30px;" >
{if $user.userid == userid()}
< button class = "btn btn-primary new1" style = "background-color: #000000;color: white" >
< span class = "line-height-1 bigger-170 blue" > {$user.total_videos}< / span >
< br >
< span class = "line-height-1 smaller-90 new1" > Videos < / span >
< / button >
< span class = "btn btn-primary new1" style = "background-color: #000000;color: #ffffff" >
< span class = "line-height-1 bigger-170 blue" > {$user.total_photos}< / span >
< br >
< span class = "line-height-1 smaller-90 new1" > Photos < / span >
< / span >
< span class = "btn btn-primary new1" style = "background-color: #000000; color: #ffffff" >
< span class = "line-height-1 bigger-170 blue" > {$user.profile_hits}< / span >
< br >
< span class = "line-height-1 smaller-90 new1" > Views < / span >
< / span >
< span class = "btn btn-primary new1" style = "background-color: #000000;color: #ffffff" >
< span class = "line-height-1 bigger-170 blue" > {$user.subscribers}< / span >
< br >
< span class = "line-height-1 smaller-90 new1" > Contacts < / span >
< / span >
{/if}
< / div >
< / div >
< div class = "btn-group col-md-6 channel" >
< h6 class = "padding35" > < b > < span id = "likes" > {$user["likes"]}< / span > people like this channel out of < span id = "totalVotes" > {$user["voted"]}< / span > < / b > < / h6 >
2014-06-05 17:30:48 +00:00
{if !$userquery->login_check('',true)}
< button id = "" class = "btn btn-primary btn-sm" href = "#" data-toggle = "modal" data-target = "#login-modal" style = "width: 218px" > < i class = "glyphicon glyphicon-thumbs-up" > < / i > < b > Login to like< / b >
< / button >
{else}
< button class = "btn btn-danger btn-sm" id = "channelVoteDown" style = "width: 50px" > < i class = "glyphicon glyphicon-thumbs-down" > < / i > < b > No< / b > < / button >
< button id = "channelVoteUp" class = "btn btn-primary btn-sm" style = "width: 218px" > < i class = "glyphicon glyphicon-thumbs-up" > < / i > < b > Do you like this channel ?< / b > < / button >
{/if}
2014-05-09 14:38:00 +00:00
< / div >
< / div >
2014-07-05 07:23:44 +00:00
2014-05-09 14:38:00 +00:00
< div class = "clearfix" > < / div >
2014-07-05 07:23:44 +00:00
< div id = "messageFav" class = "alert alert-info marginTop" style = "display:none;" > < / div >
2014-07-09 06:26:29 +00:00
< div id = "result_cont" class = "alert alert-info marginTop" style = "display:none;" > < / div >
2014-05-09 14:38:00 +00:00
< br > < br >
< div class = "row" >
< div class = "col-md-7 view_chnl" >
< div id = "cb_player" style = "height: 380px; width: 657px" >
2014-09-08 10:27:39 +00:00
{FlashPlayer vdetails=$firstVideo width='100%' height='355'}
2014-05-09 14:38:00 +00:00
< / div >
< hr class = "hr" >
< div class = "row" >
{foreach from=$videos item=video}
< div class = "col-md-4" >
< a href = "{videoLink($video)}" title = "{$video.title|title}" >
< img src = "{getThumb vdetails=$video}" width = "203" height = "115" id = "thumbs_{$video.videoid}" title = "" style = "display: inline" / > < / a >
< p class = "cbHomeVidDuration duration_view" > {if
$video.duration>1}{$video.duration|SetTime}{else}00:00{/if}< / p >
2014-06-05 17:30:48 +00:00
< a href = "{videoLink($video)}" title = "{$video.title|title}" > < h5 > < b > {$video.title|truncate:33}< / b > < / h5 > < / a >
2014-05-09 14:38:00 +00:00
< span class = "pull-left" > < h5 > < small > {$video.views} views< / small > < / h5 > < / span >
< span class = "pull-right" > < h5 > < small > {$video.date_added|niceTime}< / small > < / h5 > < / span >
< / div >
{/foreach}
< / div >
< div align = "center" > {include file="$style_dir/blocks/pagination.html"}< / div >
< / div >
< div class = "col-md-5" >
2014-07-05 07:23:44 +00:00
2014-05-09 14:38:00 +00:00
< h5 > < small > < i class = "icon-rss" > < / i > < / small > < b > {lang code="Recent Activities"}< / b > < / h5 >
< hr class = "margin-top-bottom-5 hr-channal margin-bottom-10" style = "margin-left: -2px; width: 98%;" >
< div id = "content_1" class = "content" >
< div class = "feeds1" id = "selectedDiv" >
< div id = "userFeeds" >
{if isSectionEnabled('feeds')}
{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 align = "center" class = "no_comments" >
{lang code='no_activity' assign=no_activity} {$no_activity|sprintf:$u.username}
< / div >
{/if}
{/if}
< / div >
< / div >
< / div >
2014-07-16 07:26:16 +00:00
2014-05-09 14:38:00 +00:00
< h5 > < b > {lang code="Popular Channels"}< / b > < / h5 >
< hr class = "margin-top-bottom-5 hr-channal margin-bottom-10" >
< div id = "popular" class = "content1" >
2014-07-16 07:26:16 +00:00
{section name=u_list loop=$user_s}
{include file="$style_dir/blocks/channels.html" user=$user_s[u_list]}
2014-05-09 14:38:00 +00:00
{sectionelse}
{lang code='no_results_found'}
{/section}
< / div >
< / div >
< / div >
< / div >
< / div >
< style >
.changeCover{
position: absolute;
top: 10px;
left: 10px;
}
< / style >
< script >
2014-07-07 05:28:22 +00:00
$('#changeCover').on("click", function(){
$('#cover_info').show();
});
2014-05-09 14:38:00 +00:00
(function(window){
$(document).ready(function(){
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){
$("#coverConainer").css("background", "url({$baseurl}/images/loading.png) center #000000");
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){
2014-07-07 05:28:22 +00:00
$("#coverConainer").css("background", "url(" + response.url + ") center #000000 no-repeat");
2014-05-09 14:38:00 +00:00
}else{
2014-07-07 05:28:22 +00:00
$("#coverConainer").css("background", "url(" + response.url + ") center #000000 no-repeat");
2014-05-09 14:38:00 +00:00
alert(response.msg);
}
});
uploader.bind("Error", function(plupload, error){
alert(error.message);
});
});
$("#coverConainer").hover(function(e){
$("#changeCover").removeClass("sr-only");
}, function(e){
$("#changeCover").addClass("sr-only");
});
2014-06-05 17:30:48 +00:00
$("#channelVoteUp, #channelVoteDown").one({
2014-05-09 14:38:00 +00:00
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";
2014-06-05 17:30:48 +00:00
2014-05-09 14:38:00 +00:00
}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);
2014-07-05 07:23:44 +00:00
$(document).ready(function (){
var id ='{$user.userid}';
$('#subscribe_channel').on({
click: function(e){
e.preventDefault();
_cb.subscribeToChannel(id,'subscribe_user','video_detail_result_cont');
}
});
});
2014-05-09 14:38:00 +00:00
< / script >
{include file="$style_dir/footer.html" }