clipbucket/upload/styles/cb_27/layout/view_channel.html

132 lines
4 KiB
HTML
Raw Normal View History

2014-02-07 13:26:05 +00:00
{$myAccountLinks = $userquery->my_account_links()}
{$leftMenuLinks = array_slice($myAccountLinks, 7)}
{lang code='channel' assign='object_type'}
2014-03-25 14:04:37 +00:00
2014-09-19 13:26:52 +00:00
<div id="container" class="container">
{*include file="$style_dir/blocks/manage/account_menu.html"*}
<div class="row cb-box">
{include file="$style_dir/blocks/view_channel/channel_header.html" }
2014-03-25 14:04:37 +00:00
<div class="row">
2014-09-19 13:26:52 +00:00
<div class="col-md-8 col-sm-8 col-xs-12 view_chnl">
<div id="cb_player">
{FlashPlayer vdetails=$firstVideo width='100%' height='355'}
2014-02-07 13:26:05 +00:00
</div>
2014-09-19 13:26:52 +00:00
<hr class="hr">
2014-09-19 14:04:27 +00:00
{if $videos}
2014-09-19 13:26:52 +00:00
<div class="row">
{foreach from=$videos item=video}
{include file="$style_dir/blocks/videos/video.html" display_type='user_videos'}
{/foreach}
2014-03-25 14:04:37 +00:00
</div>
2014-09-19 13:26:52 +00:00
<div align="center">{include file="$style_dir/blocks/pagination.html"}</div>
2014-09-19 14:04:27 +00:00
{/if}
2014-09-19 13:26:52 +00:00
</div>
<div class="col-md-4 col-sm-4 hidden-xs">
{include file="$style_dir/blocks/view_channel/channel_right.html" }
2014-03-25 14:04:37 +00:00
</div>
</div>
2014-09-19 13:26:52 +00:00
</div>
2014-03-25 14:04:37 +00:00
</div>
2014-09-19 13:26:52 +00:00
<div class="clearfix bottom-hieght" ></div>
2014-03-27 06:58:24 +00:00
<script>
2014-09-19 09:58:54 +00:00
$('#changeCover').on("click", function(){
$('#cover_info').show();
});
2014-03-27 06:58:24 +00:00
(function(window){
$(document).ready(function(){
var extensions = "{$extensions}";
var baseurl = '{$baseurl}';
2014-03-27 12:04:29 +00:00
var channelId = "{$user['userid']}";
2014-03-27 06:58:24 +00:00
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-09-19 09:58:54 +00:00
$("#coverConainer").css("background", "url(" + response.url + ") center #000000 no-repeat");
2014-03-27 06:58:24 +00:00
}else{
2014-09-19 09:58:54 +00:00
$("#coverConainer").css("background", "url(" + response.url + ") center #000000 no-repeat");
2014-03-27 06:58:24 +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-02 07:07:29 +00:00
$("#channelVoteUp, #channelVoteDown").one({
2014-03-27 12:04:29 +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-02 07:07:29 +00:00
2014-03-27 12:04:29 +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);
});
}
})
2014-03-27 06:58:24 +00:00
});
})(window);
2014-09-19 09:58:54 +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-03-27 06:58:24 +00:00
</script>