Hello,
it's my first small fix to TorrentTrader.
This amendment is intended that in places where the avatar is displayed, not reduce it, if its width is less than 150px.
Installation: easy
Tracker version: TT V2
Mod Author: me a.k.a [url="http://www.fafas.lt"]FaFaS[/url]
Web site: [url="http://www.fafas.lt"]www.fafas.lt[/url]
open account-details.php
find:
Enjoy!
Author me a.k.a [url="http://www.fafas.lt"]FaFaS[/url]
it's my first small fix to TorrentTrader.
This amendment is intended that in places where the avatar is displayed, not reduce it, if its width is less than 150px.
Installation: easy
Tracker version: TT V2
Mod Author: me a.k.a [url="http://www.fafas.lt"]FaFaS[/url]
Web site: [url="http://www.fafas.lt"]www.fafas.lt[/url]
open account-details.php
find:
$avatar = htmlspecialchars($user["avatar"]);
if (!$avatar) {
$avatar = "".$site_config["SITEURL"]."/images/default_avatar.gif";
}add bellow: list($width) = getimagesize($avatar);
if ($width > 150) {
$avatar .= ' width=150';
}
open backend/functions.php
find:
<img width=80 height=80 src=$avatar>
replace with:
<img src=$avatar>
find:
else {
$privacylevel = $row["privacy"];
$avatar = htmlspecialchars($row["avatar"]);
$title = htmlspecialchars($row["title"]);
$usersignature = stripslashes(format_comment($row["signature"]));
$userdownloaded = mksize($row["downloaded"]);
$useruploaded = mksize($row["uploaded"]);
add bellow:
list($width) = getimagesize($avatar);
if ($width > 150) {
$avatar .= ' width=150';
}
That's it!
If you use other plug-ins (addons), locate the place where sets the avatar, eg.
$avatar = htmlspecialchars($row["avatar"]);
or similar to this code. Then paste the code below
list($width) = getimagesize($avatar);
if ($width > 150) {
$avatar .= ' width=150';
}Enjoy!
Author me a.k.a [url="http://www.fafas.lt"]FaFaS[/url]
