Added “Meta’s Threads moderation” field
This commit is contained in:
parent
38aa09ce9b
commit
b5f625f856
1 changed files with 32 additions and 4 deletions
|
@ -575,6 +575,35 @@ while ($if<$il && $row=mysqli_fetch_assoc($res)) {
|
|||
$out.='</div>'.N;
|
||||
$out.='</div>'.N;
|
||||
|
||||
$out.='<div><span class="ilab">'._('Meta’s Threads moderation').'</span> ';
|
||||
if ($row['BlockListAvailable']==1) {
|
||||
$mmres=tquery('SELECT Domain, Severity, Comment FROM InstBlocks WHERE InstID='.$row['ID'],__LINE__);
|
||||
if (mysqli_num_rows($mmres)>0) {
|
||||
$tm=false;// tmk: threads moderation
|
||||
while ($rrow=mysqli_fetch_assoc($mmres)) {
|
||||
if (preg_match('#^(threads.net|.*\.threads.net)$#i',$rrow['Domain'])==1) {
|
||||
if ($rrow['Severity']=='suspend')
|
||||
$out.=_('Suspended');
|
||||
elseif ($rrow['Severity']=='silence')
|
||||
$out.=_('Limited');
|
||||
else
|
||||
$out.=_('Unmanaged').': «'.htmlentities($rrow['Severity']).'»';
|
||||
$tm=true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!$tm)
|
||||
$out.=_('Neither suspended nor limited');
|
||||
} else {
|
||||
$out.=_('Neither suspended nor limited');
|
||||
$mmres=false;
|
||||
}
|
||||
} else {
|
||||
$out.='<span class="null">'._('Unknown (moderated servers list is unaccessible)').'</span>';
|
||||
$mmres=false;
|
||||
}
|
||||
$out.='</div>'.N;
|
||||
|
||||
$out.='<div><span class="ilab">'._('Most used hashtags (last week)').'</span> ';
|
||||
$rres=tquery('SELECT * FROM InstTrends WHERE InstID='.$row['ID'].' ORDER BY Pos ASC',__LINE__);
|
||||
if (mysqli_num_rows($rres)>0) {
|
||||
|
@ -607,11 +636,10 @@ while ($if<$il && $row=mysqli_fetch_assoc($res)) {
|
|||
$out.='</div></div>'.N;
|
||||
|
||||
$out.='<div><div class="idlab">'._('Moderated servers').'</div><div class="idesc">';
|
||||
$sevmap=['silence'=>_('silenced'), 'suspend'=>_('suspended')];
|
||||
$rres=tquery('SELECT Domain, Severity, Comment FROM InstBlocks WHERE InstID='.$row['ID'],__LINE__);
|
||||
if (mysqli_num_rows($rres)>0) {
|
||||
$sevmap=['silence'=>_('limited'), 'suspend'=>_('sospeso')];
|
||||
if ($mmres!=false) {
|
||||
$out.='<ul class="nobott">'.N;
|
||||
while ($rrow=mysqli_fetch_assoc($rres)) {
|
||||
while ($rrow=mysqli_fetch_assoc($mmres)) {
|
||||
$out.='<li><strong>'.hspech($rrow['Domain']).'</strong>: '.$sevmap[$rrow['Severity']];
|
||||
if (!is_null($rrow['Comment'])) $out.=' - '.hspech($rrow['Comment']);// no strip, do hspech, because moredated server comments don’t support html nor markdown in mastodon
|
||||
$out.='</li>'.N;
|
||||
|
|
Loading…
Reference in a new issue