';
if (row.comment.comment.text) {
html += Mambo.Utils.mentions2Links(row.comment.comment.text);
}
if (row.comment.comment.media) {
if (row.comment.comment.media.type == 'video') {
if ((Mambo.Utils.unixTime() - row.comment.comment.time) < 60) {
html += ' ';
html += ' The video may be processing. If you can not see it, wait a few seconds and try again ';
}
html += ' ';
html += ' ';
} else if (row.comment.comment.media.type == 'audio') {
html += ' ';
html += ' ';
} else if (row.comment.comment.media.type == 'image') {
html += ' ';
}
}
html += ' ';
html += ' ';
html += ' ' + row.comment.comment.likes_count + '';
html += ' · ';
html += ' ';
html += ' Like';
html += ' · ';
html += ' Share';
html += ' · ';
html += ' ';
html += ' ';
html += '
';
html += '
';
html += '
';
if (!Mambo.Utils.isEmptyObject(row.response)) {
html += ' ';
html += '
';
html += '
';
html += ' ';
html += '
';
html += '
';
html += '
';
html += ' ' + row.response.user.username + '';
if (!Mambo.Utils.isEmptyObject(row.response.response.text)) {
html += Mambo.Utils.mentions2Links(row.response.response.text);
}
if (!Mambo.Utils.isEmptyObject(row.response.response.media)) {
if (row.response.response.media.type == 'video') {
if ((Mambo.Utils.unixTime() - row.response.response.time) < 60) {
html += ' ';
html += ' The video may be processing. If you can not see it, wait a few seconds and try again ';
}
html += ' ';
html += ' ';
} else if (row.response.response.media.type == 'audio') {
html += ' ';
html += ' ';
} else if (row.response.response.media.type == 'image') {
html += ' ';
}
}
html += ' ';
html += ' ';
html += ' ' + row.response.response.likes_count + '';
html += ' · ';
html += ' ';
html += ' Like';
html += ' · ';
html += ' Share';
html += ' · ';
html += ' ';
html += ' ';
html += '
';
html += '
';
html += '
';
html += ' ';
} else {
if (!Mambo.Utils.isEmptyObject(Mambo.Session.User) && Mambo.Session.User.id == row.user.id) {
html += ' ';
html += '
';
html += ' ';
html += ' ';
html += ' ';
html += ' ';
html += ' ';
html += ' ';
html += ' ';
html += ' ';
html += ' ';
html += ' ';
html += ' Reply';
html += '
';
html += '
';
html += '
';
} else {
html += ' ';
}
}
html += '
';
if (!Mambo.Utils.isEmptyObject(Mambo.Session.User) && Mambo.Session.User.id == row.user.id) {
if (Mambo.Utils.isEmptyObject(row.response)) {
html += ' Reply ';
}
}
html += '
';
if (withArticle) {
html += ' ';
}
html += '
';
html += '
';
html += '
';
html += '
';
html += ' Share ';
if (!Mambo.Utils.isEmptyObject(Mambo.Session.User) && Mambo.Session.User.id == row.user.id) {
html += ' Delete ';
}
html += ' Close ';
html += '
';
return html;
},
response: function(row) {
html = '';
if (!Mambo.Utils.isEmptyObject(row.response)) {
html += '
';
html += '
';
html += ' ';
html += '
';
html += '
';
html += '
';
html += ' ' + row.response.user.username + '';
if (row.response.response.text) {
html += Mambo.Utils.mentions2Links(row.response.response.text);
}
if (row.response.response.media) {
if (row.response.response.media.type == 'video') {
if ((Mambo.Utils.unixTime() - row.response.response.time) < 60) {
html += ' ';
html += ' The video may be processing. If you can not see it, wait a few seconds and try again ';
}
html += ' ';
html += ' ';
} else if (row.response.response.media.type == 'audio') {
html += ' ';
html += ' ';
} else if (row.response.response.media.type == 'image') {
html += ' ';
}
}
html += ' ';
html += ' ';
html += ' ' + row.response.response.likes_count + '';
html += ' · ';
html += ' ';
html += ' Like';
html += ' · ';
html += ' Share';
html += ' · ';
html += ' ';
html += ' ';
html += '
';
if (row.comment.comment.text) {
html += Mambo.Utils.mentions2Links(row.comment.comment.text);
}
if (row.comment.comment.media) {
if (row.comment.comment.media.type == 'video') {
if ((Mambo.Utils.unixTime() - row.comment.comment.time) < 60) {
html += ' ';
html += ' The video may be processing. If you can not see it, wait a few seconds and try again ';
}
html += ' ';
html += ' ';
} else if (row.comment.comment.media.type == 'audio') {
html += ' ';
html += ' ';
} else if (row.comment.comment.media.type == 'image') {
html += ' ';
}
}
html += '
';
html += '
';
html += '
';
html += '
';
html += ' ';
html += '
';
html += '
';
html += ' ';
html += ' ';
html += ' ';
html += ' ';
html += ' ';
html += ' ';
html += ' ';
html += ' ';
html += ' ';
html += ' ';
html += ' ';
html += '
';
html += '
';
html += ' Delete ';
html += ' Post ';
html += '
';
html += '
';
html += '
';
html += ' ';
html += '
';
html += '
';
html += '
';
html += '
';
html += ' Delete ';
html += ' Cancel ';
html += '
';
if (!Mambo.Utils.isEmptyObject(row.user)) {
html += ' ' + row.user.username + '';
} else {
html += ' Anonymous';
}
if (!Mambo.Utils.isEmptyObject(row.comment.text)) {
html += Mambo.Utils.mentions2Links(row.comment.text);
}
if (!Mambo.Utils.isEmptyObject(row.comment.media)) {
if (row.comment.media.type == 'video') {
if ((Mambo.Utils.unixTime() - row.comment.time) < 60) {
html += ' ';
html += ' The video may be processing. If you can not see it, wait a few seconds and try again ';
}
html += ' ';
html += ' ';
} else if (row.comment.media.type == 'audio') {
html += ' ';
html += ' ';
} else if (row.comment.media.type == 'image') {
html += ' ';
}
}
html += ' ';
html += ' ';
html += ' ' + row.comment.likes_count + '';
html += ' · ';
html += ' ';
html += ' Like';
html += ' · ';
html += ' Reply';
html += ' · ';
html += ' ';
if (!Mambo.Utils.isEmptyObject(Mambo.Session.User) && Mambo.Session.User.id == row.post.user_id) {
html += ' · ';
html += ' ';
html += ' ';
html += ' ';
}
html += ' ';
html += '
';
html += ' You';
if (!Mambo.Utils.isEmptyObject(row.message.text)) {
html += Mambo.Utils.mentions2Links(row.message.text);
}
if (!Mambo.Utils.isEmptyObject(row.message.media)) {
if (row.message.media.type == 'video') {
if ((Mambo.Utils.unixTime() - row.message.time) < 60) {
html += ' ';
html += ' The video may be processing. If you can not see it, wait a few seconds and try again ';
}
html += ' ';
html += ' ';
} else if (row.message.media.type == 'audio') {
html += ' ';
html += ' ';
} else if (row.message.media.type == 'image') {
html += ' ';
}
}
html += ' ';
html += '
';
html += '
';
html += '
';
} else {
html += '
';
html += '
';
html += ' ';
html += '
';
html += '
';
html += '
';
html += ' ' + row.user.username + '';
if (!Mambo.Utils.isEmptyObject(row.message.text)) {
html += Mambo.Utils.mentions2Links(row.message.text);
}
if (!Mambo.Utils.isEmptyObject(row.message.media)) {
if (row.message.media.type == 'video') {
if ((Mambo.Utils.unixTime() - row.message.time) < 60) {
html += ' ';
html += ' The video may be processing. If you can not see it, wait a few seconds and try again ';
}
html += ' ';
html += ' ';
} else if (row.message.media.type == 'audio') {
html += ' ';
html += ' ';
} else if (row.message.media.type == 'image') {
html += ' ';
}
}
html += ' ';
html += '
';
if (!Mambo.Utils.isEmptyObject(row.comment.comment.text)) {
html += Mambo.Utils.mentions2Links(row.comment.comment.text);
}
if (!Mambo.Utils.isEmptyObject(row.comment.comment.media)) {
if (row.comment.comment.media.type == 'video') {
if ((Mambo.Utils.unixTime() - row.comment.comment.time) < 60) {
html += ' ';
html += ' The video may be processing. If you can not see it, wait a few seconds and try again';
}
html += ' ';
html += ' ';
} else if (row.comment.comment.media.type == 'audio') {
html += ' ';
html += ' ';
} else if (row.comment.comment.media.type == 'image') {
html += ' ';
}
}
html += ' ';
html += ' ';
html += ' ' + row.comment.comment.likes_count + '';
html += ' · ';
html += ' ';
html += ' Like';
html += ' · ';
html += ' Reply';
html += ' · ';
html += ' Share';
html += ' · ';
html += ' ';
html += ' ';
html += '
';
html += '
';
html += '
';
hasResponses = false;
showLoadMoreResponses = false;
if (!Mambo.Utils.isEmptyObject(row.response) || !Mambo.Utils.isEmptyObject(row.responses)) {
hasResponses = true;
}
if (!Mambo.Utils.isEmptyObject(row.responses)) {
if (row.comment.comment.responses_count > row.responses.length) {
showLoadMoreResponses = true;
}
}
html += ' ';
html += ' Load more comments';
html += '
';
if (!Mambo.Utils.isEmptyObject(row.responses)) {
for (k = 0; k < row.responses.length; k++) {
html += '
';
html += '
';
html += ' ';
html += '
';
html += '
';
html += '
';
if (!Mambo.Utils.isEmptyObject(row.responses[k].user)) {
html += ' ' + row.responses[k].user.username + '';
} else {
html += ' Anonymous';
}
if (!Mambo.Utils.isEmptyObject(row.responses[k].response.text)) {
html += Mambo.Utils.mentions2Links(row.responses[k].response.text);
}
if (!Mambo.Utils.isEmptyObject(row.responses[k].response.media)) {
if (row.responses[k].response.media.type == 'video') {
if ((Mambo.Utils.unixTime() - row.responses[k].response.time) < 60) {
html += ' ';
html += ' The video may be processing. If you can not see it, wait a few seconds and try again';
}
html += ' ';
html += ' ';
} else if (row.responses[k].response.media.type == 'audio') {
html += ' ';
html += ' ';
} else if (row.responses[k].response.media.type == 'image') {
html += ' ';
}
}
html += ' ';
html += ' ';
html += ' ' + row.responses[k].response.likes_count + '';
html += ' · ';
html += ' ';
html += ' Like';
html += ' · ';
html += ' Reply';
html += ' · ';
html += ' Share';
html += ' · ';
html += ' ';
html += ' ';
html += '
';
html += '
';
html += '
';
}
} else if (!Mambo.Utils.isEmptyObject(row.response)) {
html += ' View all responses';
html += '
';
html += '
';
html += ' ';
html += '
';
html += '
';
html += '
';
if (!Mambo.Utils.isEmptyObject(row.response.user)) {
html += ' ' + row.response.user.username + '';
} else {
html += ' Anonymous';
}
if (!Mambo.Utils.isEmptyObject(row.response.response.text)) {
html += Mambo.Utils.mentions2Links(row.response.response.text);
}
if (!Mambo.Utils.isEmptyObject(row.response.response.media)) {
if (row.response.response.media.type == 'video') {
if ((Mambo.Utils.unixTime() - row.response.response.time) < 60) {
html += ' ';
html += ' The video may be processing. If you can not see it, wait a few seconds and try again';
}
html += ' ';
html += ' ';
} else if (row.response.response.media.type == 'audio') {
html += ' ';
html += ' ';
} else if (row.response.response.media.type == 'image') {
html += ' ';
}
}
html += ' ';
html += ' ';
html += ' ' + row.response.response.likes_count + '';
html += ' · ';
html += ' ';
html += ' Like';
html += ' · ';
html += ' Reply';
html += ' · ';
html += ' Share';
html += ' · ';
html += ' ';
html += ' ';
html += '
';
html += ' ';
html += ' Post as anonymous';
html += ' ';
html += ' ';
html += ' ';
html += ' ';
html += '
';
html += '
';
html += '
';
if (!Mambo.Utils.isEmptyObject(Mambo.Session.User)) {
html += ' ';
html += ' ';
} else {
html += ' ';
}
html += '
';
html += '
';
html += '
';
html += ' ';
html += ' ';
html += ' 500';
html += ' ';
html += ' ';
html += ' ';
html += ' ';
html += ' ';
html += ' ';
html += ' ';
html += ' Reply';
html += '
';
if (!Mambo.Utils.isEmptyObject(row.user)) {
html += ' ' + row.user.username + '';
} else {
html += ' Anonymous';
}
if (!Mambo.Utils.isEmptyObject(row.response.text)) {
html += Mambo.Utils.mentions2Links(row.response.text);
}
if (!Mambo.Utils.isEmptyObject(row.response.media)) {
if (row.response.media.type == 'video') {
if ((Mambo.Utils.unixTime() - row.response.time) < 60) {
html += ' ';
html += ' The video may be processing. If you can not see it, wait a few seconds and try again';
}
html += ' ';
html += ' ';
} else if (row.response.media.type == 'audio') {
html += ' ';
html += ' ';
} else if (row.response.media.type == 'image') {
html += ' ';
}
}
html += ' ';
html += ' ';
html += ' ' + row.response.likes_count + '';
html += ' · ';
html += ' ';
html += ' Like';
html += ' · ';
html += ' Reply';
html += ' · ';
html += ' Share';
html += ' · ';
html += ' ';
html += ' ';
html += '
';
if (row.data.comment.comment.text) {
html += Mambo.Utils.mentions2Links(row.data.comment.comment.text);
}
if (row.data.comment.comment.media) {
if (row.data.comment.comment.media.type == 'video') {
if ((Mambo.Utils.unixTime() - row.data.comment.comment.time) < 60) {
html += ' ';
html += ' The video may be processing. If you can not see it, wait a few seconds and try again ';
}
html += ' ';
html += ' ';
} else if (row.data.comment.comment.media.type == 'audio') {
html += ' ';
html += ' ';
} else if (row.data.comment.comment.media.type == 'image') {
html += ' ';
}
}
html += ' ';
html += ' ';
html += ' ' + row.data.comment.comment.likes_count + '';
html += ' · ';
html += ' ';
html += ' Like';
html += ' · ';
html += ' Share';
html += ' · ';
html += ' ';
html += ' ';
html += '
';
html += '
';
html += '
';
if (!Mambo.Utils.isEmptyObject(row.data.response)) {
html += '';
html += '
';
html += '
';
html += ' ';
html += '
';
html += '
';
html += '
';
html += ' ' + row.data.response.user.username + '';
if (!Mambo.Utils.isEmptyObject(row.data.response.response.text)) {
html += Mambo.Utils.mentions2Links(row.data.response.response.text);
}
if (!Mambo.Utils.isEmptyObject(row.data.response.response.media)) {
if (row.data.response.response.media.type == 'video') {
if ((Mambo.Utils.unixTime() - row.data.response.response.time) < 60) {
html += ' ';
html += ' The video may be processing. If you can not see it, wait a few seconds and try again';
}
html += ' ';
html += ' ';
} else if (row.data.response.response.media.type == 'audio') {
html += ' ';
html += ' ';
} else if (row.data.response.response.media.type == 'image') {
html += ' ';
}
}
html += ' ';
html += ' ';
html += ' ' + row.data.response.response.likes_count + '';
html += ' · ';
html += ' ';
html += ' Like';
html += ' · ';
html += ' Share';
html += ' · ';
html += ' ';
html += ' ';
html += '
';
html += '
';
html += '
';
html += '';
} else {
if (!Mambo.Utils.isEmptyObject(Mambo.Session.User) && Mambo.Session.User.id == row.data.user.id) {
html += '';
html += '
';
html += ' ';
html += ' ';
html += ' ';
html += ' ';
html += ' ';
html += ' ';
html += ' ';
html += ' ';
html += ' ';
html += ' ';
html += ' Reply';
html += '
';
html += '
';
html += '
';
} else {
html += '';
}
}
html += '
';
if (!Mambo.Utils.isEmptyObject(Mambo.Session.User) && Mambo.Session.User.id == row.data.user.id) {
if (Mambo.Utils.isEmptyObject(row.data.response)) {
html += ' Reply';
}
}
html += '
';
html += '';
html += '
';
html += '
';
html += '
';
html += '
';
html += ' Share';
if (!Mambo.Utils.isEmptyObject(Mambo.Session.User) && Mambo.Session.User.id == row.data.user.id) {
html += ' Delete';
}
html += ' Close';
html += '
';
return html;
},
response: function(row) {
html = '';
if (!Mambo.Utils.isEmptyObject(row.response)) {
html += '
';
html += '
';
html += ' ';
html += '
';
html += '
';
html += '
';
html += ' ' + row.response.user.username + '';
if (row.response.response.text) {
html += Mambo.Utils.mentions2Links(row.response.response.text);
}
if (row.response.response.media) {
if (row.response.response.media.type == 'video') {
if ((Mambo.Utils.unixTime() - row.response.response.time) < 60) {
html += ' ';
html += ' The video may be processing. If you can not see it, wait a few seconds and try again ';
}
html += ' ';
html += ' ';
} else if (row.response.response.media.type == 'audio') {
html += ' ';
html += ' ';
} else if (row.response.response.media.type == 'image') {
html += ' ';
}
}
html += ' ';
html += ' ';
html += ' ' + row.response.response.likes_count + '';
html += ' · ';
html += ' ';
html += ' Like';
html += ' · ';
html += ' Share';
html += ' · ';
html += ' ';
html += ' ';
html += '
';
html += '
';
html += '
';
}
return html;
}
},
userPost: function(row) {
if(row.type !== 'UserPost') {
return '';
}
html = '';
html += '';
html += '
';
if (row.data.post.caption) {
html += Mambo.Utils.mentions2Links(row.data.post.caption);
}
if (row.data.post.media) {
if (row.data.post.media.type == 'video') {
if ((Mambo.Utils.unixTime() - row.data.post.time) < 60) {
html += ' ';
html += ' The video may be processing. If you can not see it, wait a few seconds and try again ';
}
html += ' ';
html += ' ';
} else if (row.data.post.media.type == 'audio') {
html += ' ';
html += ' ';
} else if (row.data.post.media.type == 'image') {
html += ' ';
}
}
html += ' ';
html += ' ';
html += ' ' + row.data.post.likes_count + '';
html += ' · ';
html += ' ';
html += ' Like';
html += ' · ';
html += ' Share';
html += ' · ';
html += ' ';
html += ' ';
html += '
';
if (!Mambo.Utils.isEmptyObject(row.data.comment.comment.text)) {
html += Mambo.Utils.mentions2Links(row.data.comment.comment.text);
}
if (!Mambo.Utils.isEmptyObject(row.data.comment.comment.media)) {
if (row.data.comment.comment.media.type == 'video') {
if ((Mambo.Utils.unixTime() - row.data.comment.comment.time) < 60) {
html += ' ';
html += ' The video may be processing. If you can not see it, wait a few seconds and try again ';
}
html += ' ';
html += ' ';
} else if (row.data.comment.comment.media.type == 'audio') {
html += ' ';
html += ' ';
} else if (row.data.comment.comment.media.type == 'image') {
html += ' ';
}
}
html += ' ';
html += ' ';
html += ' ' + row.data.comment.comment.likes_count + '';
html += ' · ';
html += ' ';
html += ' Like';
html += ' · ';
html += ' Reply';
html += ' · ';
html += ' Share';
html += ' · ';
html += ' ';
html += ' ';
html += '
';
html += '
';
html += '
';
hasResponses = false;
showLoadMoreResponses = false;
if (!Mambo.Utils.isEmptyObject(row.data.responses)) {
hasResponses = true;
}
if (!Mambo.Utils.isEmptyObject(row.data.responses)) {
if (row.data.comment.comment.responses_count > row.data.responses.length) {
showLoadMoreResponses = true;
}
}
html += ' ';
html += ' Load more comments';
html += '
';
if (!Mambo.Utils.isEmptyObject(row.data.responses)) {
for (k = 0; k < row.data.responses.length; k++) {
html += '
';
html += '
';
html += ' ';
html += '
';
html += '
';
html += '
';
if (!Mambo.Utils.isEmptyObject(row.data.responses[k].user)) {
html += ' ' + row.data.responses[k].user.username + '';
} else {
html += ' Anonymous';
}
if (!Mambo.Utils.isEmptyObject(row.data.responses[k].response.text)) {
html += Mambo.Utils.mentions2Links(row.data.responses[k].response.text);
}
if (!Mambo.Utils.isEmptyObject(row.data.responses[k].response.media)) {
if (row.data.responses[k].response.media.type == 'video') {
if ((Mambo.Utils.unixTime() - row.data.responses[k].response.time) < 60) {
html += ' ';
html += ' The video may be processing. If you can not see it, wait a few seconds and try again';
}
html += ' ';
html += ' ';
} else if (row.data.responses[k].response.media.type == 'audio') {
html += ' ';
html += ' ';
} else if (row.data.responses[k].response.media.type == 'image') {
html += ' ';
}
}
html += ' ';
html += ' ';
html += ' ' + row.data.responses[k].response.likes_count + '';
html += ' · ';
html += ' ';
html += ' Like';
html += ' · ';
html += ' Reply';
html += ' · ';
html += ' Share';
html += ' · ';
html += ' ';
html += ' ';
html += '
';
html += ' ';
html += ' ';
html += ' ';
html += ' Post as anonymous';
html += ' ';
html += ' ';
html += ' ';
html += ' ';
html += '
';
html += '
';
html += '
';
if (!Mambo.Utils.isEmptyObject(Mambo.Session.User)) {
html += ' ';
html += ' ';
} else {
html += ' ';
}
html += '
';
html += '
';
html += '
';
html += ' ';
html += ' ';
html += ' 500';
html += ' ';
html += ' ';
html += ' ';
html += ' ';
html += ' ';
html += ' ';
html += ' ';
html += ' Reply';
html += '
';
html += '';
return html;
},
placeWallCommentResponse: function(row) {
html = '';
html += '
';
html += '
';
html += ' ';
html += '
';
html += '
';
html += '
';
if (!Mambo.Utils.isEmptyObject(row.user)) {
html += ' ' + row.user.username + '';
} else {
html += ' Anonymous';
}
if (!Mambo.Utils.isEmptyObject(row.response.text)) {
html += Mambo.Utils.mentions2Links(row.response.text);
}
if (!Mambo.Utils.isEmptyObject(row.response.media)) {
if (row.response.media.type == 'video') {
if ((Mambo.Utils.unixTime() - row.response.time) < 60) {
html += ' ';
html += 'The video may be processing. If you can not see it, wait a few seconds and try again ';
}
html += ' ';
html += ' ';
} else if (row.response.media.type == 'audio') {
html += ' ';
html += ' ';
} else if (row.response.media.type == 'image') {
html += ' ';
}
}
html += ' ';
html += ' ';
html += ' ' + row.response.likes_count + '';
html += ' · ';
html += ' ';
html += ' Like';
html += ' · ';
html += ' Reply';
html += ' · ';
html += ' Share';
html += ' · ';
html += ' ';
html += ' ';
html += '
'; if (row.comment.comment.text) { html += Mambo.Utils.mentions2Links(row.comment.comment.text); } if (row.comment.comment.media) { if (row.comment.comment.media.type == 'video') { if ((Mambo.Utils.unixTime() - row.comment.comment.time) < 60) { html += '
'; html += ''; html += ' The video may be processing. If you can not see it, wait a few seconds and try again '; } html += '
'; html += ' '; } else if (row.comment.comment.media.type == 'audio') { html += '
'; html += ' '; } else if (row.comment.comment.media.type == 'image') { html += ' '; } } html += ' '; html += ' '; html += ' ' + row.comment.comment.likes_count + ''; html += ' · '; html += ' '; html += ' Like'; html += ' · '; html += ' Share'; html += ' · '; html += ' '; html += ' '; html += '