Added tips about moderated and moderating instances; fixed a flaw in max toot chars display (it didn’t use “fnum” before); minor changes

This commit is contained in:
pezcurrel 2024-08-25 09:21:16 +02:00
parent 93561d1198
commit 7909ecdfdd

View file

@ -630,10 +630,10 @@ while ($if<$il && $row=mysqli_fetch_assoc($res)) {
$out.='<div><span class="ilab">'._('Active users (last month)').'</span> '.nully(fnum($row['ActiveUsersMonth'],$lc)).'</div>'.N;
$out.='<div><span class="ilab">'._('Active users (last six months)').'</span> '.nully(fnum($row['ActiveUsersHalfYear'],$lc)).'</div>'.N;
$out.='<div><span class="ilab">'._('Characters per post (max)').'</span> ';
if (nullemp(fnum($row['MaxTootChars'],$lc)))
if (nullemp($row['MaxTootChars']))
$out.='<span class="null">500</span>';
else
$out.=$row['MaxTootChars'];
$out.=fnum($row['MaxTootChars'],$lc);
$out.='</div>'.N;
$out.='<div><span class="ilab">'._('Known instances').'</span> '.nully(fnum($row['DomainCount'],$lc)).'</div>'.N;
$out.='</div>'.N;
@ -642,7 +642,7 @@ while ($if<$il && $row=mysqli_fetch_assoc($res)) {
if (is_null($row['FirstSeen'])) {// can't currently happen, but we put it there in any event
$fdate='<span class="null">'._('Not available{singular}').'</span>';
} elseif ($row['FirstSeen']<$wrfss) {
$fdate='<span class="nulltip" title="'._('We record this value only since').' '.$wrfsstxt.' ;-)">'._('Before').' '.$wrfsstxt.'</span>';
$fdate='<span class="null">'._('Before').' '.$wrfsstxt.'</span> <span class="tip" title="'._('We record this value only since').' '.$wrfsstxt.' ;-)">[?]</span>';
} else {
$fdate=datefmt_format($dfmt,$row['FirstSeen']).' UTC';
}
@ -733,7 +733,7 @@ while ($if<$il && $row=mysqli_fetch_assoc($res)) {
}
$out.='</div></div>'.N;
$out.='<div><div class="idlab">'._('Moderated instances').'</div><div class="idesc">';
$out.='<div><div class="idlab">'._('Moderated instances').' <span class="tip" title="'._('Each instance in this list is linked to our card only if it runs Mastodon and it is not dead.').'">[?]</span></div><div class="idesc">';
if ($row['PublicBlocksList']==1) {
$sevmap=['silence'=>_('limited'), 'suspend'=>_('suspended')];
$rres=tquery("SELECT Domain, Severity, Comment, ID, IsMastodon, LastOkCheckTS FROM InstBlocks LEFT JOIN Instances ON URI=Domain WHERE InstID={$row['ID']} ORDER BY Domain ASC",__LINE__);
@ -760,7 +760,7 @@ while ($if<$il && $row=mysqli_fetch_assoc($res)) {
}
$out.='</div></div>'.N;
$out.='<div><div class="idlab">'._('Instances certainly moderating this instance').'</div><div class="idesc">';
$out.='<div><div class="idlab">'._('Instances certainly moderating this instance').' <span class="tip" title="'._('Each instance in this list is linked to our card only if it runs Mastodon and it is not dead.').' '._('On many instances the list of instances they moderate is not public, so it is unlikely that this list is complete.').'">[?]</span></div><div class="idesc">';
$sevmap=['silence'=>_('limitation'), 'suspend'=>_('suspension')];
$rres=tquery("SELECT Severity, Comment, ID, URI, IsMastodon, LastOkCheckTS FROM InstBlocks LEFT JOIN Instances ON ID=InstID WHERE Domain=\"{$row['URI']}\" ORDER BY URI ASC",__LINE__);
if (mysqli_num_rows($rres)>0) {