coppermine-gallery.com/forum

Support => cpg1.5.x Support => cpg1.5 themes (visuals) => Topic started by: Visitor on January 23, 2012, 04:10:41 PM

Title: Missin image
Post by: Visitor on January 23, 2012, 04:10:41 PM
Did I do anything wrong?

Guest album, last image shown on index (visitors)
Past Visitors, album made and old photos uploaded, now no more uploads here

those show a small photo (last uploaded)

However the album "Forum Members Personal Galleries" has no phone, just a link, when clicked shows all the albums that belong to registerd members

Anyway to fet a small image next to its link?
Title: Re: Missin image
Post by: Visitor on January 23, 2012, 04:12:54 PM
However the album "Forum Members Personal Galleries" has no phone

should say
However the album "Forum Members Personal Galleries" has no photo
Title: Re: Missin image
Post by: Αndré on January 25, 2012, 10:50:25 AM
Open index.php, find
                $cat_data[]    = array($link, str_repeat($indent, $level-1) . $cat['details']['description'], $album_count, $pic_count, 'cat_albums' => $users);
and replace with
                if ($cat['details']['thumb'] > 0) {
                    $sql = "SELECT filepath, filename, url_prefix, pwidth, pheight FROM {$CONFIG['TABLE_PICTURES']} AS p WHERE pid = {$cat['details']['thumb']} $FORBIDDEN_SET";
                    $result = cpg_db_query($sql);
                    if (mysql_num_rows($result)) {
                        $picture = mysql_fetch_assoc($result);
                        mysql_free_result($result);
                        $pic_url = get_pic_url($picture, 'thumb');
                        if (!is_image($picture['filename'])) {
                            $image_info = getimagesize(urldecode($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=\"" . $pic_url . "\" class=\"image\" {$image_size['geom']} border=\"0\" alt=\"\" />";
                        $user_thumb = "<a href=\"index.php?cat={$cid}\">" . $user_thumb . "</a>";
                    } else {
                        $user_thumb = "";
                    }
                }
                $cat_data[]    = array($link, str_repeat($indent, $level-1) . $cat['details']['description'], $album_count, $pic_count, 'cat_albums' => $users, 'cat_thumb' => $user_thumb);



As there's no user interface to choose the thumbnail, you have to manually add the picture ID to the categories table in the database.
Title: Re: Missin image
Post by: Visitor on January 27, 2012, 12:26:36 PM
well that made it look right, however it shows last photo uploaded, which happend to be a guest :)

anyway to change it to any photo from any registerd member (last uploaded)

page shows last uploaded twice now, guest last uploaded
Title: Re: Missin image
Post by: Αndré on January 27, 2012, 12:44:21 PM
Quote from: Visitor on January 27, 2012, 12:26:36 PM
it shows last photo uploaded
Quote from: Αndré on January 25, 2012, 10:50:25 AM
As there's no user interface to choose the thumbnail, you have to manually add the picture ID to the categories table in the database.
Title: Re: Missin image
Post by: Visitor on January 27, 2012, 10:32:50 PM
so if i look at catagories in mysql there will be a space there? will it overwrite the mod i just did

thanks
Title: Re: Missin image
Post by: Visitor on January 27, 2012, 11:40:08 PM
ok, added an id and it works great

thanks !