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

Title: Private album "cover" thumbnail visible to quests?
Post 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?
Title: Re: Private album "cover" thumbnail visible to quests?
Post by: Joachim Müller on August 01, 2007, 07:21:16 am
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)
Title: Re: Private album "cover" thumbnail visible to quests?
Post by: Aditya Mooley on August 01, 2007, 07:28:29 am
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.

Code: [Select]
//if (!in_array($aid,$FORBIDDEN_SET_DATA) || $CONFIG['allow_private_albums'] == 0) {

And now comment the lines from 523-527

Code: [Select]
/*} 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.
Title: Re: Private album "cover" thumbnail visible to quests?
Post by: phyllismc on August 08, 2007, 06:44:06 pm
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. 

Title: Re: Private album "cover" thumbnail visible to quests?
Post by: Aditya Mooley on August 08, 2007, 07:13:23 pm
You don't have to place the code anywhere. Just comment out the code on those line numbers and it should work.
Title: Re: Private album "cover" thumbnail visible to quests?
Post by: phyllismc on August 08, 2007, 07:17:49 pm
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
Title: Re: Private album "cover" thumbnail visible to quests?
Post by: Joachim Müller on August 08, 2007, 07:21:33 pm
Changing
Code: [Select]
} 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
Code: [Select]
/*} 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.
Title: Re: Private album "cover" thumbnail visible to quests?
Post by: phyllismc on August 08, 2007, 07:46:01 pm
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.  :) 
Title: Re: Private album "cover" thumbnail visible to quests?
Post by: Joachim Müller on August 08, 2007, 09:03:35 pm
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.
Title: Re: Private album "cover" thumbnail visible to quests?
Post by: tycoonrp on April 13, 2012, 10:53:54 pm
Changing
Code: [Select]
} 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
Code: [Select]
/*} 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.
Title: Re: Private album "cover" thumbnail visible to quests?
Post by: tycoonrp on April 13, 2012, 11:23:02 pm
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.