Hi there...
First of all: thanks for this great contribution to the community...
It really rocks..!!
But I think I might have found a little bug in the code...
I have running: Joomla 1.0.10 with Community Builder 1.0 Stable. I have the LastProfileVisitors plugin running into CB. This is all working without any errors for images (avatars) that are uploaded by a user him/her self (and approved by the Admin)
. All the avatars are showed correctly is the tabs of my users.
The problem occurs when I let users pick an image from the build-in "gallery" integrated in Community Builder (described in the CB-config at the backend as: "Use Image Gallery: Yes/No?"). So the problem occurs when this last setting is Yes.
Summary:
What's the problem: The problem is that no avatars of my users are not showed in the tabs when the avatars are chosen from the build-in "Image Gallery" in CB. I then only see the standard tnnophoto.jpg loaded from //components/com_comprofiler/plugin/language/default_language/images/.
More Extensive:
IMHO the code that loads the avatar is placed in lastviews.php file in //components/com_comprofiler/plugin/user/plug_cblastviewstab-2_5 on the lines 167 till 192. Here's the code I mean:
[code:1]
if ($lastview->avatar && $lastview->banned != '1' && $lastview->avatarapproved !='0') {
$testimage = "/images/comprofiler/tn$lastview->avatar";
if (file_exists($mosConfig_absolute_path.$testimage)) {
$image = $mosConfig_live_site.$testimage;
} else {
$testimage = "/components/com_comprofiler/plugin/language/$mosConfig_lang/images/tnnophoto.jpg";
if (file_exists($mosConfig_absolute_path.$testimage)) {
$image = $mosConfig_live_site.$testimage;
} else {
$image = "$mosConfig_live_site/components/com_comprofiler/plugin/language/default_language/images/tnnophoto.jpg";
}
}
} else {
$testimage = "/components/com_comprofiler/plugin/language/$mosConfig_lang/images/tnnophoto.jpg";
if (file_exists($mosConfig_absolute_path.$testimage)) {
$image = $mosConfig_live_site.$testimage;
} else {
$image = "$mosConfig_live_site/components/com_comprofiler/plugin/language/default_language/images/tnnophoto.jpg";
}
}
$return.=
[/code:1]
EDIT BY MISCHA:
The Forum-Software is wrapping up and spreading the 2 longest lines in this code into two lines. Both the Red words tnnophoto.jpg that starts the 2 new lines are parts of the end of the line above!!!
This code needs an avatar with a thumbnail in //images/comprofiler named like tn[#USERIDINJOOMLA]_[RANDOMCODE???]. Because when a user uses a avatar from the build-in "image gallery" from Community Builder there is no thumbnail(file) from the original pic and so the damned tnnophoto.jpg is loaded again.
As you can see I already took a look at the underlying code but I have to admit the this way of coding is still is little too difficult for me
:blush:. E.g. I can't find the code that generates the RANDOMCODE in the name of the thumbnail files??
I hope someone else does know a way to solve this bug/problem? Is it really a bug or is there something wrong with the configuration I have?? If it's a bug maybe DJTrail can fix it?? Is there some other place then where I can add in into some bug-tracker system??
Hope you guys can help me with this....
Greetz,
Mischa.
Post edited by: mischa, at: 2006/08/03 02:21