Hello
I use the user albums.
And on the frontpage I display: catlist/random,3/onlinestats. When I click on the link "User galleries". They display the user albums and the (random,3) after that.
But I want the random,3 only on the frontpage. How I can remove they from the user galleries page?
pls help.
Modify index.php, change the random block from
case 'random':
display_thumbnails('random', $cat, 1, $CONFIG['thumbcols'], max(1, $matches[2]), false);
flush();
break;
to
case 'random':
if ($cat == 0) display_thumbnails('random', $cat, 1, $CONFIG['thumbcols'], max(1, $matches[2]), false);
flush();
break;
hello
thx it workd perfect!
but when I click on one user gallerie album, than I have a empty page?
I have try case 'random':
if ($cat == 0) display_thumbnails('random', $cat, 1, $CONFIG['thumbcols'], max(1, $matches[2]), false);
if ($cat == 10001) display_thumbnails('random', $cat, 1, $CONFIG['thumbcols'], max(1, $matches[2]), false);
flush();
break;
but by new user doesnt workd!
hm..who can me help?
You get the empty page because you don't have alblist.
ok, but can I not have: the random instead the alblist there
like:
if ($cat == 10001) display_thumbnails('random', $cat, 1, $CONFIG['thumbcols'], max(1, $matches[2]), false);
but automatic for each user..
Sry another Idee.
How I can display the latest uploads page after, when I click on the User galleries album.
When I click on name "HANS", then I should skip on http://www.domain/thumbnails.php?album=id from each user?
I hope you unterstand me.
Quote from: DaBe on December 29, 2007, 12:57:05 PM
ok, but can I not have: the random instead the alblist there
Not a bright idea at all. From the docs (http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#changing):
QuoteUnless you really know what you are doing you should always keep catlist and alblist in "the content of the main page", as they make up the core parts of the index page or any gallery site, for that matter.
/**
* list_users()
*
* Get a list of users galleries
*/
function list_users()
{
global $CONFIG, $PAGE, $FORBIDDEN_SET;
global $lang_list_users, $lang_errors, $template_user_list_info_box, $cpg_show_private_album, $cpg_udb;
$rowset = $cpg_udb->list_users_query($user_count);
if (!$rowset) {
msg_box($lang_list_users['user_list'], $lang_list_users['no_user_gal'], '', '', '100%');
return;
}
$user_per_page = $CONFIG['thumbcols'] * $CONFIG['thumbrows'];
$totalPages = ceil($user_count / $user_per_page);
$user_list = array();
foreach ($rowset as $user) {
$cpg_nopic_data = cpg_get_system_thumb('nopic.jpg', $user['user_id']);
$user_thumb = '<img src="' . $cpg_nopic_data['thumb'] . '" ' . $cpg_nopic_data['whole'] . ' class="image" border="0" alt="" />';
$user_pic_count = $user['pic_count'];
$user_thumb_pid = ($user['gallery_pid']) ? $user['gallery_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' AND approved='YES'";
$result = cpg_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(urldecode($pic_url));
$picture['pwidth'] = $image_info[0];
$picture['pheight'] = $image_info[1];
}
//thumb cropping
//$image_size = compute_img_size($picture['pwidth'], $picture['pheight'], $CONFIG['alb_list_thumb_size']);
if($picture['system_icon']=='true'){
$image_size = compute_img_size($picture['pwidth'], $picture['pheight'], $CONFIG['alb_list_thumb_size'], true, 'cat_thumb');
} else {
$image_size = compute_img_size($picture['pwidth'], $picture['pheight'], $CONFIG['alb_list_thumb_size'], false, 'cat_thumb');
}
$user_thumb = "<img src=\"" . $pic_url . "\" class=\"image\" {$image_size['geom']} border=\"0\" alt=\"\" />";
}
}
$albums_txt = sprintf($lang_list_users['n_albums'], $user_album_count);
$pictures_txt = sprintf($lang_list_users['n_pics'], $user_pic_count);
$params = CPGPluginAPI::filter('user_caption_params', array('{USER_NAME}' => $user['user_name'],
'{USER_ID}' => $user['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['user_id'],
'image' => $user_thumb,
'caption' => $caption,
);
}
theme_display_thumbnails($user_list, $user_count, '', '', 1, $PAGE, $totalPages, false, true, 'user');
}
hello
I want change the link to the user galleries. Where I find here the link?
I never found the code for the link..pls help...