diff --git a/website/public/js/masonry.js b/website/public/js/masonry.js index f30139c..f30f0af 100644 --- a/website/public/js/masonry.js +++ b/website/public/js/masonry.js @@ -70,9 +70,7 @@ function masonry(mode) { $form.append($("")); columns[0][1].append($postInput); - $postInput.on("load", function() { - columns[0][0] = $postInput.height() + margin; - }); + columns[0][0] = $postInput.height() + margin; } /* @@ -99,11 +97,12 @@ function masonry(mode) { /* * Rearange the objects. */ - jQuery.each(posts, function() { + $.each(posts, function() { $post = $("
").html(this["content"])); $post.append($("
").text(this["nicetime"])); + $post.append($("
").text("comments: " + this["comments"] + ", niet slechts: " + this["niet_slechts"]));
shortestColumn = getShortestColumn(columns);
shortestColumn[1].append($post);
diff --git a/website/queries/user.php b/website/queries/user.php
index 4a7ee57..9c23721 100644
--- a/website/queries/user.php
+++ b/website/queries/user.php
@@ -105,24 +105,36 @@ function selectAllUserGroups($userID) {
function selectAllUserPosts($userID) {
$stmt = $GLOBALS["db"]->prepare("
SELECT
- `postID`,
- `author`,
+ `post`.`postID`,
+ `post`.`author`,
`title`,
- CASE LENGTH(`content`) >= 150 AND `content` NOT LIKE '= 150 AND `post`.`content` NOT LIKE '
bindParam(':userID', $userID, PDO::PARAM_INT);