[SOLVED] Need to fix Profile Buddies
Divvy Offline
Junior Member
**
Posts: 37
Joined: Jan 2012
Post: #1
[SOLVED] Need to fix Profile Buddies
Hello guys,

I have installed this plugin in my forum:
http://mods.mybb.com/view/profile-buddies

And I think that I found a "little" bug, take a look here:
[Image: pHKob.png]

Some users are using same avatar... How can I fix that?
I contacted the plugin author but he is not replying me...

Help please Smile
(This post was last modified: 01-16-2012 06:46 AM by Divvy.)
01-14-2012 05:51 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #2
RE: Need to fix Profile Buddies
Try this, find:

PHP Code:
$avatar_default='';

replace with

PHP Code:
$buddy_avatar=$avatar_default='';


My Blog
01-14-2012 09:51 AM
Find all posts by this user Quote this message in a reply
Divvy Offline
Junior Member
**
Posts: 37
Joined: Jan 2012
Post: #3
RE: Need to fix Profile Buddies
Hi ZiNgA BuRgA, thank you for trying to help me Smile

Doing that, appears like that:
[Image: WCmga.png]

Note: The avatars that appeared was the ones that the avatar was uploaded to the server... the other members avatars are remote urls.

Any suggestion? Smile
01-14-2012 11:16 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #4
RE: Need to fix Profile Buddies
Bug someone to fix the code, is my suggestion.

My Blog
01-14-2012 12:12 PM
Find all posts by this user Quote this message in a reply
Divvy Offline
Junior Member
**
Posts: 37
Joined: Jan 2012
Post: #5
RE: Need to fix Profile Buddies
Cant I "bug" you? Smile
Please? You're almost there...
01-14-2012 12:13 PM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #6
RE: Need to fix Profile Buddies
Maybe you can check in the users table whether the users have the avatardimensions value?

01-15-2012 06:24 AM
Find all posts by this user Quote this message in a reply
Divvy Offline
Junior Member
**
Posts: 37
Joined: Jan 2012
Post: #7
RE: Need to fix Profile Buddies
RateU, thank you for your reply bud.

What do you mean? Checking database in phpmyadmin?
What do I need to look? Can you give me an example?

Note: avatars works fine in my all forum, only have problems in this plugin...
01-15-2012 09:21 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #8
RE: Need to fix Profile Buddies
Try to change this code:

PHP Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
if($avatar_dimensions[0]&&$avatar_dimensions[1])
{
	if($avatar_dimensions[0]>$max_width||$avatar_dimensions[1]>$max_height)
	{
		$scaled_dimensions=scale_image($avatar_dimensions[0],$avatar_dimensions[1],$max_width,$max_height);
		$avatar_width_height='width="'.$scaled_dimensions['width'].'" height="'.$scaled_dimensions['height'].'"';
	}
	else
	{
		$avatar_width_height='width="'.$avatar_dimensions[0].'" height="'.$avatar_dimensions[1].'"';
	}
	$buddy_avatar='<a href="'.get_profile_link($buddy['uid']).'"><img src="'.$buddy['avatar'].'" alt="'.htmlspecialchars_uni($buddy['username']).'" '.$avatar_width_height.' '.$avatar_default.'/></a>';
}

to this:

PHP Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
if($avatar_dimensions[0]&&$avatar_dimensions[1])
{
	if($avatar_dimensions[0]>$max_width||$avatar_dimensions[1]>$max_height)
	{
		$scaled_dimensions=scale_image($avatar_dimensions[0],$avatar_dimensions[1],$max_width,$max_height);
		$avatar_width_height='width="'.$scaled_dimensions['width'].'" height="'.$scaled_dimensions['height'].'"';
	}
	else
	{
		$avatar_width_height='width="'.$avatar_dimensions[0].'" height="'.$avatar_dimensions[1].'"';
	}
}
$buddy_avatar='<a href="'.get_profile_link($buddy['uid']).'"><img src="'.$buddy['avatar'].'" alt="'.htmlspecialchars_uni($buddy['username']).'" '.$avatar_width_height.' '.$avatar_default.'/></a>';


01-16-2012 02:02 AM
Find all posts by this user Quote this message in a reply
Divvy Offline
Junior Member
**
Posts: 37
Joined: Jan 2012
Post: #9
RE: Need to fix Profile Buddies
Fixed, thank you very much my friend Biggrin
01-16-2012 06:08 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: