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-06-14 00:27:48 -07:00
|
|
|
{$loadMoreLang ={lang code="load_more"}}
|
2016-04-08 16:32:32 +05:00
|
|
|
{$uservideos=get_videos(["user"=>$user.userid, "order"=>"date_added DESC","limit" =>9])}
|
2016-04-27 17:10:14 +05:00
|
|
|
{if $uservideos}
|
|
|
|
{$first_video = $cbvid->get_video($uservideos.0.videokey)}
|
|
|
|
{/if}
|
2016-06-03 15:42:52 +05:00
|
|
|
|
2016-04-04 14:32:18 +05:00
|
|
|
{$total_videos = $user.total_videos}
|
2016-04-08 17:52:32 +05:00
|
|
|
{$total_photos = $user.total_photos}
|
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>
|
2016-06-03 16:41:47 +05:00
|
|
|
<div class="clearfix report-block" id="report-user-form" style="display:none">
|
2016-06-03 15:42:52 +05:00
|
|
|
{show_flag_form id=$user.userid type=user}
|
|
|
|
</div>
|
2016-03-31 20:12:59 +05:00
|
|
|
<div class="clearfix">
|
|
|
|
<section id="content" class="clearfix">
|
2016-04-12 15:49:49 +05:00
|
|
|
{if $uservideos}
|
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-04-12 15:49:49 +05:00
|
|
|
{/if}
|
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-05-13 17:31:35 +05:00
|
|
|
<li>
|
2016-04-14 13:17:26 +05:00
|
|
|
<a href="#user-info" data-toggle="tab">{lang code='info'}</a>
|
2016-03-31 20:12:59 +05:00
|
|
|
</li>
|
2016-05-13 17:31:35 +05:00
|
|
|
{if isSectionEnabled('videos') && $u_control.show_my_videos != 'no'}
|
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}
|
2016-05-13 17:31:35 +05:00
|
|
|
{if isSectionEnabled('photos') && $u_control.show_my_photos != 'no'}
|
|
|
|
<li {if $u_control.show_my_videos == 'no' || !isSectionEnabled('videos')}class="active"{/if}>
|
2016-04-14 13:17:26 +05:00
|
|
|
<a href="#user-photos" data-toggle="tab">{lang code='photos'}</a>
|
2016-03-31 20:12:59 +05:00
|
|
|
</li>
|
|
|
|
<li>
|
2016-05-06 12:07:19 +05:00
|
|
|
{/if}
|
2016-05-06 12:08:04 +05:00
|
|
|
<li>
|
2016-04-14 13:17:26 +05:00
|
|
|
<a href="#user-playlist" data-toggle="tab">{lang code='playlists'}</a>
|
2016-03-31 20:12:59 +05:00
|
|
|
</li>
|
|
|
|
</ul>
|
2016-03-16 17:30:07 +05:00
|
|
|
<div class="tab-content clearfix">
|
2016-05-13 17:31:35 +05:00
|
|
|
<div class="tab-pane fade in clearfix {if $u_control.show_my_videos == 'no' && $u_control.show_my_photos == 'no'}active{/if}}" 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">
|
2016-09-08 12:36:11 +05:00
|
|
|
{if $p.profile_title}
|
|
|
|
<li>
|
|
|
|
<strong>{lang code='Title'}</strong>:{$p.profile_title}
|
|
|
|
</li>
|
|
|
|
{/if}
|
|
|
|
{if $p.profile_desc}
|
|
|
|
<li>
|
|
|
|
<strong>{lang code='Description'}</strong>:{$p.profile_desc}
|
|
|
|
</li>
|
|
|
|
{/if}
|
2016-03-31 20:12:59 +05:00
|
|
|
<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}
|
2016-07-21 02:18:30 -07:00
|
|
|
{$usercat = $userquery->get_category_name($user.category)}
|
|
|
|
<li><strong>Category: </strong>{$usercat.category_name}</li>
|
2016-03-31 20:12:59 +05:00
|
|
|
</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-05-13 17:31:35 +05:00
|
|
|
<div class="tab-pane videos fade in clearfix {if $u_control.show_my_videos != 'no'}active{/if}" 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>
|
2016-04-08 17:52:32 +05:00
|
|
|
{if $total_videos > 9}
|
2016-04-08 16:22:44 +05:00
|
|
|
<div class="clearfix text-center">
|
2016-04-14 13:17:26 +05:00
|
|
|
<button id="more-view-channel" class="btn btn-loadmore" dataLimit="9" dataHit="2">{lang code='load_more'}</button>
|
2016-04-08 16:22:44 +05:00
|
|
|
</div>
|
|
|
|
{/if}
|
2016-04-01 11:05:19 +05:00
|
|
|
{else}
|
2016-04-14 13:17:26 +05:00
|
|
|
<div class="well well-info">{lang code='no_results_found'}</div>
|
2016-04-01 11:05:19 +05:00
|
|
|
{/if}
|
|
|
|
</div>
|
2016-03-16 17:30:07 +05:00
|
|
|
</div>
|
2016-05-13 17:51:32 +05:00
|
|
|
<div class="tab-pane fade in clearfix {if $u_control.show_my_videos == 'no'}active{/if}" id="user-photos">
|
2016-04-08 17:52:32 +05:00
|
|
|
<div id="usr-photos" class="clearfix row user_photos">
|
|
|
|
{$photos=get_photos(["user"=>$user.userid,"limit" =>9])}
|
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-04-08 17:52:32 +05:00
|
|
|
{if $user.total_photos > 9}
|
|
|
|
<div class="clearfix text-center">
|
2016-04-14 13:17:26 +05:00
|
|
|
<button id="more-channel-photos" class="btn btn-loadmore" dataLimit="9" dataHit="2">{lang code='load_more'}</button>
|
2016-04-08 17:52:32 +05:00
|
|
|
</div>
|
|
|
|
{/if}
|
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">
|
|
|
|
{*$u.userid*}
|
|
|
|
{$playlists = $cbvid->action->get_playlists(["user"=>$u.userid,"order"=>"date_added DESC","limit"=>""])}
|
|
|
|
|
|
|
|
{if $playlists}
|
|
|
|
{*pr($playlists,true)*}
|
2016-04-12 15:49:49 +05:00
|
|
|
<div class="clearfix row ch-playlists">
|
2016-04-01 11:05:19 +05:00
|
|
|
|
|
|
|
{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}
|
|
|
|
|
2016-04-12 15:49:49 +05:00
|
|
|
</div>
|
2016-04-01 11:05:19 +05:00
|
|
|
{else}
|
2016-04-14 13:17:26 +05:00
|
|
|
<div class="well well-info">{lang code='no_playlists'}</div>
|
2016-04-01 11:05:19 +05:00
|
|
|
{/if}
|
2016-03-16 17:30:07 +05:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2016-03-31 20:12:59 +05:00
|
|
|
</section>
|
|
|
|
<aside id="sidebar">
|
2016-04-12 15:49:49 +05:00
|
|
|
{assign var=userFeeds value=$cbfeeds->getUserFeeds($u)}
|
2016-05-06 12:01:29 +05:00
|
|
|
{if $userFeeds && userid()}
|
2016-04-14 13:17:26 +05:00
|
|
|
<h2>{lang code="user_activity"}</h2>
|
2016-03-31 20:12:59 +05:00
|
|
|
<div id="userFeeds" class="user-activities clearfix sidebar-items">
|
|
|
|
{foreach from=$userFeeds item=userFeed}
|
|
|
|
{include file="$style_dir/blocks/feed.html" feed=$userFeed}
|
|
|
|
{/foreach}
|
|
|
|
</div>
|
2016-04-12 15:49:49 +05:00
|
|
|
{/if}
|
2016-04-15 16:49:29 +05:00
|
|
|
{$popular_users = get_users(['order'=>'profile_hits DESC limit 5'])}
|
|
|
|
{if $popular_users}
|
2016-04-01 11:05:19 +05:00
|
|
|
<h2>{lang code="Popular Users"}</h2>
|
2016-03-31 20:12:59 +05:00
|
|
|
<div class="clearfix sidebar-channels">
|
2016-04-15 16:49:29 +05:00
|
|
|
{foreach $popular_users as $popular}
|
2016-05-06 14:28:50 +05:00
|
|
|
{if $popular.username == $smarty.get.user}
|
2016-05-06 11:58:41 +05:00
|
|
|
{continue}
|
|
|
|
{/if}
|
2016-03-31 20:12:59 +05:00
|
|
|
<div class="clearfix channel-item">
|
2016-04-15 16:49:29 +05:00
|
|
|
<a href="{$userquery->profile_link($popular)}" class="avatar">
|
2016-05-09 16:25:51 +05:00
|
|
|
<img src="{$userquery->getuserthumb($popular,'small')}" width="50" height="50" class="img-circle">
|
2016-03-31 20:12:59 +05:00
|
|
|
</a>
|
|
|
|
<div class="channel-info">
|
2016-04-15 16:49:29 +05:00
|
|
|
<h3><a href="{$userquery->profile_link($popular)}">{$popular.username}</a></h3>
|
2016-03-31 20:12:59 +05:00
|
|
|
<div class="clearfix views-videos">
|
2016-04-15 16:49:29 +05:00
|
|
|
<span>{$popular.profile_hits|number_format} {lang code='views'}</span>
|
|
|
|
<span>{$popular.total_videos|number_format} {lang code='videos'}</span>
|
2016-03-31 20:12:59 +05:00
|
|
|
</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(){
|
2016-06-03 15:42:52 +05:00
|
|
|
$("#report-user").on("click",function(){
|
|
|
|
$("#report-user-form").toggle();
|
|
|
|
});
|
2016-03-16 17:30:07 +05:00
|
|
|
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);
|
|
|
|
|
2016-04-08 19:09:03 +05:00
|
|
|
/* player height and editerpick activities height */
|
|
|
|
var WinWidHome = "";
|
|
|
|
function editpickVideos(){
|
|
|
|
WinWidHome = $(window).width();
|
|
|
|
if(WinWidHome > 991)
|
|
|
|
{
|
|
|
|
console.log("height "+WinWidHome);
|
|
|
|
var bannerHeight = $(".player-items").height();
|
|
|
|
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");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/* */
|
2016-03-16 17:30:07 +05:00
|
|
|
$(document).ready(function (){
|
2016-04-08 19:09:03 +05:00
|
|
|
editpickVideos();
|
2016-03-16 17:30:07 +05:00
|
|
|
var id ='{$user.userid}';
|
|
|
|
$('#subscribe_channel').on({
|
|
|
|
click: function(e){
|
|
|
|
e.preventDefault();
|
2016-04-12 16:59:13 +05:00
|
|
|
_cb.subscribeToChannelNew(id,'subscribe_user');
|
2016-03-16 17:30:07 +05:00
|
|
|
|
|
|
|
}
|
|
|
|
});
|
2016-04-15 16:49:29 +05:00
|
|
|
|
2016-03-16 17:30:07 +05:00
|
|
|
});
|
|
|
|
|
|
|
|
$('#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
|
|
|
|
2016-06-14 00:27:48 -07:00
|
|
|
var loadMoreLang = "{$loadMoreLang}";
|
2016-04-04 14:32:18 +05:00
|
|
|
$('#container').on("click","#more-view-channel",function(){
|
|
|
|
loadHit = $(this).attr('dataHit');
|
|
|
|
loadLimit = $(this).attr('dataLimit');
|
2016-06-28 15:43:11 +05:00
|
|
|
user = "{$user['userid']}";
|
2016-04-04 14:32:18 +05:00
|
|
|
totalVids = "{$total_videos}";
|
2016-04-08 16:47:50 +05:00
|
|
|
totalShown = loadHit * 9 - 9;
|
|
|
|
if (totalVids - totalShown <= 9) {
|
|
|
|
loadMore = false;
|
|
|
|
} else {
|
|
|
|
loadMore = true;
|
|
|
|
}
|
|
|
|
|
2016-04-04 14:32:18 +05:00
|
|
|
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-08 16:47:50 +05:00
|
|
|
if (loadMore == true) {
|
2016-06-14 00:27:48 -07:00
|
|
|
$('<div class="clearfix text-center"><button id="more-view-channel" class="btn btn-loadmore" dataLimit="'+loadLimit+'" dataHit="'+nextHit+'">'+loadMoreLang+'</button></div>').appendTo('.user_vids').fadeIn('slow');
|
2016-04-08 16:47:50 +05:00
|
|
|
}
|
2016-05-13 17:51:32 +05:00
|
|
|
var moveTo = $( ".recentAppending" ).last().offset().top,
|
|
|
|
currWidth = $(window).width();
|
|
|
|
moveTo = moveTo - 630;
|
|
|
|
if (currWidth > 767) {
|
|
|
|
thakkiLoading(moveTo);
|
|
|
|
}
|
2016-04-05 12:10:32 +05:00
|
|
|
} else {
|
2016-04-08 16:47:50 +05:00
|
|
|
$('<div class="clearfix text-center"><button id="more-view-channel" class="btn btn-loadmore" disabled="disabled">Unable to fetch more</button></div>').appendTo('.user_vids').fadeIn('slow');
|
2016-04-04 14:32:18 +05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2016-04-08 17:52:32 +05:00
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
$('#container').on("click","#more-channel-photos",function(){
|
|
|
|
loadHit = $(this).attr('dataHit');
|
|
|
|
loadLimit = $(this).attr('dataLimit');
|
|
|
|
user = "{$smarty.get.user}";
|
|
|
|
totalPhotos = "{$total_photos}";
|
|
|
|
totalShown = loadHit * 9 - 9;
|
|
|
|
if (totalPhotos - totalShown <= 9) {
|
|
|
|
loadMore = false;
|
|
|
|
} else {
|
|
|
|
loadMore = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
nextHit = parseInt(loadHit) + 1;
|
|
|
|
$.ajax({
|
|
|
|
url: baseurl + "/ajax/view_channel.php",
|
|
|
|
type: "post",
|
|
|
|
dataType: "html",
|
|
|
|
data: {
|
|
|
|
"mode":'channelMorePhotos',
|
|
|
|
"loadHit":loadHit,
|
|
|
|
"loadLimit":loadLimit,
|
|
|
|
"totalPhotos":totalPhotos,
|
|
|
|
"userid":user,
|
|
|
|
},
|
|
|
|
beforeSend: function() {
|
2016-05-06 14:28:50 +05:00
|
|
|
$(document).find('#more-channel-photos').text('Loading photos..')
|
2016-04-08 17:52:32 +05:00
|
|
|
},
|
|
|
|
|
|
|
|
success: function(data) {
|
|
|
|
$('#more-channel-photos').remove();
|
|
|
|
if (data.length > 1) {
|
|
|
|
$(data).appendTo('#usr-photos').fadeIn('slow');
|
|
|
|
if (loadMore == true) {
|
|
|
|
$('<div class="clearfix text-center"><button id="more-channel-photos" class="btn btn-loadmore" dataLimit="'+loadLimit+'" dataHit="'+nextHit+'">Load More</button></div>').appendTo('.user_photos').fadeIn('slow');
|
|
|
|
}
|
2016-05-13 17:51:32 +05:00
|
|
|
|
|
|
|
var moveTo = $( ".photoAppending" ).last().offset().top,
|
|
|
|
currWidth = $(window).width();
|
|
|
|
moveTo = moveTo + 240;
|
|
|
|
if (currWidth > 767) {
|
|
|
|
thakkiLoading(moveTo);
|
|
|
|
}
|
2016-04-08 17:52:32 +05:00
|
|
|
} else {
|
|
|
|
$('<div class="clearfix text-center"><button id="more-view-channel" class="btn btn-loadmore" disabled="disabled">Unable to fetch more</button></div>').appendTo('.user_vids').fadeIn('slow');
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2016-04-04 14:32:18 +05:00
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
2016-04-05 16:42:44 +05:00
|
|
|
/**/
|
2016-04-08 19:09:03 +05:00
|
|
|
|
2016-04-05 16:42:44 +05:00
|
|
|
|
|
|
|
$('.playerRatio').load(function(){
|
|
|
|
editpickVideos();
|
|
|
|
});
|
|
|
|
$(window).resize(function() {
|
|
|
|
editpickVideos();
|
|
|
|
});
|
2016-04-04 16:13:56 +05:00
|
|
|
</script>
|