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