Quote:
Originally posted by chrisz
Ok I found that how do I add the persons avatar next to what they said during battle?
|
In battlefight.php, find:
PHP Code:
/*
$owneravatarurl=getavatarurl($ownerstats[userid]);
$oppavatarurl=getavatarurl($oppstats[userid]);
if (isset($owneravatarurl) and !empty($owneravatarurl)) {
$owneravatar = "<img src=\"$owneravatarurl\"></img>";
} else {
$owneravatar = "<br>";
}
if (isset($oppavatarurl) and !empty($oppavatarurl)) {
$oppavatar = "<img src=\"$oppavatarurl\"></img>";
} else {
$oppavatar = "<br>";
}
*/
and change it to:
PHP Code:
$owneravatarurl=getavatarurl($ownerstats[userid]);
$oppavatarurl=getavatarurl($oppstats[userid]);
if (isset($owneravatarurl) and !empty($owneravatarurl)) {
$owneravatar = "<img src=\"$owneravatarurl\"></img>";
} else {
$owneravatar = "<br>";
}
if (isset($oppavatarurl) and !empty($oppavatarurl)) {
$oppavatar = "<img src=\"$oppavatarurl\"></img>";
} else {
$oppavatar = "<br>";
}
Then, in the battle_postbit and battle_postbit2 templates, add $owneravatar where you want the owner's avatat and $oppavatar where you want the opponent's avatar.
I have not tested this in a long time, so it may not work. Also, doing this will add at least 2 queries to battlefight.php.