@@ -21,33 +21,42 @@ |
||
| 21 | 21 | <h3>Questions asked: </h3> |
| 22 | 22 | <?php if (empty($questions)) : ?> |
| 23 | 23 | <p>This user hasen't posted any questions yet.</p> |
| 24 | -<?php else : ?> |
|
| 24 | +<?php else { |
|
| 25 | + : ?> |
|
| 25 | 26 | <?php foreach ($questions as $question) : ?> |
| 26 | 27 | <p> |
| 27 | 28 | <a href="../../forum/question/<?= $question->id ?>"><?= $question->title ?></a> |
| 28 | 29 | </p> |
| 29 | - <?php endforeach; ?> |
|
| 30 | + <?php endforeach; |
|
| 31 | +} |
|
| 32 | +?> |
|
| 30 | 33 | <?php endif; ?> |
| 31 | 34 | <h3>Answers posted: </h3> |
| 32 | 35 | <?php if (empty($answers)) : ?> |
| 33 | 36 | <p>This user hasn't posted any answers yet.</p> |
| 34 | -<?php else: ?> |
|
| 37 | +<?php else { |
|
| 38 | + : ?> |
|
| 35 | 39 | <?php foreach ($answers as $answer) : ?> |
| 36 | 40 | <p> |
| 37 | 41 | <a href="../../forum/question/<?= $answer->question_id ?>"><?= $answer->content ?></a> |
| 38 | 42 | </p> |
| 39 | - <?php endforeach; ?> |
|
| 43 | + <?php endforeach; |
|
| 44 | +} |
|
| 45 | +?> |
|
| 40 | 46 | <?php endif; ?> |
| 41 | 47 | <?php if (empty($comments)) : ?> |
| 42 | 48 | <h3>Comments this user have posted: </h3> |
| 43 | 49 | <p>This user have not posted any comments yet.</p> |
| 44 | -<?php else : ?> |
|
| 50 | +<?php else { |
|
| 51 | + : ?> |
|
| 45 | 52 | <h3>Comments you have posted: </h3> |
| 46 | 53 | <?php foreach ($comments as $comment) : ?> |
| 47 | 54 | <p> |
| 48 | 55 | <a href="../../forum/question/<?= $answer->question_id ?>"><?= $comment->content ?></a> |
| 49 | 56 | </p> |
| 50 | - <?php endforeach; ?> |
|
| 57 | + <?php endforeach; |
|
| 58 | +} |
|
| 59 | +?> |
|
| 51 | 60 | <?php endif; ?> |
| 52 | 61 | <h3>Comments on answers you have posted: </h3> |
| 53 | 62 | <?php foreach ($anscomments as $anscomment) : ?> |
@@ -26,40 +26,52 @@ |
||
| 26 | 26 | <h3>Questions you have asked: </h3> |
| 27 | 27 | <?php if (empty($posts)) : ?> |
| 28 | 28 | <p>You have not made any posts yet.</p> |
| 29 | -<?php else : ?> |
|
| 29 | +<?php else { |
|
| 30 | + : ?> |
|
| 30 | 31 | <?php foreach ($posts as $post) : ?> |
| 31 | 32 | <p> |
| 32 | 33 | <a href="forum/question/<?= $post->id ?>"><?= $post->title ?></a> |
| 33 | 34 | </p> |
| 34 | - <?php endforeach; ?> |
|
| 35 | + <?php endforeach; |
|
| 36 | +} |
|
| 37 | +?> |
|
| 35 | 38 | <?php endif; ?> |
| 36 | 39 | <h3>Answers you have posted: </h3> |
| 37 | 40 | <?php if (empty($answers)) : ?> |
| 38 | 41 | <p>You have not posted any answers yet.</p> |
| 39 | -<?php else : ?> |
|
| 42 | +<?php else { |
|
| 43 | + : ?> |
|
| 40 | 44 | <?php foreach ($answers as $answer) : ?> |
| 41 | 45 | <p> |
| 42 | 46 | <a href="forum/question/<?= $answer->question_id ?>"><?= $answer->content ?></a> |
| 43 | 47 | </p> |
| 44 | - <?php endforeach; ?> |
|
| 48 | + <?php endforeach; |
|
| 49 | +} |
|
| 50 | +?> |
|
| 45 | 51 | <?php endif; ?> |
| 46 | 52 | <h3>Comments you have posted: </h3> |
| 47 | 53 | <?php if (empty($comments)) : ?> |
| 48 | 54 | <p>You have not posted any comments yet.</p> |
| 49 | -<?php else : ?> |
|
| 55 | +<?php else { |
|
| 56 | + : ?> |
|
| 50 | 57 | <?php foreach ($comments as $comment) : ?> |
| 51 | 58 | <p> |
| 52 | 59 | <a href="forum/question/<?= $answer->question_id ?>"><?= $comment->content ?></a> |
| 53 | 60 | </p> |
| 54 | - <?php endforeach; ?> |
|
| 61 | + <?php endforeach; |
|
| 62 | +} |
|
| 63 | +?> |
|
| 55 | 64 | <?php endif; ?> |
| 56 | 65 | <h3>Comments on answers you have posted: </h3> |
| 57 | 66 | <?php if (empty($anscomments)) : ?> |
| 58 | 67 | <p>You have not made any comments on answers yet.</p> |
| 59 | -<?php else : ?> |
|
| 68 | +<?php else { |
|
| 69 | + : ?> |
|
| 60 | 70 | <?php foreach ($anscomments as $anscomment) : ?> |
| 61 | 71 | <p> |
| 62 | 72 | <a href="forum/question/<?= $answer->question_id ?>"><?= $anscomment->content ?></a> |
| 63 | 73 | </p> |
| 64 | - <?php endforeach; ?> |
|
| 74 | + <?php endforeach; |
|
| 75 | +} |
|
| 76 | +?> |
|
| 65 | 77 | <?php endif; ?> |
@@ -40,9 +40,12 @@ |
||
| 40 | 40 | <p> |
| 41 | 41 | <a href="../answer/<?= $item->id ?>">Answer this post</a> |
| 42 | 42 | </p> |
| 43 | - <?php else : ?> |
|
| 43 | + <?php else { |
|
| 44 | + : ?> |
|
| 44 | 45 | <p>You have to be logged in to answer on a post!</p> |
| 45 | - <?php endif; ?> |
|
| 46 | + <?php endif; |
|
| 47 | +} |
|
| 48 | +?> |
|
| 46 | 49 | <h2>Comments: </h2> |
| 47 | 50 | <?php foreach ($comments as $comment) : ?> |
| 48 | 51 | <div class="comments"> |
@@ -18,9 +18,12 @@ |
||
| 18 | 18 | <p> |
| 19 | 19 | <a href="forum/create">Create a new post</a> |
| 20 | 20 | </p> |
| 21 | -<?php else : ?> |
|
| 21 | +<?php else { |
|
| 22 | + : ?> |
|
| 22 | 23 | <p>You have to be logged in to create a new post</p> |
| 23 | -<?php endif; ?> |
|
| 24 | +<?php endif; |
|
| 25 | +} |
|
| 26 | +?> |
|
| 24 | 27 | <?php if (!$items) : ?> |
| 25 | 28 | <p>There are no posts to show.!</p> |
| 26 | 29 | <a href="forum/create">Create a new post.</a> |