From 7fa46b7fccd6fca4ee3b77d089b6cca2ddf2e20d Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Fri, 7 Nov 2003 15:56:13 +0000 Subject: [PATCH] * ctdlprotocol.php: known room list fetch now sets subscript "hasnewmsgs" * listrooms.php: render rooms with unseen messages in boldface --- ctdlphp/ChangeLog | 5 ++++- ctdlphp/ctdlprotocol.php | 7 +++++++ ctdlphp/listrooms.php | 8 ++++++-- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/ctdlphp/ChangeLog b/ctdlphp/ChangeLog index d90b7c926..f9976427e 100644 --- a/ctdlphp/ChangeLog +++ b/ctdlphp/ChangeLog @@ -1,4 +1,8 @@ $Log$ + Revision 1.14 2003/11/07 15:56:13 ajc + * ctdlprotocol.php: known room list fetch now sets subscript "hasnewmsgs" + * listrooms.php: render rooms with unseen messages in boldface + Revision 1.13 2003/11/05 03:29:12 ajc * Added a room list function to the library * Threw together temporary room list and goto pages to demonstrate @@ -57,4 +61,3 @@ Revision 1.1 2003/10/31 03:47:13 ajc * Initial CVS import - diff --git a/ctdlphp/ctdlprotocol.php b/ctdlphp/ctdlprotocol.php index 0463ad512..a15686f35 100644 --- a/ctdlphp/ctdlprotocol.php +++ b/ctdlphp/ctdlprotocol.php @@ -269,6 +269,13 @@ function ctdl_knrooms() { $tok = strtok("|"); if ($tok) $thisline["access"] = $tok; + if ($thisline["access"] & 8) { + $thisline["hasnewmsgs"] = TRUE; + } + else { + $thisline["hasnewmsgs"] = FALSE; + } + $num_lines = array_push($all_lines, $thisline); } diff --git a/ctdlphp/listrooms.php b/ctdlphp/listrooms.php index 9920c4636..37e5ac38a 100644 --- a/ctdlphp/listrooms.php +++ b/ctdlphp/listrooms.php @@ -11,9 +11,13 @@ list($num_rooms, $roomlist) = ctdl_knrooms(); if ($num_rooms > 0) foreach ($roomlist as $x) { - echo '
  • '; + echo '' . - htmlspecialchars($x["name"]) . "
  • \n" ; + htmlspecialchars($x["name"]) . "" ; + if ($x["hasnewmsgs"]) echo ''; + echo "\n" ; } ?> -- 2.30.2