forum.coppermine-gallery.net
Support => cpg1.3.x Support => Older/other versions => cpg1.3 Miscellaneous => Topic started by: THIS ACCOUNT IS NO LONGER IN USE 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
-
Can you post a link to your site please.
-
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
-
Should be in album properties, dropdown box to select 'Album thumbnail'. Make sure you are using latest stable version, currently 1.3.2
-
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
-
the thumb that represents a user (cat) in user galleries can't be changed currently afaik.
Joachim
-
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.
-
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.
-
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