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: User Albums past page 1 not showing  (Read 7395 times)

0 Members and 1 Guest are viewing this topic.

thebimmer

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
User Albums past page 1 not showing
« on: November 22, 2003, 06:42:51 am »

My site (registration required):
http://www.flyguylive.com/modules.php?name=coppermine
is unable to see any User Albums (124 of them, total) past page 1.

When attempting to go to pages 2-4, the pages will act as if it is loading the thumbs, etc.  But, looking at the pics, they are showing 'nopic.jpg'  And, the category is always 1000, and no normal pics shows.  (And, all albums worked properly before the upgrade.)

This is an upgrade from CPG-Nuke 1.1D.

I will admit that I screwed up on the first install, which I installed standalone cpg.  I then went back and removed the changes that the standalone made.  After that, I made sure I got the cpgnuke upgrade files and upgraded from there.

As a side note, sometime today, the cpg_pictures db table was messed up.  This was noticed before I did the proper sql file (nuke upgrade version.)

Any ideas?
thanks
eric
Logged

DJMaze

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 831
    • Dragonfly CMS
User Albums past page 1 not showing
« Reply #1 on: November 22, 2003, 09:47:17 am »

name: test123
pass: test123
Logged
There are 2 kinds of users in this world: satisfied and complainers.
Why do we never hear something from the satisfied users?
http://coppermine-gallery.net/forum/index.php?topic=24315.0

thebimmer

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Any ideas?
« Reply #2 on: November 26, 2003, 05:50:39 am »

Any ideas as to why the albums on pages higher than 1 are shown as basically being unknown?

Thanks
eric
Logged

gtroll

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 618
    • CPG-Nuke
User Albums past page 1 not showing
« Reply #3 on: November 26, 2003, 07:49:48 am »

We require you to send us a login via pm if you want help with registration only galleries. Upgrade to RC3 is my suggestion and let us know if your problem persists, with a URL or pm'ed password.

thebimmer

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
no thumbs and no normal problem persists after rc3 update
« Reply #4 on: November 26, 2003, 08:44:30 am »

I updated to RC3 as suggested.

I am still experiencing the "nopic" and no albums in my user galleries.

This time, I have the "nopic"'s on the first page, and subsequent pages.  The differences between the first and subsequent pages are the links when moving the mouse over the thumbs.  While on the first page, the resulting link gives a link to a valid cat (BottomBoi, http://www.flyguylive.com/modules.php?name=coppermine&cat=15703) while the subsequent pages give links to invalid cat (Any on pages 2 and higher, http://www.flyguylive.com/modules.php?name=coppermine&cat=10000).

For the first above example, there are three pictures, the uploaded, the normal_, and the thumb_ one.  But, clicking on the link on the first page shows "0 pictures".

Any ideas?

Thanks
eric

The userid is 'test123', and the password is 'test123'.
Logged

gtroll

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 618
    • CPG-Nuke
User Albums past page 1 not showing
« Reply #5 on: November 26, 2003, 09:13:38 am »

Login Incorrect! Please Try Again...

thebimmer

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Correct login
« Reply #6 on: November 27, 2003, 12:58:25 am »

The username and password are 'test123'.  I just changed the password.
Logged

DJMaze

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 831
    • Dragonfly CMS
User Albums past page 1 not showing
« Reply #7 on: November 28, 2003, 03:19:10 am »

ok tried to login several times without luck so i asked for new password "guxxaser" and recieved it by mail.
Still i can't login with account :?
Logged
There are 2 kinds of users in this world: satisfied and complainers.
Why do we never hear something from the satisfied users?
http://coppermine-gallery.net/forum/index.php?topic=24315.0

thebimmer

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
test123 account working with 'guxxaser'
« Reply #8 on: November 28, 2003, 05:24:20 am »

Evidently, another admin saw the post from DJ and thought it was a request to add the account.  There were two 'test123' accounts.

I have removed the erroneous one, and logged in via the 'test123' account DJMaze had created with 'guxxaser'.

eric
Logged

DJMaze

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 831
    • Dragonfly CMS
User Albums past page 1 not showing
« Reply #9 on: November 28, 2003, 05:49:40 am »

Ok working and i've seen you definately have a problem.
somehow the albums are all empty starting at page 2.

We shall try to fix, although it's hard when we don't have 30 users on local harddrive.

btw please mention you have nudity on your pages by every link you post.
Logged
There are 2 kinds of users in this world: satisfied and complainers.
Why do we never hear something from the satisfied users?
http://coppermine-gallery.net/forum/index.php?topic=24315.0

pinguish

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 29
    • Pinguish - A Photographic Community
User Albums past page 1 not showing
« Reply #10 on: November 28, 2003, 06:45:15 pm »

change your config to to 1 colum wide by 1 tall and you can replicate with just 2 albums ;) FWIW its common with release.
Logged

