Advanced search  

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

Pages: [1]   Go Down

Author Topic: Private album "cover" thumbnail visible to quests?  (Read 11674 times)

0 Members and 1 Guest are viewing this topic.

FinnMin

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Private album "cover" thumbnail visible to quests?
« 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?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Logged

Aditya Mooley

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 781
    • My Sweet Home
Re: Private album "cover" thumbnail visible to quests?
« Reply #2 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.
Logged
--- "Its Nice 2 BE Important but its more Important 2 Be NICE" ---
Follow Coppermine on Twitter

phyllismc

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 29
    • Heath Ledger Heathens
Re: Private album "cover" thumbnail visible to quests?
« Reply #3 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. 

Logged

Aditya Mooley

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 781
    • My Sweet Home
Re: Private album "cover" thumbnail visible to quests?
« Reply #4 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.
Logged
--- "Its Nice 2 BE Important but its more Important 2 Be NICE" ---
Follow Coppermine on Twitter

phyllismc

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 29
    • Heath Ledger Heathens
Re: Private album "cover" thumbnail visible to quests?
« Reply #5 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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Private album "cover" thumbnail visible to quests?
« Reply #6 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.
Logged

phyllismc

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 29
    • Heath Ledger Heathens
Re: Private album "cover" thumbnail visible to quests?
« Reply #7 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.  :) 
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Private album "cover" thumbnail visible to quests?
« Reply #8 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.
Logged

tycoonrp

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Private album "cover" thumbnail visible to quests?
« Reply #9 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.
Logged

tycoonrp

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Private album "cover" thumbnail visible to quests?
« Reply #10 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.
Logged
Pages: [1]   Go Up
 

Page created in 0.034 seconds with 19 queries.