10-05-2011, 08:24 AM | #1 |
Member
Join Date: Feb 2011
Posts: 58
Rep Power: 14 |
Where are author avatars supposed to appear
I see code in the vbbridge.php file that is supposed to do something with avatars, but I don't see any on any of the WP pages or in the comments. Am I missing something?
|
Reply With Quote |
10-06-2011, 09:53 AM | #2 |
Administrator
Join Date: Jul 2010
Posts: 402
Rep Power: 10 |
Do your templates use the get_avatar() function at all?
|
Reply With Quote |
10-06-2011, 10:20 AM | #3 |
Member
Join Date: Feb 2011
Posts: 58
Rep Power: 14 |
Yes, I have called it from a template. It is also called somewhere in the commenting engine but I can't figure out where (I know it is being called for every comment posted because of my debug logs). I used Firephp to do some debugging on it. The code is expecting an integer for $u->user_id in your code but never getting one so if (!is_numeric($u->user_id)) { return; } is always returning.
|
Reply With Quote |
10-06-2011, 11:38 AM | #4 |
Member
Join Date: Feb 2011
Posts: 58
Rep Power: 14 |
Also it would help out a ton if I new what the function get_avatar was expecting in the $u parameter.
|
Reply With Quote |
10-07-2011, 06:14 AM | #5 |
Administrator
Join Date: Jul 2010
Posts: 402
Rep Power: 10 |
$u is the user object. You pass that along to it..
|
Reply With Quote |
10-07-2011, 08:50 AM | #6 |
Member
Join Date: Feb 2011
Posts: 58
Rep Power: 14 |
I ended up modifying the get_avatar function with the following so I could pass in a user's vb id and get it to work correctly:
PHP Code:
1. It sounds like I should be able to use the same function for both if I can figure out how to create a user object. Can you give me a little tutorial on how to do that? 2. How is the get_avatar function called in the WP commenting backend? I don't really see it in the code and avatars are not being associated with the comments in the backend. 3. I lied, one more.... I would also like to display the avatar of each user who comments on a post as in this page: http://www.michigan-sportsman.com/ms...an-youth-hunt/ But I don't know what to pass from this template function to make that happen. You can see my attempts at trying to get a comment author which have failed. PHP Code:
|
Reply With Quote |
Reply |
Tags |
vbulletin wordpress bridge |
|
|