Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
[HACK] Avatar size
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2 Only Mods Complete

Unknown User
2009-01-06 21:56:47
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:

	$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]

avatarsize.jpg
avatarsize.jpg
Unknown User
2010-02-03 14:50:55
it doesnt work for me
Unknown User
2010-05-21 11:36:19
work good thanks
Unknown User
2010-08-09 03:45:23
works great thanks
Unknown User
2010-09-07 13:44:59
Welcome  ;)  if have any questions just let me know  ;)  Greetings
2010-10-19 20:21:57
Thanks  :D
Unknown User
2010-11-12 14:34:04
Works great but a problem with animated GIFs..

Quote:
Warning: getimagesize() [function.getimagesize]: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /home/casey/public_html/account-details.php on line 71
Warning: getimagesize(http://quantarswords.ist-dein-chef.de/hands_up170.gif) [function.getimagesize]: failed to open stream: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /home/casey/public_html/account-details.php on line 71

Is there a way to disable animated gifs?
2010-12-29 20:21:15
Salut Xolo!   :rolleyes:

je voudrais savoir si vous pouvez faire la m
Unknown User
2010-12-29 21:18:13
As Casey above an error here to.

Warning: getimagesize() [function.getimagesize]: php_network_getaddresses: getaddrinfo failed: No such host is known. in C:\xxxx\xxxx\account-details.php on line 62

Line 62 is  list($width) = getimagesize($avatar); as mentioned in first post to use here.
Unknown User
2011-01-03 00:04:17
Hello guys, sorry for long respond and thanks for the greetings.

I will check it and let you know about the results what I can do all about this.
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 1
  • Members: 0
  • Guests online: 1
  • Comments: 3
  • Messages: 1,728