Mercurial > defr > DualBlog
comparison comment.php @ 33:c6508503269a
Possibilité d'avoir les dates en ISO 8601, requis par Atom.
author | Franck Deroche <webmaster@defr.org> |
---|---|
date | Mon, 05 Nov 2007 09:23:40 +0100 |
parents | 4cea8b128fdd |
children | a6c3716cab6a |
comparison
equal
deleted
inserted
replaced
32:4cea8b128fdd | 33:c6508503269a |
---|---|
47 $Data->Query("SELECT * FROM Commentaires Where MessId={$id} AND Visible=1 ORDER BY num_comm"); | 47 $Data->Query("SELECT * FROM Commentaires Where MessId={$id} AND Visible=1 ORDER BY num_comm"); |
48 $defaultGravatar = urlencode("http://defr.org/Misc/NoGravatar.png"); | 48 $defaultGravatar = urlencode("http://defr.org/Misc/NoGravatar.png"); |
49 while(0 !== ($row = $Data->GetRow())) { | 49 while(0 !== ($row = $Data->GetRow())) { |
50 $commentTpl = new Template(Skeleton::getTemplateFile('comment')); | 50 $commentTpl = new Template(Skeleton::getTemplateFile('comment')); |
51 $dateFormatee = strftime(" à %Hh%M le <span class='Date'>%A %d %B %Y</span>", strtotime($row['DateComment'])); | 51 $dateFormatee = strftime(" à %Hh%M le <span class='Date'>%A %d %B %Y</span>", strtotime($row['DateComment'])); |
52 $dateFormateeISO = date('c', strtotime($row['DateComment'])); | |
52 $AdresseMail = $row['AdresseMail']; | 53 $AdresseMail = $row['AdresseMail']; |
53 $grav_id = md5($AdresseMail); | 54 $grav_id = md5($AdresseMail); |
54 $grav_url = 'http://www.gravatar.com/avatar.php?gravatar_id=' . $grav_id . '&size=50&default=' . $defaultGravatar; | 55 $grav_url = 'http://www.gravatar.com/avatar.php?gravatar_id=' . $grav_id . '&size=50&default=' . $defaultGravatar; |
55 $Comment = nl2br($row['Comment']); | 56 $Comment = nl2br($row['Comment']); |
56 $Comment = str_replace(" & ", " & ", $Comment); | 57 $Comment = str_replace(" & ", " & ", $Comment); |
60 '#gravatar@src' => $grav_url, | 61 '#gravatar@src' => $grav_url, |
61 '#auteur@href' => $post->getURL() . '#c' . $row['num_comm'], | 62 '#auteur@href' => $post->getURL() . '#c' . $row['num_comm'], |
62 '#auteur@name' => 'c' . $row['num_comm'], | 63 '#auteur@name' => 'c' . $row['num_comm'], |
63 '#auteur' => $row['Auteur'], | 64 '#auteur' => $row['Auteur'], |
64 'commentDate' => $dateFormatee, | 65 'commentDate' => $dateFormatee, |
66 'commentDateISO' => $dateFormateeISO, | |
65 'commentNumber' => $row['num_comm'], | 67 'commentNumber' => $row['num_comm'], |
66 'comment' => $commentFrag, | 68 'comment' => $commentFrag, |
67 ); | 69 ); |
68 if(stristr($row['Adresse'], 'http://')) { | 70 if(stristr($row['Adresse'], 'http://')) { |
69 $params['#auteur@href'] = $row['Adresse']; | 71 $params['#auteur@href'] = $row['Adresse']; |