coppermine-gallery.com/forum

Support => Older/other versions => cpg1.3.x Support => Topic started by: nuno gil on August 31, 2004, 03:19:35 AM

Title: nopic.jpg
Post by: nuno gil on August 31, 2004, 03:19:35 AM
i've just installed this program, but i realize that all albuns ahve the "nopic.jpg" as a front. Whow can the users change that?

thanks
Title: Re: nopic.jpg
Post by: Joachim Müller on August 31, 2004, 07:11:23 AM
If you upload at least one file to an album, the nopic thumbnail will go away (if it doesn't, do a force refresh on your browser by hitting [Ctrl]+[F5]). As the albums contain "no pic", the "nopic" thumbnail is appropriate, isn't it? If you want another thumbnail to appear for empty albums, replace the file /images/nopic.jpg with a custom file of your choice. For detilas, post a link to your gallery page.

Joachim
Title: Re: nopic.jpg
Post by: nuno gil on August 31, 2004, 07:48:12 AM
even when the users have upload files...the nopic remans

please take a look
http://www.forum-mergulho.com/galeria2

Thanks

Quote from: GauGau on August 31, 2004, 07:11:23 AM
If you upload at least one file to an album, the nopic thumbnail will go away (if it doesn't, do a force refresh on your browser by hitting [Ctrl]+[F5]). As the albums contain "no pic", the "nopic" thumbnail is appropriate, isn't it? If you want another thumbnail to appear for empty albums, replace the file /images/nopic.jpg with a custom file of your choice. For detilas, post a link to your gallery page.

Joachim
Title: Re: nopic.jpg
Post by: Joachim Müller on August 31, 2004, 08:03:54 AM
please post a test user account (non-admin) with privileges to have a private gallery. Did you apply any hacks, or is your coppermine install "out-of-the box"?

Joachim
Title: Re: nopic.jpg
Post by: nuno gil on August 31, 2004, 08:21:34 AM
i don't alllow user to have private gallerys...
but i will do it


out of the box
Title: Re: nopic.jpg
Post by: nuno gil on August 31, 2004, 08:27:18 AM
teste / teste1

i've allowed private gallerys
Title: Re: nopic.jpg
Post by: Joachim Müller on August 31, 2004, 08:52:26 AM
what do you mean "you don't allow private galleries" - you already have some of them - this is what the whole issue is about, isn't it?
Please answer my other question as well: did you apply any mods?

I want you to do a check: edit index.php, find        if ($user_pic_count) {
            $sql = "SELECT filepath, filename, url_prefix, pwidth, pheight " . "FROM {$CONFIG['TABLE_PICTURES']} " . "WHERE pid='$user_thumb_pid'";
            $result = db_query($sql);
            if (mysql_num_rows($result)) {
                $picture = mysql_fetch_array($result);
                mysql_free_result($result);
                $pic_url =  get_pic_url($picture, 'thumb');
                if (!is_image($picture['filename'])) {
                        $image_info = getimagesize($pic_url);
                        $picture['pwidth'] = $image_info[0];
                        $picture['pheight'] = $image_info[1];
                }
                $image_size = compute_img_size($picture['pwidth'], $picture['pheight'], $CONFIG['alb_list_thumb_size']);
                    $user_thumb = "<img src=\"" . get_pic_url($picture, 'thumb') . "\" class=\"image\" {$image_size['geom']} border=\"0\" alt=\"\">";
            }
and replace with        //if ($user_pic_count) {
            $sql = "SELECT filepath, filename, url_prefix, pwidth, pheight " . "FROM {$CONFIG['TABLE_PICTURES']} " . "WHERE pid='$user_thumb_pid'";
            $result = db_query($sql);
            if (mysql_num_rows($result)) {
                $picture = mysql_fetch_array($result);
                mysql_free_result($result);
                $pic_url =  get_pic_url($picture, 'thumb');
                if (!is_image($picture['filename'])) {
                        $image_info = getimagesize($pic_url);
                        $picture['pwidth'] = $image_info[0];
                        $picture['pheight'] = $image_info[1];
                }
                $image_size = compute_img_size($picture['pwidth'], $picture['pheight'], $CONFIG['alb_list_thumb_size']);
                    $user_thumb = "<img src=\"" . get_pic_url($picture, 'thumb') . "\" class=\"image\" {$image_size['geom']} border=\"0\" alt=\"\">";
            //}
Check if the nopic.jpg is gone then and make a screenshot. Then revert index.php back to the way it was before (undo the changes I made you upload). Please report back, with the screenshot.

Joachim
Title: Re: nopic.jpg
Post by: nuno gil on August 31, 2004, 09:13:50 AM
now it's workink

i've noted trought your quotes that in my index, this line:
$user_thumb = "<img src=\"" . get_pic_url($picture, 'thumb') . "\" class=\"image\" {$image_size['geom']} border=\"0\" alt=\"\">";


was missing

so i've put it in and it's working


this was a download and install copy, so i don't understand...
i didn't install any mods


the public/private parte is, from what i can see, this software allow user to set private albuns.,,,
that was i said i dind't aloowed...all albuns are public


thank you very much
Title: Re: nopic.jpg
Post by: Joachim Müller on August 31, 2004, 09:16:23 AM
where did you get the coppermine package from?

Joachim
Title: Re: nopic.jpg
Post by: nuno gil on August 31, 2004, 09:22:48 AM
i've download it forum the "official" page some time ago..but only now i've installed it
Title: Re: nopic.jpg
Post by: Joachim Müller on August 31, 2004, 09:28:57 AM
Oh, I see - you're using cpg1.3.0. You're recommended to upgrade to cpg1.3.2 then.

Joachim