×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Can we always show avatar?

Can we always show avatar? 16 years 1 month ago #1152

  • Ben T.
  • Ben T.'s Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 21
  • Thank you received: 0
Hello everybody !

Thanks a lot for this wonderful component ! :woohoo:
I have successfuly adjust all the arrangements which I wanted, except one over which I block :

I would want that the avatars of users appear every time. It is the case but not for the guests, and I would like that even for them that shows an avatar by default (as on this forum, for example).

Is it possible ?


Thanks a lot and sorry for my English, I'm French. :side:

Can we always show avatar? 16 years 1 month ago #1153

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Are you using CB? If so, then you must get an image for guests.

Can we always show avatar? 16 years 1 month ago #1155

  • Ben T.
  • Ben T.'s Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 21
  • Thank you received: 0
Yes I use CB, and it works because registered users who don't have avatar have a generic one in forum, seyret, …
In JoomlaComment, I have avatars for registered users but not for guests.

I don't talk about this little icon, wich display for all replies :

Can we always show avatar? 16 years 1 month ago #1157

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
May I see your web site?

Can we always show avatar? 16 years 1 month ago #1162

  • Ben T.
  • Ben T.'s Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 21
  • Thank you received: 0
Daniel Dimitrov wrote:

May I see your web site?

Yes, but you will not see anything because during the test period, it not appear, I let AkoComment instead untill JoomlaComment works correctly.

Here is a screenshot to see the problem :


As you can see, the 2nd and the third comments are posted by guests, and no generic avatar appears. So my template is deformed.

Can we always show avatar? 16 years 1 month ago #1163

  • Ben T.
  • Ben T.'s Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 21
  • Thank you received: 0
Is this the code to modify ? :
/* * set  _profiles[userid][id of cb] */
 
 if ($this->_profile)
$this->_profiles[$item['user_id']]['id'] = $item['user_id'];
else
$this->_profiles[$item['user_id']]['id'] = false;
 
        }
(In comment.class.php, line 803)

Can we always show avatar? 16 years 1 month ago #1169

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Hm, Look for avatar -> it should be somewhere in comment.class.php

Does CB has avatar for unregistered user? I mean if you are registered and you don't have avatar - then you see an image, but if you are not registered, there is no image or am I wrong?

Can we always show avatar? 16 years 1 month ago #1171

  • Ben T.
  • Ben T.'s Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 21
  • Thank you received: 0
Yes it works like that. So it's not possible? :o

Can we always show avatar? 16 years 1 month ago #1172

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
No, everything is possible :)
I don't have the exact code infront of me, but I believe that there was a check if cb is used
then it was checking if the user has avatar and was making the link to it. If it didn't have avatar it gets the standart picture.
So on that place you should make another
if (guest)
$avatar = path to the picture

and it should work. Can you try that?

Can we always show avatar? 16 years 1 month ago #1174

  • Ben T.
  • Ben T.'s Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 21
  • Thank you received: 0
Thanks for your help ! :)
Daniel Dimitrov wrote:

No, everything is possible :)

Cool B)
Impossible is nothing :D
/*
             * set  _profiles[userid][avatar] 
             */
 
            if ($this->_avatar) 
                $this->_profiles[$item['user_id']]['avatar'] = $item['avatar'];
            else  
                $this->_profiles[$item['user_id']]['avatar'] = false;
 
            /*
             * set  _profiles[userid][id of cb] 
             */
 
            if ($this->_profile) 
                $this->_profiles[$item['user_id']]['id'] = $item['user_id'];
            else 
                $this->_profiles[$item['user_id']]['id'] = false;
        }
I try to put the code but wherever I place it, there is an error :
Fatal error: Cannot instantiate non-existent class: josc_board in [...]/www/components/com_comment/joscomment/utils.php on line 179

A ";" is missing at the end isn't it ? :
if (guest)
$avatar = http://www.pathtothepicure.jpg

(Even my registered users without avatar selected have no standart picture. Is that the normal comportement of the component?)

Can we always show avatar? 16 years 1 month ago #1176

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
sorry I was not clear enough. What I wrote is pseudo code. I don't have the time to look for this.
Somewhere should the avatar be build and there you should tell what to do if no avatar.

Can we always show avatar? 16 years 1 month ago #1224

  • Ben T.
  • Ben T.'s Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 21
  • Thank you received: 0
Ok. :) I not a PHP expert so I tried to put the code as it is.

But JoomlaComment is configured to show a default avatar for the guests ?
(It works in my CB but not in my JoomlaComment)

Can we always show avatar? 16 years 1 month ago #1301

  • Ben T.
  • Ben T.'s Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 21
  • Thank you received: 0
Does anyone has succeeded to display avatars for guests ?
(it is a default feature of JoomlaComment isn't it?)

Because I don't resolved my problem with my template displays…
In the CSS, if I align the footer (#comment .postfooter {) in the left of my bubble, a comment without avatar will display the footer with a gap :


Is there a way to separate the CSS class of the footer for a comment with/without avatar?
  • Page:
  • 1
Time to create page: 0.128 seconds