Selecting the Avatar

I've found the code that changes the order of the images in an album so that the image at 0 is the avatar. However, with multiple albums, I can't find the code which tells me which album it is I should be looking in to choose the avatar from. Is there a pointer in the database somewhere?

 

Ultimately what I need to do is get the ID of the image for a given member.

 

Cust.

Quote · 11 Oct 2016

Perhaps I should say thumbnail instead of avatar.

Quote · 11 Oct 2016

I think I sorted it:

 

bx_photos_main.id IN ( SELECT sys_albums_objects.id_object FROM sys_albums_objects WHERE sys_albums_objects.obj_order = 0 AND sys_albums_objects.id_album IN ( SELECT min(sys_albums.ID) FROM sys_albums GROUP BY Owner))

 

Returns a list of id's for all the photo thumbnails... I hope. Anyone see any issues or a better way of doing it?

Quote · 11 Oct 2016
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.