<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1037,6 +1037,10 @@ function display_user ($user_id=&quot;&quot;) {
 				&lt;span class=&quot;label&quot;&gt;Joined&lt;/span&gt;
 				&lt;span class=&quot;formw&quot;&gt;&lt;?php echo htmlentities($registrationtime); ?&gt;&lt;/span&gt;
 				&lt;/div&gt;
+                                &lt;div class=&quot;row&quot;&gt;
+                                &lt;span class=&quot;label&quot;&gt;Avatar (&lt;a href=&quot;/help/#avatar&quot;&gt;?&lt;/a&gt;)&lt;/span&gt;
+                                &lt;span class=&quot;formw&quot;&gt;&lt;img src=&quot;http://www.gravatar.com/avatar/&lt;?php echo md5($USER-&gt;email()) ?&gt;?s=32&amp;d=identicon&amp;r=g&quot; width=&quot;32&quot; height=&quot;32&quot; alt=&quot;Avatar for &lt;?php echo $name ?&gt;&quot;&gt;&lt;/span&gt;
+                                &lt;/div&gt;
 &lt;?php
 		}
 		</diff>
      <filename>www/docs/user/index.php</filename>
    </modified>
    <modified>
      <diff>@@ -483,7 +483,7 @@ class COMMENTLIST {
 		
 		// Add on the stuff for getting a user's details.
 		if (isset($amount['user']) &amp;&amp; $amount['user'] == true) {
-			$fieldsarr['users'] = array ('firstname', 'lastname', 'user_id');
+			$fieldsarr['users'] = array ('firstname', 'lastname', 'user_id', 'email');
 			// Like doing &quot;FROM comments, users&quot; but it's easier to add
 			// an &quot;INNER JOIN...&quot; automatically to the query.
 			$join .= ' INNER JOIN users ON comments.user_id = users.user_id ';</diff>
      <filename>www/includes/easyparliament/commentlist.php</filename>
    </modified>
    <modified>
      <diff>@@ -2044,7 +2044,8 @@ class HANSARDLIST {
 									c.body,
 									c.posted,
 									u.firstname,
-									u.lastname
+									u.lastname,
+									u.email
 							FROM	comments c, users u
 							WHERE	c.epobject_id = '&quot; . mysql_escape_string($item_data['epobject_id']) . &quot;'
 							AND		c.user_id = u.user_id
@@ -2059,7 +2060,8 @@ class HANSARDLIST {
 					'user_id'	=&gt; $q-&gt;field(0, 'user_id'),
 					'body'		=&gt; $q-&gt;field(0, 'body'),
 					'posted'	=&gt; $q-&gt;field(0, 'posted'),
-					'username'	=&gt; $q-&gt;field(0, 'firstname') .' '. $q-&gt;field(0, 'lastname')
+					'username'	=&gt; $q-&gt;field(0, 'firstname') .' '. $q-&gt;field(0, 'lastname'),
+					'email'		=&gt; $q-&gt;field(0, 'email')
 				);
 			}
 			</diff>
      <filename>www/includes/easyparliament/hansardlist.php</filename>
    </modified>
    <modified>
      <diff>@@ -8,6 +8,7 @@
 &lt;li&gt;&lt;a href=&quot;#numbers&quot;&gt;Why should I read in more depth than just the numbers?&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href=&quot;#api&quot;&gt;Do you have the data as a spreadsheet file, XML or in an API?&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href=&quot;#regmem&quot;&gt;What is the Register of Interests and how can I use it?&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a href=&quot;#avatar&quot;&gt;Where do the little pictures of commenters come from and how do I change mine?&lt;/a&gt;&lt;/li&gt;
 
 &lt;/ul&gt;
 
@@ -128,4 +129,9 @@ Please note that for the Register of Interests we have been asked to make the fo
 &lt;/ul&gt;
 &lt;/dd&gt;
 
+&lt;dt&gt;&lt;a name=&quot;avatar&quot;&gt;&lt;/a&gt;Where do the little pictures of commenters come from and how do I change mine?&lt;/dt&gt;
+&lt;dd&gt;
+&lt;p&gt;The little pictures beside commenter's names are called avatars. We use the &lt;a href=&quot;http://www.gravatar.com/&quot;&gt;Gravatar service&lt;/a&gt; to show these. So, if you want to change your own, please &lt;a href=&quot;http://www.gravatar.com/site/signup/&quot;&gt;sign-up to Gravatar&lt;/a&gt;. Just make sure that you use the same email address for your Gravatar as the email address you used when you registered with OpenAustralia.&lt;/p&gt;
+&lt;/dd&gt;
+
 &lt;/dl&gt;</diff>
      <filename>www/includes/easyparliament/staticpages/help.php</filename>
    </modified>
    <modified>
      <diff>@@ -121,8 +121,11 @@ if (isset($data['comments']) &amp;&amp; count($data['comments']) &gt; 0) {
 		list($date, $time) = explode(' ', $comment['posted']);
 		$date = format_date($date, SHORTDATEFORMAT);
 		$time = format_time($time, TIMEFORMAT);
+
+		// MD5 hash the user's email for their Gravatar
+		$usermailmd5 = md5($comment['email']);
 		?&gt;
-					&lt;p class=&quot;credit&quot;&gt;&lt;a href=&quot;&lt;?php echo $USERURL-&gt;generate(); ?&gt;&quot; title=&quot;See information about this user&quot;&gt;&lt;strong&gt;&lt;?php echo htmlentities($comment['firstname']) .' '. htmlentities($comment['lastname']); ?&gt;&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
+					&lt;p class=&quot;credit&quot;&gt;&lt;img class=portrait src=&quot;http://www.gravatar.com/avatar/&lt;?php echo $usermailmd5; ?&gt;?s=32&amp;d=identicon&amp;r=g&quot; width=&quot;32&quot; height=&quot;32&quot; alt=&quot;Avatar for &lt;?php echo htmlentities($comment['firstname']) .' '. htmlentities($comment['lastname']); ?&gt;&quot;&gt;&lt;a href=&quot;&lt;?php echo $USERURL-&gt;generate(); ?&gt;&quot; title=&quot;See information about this user&quot;&gt;&lt;strong&gt;&lt;?php echo htmlentities($comment['firstname']) .' '. htmlentities($comment['lastname']); ?&gt;&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
 					&lt;small&gt;Posted on &lt;?php echo $date; 
 					
 		if (isset($comment['url'])) {</diff>
      <filename>www/includes/easyparliament/templates/html/comments.php</filename>
    </modified>
    <modified>
      <diff>@@ -21,12 +21,12 @@ if (isset($data['comments']) &amp;&amp; count($data['comments']) &gt; 0) {
 	if ($this_page != 'home') $PAGE-&gt;page_links($data);
 	$USERURL = new URL('userview');
 	?&gt;
-						&lt;ul&gt;
+						&lt;table class=&quot;people&quot; border=&quot;0&quot; cellpadding=&quot;3&quot; cellspacing=&quot;0&quot;&gt;
 &lt;?php
 	foreach ($data['comments'] as $n =&gt; $comment) {
 		?&gt;	
 
-						&lt;li&gt;&lt;?php
+						&lt;tr&gt;&lt;?php
 		
 		$commenttext = trim_characters($comment['body'], 0, 200);
 		list($date, $time) = explode(' ', $comment['posted']);
@@ -36,12 +36,15 @@ if (isset($data['comments']) &amp;&amp; count($data['comments']) &gt; 0) {
 		$count = $n+1;
 		
 		$USERURL-&gt;insert(array('u'=&gt;$comment['user_id']));
+
+		// MD5 hash the user's email for their Gravatar
+		$usermailmd5 = md5($comment['email']);
 		
-		?&gt;&lt;a name=&quot;c&lt;?php echo $count; ?&gt;&quot;&gt;&lt;/a&gt;&lt;strong&gt;&lt;?php echo htmlentities($comment['firstname'] . ' ' . $comment['lastname']); ?&gt;:&lt;/strong&gt; &lt;?php echo $commenttext; ?&gt; &lt;small&gt;(&lt;?php echo relative_time($comment['posted']); ?&gt;)&lt;/small&gt;&lt;br&gt;&lt;a href=&quot;&lt;?php echo $comment['url']; ?&gt;&quot;&gt;Read comment&lt;/a&gt; | &lt;a href=&quot;&lt;?php echo $USERURL-&gt;generate(); ?&gt;&quot; title=&quot;See more information about this user&quot;&gt;All by this user&lt;/a&gt; &lt;/li&gt;
+		?&gt;&lt;td&gt;&lt;img src=&quot;http://www.gravatar.com/avatar/&lt;?php echo $usermailmd5; ?&gt;?s=32&amp;d=identicon&amp;r=g&quot; width=&quot;32&quot; height=&quot;32&quot; alt=&quot;Avatar for &lt;?php echo htmlentities($comment['firstname']) .' '. htmlentities($comment['lastname']); ?&gt;&quot;&gt;&lt;/td&gt;&lt;td style=&quot;font-size: 1em&quot;&gt;&lt;a name=&quot;c&lt;?php echo $count; ?&gt;&quot;&gt;&lt;/a&gt;&lt;strong&gt;&lt;?php echo htmlentities($comment['firstname'] . ' ' . $comment['lastname']); ?&gt;:&lt;/strong&gt; &lt;?php echo $commenttext; ?&gt; &lt;small&gt;(&lt;?php echo relative_time($comment['posted']); ?&gt;)&lt;/small&gt;&lt;br&gt;&lt;a href=&quot;&lt;?php echo $comment['url']; ?&gt;&quot;&gt;Read comment&lt;/a&gt; | &lt;a href=&quot;&lt;?php echo $USERURL-&gt;generate(); ?&gt;&quot; title=&quot;See more information about this user&quot;&gt;All by this user&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
 &lt;?php
 	}
 	?&gt;
-						&lt;/ul&gt;
+						&lt;/table&gt;
 &lt;?php
 
 	if ($this_page == 'home') {</diff>
      <filename>www/includes/easyparliament/templates/html/comments_recent.php</filename>
    </modified>
    <modified>
      <diff>@@ -473,8 +473,11 @@ function generate_commentteaser (&amp;$row, $major) {
 					$linktext = 'Continue reading';
 				}
 			}
+			
+			// MD5 hash the user's email for their Gravatar
+			$usermailmd5 = md5($comment['email']);
 		
-			$html = '&lt;em&gt;' . htmlentities($comment['username']) . '&lt;/em&gt;: ' . prepare_comment_for_display($commentbody);
+			$html = '&lt;img style=&quot;float: left; padding: 3px;&quot; src=&quot;http://www.gravatar.com/avatar/' . $usermailmd5 . '?s=32&amp;d=identicon&amp;r=g&quot; width=&quot;32&quot; height=&quot;32&quot; alt=&quot;Avatar for ' . htmlentities($comment['username']) . '&quot;&gt;&lt;em&gt;' . htmlentities($comment['username']) . '&lt;/em&gt;: ' . prepare_comment_for_display($commentbody);
 			
 			if (isset($linktext)) {
 				$html .= ' &lt;a href=&quot;' . $row['commentsurl'] . '#c' . $comment['comment_id'] . '&quot; title=&quot;See any comments posted about this&quot;&gt;' . $linktext . '&lt;/a&gt;';</diff>
      <filename>www/includes/easyparliament/templates/html/hansard_gid.php</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>d700031aca7d79bd430e671ce14edab50a3ca381</id>
    </parent>
    <parent>
      <id>74ed7e58371b46bf8b89a3747c9261c2d72cd657</id>
    </parent>
  </parents>
  <author>
    <name>Matthew Landauer</name>
    <email>matthew@openaustralia.org</email>
  </author>
  <url>http://github.com/mlandauer/twfy/commit/42d7cbad66207b29543956d1e2d3006edc065b54</url>
  <id>42d7cbad66207b29543956d1e2d3006edc065b54</id>
  <committed-date>2009-11-06T23:04:15-08:00</committed-date>
  <authored-date>2009-11-06T23:04:15-08:00</authored-date>
  <message>Merge branch 'OA-339'</message>
  <tree>25a8635d3b2c8655771bdaf54df977d0913642bd</tree>
  <committer>
    <name>Matthew Landauer</name>
    <email>matthew@openaustralia.org</email>
  </committer>
</commit>
