From d0163957f62222522b190747370613c1cb035644 Mon Sep 17 00:00:00 2001 From: Daniel Winzen Date: Mon, 5 Sep 2016 19:05:10 +0200 Subject: [PATCH] Make nicknames in the chatters list clickable to send PMs more easily --- CHANGELOG | 1 + chat.php | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 2ab3321..029d2df 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,6 +4,7 @@ Don't escape CSS (fixes use of html entities) Allow changing frame sorting Allow making filters case sensitive Add option to hide the list of chatters +Make nicknames in the chatters list clickable to send PMs more easily Version 1.21 - Aug. 29, 2016 Don't display empty option for system messages in delete messages by name diff --git a/chat.php b/chat.php index d966572..26cd2e1 100644 --- a/chat.php +++ b/chat.php @@ -2072,16 +2072,18 @@ function print_notifications(){ echo ''; } function print_chatters(){ - global $I, $U, $db; + global $I, $U, $db, $language; if(!$U['hidechatters']){ echo '
'; $stmt=$db->prepare('SELECT nickname, style, status FROM ' . PREFIX . 'sessions WHERE entry!=0 AND status>0 AND incognito=0 AND nickname NOT IN (SELECT ign FROM '. PREFIX . 'ignored WHERE ignby=?) AND nickname NOT IN (SELECT ignby FROM '. PREFIX . 'ignored WHERE ign=?) ORDER BY status DESC, lastpost DESC;'); $stmt->execute([$U['nickname'], $U['nickname']]); + $nc=substr(time(), -6); while($user=$stmt->fetch(PDO::FETCH_NUM)){ + $link="'.style_this(htmlspecialchars($user[0]), $user[1]).''; if($user[2]<=2){ - $G[]=style_this(htmlspecialchars($user[0]), $user[1]); + $G[]=$link; }else{ - $M[]=style_this(htmlspecialchars($user[0]), $user[1]); + $M[]=$link; } } if(!empty($M)){