Make nicknames in the chatters list clickable to send PMs more easily
This commit is contained in:
8
chat.php
8
chat.php
@ -2072,16 +2072,18 @@ function print_notifications(){
|
||||
echo '</span>';
|
||||
}
|
||||
function print_chatters(){
|
||||
global $I, $U, $db;
|
||||
global $I, $U, $db, $language;
|
||||
if(!$U['hidechatters']){
|
||||
echo '<div id="chatters"><table style="border-spacing:0px;"><tr>';
|
||||
$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="<a href=\"$_SERVER[SCRIPT_NAME]?action=post&session=$U[session]&lang=$language&nc=$nc&sendto=".htmlspecialchars($user[0]).'" target="post">'.style_this(htmlspecialchars($user[0]), $user[1]).'</a>';
|
||||
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)){
|
||||
|
Reference in New Issue
Block a user