Advanced search  

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]

Pages: [1]   Go Down

Author Topic: nopic.jpg  (Read 5097 times)

0 Members and 1 Guest are viewing this topic.

nuno gil

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
nopic.jpg
« 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
« Last Edit: August 31, 2004, 09:15:56 am by GauGau »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: nopic.jpg
« Reply #1 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
Logged

nuno gil

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: nopic.jpg
« Reply #2 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

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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: nopic.jpg
« Reply #3 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
Logged

nuno gil

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: nopic.jpg
« Reply #4 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
Logged

nuno gil

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: nopic.jpg
« Reply #5 on: August 31, 2004, 08:27:18 am »

teste / teste1

i've allowed private gallerys
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: nopic.jpg
« Reply #6 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
Code: [Select]
        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
Code: [Select]
        //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
Logged

nuno gil

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: nopic.jpg
« Reply #7 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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: nopic.jpg
« Reply #8 on: August 31, 2004, 09:16:23 am »

where did you get the coppermine package from?

Joachim
Logged

nuno gil

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: nopic.jpg
« Reply #9 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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: nopic.jpg
« Reply #10 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
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 15 queries.