-
AuthorPosts
-
July 18, 2011 at 4:24 am #166397
With gravatar enabled:
Gravatar only showing for registered user in comments.
Not showing with guest comment.Is that normal???
Stork11 FriendStork11
- Join date:
- March 2011
- Posts:
- 2273
- Downloads:
- 0
- Uploads:
- 142
- Thanks:
- 55
- Thanked:
- 431 times in 393 posts
July 20, 2011 at 4:02 am #401978Yes, avatar system of JA Comment only showing for registered user, including Gravatar.
Thank you.
July 20, 2011 at 6:36 am #401999<em>@cklehe 253709 wrote:</em><blockquote>With gravatar enabled:
Gravatar only showing for registered user in comments.
Not showing with guest comment.Is that normal???</blockquote>
I just installed and have the same issue.
TomJuly 21, 2011 at 1:45 am #402167Ok. Would you have an idea how i can make it work with guest comment like wordpress does?
At least an hint on how to do it, i have a good knowledge of php.That will be great thank you.
Stork11 FriendStork11
- Join date:
- March 2011
- Posts:
- 2273
- Downloads:
- 0
- Uploads:
- 142
- Thanks:
- 55
- Thanked:
- 431 times in 393 posts
July 21, 2011 at 4:31 am #402203<em>@cklehe 254507 wrote:</em><blockquote>Ok. Would you have an idea how i can make it work with guest comment like wordpress does?
At least an hint on how to do it, i have a good knowledge of php.That will be great thank you.</blockquote>
Hello,
I modified something in your code and it worked well. I also left a backup of jahelper.php on your site. You can compare the code if you want.
The following guide shows what I did. I hope it helps you and others 🙂
– Open “componentscom_jacommenthelpersjahelper.php” file, at line 1649:
Before
[PHP]
function getAvatar($userID = 0, $ismodule = 0, $avatarSize = 0, $typeAvatar = ”) {
[/PHP]
After
[PHP]
function getAvatar($userID = 0, $ismodule = 0, $avatarSize = 0, $typeAvatar = ”, $itemEmail = ”) {
[/PHP]And at line 1677:
Before
[PHP]
if (! $userID)
[/PHP]
After
[PHP]
if (!$userID && $typeAvatar==3) {
$avatar = JACommentHelpers::getAvatarGravatar ($itemEmail, $avatarSize, $src, $ismodule, $avatarSize);
if (! $avatar)
$avatar = $src;return $avatar = array ($avatar, $size );
}
else if (! $userID)
[/PHP]– Open “componentscom_jacommentviewscommentsview.html.php” file, at line 848:
Before
[PHP]
$tmpAvatar = $helper->getAvatar($userInfo->id);
[/PHP]
After
[PHP]
$tmpAvatar = $helper->getAvatar($userInfo->id, 0, 0, ”, $item->strEmail);
[/PHP]– Open “administratorcomponentscom_jacommentcontrollerscomments.php” file, at line 244:
Before
[PHP]
$avatar = $helper->getAvatar($userID);
[/PHP]
After
[PHP]
$avatar = $helper->getAvatar($userID, 0, 0, ”, $strEmail);
[/PHP]– Open “/administrator/components/com_jacomment/views/comments/tmpl/comments.php” file, at line 86:
Before
[PHP]
$tmpAvatar = $helper->getAvatar($userInfo->id);
[/PHP]
After
[PHP]
$tmpAvatar = $helper->getAvatar($userInfo->id, 0, 0, ”, $strEmail);
[/PHP]Best regards.
2 users say Thank You to Stork11 for this useful post
July 21, 2011 at 5:29 pm #402356Thank you very much for the modification. You outdone yourself!
As usual great great support here at joomlart!
You should include this in the next version of jacomment as gravatar for guest comment is what most people need with comment system especially if user are not allowed to register.
-
AuthorPosts
This topic contains 6 replies, has 3 voices, and was last updated by cklehe 13 years, 4 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum