diff options
author | Arun Persaud <arun@nubati.net> | 2009-10-22 22:56:21 -0700 |
---|---|---|
committer | Arun Persaud <arun@nubati.net> | 2009-10-30 20:49:42 -0700 |
commit | ba7d92fad7b3ac0cfe4a6733339aa474991315a2 (patch) | |
tree | 67bd1b65dd9e4b6e084ebbcdd9fca141464b7b31 /include/functions.php | |
parent | de3f7290a0d3fb90e48c89cf508b38d77db1ccff (diff) | |
download | e-DoKo-ba7d92fad7b3ac0cfe4a6733339aa474991315a2.tar.gz e-DoKo-ba7d92fad7b3ac0cfe4a6733339aa474991315a2.tar.bz2 e-DoKo-ba7d92fad7b3ac0cfe4a6733339aa474991315a2.zip |
NEW FEATURE: use gravatars as icons for players
use icons at the table and on the user page (for last players logged in).
Diffstat (limited to 'include/functions.php')
-rw-r--r-- | include/functions.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/functions.php b/include/functions.php index 43fbb24..63216eb 100644 --- a/include/functions.php +++ b/include/functions.php @@ -803,7 +803,8 @@ function display_table () " Hand.point_call, ". " User.last_login, ". " Hand.hash, ". - " User.timezone ". + " User.timezone, ". + " User.email ". "FROM Hand ". "LEFT JOIN User ON User.id=Hand.user_id ". "WHERE Hand.game_id='".$gameid."' ". @@ -821,11 +822,14 @@ function display_table () $call = $r[5]; $hash = $r[7]; $timezone = $r[8]; + $email = $r[9]; $wins = DB_get_number_of_tricks($gameid,$pos); date_default_timezone_set($defaulttimezone); $lastlogin = strtotime($r[6]); date_default_timezone_set($timezone); $timenow = strtotime(date("Y-m-d H:i:s")); + $gravatar = "$name<br /><img class=\"gravatar\" title=\"$name\" src=\"http://www.gravatar.com/avatar/".md5(strtolower(trim($email)))."?d=identicon\" />"; + echo " <div class=\"table".($pos-1)."\">\n"; @@ -838,10 +842,10 @@ function display_table () $comment = $vacation[2]; $title = "begin: $start end: $stop $comment"; - echo " <span class=\"vacation\" title=\"$title\">$name (on vacation until $stop)</span> \n"; + echo " <span class=\"vacation\" title=\"$title\">$gravatar (on vacation until $stop)</span> \n"; } else - echo " $name \n"; + echo " $gravatar \n"; if($debug) echo"</a>\n"; |