LEFT SIDEBAR PAGE
remove();$(" pm-pro-user-activity-content").append(a);user_activity_page_count++;bind_waypoint("btn_user_activity_load_more",{offset:"110%",triggerOnce:true},function(){user_activity_load_more();return false});bind_user_activity_actions();return false}});return false}function activity_stream_load_more(){if(activity_stream_page_count==1){$(" pm-pro-activity-stream-content").append(social_loading_gif_html)}else{$(" pm-pro-activity-stream-content btn_activity_stream_load_more").replaceWith(social_loading_gif_html)}$.ajax({type:"GET",url:MELODYURL2+"/ajax.php",data:{p:"profile","do":"activity-stream",uid:$(`input[name="profile_user_id"]`).val(),page:activity_stream_page_count},dataType:"html",success:function(a){$(" pm-pro-activity-stream-content loading").remove();$(" pm-pro-activity-stream-content").append(a);activity_stream_page_count++;bind_waypoint("btn_activity_stream_load_more",{offset:"110%",triggerOnce:true},function(){activity_stream_load_more()});bind_user_activity_actions();return false}});return false}function bind_follow_actions(){$(`*[id^="btn_follow_"]`).unbind("click");$(`*[id^="btn_unfollow_"]`).unbind("click");$(`*[id^="btn_follow_"]`).click(function(){var b=$(this).attr("id");var a=b.match(/d+/);if(!a){return false}$(this).attr("disabled","disabled").addClass("disabled");follow_send_request("follow",a[0]);return false});$(`*[id^="btn_unfollow_"]`).click(function(){var b=$(this).attr("id");var a=b.match(/d+/);if(!a){return false}$(this).attr("disabled","disabled").addClass("disabled");follow_send_request("unfollow",a[0]);return false})}function follow_load_more(b){if(!b){return false}if(b=="getfollowers"){var a=followers_page_count;if(a==1){$(" pm-pro-followers-content").append(social_loading_gif_html)}else{$(" btn_follow_load_more").replaceWith(social_loading_gif_html)}}else{var a=following_page_count;if(a==1){$(" pm-pro-following-content").append(social_loading_gif_html)}else{$(" btn_follow_load_more").replaceWith(social_loading_gif_html)}}$.ajax({type:"GET",url:MELODYURL2+"/ajax.php",data:{p:"profile","do":b,uid:$(`input[name="profile_user_id"]`).val(),page:a},dataType:"html",success:function(c){if(b=="getfollowers"){$(" pm-pro-followers-content loading").remove();$(" pm-pro-followers-content").append(c);followers_page_count++}else{$(" pm-pro-following-content loading").remove();$(" pm-pro-following-content").append(c);following_page_count++}bind_follow_actions();bind_waypoint("btn_follow_load_more",{offset:"110%",triggerOnce:true},function(){follow_load_more(b);return false});return false}});return false}function follow_send_request(b,a){if(!b||!a){return false}$.ajax({type:"POST",url:MELODYURL2+"/ajax.php",data:{p:"profile","do":b,uid:a},dataType:"json",success:function(c){if(c.success==false){alert(c.msg);$(" btn_follow_"+a).removeAttr("disabled").removeClass("disabled");return false}if(b=="follow"){$(" btn_follow_"+a).replaceWith(c.html);bind_follow_actions()}else{$(" btn_unfollow_"+a).replaceWith(c.html);bind_follow_actions()}return false}});return false}function update_status(){var c=$(`form[name="user-update-status"]`);var a=c.find("textarea").val();var b=" pm-pro-activity-stream-content";if(a!=c.find("textarea").attr("placeholder")){c.find("button").attr("disabled","disabled");if(selected_tab=="pm-pro-user-activity"){b=" pm-pro-user-activity-content"}$(b+" preview_status").html(social_loading_gif_html);$.ajax({type:"POST",url:MELODYURL2+"/ajax.php",data:{p:"profile","do":"update-status",uid:$(`input[name="profile_user_id"]`).val(),txt:a},dataType:"json",success:function(d){if(d.success==false){alert(d.msg);$(" preview_status").html("");return false}$(b+" preview_status").replaceWith(d.html);bind_user_activity_actions();c.find("textarea").val("");c.find("button").