Missin image Missin image
 

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

Missin image

Started by Visitor, January 23, 2012, 04:10:41 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Visitor

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?

Visitor

However the album "Forum Members Personal Galleries" has no phone

should say
However the album "Forum Members Personal Galleries" has no photo

Αndré

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.

Visitor

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

Αndré

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.

Visitor

so if i look at catagories in mysql there will be a space there? will it overwrite the mod i just did

thanks

Visitor

ok, added an id and it works great

thanks !