lien commentaire

This commit is contained in:
Simon Vieille 2016-02-11 16:30:21 +01:00
parent 2b91fb80ac
commit 68740a40ed

View file

@ -120,29 +120,25 @@ $comments = getCommentsByProject($id);
<div> <div>
<p> <p>
<img src="<?php echo $comment['avatar'] ?>" alt="" /> <img src="<?php echo $comment['avatar'] ?>" alt="" />
<?php echo $comment['name'] ?>,
posté le <?php echo $comment['date']->format('d/m/Y à H:i') ?> <?php if ($comment['website']): ?>
<a href="<?php echo htmlspecialchars($comment['website']) ?>">
<?php endif ?>
<?php echo htmlspecialchars($comment['name']) ?>
<?php if ($comment['website']): ?>
</a>
<?php endif ?>
- Posté le <?php echo $comment['date']->format('d/m/Y à H:i') ?>
</p> </p>
<p> <p>
<?php echo $comment['content'] ?> <?php echo nl2br(htmlspecialchars($comment['content'])) ?>
</p> </p>
</div> </div>
<?php endforeach ?> <?php endforeach ?>
</section> </section>
<!--
Afficher la liste des commentaires
Un commentaire est composé de :
- son auteur
- le site web de l'auteur
- l'email de l'auteur
- sa date de publication
- son contenu
Il faudra afficher l'avatar de l'auteur en utilisant gravatar : https://fr.gravatar.com/site/implement/images/php/
Attention : ne pas utiliser cette fonction, il faut écrire la votre !
-->
</body> </body>
</html> </html>