Hi,
I have tried the 1.3 install. There is the lang-eng problem to deal with, which is well documented. Then I came across a $sel-theme (spelling from memory) issue, then there were problems in the nbb file. (again from memory), so as I see it I have 1.2 with one bug that impacts me, and at least three bugs with 1.3, and I still do not know whether the usergalleries issue is generic, so if I can get round the 1.3 install issue I could still be left with a "generic" pages issue.
I have trawled the web seeking out users with a large number of albums/galleries to see if they page correctly, none I came accross saw paging of usergalleries.
I am no coder but I tried looking in the index.php within the coppermine folder and in 1.2 there are two instances where the code attempts to page galleries.
// List all albums
function list_albums()
{
global $CONFIG, $USER, $USER_DATA, $PAGE, $lastup_date_fmt;
global $cat;
global $lang_list_albums, $lang_errors;
$alb_per_page = $CONFIG['albums_per_page'];
$maxTab = $CONFIG['max_tabs'];
$result = db_query("SELECT count(*) FROM {$CONFIG['TABLE_ALBUMS']} WHERE category = '$cat'");
$nbEnr = mysql_fetch_array($result);
$nbAlb = $nbEnr[0];
mysql_free_result($result);
if (!$nbAlb) return;
$totalPages = ceil($nbAlb / $alb_per_page);
if ($PAGE > $totalPages) $PAGE = 1;
$lower_limit = ($PAGE-1) * $alb_per_page;
$upper_limit = min($nbAlb, $PAGE * $alb_per_page);
$limit = "LIMIT " . $lower_limit . "," . ($upper_limit - $lower_limit);
$sql = "SELECT a.aid, a.title, a.description, visibility, filepath, " . " filename, url_prefix, pwidth, pheight " . "FROM {$CONFIG['TABLE_ALBUMS']} as a " . "LEFT JOIN {$CONFIG['TABLE_PICTURES']} as p ON thumb=pid " . "WHERE category = '$cat' ORDER BY pos " . "$limit";
$alb_thumbs_q = db_query($sql);
$alb_thumbs = db_fetch_rowset($alb_thumbs_q);
mysql_free_result($alb_thumbs_q);
$disp_album_count = count($alb_thumbs);
$album_set = '';
foreach($alb_thumbs as $value) {
$album_set .= $value['aid'] . ', ';
}
$album_set = '(' . substr($album_set, 0, -2) . ')';
$sql = "SELECT aid, count(pid) as pic_count, max(pid) as last_pid, max(ctime) as last_upload " . "FROM {$CONFIG['TABLE_PICTURES']} " . "WHERE aid IN $album_set AND approved = 'YES' " . "GROUP BY aid";
$alb_stats_q = db_query($sql);
$alb_stats = db_fetch_rowset($alb_stats_q);
mysql_free_result($alb_stats_q);
foreach($alb_stats as $key => $value) {
$cross_ref[$value['aid']] = &$alb_stats[$key];
}
for ($alb_idx = 0; $alb_idx < $disp_album_count; $alb_idx++) {
$alb_thumb = &$alb_thumbs[$alb_idx];
$aid = $alb_thumb['aid'];
if (isset($cross_ref[$aid])) {
$alb_stat = $cross_ref[$aid];
$count = $alb_stat['pic_count'];
} else {
$alb_stat = array();
$count = 0;
}
// Inserts a thumbnail if the album contains 1 or more images
if ($count > 0) {
$visibility = $alb_thumb['visibility'];
if ($visibility == '0' || $visibility == (FIRST_USER_CAT + USER_ID) || strstr(USER_GROUP_SET, $visibility)) {
if ($alb_thumb['filename']) {
$picture = &$alb_thumb;
} else {
$sql = "SELECT filepath, filename, url_prefix, pwidth, pheight " . "FROM {$CONFIG['TABLE_PICTURES']} " . "WHERE pid='{$alb_stat['last_pid']}'";
$result = db_query($sql);
$picture = mysql_fetch_array($result);
mysql_free_result($result);
}
$image_size = compute_img_size($picture['pwidth'], $picture['pheight'], $CONFIG['alb_list_thumb_size']);
$alb_list[$alb_idx]['thumb_pic'] = "<img src=\"" . get_pic_url($picture, 'thumb') . "\" {$image_size['geom']} alt=\"\" border=\"0\" class=\"image\" />";
} elseif ($CONFIG['show_private']) {
$image_size = compute_img_size(100, 75, $CONFIG['alb_list_thumb_size']);
$alb_list[$alb_idx]['thumb_pic'] = "<img src=\"images/private.jpg\" {$image_size['geom']} alt=\"\" border=\"0\" class=\"image\" />";
}
} else {
$image_size = compute_img_size(100, 75, $CONFIG['alb_list_thumb_size']);
$alb_list[$alb_idx]['thumb_pic'] = "<img src=\"images/nopic.jpg\" {$image_size['geom']} alt=\"\" border=\"0\" class=\"image\" />";
}
// Prepare everything
if ($visibility == '0' || $visibility == (FIRST_USER_CAT + USER_ID) || $visibility == $USER_DATA['group_id']) {
$last_upload_date = $count ? localised_date($alb_stat['last_upload'], $lastup_date_fmt) : '';
$alb_list[$alb_idx]['aid'] = $alb_thumb['aid'];
$alb_list[$alb_idx]['album_title'] = $alb_thumb['title'];
$alb_list[$alb_idx]['album_desc'] = bb_decode($alb_thumb['description']);
$alb_list[$alb_idx]['pic_count'] = $count;
$alb_list[$alb_idx]['last_upl'] = $last_upload_date;
$alb_list[$alb_idx]['album_info'] = sprintf($lang_list_albums['n_pictures'], $count) . ($count ? sprintf($lang_list_albums['last_added'], $last_upload_date) : "");
$alb_list[$alb_idx]['album_adm_menu'] = (GALLERY_ADMIN_MODE || (USER_ADMIN_MODE && $cat == USER_ID + FIRST_USER_CAT)) ? html_albummenu($alb_thumb['aid']) : ' ';
} elseif ($CONFIG['show_private']) { // uncomment this else block to show private album description
$last_upload_date = $count ? localised_date($alb_stat['last_upload'], $lastup_date_fmt) : '';
$alb_list[$alb_idx]['aid'] = $alb_thumb['aid'];
$alb_list[$alb_idx]['album_title'] = $alb_thumb['title'];
$alb_list[$alb_idx]['album_desc'] = bb_decode($alb_thumb['description']);
$alb_list[$alb_idx]['pic_count'] = $count;
$alb_list[$alb_idx]['last_upl'] = $last_upload_date;
$alb_list[$alb_idx]['album_info'] = sprintf($lang_list_albums['n_pictures'], $count) . ($count ? sprintf($lang_list_albums['last_added'], $last_upload_date) : "");
$alb_list[$alb_idx]['album_adm_menu'] = (GALLERY_ADMIN_MODE || (USER_ADMIN_MODE && $cat == USER_ID + FIRST_USER_CAT)) ? html_albummenu($alb_thumb['aid']) : ' ';
}
}
theme_display_album_list($alb_list, $nbAlb, $cat, $PAGE, $totalPages);
}
and a similar function below this starting as follows:
// List category albums
// This has been added to list the category albums largely a repetition of code elsewhere
// Redone for a cleaner approach
function list_cat_albums($cat = 0)
{
global $CONFIG, $USER, $PAGE, $lastup_date_fmt, $HTTP_GET_VARS, $USER_DATA;
global $lang_list_albums, $lang_errors;
if ($cat == 0) {
return '';
}
This code runs on of course but there is no merit in posting it.
One of this functions is trying to page the usergalleries. This snippet is trying to caclulat ethe number of pages it will need to tab.
$totalPages = ceil($nbAlb / $alb_per_page);
so I am in the right area.
Curiously the same file in 1.3. only has one instance of trying to page galleries. I pasted that code into my 1.2 index file and the site did not crash, but guess what ? It did not page galleries either. I don't know if it is a field name issue, a defect in the code but it looks GENERIC to me.
Any clues?
PS: I have rechecked my profile, the email address is sound. I have been exanding for more options at the end of each post and asking for notification of posting, as I will do again. But I have not ever received a notification of a further comment.
I am trying my damndest to self-help but I am stuck.
Any clues?
TIA