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