thebimmer

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
1.2RC4 still having problems in User Gallery Albums
« Reply #11 on: November 30, 2003, 04:29:35 am »

I have updated all files in the RC4 distro.  I'm still seeing the errors as described above.
Logged

DJMaze

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 831
    • Dragonfly CMS
User Albums past page 1 not showing
« Reply #12 on: November 30, 2003, 05:01:16 am »

This problem is solved and solution will be available soon.

open index.php and replace the whole function
Code: [Select]
function list_users()
{

}


with this:
Code: [Select]
function list_users()
{
    global $CONFIG, $PAGE, $FORBIDDEN_SET, $CPG_M_DIR;
    global $lang_list_users, $lang_errors, $template_user_list_info_box;
    global $field_user_id, $field_user_name;

    $sql = "SELECT $field_user_id, " .
           "$field_user_name, " .
           "COUNT(DISTINCT a.aid) as alb_count, " .
           "COUNT(DISTINCT pid) as pic_count, " .
           "MAX(pid) as thumb_pid " .
           "FROM {$CONFIG['TABLE_USERS']} AS u " .
           "INNER JOIN {$CONFIG['TABLE_USERGROUPS']} AS g ON user_group_cp = group_id " .
           "INNER JOIN {$CONFIG['TABLE_ALBUMS']} AS a ON category = " . FIRST_USER_CAT . " + $field_user_id " .
           "LEFT JOIN {$CONFIG['TABLE_PICTURES']} AS p ON (p.aid = a.aid AND approved = 'YES' $FORBIDDEN_SET) " .
           "GROUP BY user_id ORDER BY $field_user_name";
    $result = db_query($sql);
    $user_count = mysql_num_rows($result);
    if (!$user_count) {
        msg_box($lang_list_users['user_list'], $lang_list_users['no_user_gal'], '', '', '100%');
        mysql_free_result($result);
        return;
    }

    $user_per_page = $CONFIG['thumbcols'] * $CONFIG['thumbrows'];
    $totalPages = ceil($user_count / $user_per_page);
    if ($PAGE > $totalPages) $PAGE = 1;
    $lower_limit = ($PAGE-1) * $user_per_page;
    $upper_limit = min($user_count, $PAGE * $user_per_page);

    $row_count = $upper_limit - $lower_limit;

    $rowset = array();
    $i = 0;
    mysql_data_seek($result, $lower_limit);
    while (($row = mysql_fetch_array($result)) && ($i++ < $row_count)) $rowset[] = $row;
    mysql_free_result($result);

    $user_list = array();

    for ($i = 0; $i < $row_count; $i++) {
        $user = &$rowset[$i];
        $user_thumb = '<img src="' . $CPG_M_DIR . '/images/nopic.jpg" class="image" border="0">';
        $user_pic_count = $user['pic_count'];
        $user_thumb_pid = $user['thumb_pid'];
        $user_album_count = $user['alb_count'];

        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);

                $image_size = compute_img_size($picture['pwidth'], $picture['pheight'], $CONFIG['thumb_width']);
                $user_thumb = "<img src=\"" . get_pic_url($picture, 'thumb') . "\" {$image_size['geom']} alt=\"\" border=\"0\" class=\"image\">";
            }
        }

        $albums_txt = sprintf($lang_list_users['n_albums'], $user_album_count);
        $pictures_txt = sprintf($lang_list_users['n_pics'], $user_pic_count);

        $params = array('{username}' => $user[$field_user_name],
            '{USER_ID}' => $user[$field_user_id],
            '{ALBUMS}' => $albums_txt,
            '{PICTURES}' => $pictures_txt,
        );
        $caption = template_eval($template_user_list_info_box, $params);

        $user_list[] = array('cat' => FIRST_USER_CAT + $user[$field_user_id],
            'image' => $user_thumb,
            'caption' => $caption,
        );
    }
    theme_display_thumbnails($user_list, $user_count, '', '', 1, $PAGE, $totalPages, false, true, 'user');
}
Logged
There are 2 kinds of users in this world: satisfied and complainers.
Why do we never hear something from the satisfied users?
http://coppermine-gallery.net/forum/index.php?topic=24315.0

thebimmer

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
The above change worked
« Reply #13 on: November 30, 2003, 06:42:45 am »

I have updated my coppermine/index.php and that worked.  For the most part.

I think the ones that are not working currently are ones that were added while I was having the problem.

I will update when I know more.

But, in the meantime, that change does appear to work properly!

Thanks
eric
Logged

thebimmer

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
So far so good
« Reply #14 on: November 30, 2003, 07:57:57 am »

I was able to delete all the incorrect albums in the user gallery.

So far the albums are showing properly.

Thanks again!
eric
Logged
Pages: [1]   Go Up
 

Page created in 0.024 seconds with 20 queries.