ericdavisosu
Total posts: 11
02 Sep 2013 22:25

I am trying to integrate Community Builder into my site and I am using the integration on the config page. This integration is successfully linking the name to the user account, but the avatar is not working quite right. The default avatar works correctly, but when I change the avatar to anything else it just gives me the broken link symbol. I really like Cobalt so far and plan to keep using it, but this is a somewhat significant inconvenience and I am probably not the only one with this problem. Thanks.

Sincerely,

Eric

Last Modified: 02 Mar 2014


Konstantin
Total posts: 1,113
02 Sep 2013 22:47

Can you get a link where we can see the error. And it would be great if you also get ftp access, then we can debug it and fix.


Sergey
Total posts: 13,748
03 Sep 2013 01:51

If it is local please check the source and get tag src attribute. Show what is there. Perhaps CB changed how it stores avatars or may be file permission problems because it should regenerate thumbnail.

Anyway, if you provide access we will fix by next Thursday release.


ericdavisosu
Total posts: 11
03 Sep 2013 16:07

The site is local, but I have attached an image showing that the default avatar works, but the custom avatar does not. The screenshot also includes the CSS stuff that shows the source tag. I am running the latest versions of Joomla, CB, and Cobalt with no other extensions added yet. I have turned off all caching so that is also not the problem. The permissions on the www folder should be good as well. Thanks for the prompt reply.


Sergey
Total posts: 13,748
04 Sep 2013 02:37

Can you see avatar in profile and tel where picture is located?


ericdavisosu
Total posts: 11
04 Sep 2013 16:32

I used one of the avatars that came with Community Builder and according to the profile it is located at:

admin


Sergey
Total posts: 13,748
05 Sep 2013 04:45

This is default avatar. Is it? Where is one of the user's avatars are located? can you see at list one user avatar?


ericdavisosu
Total posts: 11
05 Sep 2013 18:14

I uploaded an image and that works. It is just the default avatars provided by Community Builder that don't work. I guess as a temporary workaround people can just delete all the default avatars that came with Community Builder, but some people may mass import images into that folder as default images and they will probably run into the same problem.


pepperstreet VIP
Total posts: 3,837
05 Sep 2013 18:53

Confirmed. Checked with latest CB and Cobalt as of today. There seems to be a** bug with CB avatar thumbs from CB provided gallery**. There is no full path in img tag. Just my root joomla directory?!

<img class="img-polaroid" src="/myjoomla/">

I also see the CB default avatar for other users. But I wonder why they are stored in cache/cobalt_thumbs? i.e.:

<img class="img-polaroid" src="/myjoomla/cache/cobalt_thumbs/avatars/270/c34376a4318f0af1fcc0ac37a576b4c9.png">

Usually, all CB avatar images are located in images/comprofiler ... either directly with full image and thumb with leading "tn", or a pre-made selection in subfolder /gallery

Why did this change in Cobalt? It worked in the past, AFAIK.


pepperstreet VIP
Total posts: 3,837
05 Sep 2013 18:58

Self-uploaded avatar images are displayed. But also loaded from cache !?!?

<img class="img-polaroid" src="/cobalt/cache/cobalt_thumbs/avatars/388/5eb6f310c0bd2039507b0e4a5a5e4692.jpg">

Why is this? Doesn´t make sense to me. CB is responsive for storing avatar pictures. Cobalt should just use them from the original location.


pepperstreet VIP
Total posts: 3,837
06 Sep 2013 04:55

Default avatars "nophoto_n.png" HAVE TO BE loaded from the current CB profile template folder. CB supports different templates for each user. i.e.:

see path and "MyCBTemplate"

default THUMB from CB template:

<img src="/ http://localhost :8888/cobalt7/components/com_comprofiler/plugin/templates/MYCBTEMPLATE/images/avatar/tnnophoto_n.png" >

default FULL PIC from CB template:

<img src="/ http://mySampleDomain/cobalt/components/com_comprofiler/plugin/templates/MYCBTEMPALTE/images/avatar/nophoto_n.png " alt="user1" title="user1" class="cbFullPict">

Sergey
Total posts: 13,748
08 Sep 2013 02:55

Why is this? Doesn´t make sense to me. CB is responsive for storing avatar pictures. Cobalt should just use them from the original location.

No it should not. The size of avatar may not conform to size with is set in template parameters. Cobalt create exact resized version. It does it only once so there is no worries about performance. I remember times when bigger image set a source on tag with smaller width attribute was distorted.

I was searching but could not find information how CB stores user avatars. Please give me an example of user avatar file. Where is it on the disk?


pepperstreet VIP
Total posts: 3,837
10 Sep 2013 17:44

Here is the short summary of CB profile image / avatar file locations. Since you want to resize and cache it in Cobalt, i refer to the bigger image, only:

DEFAULT

/components/com_comprofiler/plugin/templates/MYCBTEMPALTE/images/avatar/nophoto_n.png

DEFAULT PENDING

(if avatar moderation is on)

/components/com_comprofiler/plugin/templates/MYCBTEMPALTE/images/avatar/pending_n.png

USER UPLOAD

(leading userID# and underscore, followed by random number)

/images/comprofiler/CBUSERID_5229187c19dac.jpg

GALLERY

(optional avatar selection. Includes build-in samples. Very small GIFs, actually small thumbnails. This folder can be filled with custom images! Obviously, they should be larger than those default GIFs.)

/images/comprofiler/gallery/frog.gif

/images/comprofiler/gallery/fish.gif

/images/comprofiler/gallery/duck.gif


Sergey
Total posts: 13,748
11 Sep 2013 00:31

How do I get MYCBTEMPALTE?

What would be noew returned by this query?

SELECT avatar FROM #__comprofiler WHERE user_id = 42 AND avatarapproved = 1


pepperstreet VIP
Total posts: 3,837
11 Sep 2013 13:32

How do I get MYCBTEMPALTE?

Not 100% sure. I could not find the info in DB. I will ask "krileon" from Joomlapolis...

How do I get MYCBTEMPALTE?

What would be noew returned by this query?

SELECT avatar FROM #__comprofiler WHERE user_id = 42 AND avatarapproved = 1

by default the database field is: NULL (and avatar approved = 0)

If the user has uploaded an image: CBUSERID_xxxxxxxxx

if the user has chosen an image from the gallery folder: gallery/butterfly.gif

Heads-up:

There is an optional CB PRO plugin "CB Template Changer", which lets the user select a different profile template. Field name is "template_profile". The field is not available if the plugin is not installed.


Sergey
Total posts: 13,748
12 Sep 2013 01:16

What is default template name?

If the user has uploaded an image: CBUSERID_xxxxxxxxx

It includes CBUSERID_ or only xxxxxxx?


pepperstreet VIP
Total posts: 3,837
12 Sep 2013 11:34

Hopefully, i will get an answer from Joomlapolis today. I could not find an info about the selected Template in CB Global configuration. Maybe it is available in a config file and in a API parameter?! The CB template from User is stored in profile field.

You can follow and read in my related CB forum topic.

First answer from "krileon" is to use CB API.

Which reminds me on previous discussion about full CB integration. I think, it might be useful and complete to load CB API via Cobalt global config option? Optional to Community integration parameter. Maybe always, if CB is selected?! (I remember that jReview does it this way)


Sergey
Total posts: 13,748
13 Sep 2013 07:11

You have doc about CB api. Had you?


pepperstreet VIP
Total posts: 3,837
13 Sep 2013 10:42

You have doc about CB api. Had you?


Sergey
Total posts: 13,748
15 Sep 2013 02:11

There is nothing said about avatars unfortunately.

Powered by Cobalt