How to change the thumbnail representing an user ? How to change the thumbnail representing an user ?
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

How to change the thumbnail representing an user ?

Started by THIS ACCOUNT IS NO LONGER IN USE, January 04, 2005, 12:08:29 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

THIS ACCOUNT IS NO LONGER IN USE

In the "Home > User Galleries" page (http://....../gallery/index.php?cat=1) there are users represented by thumbnails. I have to admit I am unable to change my thumbnail and must ask for help. This is not an album thumbnail that can be easily changed in the album properties.  Thank you in advance.

Harvey

Nibbler


THIS ACCOUNT IS NO LONGER IN USE

Unfortunately you cannot visit this gallery. The server is behind a firewall and not reachable from Internet.

The thumbnail in question seems to be the last uploaded file to any of the user's albums. I want to change it but don't know how.

Harvey

Nibbler

Should be in album properties, dropdown box to select 'Album thumbnail'. Make sure you are using latest stable version, currently 1.3.2

THIS ACCOUNT IS NO LONGER IN USE

Thank you for the reply, but as I wrote it is not an album that's why there are no album properties. I think it was called sub-category in one of the posts here.  Look at the demo gallery at http://coppermine.sourceforge.net/demo/index.php?cat=1 - how could one change the thumbnail close to the "Oasis, 1 album, 1 picture" there ?

My gallery is freshly installed 1.3.2 version.

Harvey

Joachim Müller

the thumb that represents a user (cat) in user galleries can't be changed currently afaik.

Joachim

THIS ACCOUNT IS NO LONGER IN USE

If it cannot be changed, could you please tell which lines of code are responsible for that thumbnail ? I'll try to change it.  "Click here" is better than a thumbnail of an ugly spider from the close-up gallery. Thank you.

Nibbler

It's this query here I think, in index.php

        $sql = "SELECT user_id, " .
               "user_name, " .
               "COUNT(DISTINCT a.aid) as alb_count, " .
               "COUNT(DISTINCT pid) as pic_count, " .
               "MAX(pid) as thumb_pid " .
               "FROM {$CONFIG['TABLE_USERS']} AS u " .
               "INNER JOIN {$CONFIG['TABLE_ALBUMS']} AS a ON category = " . FIRST_USER_CAT . " + user_id " .
               "LEFT JOIN {$CONFIG['TABLE_PICTURES']} AS p ON (p.aid = a.aid AND approved = 'YES') ";


It's taking the max(pid) (ie. last uploaded pic) to use as the thumbnail pic.

THIS ACCOUNT IS NO LONGER IN USE

Thank you for the hint.

I did the following:
in the line 328: $user_thumb = '<img src="images/nopic.jpg" class="image" border="0" />
changed the default "nopic.jpg" to "gallery.jpg" which I prepared and copied to the images directory
and commented out the line 346: $user_thumb = "<img src=\"" . get_pic_url($picture        , 'thumb') . " .....

Now is the general "gallery.jpg" thumbnail representing all users' galleries. Not a real solution, but it is OK for me. Yes, It's just a stupid hack, but I do not know PHP.

Thanks and good bye

Harvey