nopic.jpg nopic.jpg
 

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

Main Menu

nopic.jpg

Started by nuno gil, August 31, 2004, 03:19:35 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

nuno gil

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

Joachim Müller

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

nuno gil

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

Joachim Müller

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

nuno gil

i don't alllow user to have private gallerys...
but i will do it


out of the box

nuno gil

teste / teste1

i've allowed private gallerys

Joachim Müller

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

nuno gil

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

Joachim Müller

where did you get the coppermine package from?

Joachim

nuno gil

i've download it forum the "official" page some time ago..but only now i've installed it

Joachim Müller

Oh, I see - you're using cpg1.3.0. You're recommended to upgrade to cpg1.3.2 then.

Joachim