Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: How to change the thumbnail representing an user ?  (Read 4972 times)

0 Members and 1 Guest are viewing this topic.

THIS ACCOUNT IS NO LONGER IN USE

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
How to change the thumbnail representing an user ?
« on: January 04, 2005, 12:08:29 pm »

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
« Last Edit: January 07, 2005, 11:22:04 am by GauGau »
Logged

Nibbler

  • Guest
Re: How to change the thumbnail representing an user ?
« Reply #1 on: January 04, 2005, 01:56:13 pm »

Can you post a link to your site please.
Logged

THIS ACCOUNT IS NO LONGER IN USE

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: How to change the thumbnail representing an user ?
« Reply #2 on: January 04, 2005, 03:56:01 pm »

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
Logged

Nibbler

  • Guest
Re: How to change the thumbnail representing an user ?
« Reply #3 on: January 04, 2005, 04:27:17 pm »

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

THIS ACCOUNT IS NO LONGER IN USE

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: How to change the thumbnail representing an user ?
« Reply #4 on: January 04, 2005, 10:20:31 pm »

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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: How to change the thumbnail representing an user ?
« Reply #5 on: January 05, 2005, 01:35:49 am »

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

Joachim
Logged

THIS ACCOUNT IS NO LONGER IN USE

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: How to change the thumbnail representing an user ?
« Reply #6 on: January 06, 2005, 10:43:45 am »

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.
Logged

Nibbler

  • Guest
Re: How to change the thumbnail representing an user ?
« Reply #7 on: January 06, 2005, 04:52:56 pm »

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

Code: [Select]
        $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.
Logged

THIS ACCOUNT IS NO LONGER IN USE

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: How to change the thumbnail representing an user ?
« Reply #8 on: January 06, 2005, 08:45:52 pm »

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
Logged
Pages: [1]   Go Up
 

Page created in 0.045 seconds with 20 queries.