Make nicknames in the chatters list clickable to send PMs more easily
This commit is contained in:
@ -4,6 +4,7 @@ Don't escape CSS (fixes use of html entities)
|
|||||||
Allow changing frame sorting
|
Allow changing frame sorting
|
||||||
Allow making filters case sensitive
|
Allow making filters case sensitive
|
||||||
Add option to hide the list of chatters
|
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
|
Version 1.21 - Aug. 29, 2016
|
||||||
Don't display empty option for system messages in delete messages by name
|
Don't display empty option for system messages in delete messages by name
|
||||||
|
8
chat.php
8
chat.php
@ -2072,16 +2072,18 @@ function print_notifications(){
|
|||||||
echo '</span>';
|
echo '</span>';
|
||||||
}
|
}
|
||||||
function print_chatters(){
|
function print_chatters(){
|
||||||
global $I, $U, $db;
|
global $I, $U, $db, $language;
|
||||||
if(!$U['hidechatters']){
|
if(!$U['hidechatters']){
|
||||||
echo '<div id="chatters"><table style="border-spacing:0px;"><tr>';
|
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=$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']]);
|
$stmt->execute([$U['nickname'], $U['nickname']]);
|
||||||
|
$nc=substr(time(), -6);
|
||||||
while($user=$stmt->fetch(PDO::FETCH_NUM)){
|
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){
|
if($user[2]<=2){
|
||||||
$G[]=style_this(htmlspecialchars($user[0]), $user[1]);
|
$G[]=$link;
|
||||||
}else{
|
}else{
|
||||||
$M[]=style_this(htmlspecialchars($user[0]), $user[1]);
|
$M[]=$link;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!empty($M)){
|
if(!empty($M)){
|
||||||
|
Reference in New Issue
Block a user