* replace deprecated HTML <font> tag with <span>

This commit is contained in:
slawkens
2018-06-01 13:35:27 +02:00
parent 1926c5ec5b
commit 05e15ce9ad
38 changed files with 267 additions and 267 deletions

View File

@@ -565,7 +565,7 @@ function getCreatureName($killer, $showStatus = false, $extendedInfo = false)
if(!$showStatus)
return $str.'<b>'.$player->getName().'</b></a>';
$str .= '<font color="'.($player->isOnline() ? 'green' : 'red').'">' . $player->getName() . '</font></b></a>';
$str .= '<span style="color: '.($player->isOnline() ? 'green' : 'red').'">' . $player->getName() . '</span></b></a>';
if($extendedInfo) {
$str .= '<br><small>'.$player->getLevel().' '.$player->getVocationName().'</small>';
}
@@ -684,25 +684,25 @@ function superAdmin() {
*
* @param int $exp Experience amount.
* @param bool $color Should result be colorized?
* @return string Resulted message attached in <font> tag.
* @return string Resulted message attached in <span> tag.
*/
function formatExperience($exp, $color = true)
{
$ret = '';
if($color)
{
$ret .= '<font';
if($exp > 0)
$ret .= ' color="green">';
elseif($exp < 0)
$ret .= ' color="red">';
else
$ret .= '<span';
if($exp != 0) {
$ret .= ' style="color: ' . ($exp > 0 ? 'green' : 'red') . '">';
}
else {
$ret .= '>';
}
}
$ret .= '<b>' . ($exp > 0 ? '+' : '') . number_format($exp) . '</b>';
if($color)
$ret .= '</font>';
$ret .= '</span>';
return $ret;
}