var SITE_URL = "https://chatplayshare.com";
if(!URL_ROOT){
var URL_ROOT = "/";
}
var plugin = {
name : "comments",
comments : {},
commentTimeout : null,
commentsParsing : false,
addingComment : false,
replyingComment : false,
newChild : false,
newChildParent : false,
options :{},
createOverlay: function(container, button){
button.html("");
container.append("
");
},
hideOverlay: function(container, button){
button.html("
");
container.find(".details_overlay").remove();
},
integrate : function(plugins,options){
var framework = this;
var headID = document.getElementsByTagName("head")[0];
if(document.getElementById("comments_plugin_css") == null){
var cssNode = document.createElement('link');
cssNode.id = "comments_plugin_css";
cssNode.type = 'text/css';
cssNode.rel = 'stylesheet';
cssNode.href = URLROOT + 'plugins/comments/css/comments.css';
cssNode.media = 'screen';
headID.appendChild(cssNode);
}
if(document.getElementById("comments_plugin_mobile_css") == null){
var cssNode = document.createElement('link');
cssNode.id = "comments_plugin_mobile_css";
cssNode.type = 'text/css';
cssNode.rel = 'stylesheet';
cssNode.href = URLROOT + 'plugins/comments/css/mobile/comments.css';
cssNode.media = 'screen';
headID.appendChild(cssNode);
}
var plugin = this;
this.options = options;
$(document).ready(function(){
var html = "\
\
";
var ele = $('#' + options.element)
ele.append(html);
if(typeof(uploader) != "undefined"){
new uploader({
field:ele.find(".comment_box_container"),
button:ele.find(".upload_button").get(0),
insertBefore:false,
containField:false,
stacked: false,
fitted: true,
floatRight:false
});
ele.find(".comment_box_buttons").css({position:"absolute"});
}
var textarea = ele.find("#comment");
var addComment = ele.find(".send_button");
if(addComment.length > 0){
addComment.click(function(){
framework.createOverlay(ele.find(".comment_box_container"),addComment);
plugin.addComment(textarea,null,function(comment){
framework.hideOverlay(ele.find(".comment_box_container"),addComment);
if(typeof(comment.error) == "undefined"){
textarea.html("");
}
});
});
}
var checkScroll = function(field){
console.log(field.clientHeight);
if(field.clientHeight < field.scrollHeight || field.clientHeight >= 67){
ele.addClass("comment_scroll");
}else{
ele.removeClass("comment_scroll");
}
};
textarea.keyup(function(e){
var Ucode = e.keyCode? e.keyCode : e.charCode;
checkScroll(this);
});
//setupCheckboxes();
plugin.comments = options.comments;
if(typeof(plugin.comments) != "object"){
plugin.comments = {};
}
plugin.processComments(plugin.comments, options.entityID);
if($("#comment_sort").length > 0){
$("#comment_sort").change(function(){
$d.helpers.showOverlay($("#comments_list_container"));
$d.network.post(URLROOT+"comments/sort/" + options.type,{entity:options.entityID,sort:$("#comment_sort").val(),session_id:""},function(result){
options.comments = result;
plugin.processComments(result)
});
});
}
if("" != ""){
if(typeof(typeof window[""]) === "function"){
;
}
}
$d.initCheckboxes(ele);
$d.initSelects(ele);
});
},
processComment : function(comment,append,element,fadeIn){
var plugin = this;
var framework = this;
if(comment != null){
var image = "";
if(comment.image.startsWith("http")){
image = comment.image;
}else{
image = SITE_URL + comment.image;
}
var commentUserImage = "
";
var commentUsername = comment.username;
if(comment.link && comment.link != "" && comment.deleted == false) {
commentUserImage = "
";
commentUsername = "
"+comment.username+"";
}
var li = $(document.createElement("li"));
li.addClass("comment_item clearfix");
li.attr("data-id",comment.id);
li.attr("point-count",comment.score);
li.attr("data-parent",comment.parent);
li.attr("data-level",comment.level);
li.attr("data-type",comment.type);
li.attr("data-children",0);
li.attr("data-guildings",comment.guilds);
li.addClass("level-"+comment.level);
if(comment.parent > 0){
var p = $("li[data-id="+comment.parent+"] > ul");
if(p.length > 0){
element = p;
}
}
if(comment.level > 1){
li.addClass("sub-comment");
var parent = $(".comment_item[data-id='"+comment.parent+"']");
parent.addClass("has-children");
parent.data("children",parent.data("children") + 1);
if(parent.length){
var setText = function(parent,e){
var text = "Show";
if(e.hasClass("collapsed")){
text = "Hide";
}
var coText = "comment";
if(parent.data("children") > 1){
coText += "s";
}
e.attr("title",text + " " + parent.data("children") + " " + coText);
e.find(".comment_count").html(parent.data("children"));
};
var e = parent.find("> .comment_container .collapse_comments");
if(e.length == 0){
parent.find(".comment_left").prepend("");
e = parent.find("> .comment_container .collapse_comments");
console.log(e);
e.click(function(){
var ele = $(this);
if(parent.hasClass("collapsed")){
parent.removeClass("collapsed");
}else{
parent.addClass("collapsed");
}
setText(parent,e);
});
}
if(e.length > 0){
setText(parent,e);
}
}
}
var container = $(document.createElement("div"));
container.addClass("comment_container");
container.html("\
\
\
\
\
\
\
\
\
\
");
li.append(container);
li.append("
");
if(comment.loggedIn){
if(comment.deleted == false){
container.find(".comment_left").append("");
container.find(".comment_voting_buttons").append("
\
");
var upvote = container.find(".upVote");
if(upvote.length > 0){
upvote.click(function(){
plugin.upvote(comment.id);
});
}
var downvote = container.find(".downVote");
if(downvote.length > 0){
downvote.click(function(){
plugin.downvote(comment.id);
});
}
var guildButton = container.find(".comment_guild");
var updateGuildCount = function(){
var con = guildButton.find(".comment_guilds");
if(li.data("guildings") > 0){
con.html(li.data("guildings"));
li.addClass("guilded");
}else{
con.html("");
li.removeClass("guilded");
}
};
updateGuildCount();
guildButton.click(function(){
var doGuild = function(){};
doGuild = function(c){
$d.network.post(URLROOT+"credits/guild",{entity:comment.id,type:"comment",uid:comment.user,confirm:c},function(data){
if(data == "confirm"){
if(confirm("You've already guilded this comment are you sure you'd like to give it another one?")){
doGuild(1);
}
}else{
if(data != false){
li.data("guildings",data);
}else{
alert("You don't have enough credits");
}
updateGuildCount();
}
});
};
doGuild(0);
});
var replyButton = $("
");
container.find(".comment_buttons").append(replyButton);
replyButton.click(function(){
var existing = $(".comment_reply_box[data-parent="+comment.id+"]");
$(".comment_reply_box").remove();
$(".replying").removeClass("replying");
if(!existing.length){
container.addClass("replying");
var replyBox = $("");
if(typeof(uploader) != "undefined"){
new uploader({
field:$(replyBox).find(".comment_reply_content"),
button:$(replyBox).find(".upload_button").get(0),
insertBefore:false,
containField:false,
stacked: false,
fitted: true,
floatRight:false
});
}else{
replyBox.find(".upload_button").hide();
}
var textarea = replyBox.find(".textarea");
if(comment.level == 21){
textarea.html("@"+comment.username + " ");
}
var checkScroll = function(field){
if(field.clientHeight < field.scrollHeight || field.clientHeight >= 65){
$(replyBox).addClass("comment_scroll");
}else{
$(replyBox).removeClass("comment_scroll");
}
};
textarea.keyup(function(e){
var Ucode = e.keyCode? e.keyCode : e.charCode;
if(Ucode == 13) {
if(e.shiftKey == false){
e.preventDefault();
$(this).parent().parent().parent().find(".send_button").click();
return false;
}else{
checkScroll(this);
}
}else{
checkScroll(this);
}
});
replyBox.find(".send_button").click(function(){
var text = $(this).parent().parent().parent().find(".textarea");
var par = $(this).parent().parent().parent();
var button = $(this);
framework.createOverlay(text.parent(),$(this));
var p = par.data("parent");
if(comment.level == 21){
p = par.data("cparent");
}
plugin.addComment(text,p,function(comment){
if(typeof(comment.error) == "undefined"){
par.remove();
container.removeClass("replying");
}else{
framework.hideOverlay(text.parent(),button);
}
});
});
container.after(replyBox);
textarea.focus();
}
});
if(comment.delete == true){
li.addClass("deleteable");
var deleteButton = $("
");
container.find(".comment_buttons").append(deleteButton);
deleteButton.click(function(){
$(".comment_reply_box").remove();
container.removeClass("replying");
if(confirm("Are you sure you want to delete this comment?")){
var comment = $(this).attr("data-id");
var p = $(this).parent().parent().parent().parent();
var type = p.parent().data("type");
$d.helpers.showOverlay(p,"",false,false);
$d.network.post(URLROOT+"comments/delete/" + type,{id:comment,session_id:""},function(){
plugin.comments[comment] = null;
var children = $(".comment_item[data-parent="+comment+"]");
if(children.length > 0){
p.find(".comment_username").html("deleted");
p.find(".comment_reply").remove();
container.removeClass("replying");
p.find(".comment_delete").remove();
p.find(".comment_voting_buttons").remove();
p.addClass("comment_deleted");
p.find(".comment_content").html("");
$d.helpers.hideOverlay();
}else{
p.remove();
}
});
}
});
}
}else{
container.addClass("comment_deleted");
}
}
if(comment.previews && comment.previews.length > 0){
}
var content = container.find(".comment_content");
if(content.length > 0) {
content.html("");
}
if(fadeIn == true){
li.hide();
}
if(typeof(append) != "undefined" && append == true && typeof(element) != "undefined" && element != null){
element.append(li);
}else{
element.prepend(li);
}
if(fadeIn == true){
li.fadeIn(500);
}
if(typeof(comment.children) != "undefined" && comment.children != null){
for(var x in comment.children){
plugin.processComment(comment.children[x],true,element);
}
}
return li;
}
},
processComments : function(comments, id) {
var plugin = this;
var process = function(comments) {
if(comments && typeof(comments) != "undefined" && comments != null) {
var element = $("#comments_list");
element.html("");
var count = 0;
for(var commentIndex in comments) {
var comment = comments[commentIndex];
if(comment != null){
plugin.processComment(comment,true,element);
}
}
}
};
if(comments && typeof(comments) != "undefined" && comments != null) {
process(comments);
plugin.updateList();
$d.helpers.hideOverlay();
}
},
updateList : function(){
$("#comments_list li.comment_no_comment").remove();
var commentList = $("#comments_list li");
if(commentList.length > 1){
$("#comment_sort").css({display:"block"});
}else{
$("#comment_sort").css({display:"none"});
}
if(commentList.length == 0){
var li = $(document.createElement("li"));
li.addClass("comment_item clearfix comment_no_comment");
if($d.session && $d.session.isLoggedIn()){
li.html("
Be the first to comment!
");
}else{
//li.html("
");
}
$("#comments_list").append(li);
}
},
addComment : function(element,parent,callback) {
var plugin = this;
if(typeof(parent) == "undefined" || parent == null){
parent = 0;
}
if(plugin.addingComment == false){
plugin.addingComment = true;
if(typeof(element) != "undefined" && element != null){
var text = $(element);
}
else{
var text = $("#comment");
}
if(text.length > 0) {
var isDiv = false;
if(text.is("div")){
isDiv = true;
var content = $d.helpers.stripHTML(text.html());
}else{var content = text.val();}
var domField = null;
if(element){
domField = element.parent().get(0);
if(domField.uploader){
var used = {};
for(var x in domField.uploader.uploads){
var upload = domField.uploader.uploads[x];
if(upload != null){
if(upload.url){
if(!used[upload.url]){
content += " " + upload.url.replace("%2F","/");
used[upload.url] = true;
}
}
}
}
}
}
if(content == "") {
alert("Please enter a comment");
plugin.addingComment = false;
}
else {
var anonymous = false;
if(plugin.options.anonymous){
var anonymous = document.getElementById("comment_anonymous").checked;
}
if(anonymous == true) {anonymous = 1;}
else {anonymous = 0;}
if(!isDiv){
text.attr("disabled",true);
text.css({width:"69%"});
var loading = $("#comment_loading").css({display:"block"});
}
$d.network.request({
type:"POST",
url:URLROOT+"comments/save/" + plugin.options.type,
data:{id:plugin.options.entityID, content:content, anonymous:anonymous, parent:parent, session_id:""}
}).done(function(result){
if(result != "") {
var newComment = JSON.parse(result);
if(callback){
try{callback(newComment);}
catch(e){}
}
if(typeof(newComment.error) == "undefined"){
if(domField != null && domField.uploader){
domField.uploader.clear();
}
text.val("");
plugin.comments[newComment.id] = newComment;
$("li[data-id="+newComment.parent+"]").addClass("collapsed");
var pComment = plugin.processComment(newComment,false,$("#comments_list"),true);
plugin.updateList();
}else{
if(newComment.error == "spam"){
var element = $("#comments_list");
if($("#comments_list #spam_error_wait").length > 0){
$("#comments_list #spam_error_wait").html(newComment.wait);
} else {
element.prepend("
You're doing the thing too quickly please wait " + newComment.wait + " seconds
");
}
}
}
} else {
alert("Could not post your comment, please try again");
}
}).always(function(result){
if(!isDiv){
text.attr("disabled",false);
text.attr("style",'');
loading.css({display:"none"});
}
plugin.addingComment = false;
});
}
}
}
},
downvote : function(id) {
var plugin = this;
var uoption = $(".comment_upvote_"+id);
var doption = $(".comment_downvote_"+id);
var comment = $(".comment_item[data-id="+id+"]");
var points = parseInt(comment.attr("point-count"));
if(doption.hasClass("selected")) {
doption.removeClass("selected");
points++;
} else if(uoption.hasClass("selected")) {
uoption.removeClass("selected");
doption.addClass("selected");
points--;
points--;
} else {
doption.addClass("selected");
points--;
}
if(plugin.comments[id]){
plugin.comments[id].upclass = "";
plugin.comments[id].downclass = "";
if(doption.hasClass("selected")){
plugin.comments[id].upclass = "";
plugin.comments[id].downclass = "selected";
}else if(uoption.hasClass("selected")){
plugin.comments[id].upclass = "selected";
plugin.comments[id].downclass = "";
}
plugin.comments[id].score = points;
}
comment.attr("point-count",points);
comment.find(".comment_score").first().html(points + " points");
$d.network.post(URLROOT+"comments/downVote/" + plugin.options.type, {cid:id,session_id:""}, function(result) {});
},
upvote : function(id) {
var plugin = this;
var uoption = $(".comment_upvote_"+id);
var doption = $(".comment_downvote_"+id);
var comment = $(".comment_item[data-id="+id+"]");
var index = id;
var points = parseInt(comment.attr("point-count"));
if(uoption.hasClass("selected")) {
uoption.removeClass("selected");
points--;
} else if(doption.hasClass("selected")) {
doption.removeClass("selected");
uoption.addClass("selected");
points++;
points++;
} else {
uoption.addClass("selected");
points++;
}
if(plugin.comments[id]){
plugin.comments[id].upclass = "";
plugin.comments[id].downclass = "";
if(doption.hasClass("selected")){
plugin.comments[id].upclass = "";
plugin.comments[id].downclass = "selected";
}else if(uoption.hasClass("selected")){
plugin.comments[id].upclass = "selected";
plugin.comments[id].downclass = "";
}
plugin.comments[id].score = points;
}
comment.attr("point-count",points);
comment.find(".comment_score").first().html(points + " points");
$d.network.post(URLROOT+"comments/upVote/" + plugin.options.type, {cid:id,session_id:""}, function(result) {});
}
};
var options = {
type:"topic",
anonymous : "1",
comments : [{"id":30006,"user":86108,"comment":"StarCraft II, Playerunknown's Battlegrounds, Age of Empires II HD Edition, Worms Reloaded (or any of them), Mount Your Friends","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/rhino.jpg","link":"\/profile\/mrvashoom358","date":"2018-05-14","delete":false,"datetime":"May 14th 2018 18:02","timestamp":1526320944,"loggedIn":false,"username":"mrvashoom358","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":1,"children":[{"id":30007,"user":85876,"comment":"The new mount your friends 3D looks hella interesting","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/cat.jpg","link":"\/profile\/ayciate","date":"2018-05-14","delete":false,"datetime":"May 14th 2018 18:08","timestamp":1526321292,"loggedIn":false,"username":"ayciate","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":2,"children":[{"id":30008,"user":86108,"comment":"I want to play it but there's no way I can convince other people in my life to play it...","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/rhino.jpg","link":"\/profile\/mrvashoom358","date":"2018-05-14","delete":false,"datetime":"May 14th 2018 18:26","timestamp":1526322379,"loggedIn":false,"username":"mrvashoom358","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":3,"children":[],"deleted":0,"parent":30007,"previews":[],"entity":2564,"guilds":0,"type":"1","type_string":"topic"}],"deleted":0,"parent":30006,"previews":[],"entity":2564,"guilds":0,"type":"1","type_string":"topic"}],"deleted":0,"parent":0,"previews":[],"entity":2564,"guilds":0,"type":"1","type_string":"topic"},{"id":29675,"user":85876,"comment":"No one here wants to waste 300 hours on factorio with me :P ?","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/cat.jpg","link":"\/profile\/ayciate","date":"2018-04-06","delete":false,"datetime":"Apr 06th 2018 12:08","timestamp":1523016524,"loggedIn":false,"username":"ayciate","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":1,"children":[{"id":29964,"user":4308,"comment":"I mean sure. I have only completed like the first 5ish missions so some of the higher tech interactions you would have to teach me. Thebadtank#4319 if you wanna play","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/rhino.jpg","link":"\/profile\/thebadtank","date":"2018-05-04","delete":false,"datetime":"May 04th 2018 07:03","timestamp":1525417439,"loggedIn":false,"username":"thebadtank","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":2,"children":[],"deleted":0,"parent":29675,"previews":[],"entity":2564,"guilds":0,"type":"1","type_string":"topic"}],"deleted":0,"parent":0,"previews":[],"entity":2564,"guilds":0,"type":"1","type_string":"topic"},{"id":29193,"user":85393,"comment":"Seeing, as there is an Unturned server now, would anyone be interested in casually gaming on it outside of SoSa plays events? I'm there at least once a week setting up a base. Would be cool if there was some sort of support for the 'casuals' with some sweet, sweet loot to offer, or in fact a small community of Unturned players.","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/rhino.jpg","link":"\/profile\/HodorLebowski","date":"2018-02-05","delete":false,"datetime":"Feb 05th 2018 13:02","timestamp":1517835725,"loggedIn":false,"username":"HodorLebowski","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":1,"children":[{"id":29194,"user":1,"comment":"It's still only temporary, give me until March and I'll set up a range of permanent servers that SoSa members can join, free and I'll make sure people know they exist :)","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/cat.jpg","link":"\/profile\/TheBritishAreComing","date":"2018-02-05","delete":false,"datetime":"Feb 05th 2018 13:03","timestamp":1517835828,"loggedIn":false,"username":"TheBritishAreComing","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":2,"level":2,"children":[{"id":29195,"user":85393,"comment":"sweet. Is this going to be the subscription related access? I only have basic for now :\/","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/rhino.jpg","link":"\/profile\/HodorLebowski","date":"2018-02-05","delete":false,"datetime":"Feb 05th 2018 13:05","timestamp":1517835920,"loggedIn":false,"username":"HodorLebowski","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":3,"children":[{"id":29197,"user":1,"comment":"Na we will create "premium" servers later down the line. For now it'll be 100% open to everyone but still restricted by IP (so only SoSa members can access)","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/cat.jpg","link":"\/profile\/TheBritishAreComing","date":"2018-02-05","delete":false,"datetime":"Feb 05th 2018 16:47","timestamp":1517849246,"loggedIn":false,"username":"TheBritishAreComing","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":2,"level":4,"children":[],"deleted":0,"parent":29195,"previews":[],"entity":2564,"guilds":0,"type":"1","type_string":"topic"}],"deleted":0,"parent":29194,"previews":[],"entity":2564,"guilds":0,"type":"1","type_string":"topic"}],"deleted":0,"parent":29193,"previews":[],"entity":2564,"guilds":0,"type":"1","type_string":"topic"}],"deleted":0,"parent":0,"previews":[],"entity":2564,"guilds":0,"type":"1","type_string":"topic"},{"id":29159,"user":73578,"comment":"Dreadnought, if this is still goin on :D","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/rhino.jpg","link":"\/profile\/MOTHERFUCKINGJESUS","date":"2018-01-27","delete":false,"datetime":"Jan 27th 2018 00:23","timestamp":1517012589,"loggedIn":false,"username":"MOTHERFUCKINGJESUS","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":2,"level":1,"children":[],"deleted":0,"parent":0,"previews":[],"entity":2564,"guilds":0,"type":"1","type_string":"topic"},{"id":27833,"user":70247,"comment":"L4D2 (If that's not meant with L4D there)","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/rhino.jpg","link":"\/profile\/MehWasTooShort","date":"2017-04-23","delete":false,"datetime":"Apr 23rd 2017 16:25","timestamp":1492964738,"loggedIn":false,"username":"MehWasTooShort","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":1,"children":[],"deleted":0,"parent":0,"previews":[],"entity":2564,"guilds":0,"type":"1","type_string":"topic"},{"id":27276,"user":82841,"comment":"Golf With Your Friends, GiTS f2p, Rocket League, Shellshock Live, CSGO, Dirty Bomb f2p, Gang Beasts.","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/cat.jpg","link":"\/profile\/slimySumoCow","date":"2017-02-17","delete":false,"datetime":"Feb 17th 2017 21:56","timestamp":1487368598,"loggedIn":false,"username":"slimySumoCow","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":4,"level":1,"children":[],"deleted":0,"parent":0,"previews":[],"entity":2564,"guilds":0,"type":"1","type_string":"topic"},{"id":27047,"user":73627,"comment":"A Miscreated server that's whitelist only would be amazing. I'd be willing to admin it\/assist in managing the whitelist","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/rhino.jpg","link":"\/profile\/MrTopp3r","date":"2017-02-01","delete":false,"datetime":"Feb 01st 2017 19:54","timestamp":1485978875,"loggedIn":false,"username":"MrTopp3r","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":3,"level":1,"children":[],"deleted":0,"parent":0,"previews":[],"entity":2564,"guilds":0,"type":"1","type_string":"topic"},{"id":26920,"user":73578,"comment":"how bout just a general steam server?","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/rhino.jpg","link":"\/profile\/MOTHERFUCKINGJESUS","date":"2017-01-25","delete":false,"datetime":"Jan 25th 2017 19:33","timestamp":1485372782,"loggedIn":false,"username":"MOTHERFUCKINGJESUS","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":1,"children":[{"id":26921,"user":1,"comment":"You mean group? like this [
link<\/a>]","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/cat.jpg","link":"\/profile\/TheBritishAreComing","date":"2017-01-25","delete":false,"datetime":"Jan 25th 2017 19:34","timestamp":1485372847,"loggedIn":false,"username":"TheBritishAreComing","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":2,"level":2,"children":[{"id":26922,"user":73578,"comment":"Yup lol","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/rhino.jpg","link":"\/profile\/MOTHERFUCKINGJESUS","date":"2017-01-25","delete":false,"datetime":"Jan 25th 2017 19:34","timestamp":1485372880,"loggedIn":false,"username":"MOTHERFUCKINGJESUS","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":3,"children":[],"deleted":0,"parent":26921,"previews":[],"entity":2564,"guilds":0,"type":"1","type_string":"topic"}],"deleted":0,"parent":26920,"previews":[],"entity":2564,"guilds":0,"type":"1","type_string":"topic"}],"deleted":0,"parent":0,"previews":[],"entity":2564,"guilds":0,"type":"1","type_string":"topic"},{"id":26510,"user":57134,"comment":"MInecraft - Pokemon Revival","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/rhino.jpg","link":"\/profile\/ZackBall","date":"2016-12-18","delete":false,"datetime":"Dec 18th 2016 22:26","timestamp":1482099990,"loggedIn":false,"username":"ZackBall","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":1,"children":[],"deleted":0,"parent":0,"previews":[],"entity":2564,"guilds":0,"type":"1","type_string":"topic"},{"id":25781,"user":68992,"comment":"[link<\/a>]
\n
\nfor free halloween spoopy goodness","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/cat.jpg","link":"\/profile\/kptkrunk","date":"2016-10-31","delete":false,"datetime":"Oct 31st 2016 06:22","timestamp":1477894979,"loggedIn":false,"username":"kptkrunk","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":1,"children":[{"id":27906,"user":84268,"comment":"I didn't even know this was co-op. T
\nhat is amazing.","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/rhino.jpg","link":"\/profile\/WildCard007","date":"2017-04-29","delete":false,"datetime":"Apr 29th 2017 21:49","timestamp":1493502557,"loggedIn":false,"username":"WildCard007","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":2,"children":[],"deleted":0,"parent":25781,"previews":[],"entity":2564,"guilds":0,"type":"1","type_string":"topic"}],"deleted":0,"parent":0,"previews":[],"entity":2564,"guilds":0,"type":"1","type_string":"topic"},{"id":25053,"user":-1,"comment":"I can comment anonymously, what is this madness","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/rhino.jpg","link":"","date":"2016-08-22","delete":false,"datetime":"Aug 22nd 2016 06:48","timestamp":1471848480,"loggedIn":false,"username":"Anonymous","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":5,"level":1,"children":[],"deleted":0,"parent":0,"previews":[],"entity":2564,"guilds":0,"type":"1","type_string":"topic"},{"id":24094,"user":10560,"comment":"Minecraft - Buildcraft","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/rhino.jpg","link":"\/profile\/rustyhook81","date":"2016-06-20","delete":false,"datetime":"Jun 20th 2016 11:06","timestamp":1466420812,"loggedIn":false,"username":"rustyhook81","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":2,"level":1,"children":[{"id":24111,"user":1,"comment":"We have Feed The Beast which is easy for people to set up, no one plays it :\\","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/cat.jpg","link":"\/profile\/TheBritishAreComing","date":"2016-06-21","delete":false,"datetime":"Jun 21st 2016 15:44","timestamp":1466523879,"loggedIn":false,"username":"TheBritishAreComing","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":2,"children":[],"deleted":0,"parent":24094,"previews":[],"entity":2564,"guilds":0,"type":"1","type_string":"topic"}],"deleted":0,"parent":0,"previews":[],"entity":2564,"guilds":0,"type":"1","type_string":"topic"},{"id":23784,"user":80589,"comment":"Urban Terror anyone?","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/rhino.jpg","link":"\/profile\/BowserKing","date":"2016-06-01","delete":false,"datetime":"Jun 01st 2016 03:38","timestamp":1464752329,"loggedIn":false,"username":"BowserKing","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":2,"level":1,"children":[],"deleted":0,"parent":0,"previews":[],"entity":2564,"guilds":0,"type":"1","type_string":"topic"},{"id":23695,"user":1,"comment":"Hi everyone, it's now in the menu! I will be e-mailing everyone tomorrow :) this is just the first few game servers","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/cat.jpg","link":"\/profile\/TheBritishAreComing","date":"2016-05-27","delete":false,"datetime":"May 27th 2016 20:20","timestamp":1464380423,"loggedIn":false,"username":"TheBritishAreComing","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":1,"children":[],"deleted":0,"parent":0,"previews":[],"entity":2564,"guilds":0,"type":"1","type_string":"topic"},{"id":23554,"user":81732,"comment":"I'm new here. How do I find the IP address of the servers?","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/cat.jpg","link":"\/profile\/izaihb","date":"2016-05-23","delete":false,"datetime":"May 23rd 2016 20:09","timestamp":1464034183,"loggedIn":false,"username":"izaihb","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":3,"level":1,"children":[{"id":23585,"user":32171,"comment":"[link<\/a>] as i said, its hidden from the menu, so kinda pointless..","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/rhino.jpg","link":"\/profile\/MrKarter77","date":"2016-05-24","delete":false,"datetime":"May 24th 2016 06:21","timestamp":1464070864,"loggedIn":false,"username":"MrKarter77","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":2,"children":[],"deleted":0,"parent":23554,"previews":[],"entity":2564,"guilds":0,"type":"1","type_string":"topic"}],"deleted":0,"parent":0,"previews":[],"entity":2564,"guilds":0,"type":"1","type_string":"topic"},{"id":23488,"user":32171,"comment":"Should add a link to the game servers in the menu...","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/rhino.jpg","link":"\/profile\/MrKarter77","date":"2016-05-23","delete":false,"datetime":"May 23rd 2016 06:08","timestamp":1463983738,"loggedIn":false,"username":"MrKarter77","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":3,"level":1,"children":[],"deleted":0,"parent":0,"previews":[],"entity":2564,"guilds":0,"type":"1","type_string":"topic"},{"id":23487,"user":81792,"comment":"How about an ark modded server? i'm getting a new computer in a few weeks and will actually be able to play :)","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/cat.jpg","link":"\/profile\/SeriousPancake","date":"2016-05-23","delete":false,"datetime":"May 23rd 2016 06:08","timestamp":1463983731,"loggedIn":false,"username":"SeriousPancake","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":1,"children":[],"deleted":0,"parent":0,"previews":[],"entity":2564,"guilds":0,"type":"1","type_string":"topic"},{"id":23385,"user":50450,"comment":"I can host a feed the beast minecraft server on my server at home 24\/7 uptime, I'm an option if you need one. Ssds and all.","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/rhino.jpg","link":"\/profile\/luc401","date":"2016-05-18","delete":false,"datetime":"May 18th 2016 20:55","timestamp":1463604936,"loggedIn":false,"username":"luc401","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":2,"level":1,"children":[],"deleted":0,"parent":0,"previews":[],"entity":2564,"guilds":0,"type":"1","type_string":"topic"},{"id":23378,"user":17476,"comment":"Terraria :)","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/giraffe.jpg","link":"\/profile\/CowsGoMooALot","date":"2016-05-18","delete":false,"datetime":"May 18th 2016 19:02","timestamp":1463598140,"loggedIn":false,"username":"CowsGoMooALot","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":3,"level":1,"children":[{"id":23379,"user":29316,"comment":"That's already an option, you smart-Alex","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/cat.jpg","link":"\/profile\/imyourzer0","date":"2016-05-18","delete":false,"datetime":"May 18th 2016 19:10","timestamp":1463598608,"loggedIn":false,"username":"imyourzer0","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":2,"children":[{"id":23389,"user":17476,"comment":"I was on mobile, so it didn't give me the options, bruh.","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/giraffe.jpg","link":"\/profile\/CowsGoMooALot","date":"2016-05-18","delete":false,"datetime":"May 18th 2016 22:54","timestamp":1463612071,"loggedIn":false,"username":"CowsGoMooALot","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":3,"children":[],"deleted":0,"parent":23379,"previews":[],"entity":2564,"guilds":0,"type":"1","type_string":"topic"}],"deleted":0,"parent":23378,"previews":[],"entity":2564,"guilds":0,"type":"1","type_string":"topic"}],"deleted":0,"parent":0,"previews":[],"entity":2564,"guilds":0,"type":"1","type_string":"topic"},{"id":23375,"user":29316,"comment":"Mario Kart \/ Smash Bros... though I don't know whether that's a possible thing to do.","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/cat.jpg","link":"\/profile\/imyourzer0","date":"2016-05-18","delete":false,"datetime":"May 18th 2016 18:29","timestamp":1463596195,"loggedIn":false,"username":"imyourzer0","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":1,"children":[],"deleted":0,"parent":0,"previews":[],"entity":2564,"guilds":0,"type":"1","type_string":"topic"},{"id":23373,"user":69901,"comment":"Halo: Custom Edition server might be a fun one to have, as long as a list of extra maps required to play on it are left on the server page","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/cat.jpg","link":"\/profile\/DarkLordArbitur","date":"2016-05-18","delete":false,"datetime":"May 18th 2016 16:58","timestamp":1463590686,"loggedIn":false,"username":"DarkLordArbitur","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":1,"children":[{"id":23376,"user":1,"comment":"Added! please vote!","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/cat.jpg","link":"\/profile\/TheBritishAreComing","date":"2016-05-18","delete":false,"datetime":"May 18th 2016 18:30","timestamp":1463596218,"loggedIn":false,"username":"TheBritishAreComing","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":2,"children":[],"deleted":0,"parent":23373,"previews":[],"entity":2564,"guilds":0,"type":"1","type_string":"topic"}],"deleted":0,"parent":0,"previews":[],"entity":2564,"guilds":0,"type":"1","type_string":"topic"},{"id":23372,"user":42081,"comment":"Smite please","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/rhino.jpg","link":"\/profile\/DigityDog","date":"2016-05-18","delete":false,"datetime":"May 18th 2016 16:49","timestamp":1463590176,"loggedIn":false,"username":"DigityDog","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":1,"children":[{"id":23377,"user":1,"comment":"Added! please vote!","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/cat.jpg","link":"\/profile\/TheBritishAreComing","date":"2016-05-18","delete":false,"datetime":"May 18th 2016 18:30","timestamp":1463596222,"loggedIn":false,"username":"TheBritishAreComing","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":2,"children":[],"deleted":0,"parent":23372,"previews":[],"entity":2564,"guilds":0,"type":"1","type_string":"topic"}],"deleted":0,"parent":0,"previews":[],"entity":2564,"guilds":0,"type":"1","type_string":"topic"},{"id":23369,"user":4260,"comment":"Arma 3 exile, Arma 2 Epoch, Rust, or Ark Survival Evolved.","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/rhino.jpg","link":"\/profile\/FabulaExtant","date":"2016-05-18","delete":false,"datetime":"May 18th 2016 13:53","timestamp":1463579633,"loggedIn":false,"username":"FabulaExtant","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":3,"level":1,"children":[{"id":23370,"user":1,"comment":"Added them all, feel free to vote :)","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/cat.jpg","link":"\/profile\/TheBritishAreComing","date":"2016-05-18","delete":false,"datetime":"May 18th 2016 13:56","timestamp":1463579771,"loggedIn":false,"username":"TheBritishAreComing","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":2,"children":[{"id":23371,"user":4260,"comment":"Space Engineers, Chivalry, and Life is Feudal.","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/rhino.jpg","link":"\/profile\/FabulaExtant","date":"2016-05-18","delete":false,"datetime":"May 18th 2016 14:26","timestamp":1463581618,"loggedIn":false,"username":"FabulaExtant","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":3,"children":[],"deleted":0,"parent":23370,"previews":[],"entity":2564,"guilds":0,"type":"1","type_string":"topic"}],"deleted":0,"parent":23369,"previews":[],"entity":2564,"guilds":0,"type":"1","type_string":"topic"}],"deleted":0,"parent":0,"previews":[],"entity":2564,"guilds":0,"type":"1","type_string":"topic"},{"id":23367,"user":73627,"comment":"Insurgency!","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/rhino.jpg","link":"\/profile\/MrTopp3r","date":"2016-05-18","delete":false,"datetime":"May 18th 2016 13:13","timestamp":1463577207,"loggedIn":false,"username":"MrTopp3r","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":2,"level":1,"children":[{"id":23368,"user":1,"comment":"Added!","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/cat.jpg","link":"\/profile\/TheBritishAreComing","date":"2016-05-18","delete":false,"datetime":"May 18th 2016 13:15","timestamp":1463577335,"loggedIn":false,"username":"TheBritishAreComing","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":2,"children":[],"deleted":0,"parent":23367,"previews":[],"entity":2564,"guilds":0,"type":"1","type_string":"topic"}],"deleted":0,"parent":0,"previews":[],"entity":2564,"guilds":0,"type":"1","type_string":"topic"},{"id":23364,"user":31703,"comment":"also Civ 5 and\/or Terraria pls and thank you","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/cat.jpg","link":"\/profile\/SergeantKnickerlessArsewipe","date":"2016-05-18","delete":false,"datetime":"May 18th 2016 11:32","timestamp":1463571178,"loggedIn":false,"username":"SergeantKnickerlessArsewipe","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":6,"level":1,"children":[{"id":23365,"user":1,"comment":"I've just added Terraria. Civ 5 isn't something we can host","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/cat.jpg","link":"\/profile\/TheBritishAreComing","date":"2016-05-18","delete":false,"datetime":"May 18th 2016 11:36","timestamp":1463571364,"loggedIn":false,"username":"TheBritishAreComing","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":2,"children":[{"id":23374,"user":67231,"comment":"I vote for Civ 5.","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/cat.jpg","link":"\/profile\/SirPanbornBeast","date":"2016-05-18","delete":false,"datetime":"May 18th 2016 17:11","timestamp":1463591480,"loggedIn":false,"username":"SirPanbornBeast","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":3,"children":[],"deleted":0,"parent":23365,"previews":[],"entity":2564,"guilds":0,"type":"1","type_string":"topic"},{"id":23366,"user":31703,"comment":"poops, but tru, Civ 5 is great though. Have I mentioned that Civ 5 is great?","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/cat.jpg","link":"\/profile\/SergeantKnickerlessArsewipe","date":"2016-05-18","delete":false,"datetime":"May 18th 2016 11:37","timestamp":1463571463,"loggedIn":false,"username":"SergeantKnickerlessArsewipe","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":3,"children":[],"deleted":0,"parent":23365,"previews":[],"entity":2564,"guilds":0,"type":"1","type_string":"topic"}],"deleted":0,"parent":23364,"previews":[],"entity":2564,"guilds":0,"type":"1","type_string":"topic"}],"deleted":0,"parent":0,"previews":[],"entity":2564,"guilds":0,"type":"1","type_string":"topic"}],
entityID : "2564",
title : "Comments",
element : "discussion_container",
buttonText : "Add Comment",
buttonClasses : "small_button small_button_green",
answerClasses : ""
};
if(typeof($d) == "undefined"){
$d = {
initCheckboxes:function(element){
element.find("input[type=checkbox]").each(function(){
var c = $(this);
if(!c.attr("checkbox_setup")){
c.attr("checkbox_setup",true);
var id = c.attr("id");
var container = $(document.createElement("div"));
container.addClass(c.get(0).className);
c.get(0).className = "";
container.addClass("checkbox");
container.attr("id",id);
container.prop("name",id);
c.attr("id",id + "-checkbox");
container.prop("checked",c.get(0).checked);
container.prop("value",c.val());
container.prop("type","checkbox");
container.attr("type","checkbox");
if(c.prop("title")){container.append(""+c.prop("title")+"");}
c.before(container);
c.remove();
container.append(c);
if(c.get(0).checked){
container.addClass("checked");
}
var checkUncheck = function(){
c.addClass("toSave");
if(c.get(0).checked){container.addClass("checked");}
else{container.removeClass("checked");}
};
container.click(function(){
var container = $(this);
c.click();
container.prop("checked",c.get(0).checked);
checkUncheck();
});
}
});
},
initSelects: function(element){
try{
if(!this.helpers.isMobile()){
element.find("select").select2();
}
}catch(e){}
},
session: {
isLoggedIn:function(){return false;}
},
helpers: {
stripHTML : function(string){
var div = $(document.createElement("div"));
div.html(string.replace(/(
|
|
)/gm,'\n').replace(/<\/p>/gm,'\n\n'));
return div.text().trim();
},
showOverlay : function(containers, content, realignLeft, realignTop) {
if(!content) {content = "";}
// Adds a default loading icon
if($.trim(content) == "") {content = "";}
if(containers) {
containers.each(function() {
var container = $(this);
container.append("");
var contentDiv = $(".details_overlay_content");
if(typeof(realignLeft) == "undefined" || realignLeft == true || realignLeft == null){
var contentLeft = (container.outerWidth()/2)-(contentDiv.outerWidth()/2);
contentDiv.css({left:contentLeft+"px"});
}
if(typeof(realignTop) == "undefined" || realignTop == true || realignTop == null){
var contentTop = (container.outerHeight()/2)-(contentDiv.outerHeight()/2);
contentDiv.css({top:contentTop+"px"});
}
});
}
},
hideOverlay : function(container) {
if(container) {container.find("details_overlay").remove();}
else {
$(".details_overlay").each(function() {
$(this).remove();
});
}
},
},
network:{
request:$.ajax,
post:$.post,
get:$.get
}
}
plugin.integrate(null,options);
}else{
$d.plugins.add(plugin,options);
$d.plugins.get("comments").integrate($d.plugins,options);
$d.network.addHandler("comments", "update-score",function(data){
if(typeof(data) != "undefined" && data != null){
var comment = $(".comment_item[data-id="+data.comment+"]");
if(comment.length > 0){
if(typeof(plugin.comments[data.comment]) == "undefined"){
plugin.comments[data.comment] = {};
}
if(typeof(plugin.comments[data.comment].score) == "undefined"){
plugin.comments[data.comment].score = 0;
}
plugin.comments[data.comment].score = data.score;
comment.attr("point-count",data.score);
comment.find(".comment_score").html(data.score + " points");
}
}
});
$d.network.addHandler("comments","deleted",function(data){
if(typeof(data) != "undefined" && data != null){
var p = $(".comment_item[data-id="+data+"]");
var children = $(".comment_item[data-parent="+data+"]");
if(children.length > 0){
p.find(".comment_username").html("deleted");
p.find(".comment_reply").remove();
p.find(".comment_delete").remove();
p.find(".comment_voting_buttons").remove();
p.addClass("comment_deleted");
p.find(".comment_content").html("");
$d.helpers.hideOverlay();
}else{
p.remove();
}
}
});
$d.network.addHandler("comments","added",function(data){
if(typeof(data.comment) != "undefined"){
var newComment = data;
if(typeof(newComment.error) == "undefined"){
if(!plugin.comments[newComment.id]){
setTimeout(function(){
plugin.comments[newComment.id] = newComment;
var pComment = plugin.processComment(newComment,false,$("#comments_list"),true);
$d.plugins.get("comments").updateList();
},1000);
}
}
}
});
}
" + options.title + "
"; } if($d.session && $d.session.isLoggedIn()){ html += "