forum.coppermine-gallery.net
Support => cpg1.4.x Support => Older/other versions => cpg1.4 permissions => Topic started by: FinnMin on August 01, 2007, 03:13:24 am
-
I’m setting up a digital comic book gallery for members only; each album contains the pages of one comic book and the “album thumbnail” for each album is the comic book’s cover pic. I set up the desired cover thumbnail in “Modify Album”.
I would like unregistered visitors to be able to see what albums I have available for members (to lure them in), just the pretty “cover thumbnail” of each album and not the thumbnail indexes!
I tried this: I enabled “Show private album Icon to unlogged user” on admin panel.
Result: member albums are visible to guests, but the album thumbnail is a generic “thumb_private.jpg” for every album and not the unique cover thumbnail.
Is there a way to show the real album thumbnail instead of thumb_private.jpg to guests without letting them see any other private content?
-
FAQ: How can I let unregistered users see the thumbnails only, but not the actual pictures? (http://coppermine-gallery.net/demo/cpg14x/docs/faq.htm#viewThumbnailsOnly)
-
I think he don't even want to show thumbnails. Just want to display the album thumbnail to unregistered users.
To do that -
open index.php file in your favorite editor. Go to line 500 and comment it.
//if (!in_array($aid,$FORBIDDEN_SET_DATA) || $CONFIG['allow_private_albums'] == 0) {
And now comment the lines from 523-527
/*} elseif ($CONFIG['show_private']) {
// $image_size = compute_img_size(100, 75, $CONFIG['alb_list_thumb_size']);
$cpg_privatepic_data = cpg_get_system_thumb('private.jpg', $alb_thumb['category']);
$alb_list[$alb_idx]['thumb_pic'] = '<img src="' . $cpg_privatepic_data['thumb'] . '" ' . $cpg_privatepic_data['whole'] . ' class="image" border="0" alt="" />';
}*/
That's it. Don't forget to take a backup first.
-
I think he don't even want to show thumbnails. Just want to display the album thumbnail to unregistered users
Aditya, I also am looking to do this exact thing. But when I tried, I keep getting errors. I tried placing your code at the beginning of line 500, and the second bit at the beginning of line 523 of the index.php file. But I think I must be placing it wrong, or doing something else incorrectly.
Can you show exactly what I should be placing the above code in front of? I'd be very grateful.
Thanks.
-
You don't have to place the code anywhere. Just comment out the code on those line numbers and it should work.
-
You don't have to place the code anywhere. Just comment out the code on those line numbers and it should work.
LOL That explains my problem. I don't know what it means to "comment out the code". How do I do it?
I'm sorry for being so thick. LOL
-
Changing
} elseif ($CONFIG['show_private']) {
// $image_size = compute_img_size(100, 75, $CONFIG['alb_list_thumb_size']);
$cpg_privatepic_data = cpg_get_system_thumb('private.jpg', $alb_thumb['category']);
$alb_list[$alb_idx]['thumb_pic'] = '<img src="' . $cpg_privatepic_data['thumb'] . '" ' . $cpg_privatepic_data['whole'] . ' class="image" border="0" alt="" />';
}
to/*} elseif ($CONFIG['show_private']) {
// $image_size = compute_img_size(100, 75, $CONFIG['alb_list_thumb_size']);
$cpg_privatepic_data = cpg_get_system_thumb('private.jpg', $alb_thumb['category']);
$alb_list[$alb_idx]['thumb_pic'] = '<img src="' . $cpg_privatepic_data['thumb'] . '" ' . $cpg_privatepic_data['whole'] . ' class="image" border="0" alt="" />';
}*/
means commenting out. Just follow the instructions.
-
Thank you, Gau Gau. I understand now.
Basically, commenting out is just adding /* and */ before and after the mentioned code, right?
To edit, I had pasted the index.php code into my word processing program and added line numbering. Lines 500 and 523 weren't the same as above. Probably because I used a word processor to edit. But I found the right lines.
Thanks very much for both your help. :)
-
Never use a word processor to edit code, as it tends to "auto-correct" stuff that it isn't supposed to. Use plain-text editors instead - notepad.exe is fine.
-
Changing} elseif ($CONFIG['show_private']) {
// $image_size = compute_img_size(100, 75, $CONFIG['alb_list_thumb_size']);
$cpg_privatepic_data = cpg_get_system_thumb('private.jpg', $alb_thumb['category']);
$alb_list[$alb_idx]['thumb_pic'] = '<img src="' . $cpg_privatepic_data['thumb'] . '" ' . $cpg_privatepic_data['whole'] . ' class="image" border="0" alt="" />';
}
to/*} elseif ($CONFIG['show_private']) {
// $image_size = compute_img_size(100, 75, $CONFIG['alb_list_thumb_size']);
$cpg_privatepic_data = cpg_get_system_thumb('private.jpg', $alb_thumb['category']);
$alb_list[$alb_idx]['thumb_pic'] = '<img src="' . $cpg_privatepic_data['thumb'] . '" ' . $cpg_privatepic_data['whole'] . ' class="image" border="0" alt="" />';
}*/
means commenting out. Just follow the instructions.
I have cpg1.5.x. I followed your instruction and still see the padlock image. Please advise. THank you.
-
Please disregard my last post. The padlock still shows on my homepage. However, when I go to the album's category, the thumbnail displays. I guess that how it supposed to work. Thanks.