Private album "cover" thumbnail visible to quests? Private album "cover" thumbnail visible to quests?
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Private album "cover" thumbnail visible to quests?

Started by FinnMin, August 01, 2007, 03:13:24 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

FinnMin

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?


Aditya Mooley

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.
--- "Its Nice 2 BE Important but its more Important 2 Be NICE" ---
Follow Coppermine on Twitter

phyllismc

Quote from: 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

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. 


Aditya Mooley

You don't have to place the code anywhere. Just comment out the code on those line numbers and it should work.
--- "Its Nice 2 BE Important but its more Important 2 Be NICE" ---
Follow Coppermine on Twitter

phyllismc

Quote from: 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.

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

Joachim Müller

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.

phyllismc

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.  :) 

Joachim Müller

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.

tycoonrp

Quote from: Joachim Müller on August 08, 2007, 07:21:33 PM
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.

tycoonrp

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.