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 = "\
"; if(options.title){ html = html + "

" + options.title + "

"; } if($d.session && $d.session.isLoggedIn()){ html += "
\
\
\
"; if(options.anonymous){ html += ""; } html += "\ \ \
\
\
"; }else{ html += ""; } 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("1"); 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("\
    \
    "+commentUserImage+"
    \
    \
    "+commentUsername+", "+comment.datetime+"
    \
    \
    \
    \
    \
    \
    \
    \
    \
    \
    \
    "+comment.score+" points
    \
    \
    \
    \ "); 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("[deleted]"); $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("

    "+comment.comment+"

    "); } 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("
    Login to comment
    "); } $("#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:"meetup", anonymous : "", comments : [{"id":1912,"user":13328,"comment":"Ah fuck, I thought it was in August! FUCKKKKK","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/rhino.jpg","link":"\/profile\/NiceWork","date":"2018-08-03","delete":false,"datetime":"Aug 03rd 2018 17:51","timestamp":"1533318701","loggedIn":false,"username":"NiceWork","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":2,"level":1,"children":[{"id":1913,"user":75595,"comment":"Well I think your name says it all","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/rhino.jpg","link":"\/profile\/Danda","date":"2018-08-03","delete":false,"datetime":"Aug 03rd 2018 18:28","timestamp":"1533320888","loggedIn":false,"username":"Danda","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":2,"level":2,"children":[],"deleted":0,"parent":1912,"previews":[],"entity":535,"guilds":0,"type":"3","type_string":"meetup"}],"deleted":0,"parent":0,"previews":[],"entity":535,"guilds":0,"type":"3","type_string":"meetup"},{"id":1910,"user":1,"comment":"Details are in your PMs thanks love jems","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/cat.jpg","link":"\/profile\/TheBritishAreComing","date":"2018-07-27","delete":false,"datetime":"Jul 27th 2018 23:32","timestamp":"1532734350","loggedIn":false,"username":"TheBritishAreComing","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":1,"children":[],"deleted":0,"parent":0,"previews":[],"entity":535,"guilds":0,"type":"3","type_string":"meetup"},{"id":1906,"user":78247,"comment":"Can you share more about the location and time? Or where I can find the info?","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/giraffe.jpg","link":"\/profile\/elia","date":"2018-07-27","delete":false,"datetime":"Jul 27th 2018 17:32","timestamp":"1532712769","loggedIn":false,"username":"elia","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":1,"children":[{"id":1907,"user":-1,"comment":"[deleted]<\/span>","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/cat.jpg","link":"#","date":"2018-07-27","delete":false,"datetime":"Jul 27th 2018 17:33","timestamp":"1532712833","loggedIn":false,"username":"deleted","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":2,"children":[{"id":1908,"user":78247,"comment":"Thank you, I appreciate it! :)","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/giraffe.jpg","link":"\/profile\/elia","date":"2018-07-27","delete":false,"datetime":"Jul 27th 2018 18:21","timestamp":"1532715690","loggedIn":false,"username":"elia","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":3,"children":[{"id":1909,"user":1,"comment":"Hey, it should be in your PMs i sent everyone a PM a few days ago :)","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/cat.jpg","link":"\/profile\/TheBritishAreComing","date":"2018-07-27","delete":false,"datetime":"Jul 27th 2018 22:42","timestamp":"1532731344","loggedIn":false,"username":"TheBritishAreComing","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":4,"children":[],"deleted":0,"parent":1908,"previews":[],"entity":535,"guilds":0,"type":"3","type_string":"meetup"}],"deleted":0,"parent":1907,"previews":[],"entity":535,"guilds":0,"type":"3","type_string":"meetup"}],"deleted":1,"parent":1906,"previews":[],"entity":535,"guilds":0,"type":"3","type_string":"meetup"}],"deleted":0,"parent":0,"previews":[],"entity":535,"guilds":0,"type":"3","type_string":"meetup"},{"id":1887,"user":1,"comment":"RIGHT EVERYONE WHO IS COMING I NEED T-SHIRT SIZES PLS","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/cat.jpg","link":"\/profile\/TheBritishAreComing","date":"2018-06-28","delete":false,"datetime":"Jun 28th 2018 09:28","timestamp":"1530178111","loggedIn":false,"username":"TheBritishAreComing","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":3,"level":1,"children":[{"id":1905,"user":78247,"comment":"L","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/giraffe.jpg","link":"\/profile\/elia","date":"2018-07-27","delete":false,"datetime":"Jul 27th 2018 17:24","timestamp":"1532712242","loggedIn":false,"username":"elia","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":2,"children":[],"deleted":0,"parent":1887,"previews":[],"entity":535,"guilds":0,"type":"3","type_string":"meetup"},{"id":1899,"user":39692,"comment":"I missed this but if it's not too late then Large please :)","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/giraffe.jpg","link":"\/profile\/alcopop","date":"2018-07-07","delete":false,"datetime":"Jul 07th 2018 16:21","timestamp":"1530980497","loggedIn":false,"username":"alcopop","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":2,"children":[],"deleted":0,"parent":1887,"previews":[],"entity":535,"guilds":0,"type":"3","type_string":"meetup"},{"id":1895,"user":42347,"comment":"L please, i like em big....aye","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/cat.jpg","link":"\/profile\/pandatoast","date":"2018-06-29","delete":false,"datetime":"Jun 29th 2018 20:37","timestamp":"1530304661","loggedIn":false,"username":"pandatoast","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":2,"level":2,"children":[],"deleted":0,"parent":1887,"previews":[],"entity":535,"guilds":1,"type":"3","type_string":"meetup"},{"id":1894,"user":56896,"comment":"depends, what material and cut type.  unisex or you doing mens and womens.  small is my go to.  if there is a preferred cut\/fabric then distressed\/vintage cotton in mens\/unisex, next choice is womens (don't judge, I like a tight shirt), if it's unisex standard then it doesn't really matter.  sorry for being over complicated in clothing :(","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/cat.jpg","link":"\/profile\/thekamikazekid","date":"2018-06-29","delete":false,"datetime":"Jun 29th 2018 20:36","timestamp":"1530304563","loggedIn":false,"username":"thekamikazekid","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":2,"children":[{"id":1896,"user":1,"comment":"I'm giving you a mug","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/cat.jpg","link":"\/profile\/TheBritishAreComing","date":"2018-06-30","delete":false,"datetime":"Jun 30th 2018 22:45","timestamp":"1530398733","loggedIn":false,"username":"TheBritishAreComing","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":3,"children":[{"id":1898,"user":56896,"comment":"o.O  I don't wanna be mugged though :(","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/cat.jpg","link":"\/profile\/thekamikazekid","date":"2018-07-02","delete":false,"datetime":"Jul 02nd 2018 16:26","timestamp":"1530548779","loggedIn":false,"username":"thekamikazekid","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":4,"children":[],"deleted":0,"parent":1896,"previews":[],"entity":535,"guilds":0,"type":"3","type_string":"meetup"}],"deleted":0,"parent":1894,"previews":[],"entity":535,"guilds":0,"type":"3","type_string":"meetup"}],"deleted":0,"parent":1887,"previews":[],"entity":535,"guilds":0,"type":"3","type_string":"meetup"},{"id":1893,"user":60195,"comment":"M","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/rhino.jpg","link":"\/profile\/khazorath","date":"2018-06-28","delete":false,"datetime":"Jun 28th 2018 19:09","timestamp":"1530212989","loggedIn":false,"username":"khazorath","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":2,"children":[],"deleted":0,"parent":1887,"previews":[],"entity":535,"guilds":0,"type":"3","type_string":"meetup"},{"id":1892,"user":21049,"comment":"M","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/cat.jpg","link":"\/profile\/Weatherbee","date":"2018-06-28","delete":false,"datetime":"Jun 28th 2018 17:52","timestamp":"1530208327","loggedIn":false,"username":"Weatherbee","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":2,"children":[],"deleted":0,"parent":1887,"previews":[],"entity":535,"guilds":0,"type":"3","type_string":"meetup"},{"id":1891,"user":86283,"comment":"Medium for me please","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/giraffe.jpg","link":"\/profile\/Nanners","date":"2018-06-28","delete":false,"datetime":"Jun 28th 2018 16:53","timestamp":"1530204838","loggedIn":false,"username":"Nanners","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":2,"children":[],"deleted":0,"parent":1887,"previews":[],"entity":535,"guilds":0,"type":"3","type_string":"meetup"},{"id":1890,"user":1574,"comment":"1 small please","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/cat.jpg","link":"\/profile\/TheTrooperWithAFearOfTheDark","date":"2018-06-28","delete":false,"datetime":"Jun 28th 2018 12:33","timestamp":"1530189212","loggedIn":false,"username":"TheTrooperWithAFearOfTheDark","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":2,"children":[],"deleted":0,"parent":1887,"previews":[],"entity":535,"guilds":0,"type":"3","type_string":"meetup"},{"id":1889,"user":75595,"comment":"I'll be safe and go with a Large","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/rhino.jpg","link":"\/profile\/Danda","date":"2018-06-28","delete":false,"datetime":"Jun 28th 2018 09:57","timestamp":"1530179829","loggedIn":false,"username":"Danda","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":2,"children":[],"deleted":0,"parent":1887,"previews":[],"entity":535,"guilds":0,"type":"3","type_string":"meetup"},{"id":1888,"user":81802,"comment":"L :)","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/rhino.jpg","link":"\/profile\/fred0ne","date":"2018-06-28","delete":false,"datetime":"Jun 28th 2018 09:36","timestamp":"1530178567","loggedIn":false,"username":"fred0ne","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":2,"children":[],"deleted":0,"parent":1887,"previews":[],"entity":535,"guilds":0,"type":"3","type_string":"meetup"}],"deleted":0,"parent":0,"previews":[],"entity":535,"guilds":0,"type":"3","type_string":"meetup"},{"id":1874,"user":82121,"comment":"Somebody send me an email with a reminder 20 days before the meetup","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/rhino.jpg","link":"\/profile\/Norwegurian","date":"2018-05-11","delete":false,"datetime":"May 11th 2018 19:01","timestamp":"1526065299","loggedIn":false,"username":"Norwegurian","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":2,"level":1,"children":[{"id":1904,"user":80775,"comment":"A late reminder","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/cat.jpg","link":"\/profile\/Rhodderz","date":"2018-07-23","delete":false,"datetime":"Jul 23rd 2018 19:39","timestamp":"1532374776","loggedIn":false,"username":"Rhodderz","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":2,"children":[],"deleted":0,"parent":1874,"previews":[],"entity":535,"guilds":0,"type":"3","type_string":"meetup"}],"deleted":0,"parent":0,"previews":[],"entity":535,"guilds":0,"type":"3","type_string":"meetup"},{"id":1870,"user":27612,"comment":"Will probably forget so somebody please remind me closer to the date","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/rhino.jpg","link":"\/profile\/GreatGrandGog","date":"2018-05-06","delete":false,"datetime":"May 06th 2018 00:13","timestamp":"1525565587","loggedIn":false,"username":"GreatGrandGog","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":2,"level":1,"children":[{"id":1871,"user":1574,"comment":"Hey, we're now closer to the date, here's a reminder","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/cat.jpg","link":"\/profile\/TheTrooperWithAFearOfTheDark","date":"2018-05-06","delete":false,"datetime":"May 06th 2018 08:18","timestamp":"1525594708","loggedIn":false,"username":"TheTrooperWithAFearOfTheDark","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":2,"children":[],"deleted":0,"parent":1870,"previews":[],"entity":535,"guilds":0,"type":"3","type_string":"meetup"}],"deleted":0,"parent":0,"previews":[],"entity":535,"guilds":0,"type":"3","type_string":"meetup"},{"id":1864,"user":39692,"comment":"I'm actually coming this time, promise! It's going in the diary as we speak, yay!","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/giraffe.jpg","link":"\/profile\/alcopop","date":"2018-04-29","delete":false,"datetime":"Apr 29th 2018 17:40","timestamp":"1525023631","loggedIn":false,"username":"alcopop","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":2,"level":1,"children":[{"id":1865,"user":80775,"comment":"Done believe you","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/cat.jpg","link":"\/profile\/Rhodderz","date":"2018-04-29","delete":false,"datetime":"Apr 29th 2018 23:58","timestamp":"1525046324","loggedIn":false,"username":"Rhodderz","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":2,"children":[{"id":1866,"user":80775,"comment":"Don't*","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/cat.jpg","link":"\/profile\/Rhodderz","date":"2018-04-29","delete":false,"datetime":"Apr 29th 2018 23:58","timestamp":"1525046336","loggedIn":false,"username":"Rhodderz","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":3,"children":[{"id":1868,"user":39692,"comment":"I've booked a non-refundable hotel so I'm locked in!","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/giraffe.jpg","link":"\/profile\/alcopop","date":"2018-05-06","delete":false,"datetime":"May 06th 2018 00:06","timestamp":"1525565217","loggedIn":false,"username":"alcopop","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":4,"children":[],"deleted":0,"parent":1866,"previews":[],"entity":535,"guilds":0,"type":"3","type_string":"meetup"}],"deleted":0,"parent":1865,"previews":[],"entity":535,"guilds":0,"type":"3","type_string":"meetup"}],"deleted":0,"parent":1864,"previews":[],"entity":535,"guilds":0,"type":"3","type_string":"meetup"}],"deleted":0,"parent":0,"previews":[],"entity":535,"guilds":0,"type":"3","type_string":"meetup"},{"id":1855,"user":13328,"comment":"What's a Hyde park?","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/rhino.jpg","link":"\/profile\/NiceWork","date":"2018-04-12","delete":false,"datetime":"Apr 12th 2018 21:44","timestamp":"1523569479","loggedIn":false,"username":"NiceWork","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":1,"children":[],"deleted":0,"parent":0,"previews":[],"entity":535,"guilds":0,"type":"3","type_string":"meetup"},{"id":1854,"user":31703,"comment":"imma be there and be square B)","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/cat.jpg","link":"\/profile\/SergeantKnickerlessArsewipe","date":"2018-04-11","delete":false,"datetime":"Apr 11th 2018 16:12","timestamp":"1523463158","loggedIn":false,"username":"SergeantKnickerlessArsewipe","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":3,"level":1,"children":[],"deleted":0,"parent":0,"previews":[],"entity":535,"guilds":0,"type":"3","type_string":"meetup"},{"id":1853,"user":85393,"comment":"Travel booked. Now let's talk accommodation. Anyone willing to share a hotel room with this Hodor? Or do we just all crash in the park?","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/rhino.jpg","link":"\/profile\/HodorLebowski","date":"2018-04-11","delete":false,"datetime":"Apr 11th 2018 14:23","timestamp":"1523456632","loggedIn":false,"username":"HodorLebowski","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":3,"level":1,"children":[],"deleted":0,"parent":0,"previews":[],"entity":535,"guilds":0,"type":"3","type_string":"meetup"},{"id":1843,"user":84979,"comment":"I sadly won't be able to make it. I'm going to be buying a home in the next few months and a dear friend is getting married in mid July. I'll be in NYC in October though!","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/rhino.jpg","link":"\/profile\/justanothermick","date":"2018-03-24","delete":false,"datetime":"Mar 24th 2018 20:16","timestamp":"1521922609","loggedIn":false,"username":"justanothermick","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":0,"level":1,"children":[],"deleted":0,"parent":0,"previews":[],"entity":535,"guilds":0,"type":"3","type_string":"meetup"},{"id":1833,"user":1,"comment":"Would you guys be interested in free SoSa t-shirts on the day?","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/cat.jpg","link":"\/profile\/TheBritishAreComing","date":"2018-03-08","delete":false,"datetime":"Mar 08th 2018 10:14","timestamp":"1520504060","loggedIn":false,"username":"TheBritishAreComing","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":5,"level":1,"children":[{"id":1869,"user":39692,"comment":"yaaaaasss","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/giraffe.jpg","link":"\/profile\/alcopop","date":"2018-05-06","delete":false,"datetime":"May 06th 2018 00:07","timestamp":"1525565231","loggedIn":false,"username":"alcopop","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":2,"children":[],"deleted":0,"parent":1833,"previews":[],"entity":535,"guilds":0,"type":"3","type_string":"meetup"},{"id":1848,"user":81802,"comment":"OF COURSE !!!!","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/rhino.jpg","link":"\/profile\/fred0ne","date":"2018-03-29","delete":false,"datetime":"Mar 29th 2018 13:31","timestamp":"1522330318","loggedIn":false,"username":"fred0ne","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":2,"children":[{"id":1849,"user":1,"comment":"Fight you for one","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/cat.jpg","link":"\/profile\/TheBritishAreComing","date":"2018-03-29","delete":false,"datetime":"Mar 29th 2018 14:42","timestamp":"1522334558","loggedIn":false,"username":"TheBritishAreComing","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":2,"level":3,"children":[{"id":1850,"user":81802,"comment":"DEAL","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/rhino.jpg","link":"\/profile\/fred0ne","date":"2018-03-29","delete":false,"datetime":"Mar 29th 2018 14:43","timestamp":"1522334597","loggedIn":false,"username":"fred0ne","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":4,"children":[],"deleted":0,"parent":1849,"previews":[],"entity":535,"guilds":0,"type":"3","type_string":"meetup"}],"deleted":0,"parent":1848,"previews":[],"entity":535,"guilds":0,"type":"3","type_string":"meetup"}],"deleted":0,"parent":1833,"previews":[],"entity":535,"guilds":0,"type":"3","type_string":"meetup"},{"id":1840,"user":76952,"comment":"depends on what the tshirts look like","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/giraffe.jpg","link":"\/profile\/Para","date":"2018-03-14","delete":false,"datetime":"Mar 14th 2018 07:53","timestamp":"1521014026","loggedIn":false,"username":"Para","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":2,"children":[{"id":1841,"user":1,"comment":"They'll look good and more than likely ethically sourced. I'm thinking plain black \/ white with just the logo "SoSa Chat Play Share"","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/cat.jpg","link":"\/profile\/TheBritishAreComing","date":"2018-03-14","delete":false,"datetime":"Mar 14th 2018 11:24","timestamp":"1521026681","loggedIn":false,"username":"TheBritishAreComing","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":2,"level":3,"children":[],"deleted":0,"parent":1840,"previews":[],"entity":535,"guilds":0,"type":"3","type_string":"meetup"}],"deleted":0,"parent":1833,"previews":[],"entity":535,"guilds":0,"type":"3","type_string":"meetup"},{"id":1837,"user":56896,"comment":"Sure","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/cat.jpg","link":"\/profile\/thekamikazekid","date":"2018-03-08","delete":false,"datetime":"Mar 08th 2018 16:36","timestamp":"1520526982","loggedIn":false,"username":"thekamikazekid","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":2,"children":[],"deleted":0,"parent":1833,"previews":[],"entity":535,"guilds":1,"type":"3","type_string":"meetup"},{"id":1836,"user":80775,"comment":"I would always like a free tshirtb as i may of mentioned a few times in the oast :P","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/cat.jpg","link":"\/profile\/Rhodderz","date":"2018-03-08","delete":false,"datetime":"Mar 08th 2018 13:23","timestamp":"1520515416","loggedIn":false,"username":"Rhodderz","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":2,"children":[],"deleted":0,"parent":1833,"previews":[],"entity":535,"guilds":1,"type":"3","type_string":"meetup"}],"deleted":0,"parent":0,"previews":[],"entity":535,"guilds":0,"type":"3","type_string":"meetup"},{"id":1832,"user":56896,"comment":"I should be there, going to Blackpool the following weekend for Rebellion Festival.  Still sorting overall trip and accommodations.","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/cat.jpg","link":"\/profile\/thekamikazekid","date":"2018-03-05","delete":false,"datetime":"Mar 05th 2018 21:44","timestamp":"1520286280","loggedIn":false,"username":"thekamikazekid","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":1,"children":[],"deleted":0,"parent":0,"previews":[],"entity":535,"guilds":0,"type":"3","type_string":"meetup"},{"id":1830,"user":81802,"comment":"FLIGHT RESERVED !!!! see you soon !","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/rhino.jpg","link":"\/profile\/fred0ne","date":"2018-02-28","delete":false,"datetime":"Feb 28th 2018 13:33","timestamp":"1519824796","loggedIn":false,"username":"fred0ne","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":1,"children":[{"id":1831,"user":29209,"comment":"SEE YOU SOON TOO I GOT MY FLIGHTS TONIGHT","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/giraffe.jpg","link":"\/profile\/umbrena","date":"2018-03-01","delete":false,"datetime":"Mar 01st 2018 02:53","timestamp":"1519872786","loggedIn":false,"username":"umbrena","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":2,"children":[],"deleted":0,"parent":1830,"previews":[],"entity":535,"guilds":0,"type":"3","type_string":"meetup"}],"deleted":0,"parent":0,"previews":[],"entity":535,"guilds":1,"type":"3","type_string":"meetup"},{"id":1825,"user":51365,"comment":"I asked for time off work, so I will most likely be there.","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/giraffe.jpg","link":"\/profile\/MsFons","date":"2018-02-15","delete":false,"datetime":"Feb 15th 2018 15:25","timestamp":"1518708307","loggedIn":false,"username":"MsFons","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":3,"level":1,"children":[{"id":1827,"user":1,"comment":"Exciting!","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/cat.jpg","link":"\/profile\/TheBritishAreComing","date":"2018-02-17","delete":false,"datetime":"Feb 17th 2018 10:00","timestamp":"1518861636","loggedIn":false,"username":"TheBritishAreComing","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":2,"children":[],"deleted":0,"parent":1825,"previews":[],"entity":535,"guilds":0,"type":"3","type_string":"meetup"},{"id":1826,"user":29209,"comment":"oh em gee","image":"https:\/\/chatplayshare.com\/themes\/default\/images\/profiles\/giraffe.jpg","link":"\/profile\/umbrena","date":"2018-02-16","delete":false,"datetime":"Feb 16th 2018 13:58","timestamp":"1518789530","loggedIn":false,"username":"umbrena","upclass":"","downclass":"","upvoted":false,"downvoted":false,"score":1,"level":2,"children":[],"deleted":0,"parent":1825,"previews":[],"entity":535,"guilds":0,"type":"3","type_string":"meetup"}],"deleted":0,"parent":0,"previews":[],"entity":535,"guilds":1,"type":"3","type_string":"meetup"}], entityID : "535", title : "Comments", element : "comments", 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("
    "+content+"
    "); 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("[deleted]"); $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); } } } }); }