Well, I tried to explain into more detail:
I would like to have an avatar in front of each comment in the comments-list of wordpress (not the forum). An individually avatar should be shown, if a comment was written by a still exisiting user (means: registered in my blog and the simple press forum). If a guest (not registered) write a comment to a thread of my blog, a default avatar should be shown next to his name in the comments-list.
Therefore I used this funtion:
sp_UserAvatar('context=user&size=40&imgClass=spAvatar', $comment);
Edit: Now I found my mistake. I extended the function like the following:
sp_UserAvatar('context=user&size=40&imgClass=spAvatar', $comment->comment_author_email);
The result looks like this, like it should:
www.miranda-fusion.de/simple-press3.jpg
This function works now for comments in articles, BUT not in the comments-list of pages. It gives me an error:
Fatal error: Call to undefined function sp_UserAvatar() in the function.php.
But works for articles. Maybe you have an explanation for that. Why is this function not working on static pages?