Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

JoomlaTune Support Forum    JComments component    Suggestions, Wishlists & Feature Requests    Topic: Jcomments integration with Identicons, MonsterID’s, and Wavatars
Pages: [1]   Go Down
  Print  
Author Topic: Jcomments integration with Identicons, MonsterID’s, and Wavatars  (Read 9649 times)
0 Members and 1 Guest are viewing this topic.
agez
Newbie
*

Karma: -5
Offline Offline

Gender: Male
Posts: 7



« on: September 24, 2010, 15:11:38 »

Hello,

First of all, amazing component, best aut there Smiley

I would like to use Identicons, MonsterID’s or Wavatars as my default avatar. Can someone help me with this?
Logged
smart
Administrator
Hero Member
*****

Karma: 187
Offline Offline

Gender: Male
Posts: 1883



WWW
« Reply #1 on: September 24, 2010, 16:21:36 »

At this moment you need to make some code modification.

1. Open file /components/com_jcomments/jcomments.php
2. Find code:
Code: (php)
$comment->avatar = '<img src="http://www.gravatar.com/avatar.php?gravatar_id='. $comment->gravatar .'&amp;default=' . urlencode(JCommentsFactory::getLink('noavatar')) . '" alt="" />';
3. Replace with:
Code: (php)
$comment->avatar = '<img src="http://www.gravatar.com/avatar.php?gravatar_id='. $comment->gravatar .'&amp;default=identicon" alt="" />';
or
Code: (php)
$comment->avatar = '<img src="http://www.gravatar.com/avatar.php?gravatar_id='. $comment->gravatar .'&amp;default=wavatar" alt="" />';
or
Code: (php)
$comment->avatar = '<img src="http://www.gravatar.com/avatar.php?gravatar_id='. $comment->gravatar .'&amp;default=monsterid" alt="" />';

In future versions I'll move this into JComments settings and you'll be able to select Gravatar's default image without code hacks.
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
agez
Newbie
*

Karma: -5
Offline Offline

Gender: Male
Posts: 7



« Reply #2 on: September 24, 2010, 17:34:00 »

thanks smart, this is what i was looking for. Great support   Wink

EDITED

it seems, that Jcomments latest comments module cann't display Identicons, MonsterID’s, and Wavatars avatars inside module. It loads default no avatar image. Avatar link that is loaded is this /components/com_jcomments/images/no_avatar.png Is there way to fix this? hack will be good for me Smiley

I believe the line i need to modify is 411 in Jcomments module

Code:
echo '<img src="http://www.gravatar.com/avatar.php?gravatar_id='. md5( $row->email ) .'&amp;default=' . urlencode($mainframe->getCfg( 'live_site' ) . '/components/com_jcomments/images/no_avatar.png') . '&amp;size=' . $avatar_size . '"  alt="" border="0" />';
« Last Edit: October 01, 2010, 04:32:14 by agez » Logged
agez
Newbie
*

Karma: -5
Offline Offline

Gender: Male
Posts: 7



« Reply #3 on: October 01, 2010, 16:44:11 »

emmm made this post so this forum thread would be noticed by someone Smiley

DONE Smiley

replaced line 411 with this:
Code:
echo '<img src="http://www.gravatar.com/avatar.php?gravatar_id='. md5( $row->email ) .'&amp;default=monsterid" alt="" border="0" />';
« Last Edit: October 02, 2010, 02:04:45 by agez » Logged
Pages: [1]   Go Up
  Print  
JoomlaTune Support Forum    JComments component    Suggestions, Wishlists & Feature Requests    Topic: Jcomments integration with Identicons, MonsterID’s, and Wavatars
 
Jump to: