Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Only registered users can view actual gallery pics, everyone else can view thumb  (Read 5331 times)

0 Members and 1 Guest are viewing this topic.

opulence

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 46

Is there a way to make it so that only registered users can view the actual gallery pics, but everyone else can view thumbnails, searh, film strip, etc?
« Last Edit: April 22, 2005, 10:41:40 pm by TranzNDance »
Logged

krkeegan

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 53
  • ahh the life...
    • Kevin's Photos

This is not in the design of coppermine. You could modify the display image page but it would require some php coding and it could still be curcumnavigated by someone who knew what they were doing.

Kevin
Logged
There are no stupid questions, only stupid people. -Mr. Mackey, South Park

opulence

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 46

I wouldn't mind if someone who knew what they were doing could access the pics.

I just want to give incentive for someone to actually register, while at least letting them be able to see thumbnails/etc as a tease...
Logged

krkeegan

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 53
  • ahh the life...
    • Kevin's Photos

Okay then you will need to modify the php code for the displayimage page to require the registered user group. Sorry I don't have any use for this on my site so I have not looked farther, but I think it should be pretty easy.

Kevin
Logged
There are no stupid questions, only stupid people. -Mr. Mackey, South Park

opulence

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 46

Does anyone know how I may edit displayimage.php in order to require the registered user group? :S
Logged

gaxxia

  • Coppermine newbie
  • Offline Offline
  • Gender: Female
  • Posts: 2
    • Gael García Fan Site

Edit displayimage.php and add

Code: [Select]
if (!USER_ID) cpg_die(ERROR, 'You need to register to access this page', __FILE__, __LINE__);
just before
Code: [Select]
/**************************************************************************
* Local functions definition
**************************************************************************/


Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website

The above post came directly from the FAQ.  Always good to check out the resources available.
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

opulence

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 46

Thanks for the help guys, but strangely, it didn't work

I did manage to previously find this in the FAQ:

"How can I prevent unregistered user from viewing the gallery?

edit
displayimage.php and index.php and search.php and thumbnails.php
and search for

require('include/init.inc.php');


and add after it

if (USER_ID){

} else {
{
   $redirect = $redirect . "login.php";
   header("Location: $redirect");

   exit();
        }
}"

Which I only added to displayimage.php

I tried with that, didn't work, I tried seperately with the code listed above, didn't work, and I tried both of them together and it still didn't work.

(And yes, I remembered to be logged out each time!)
Logged

Joachim Müller

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

opulence

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 46

as suggested above: http://coppermine.sourceforge.net/faq.php#viewThumbnailsOnly

That one worked! thanks much, sorry for not being able to see this myself
Logged
Pages: [1]   Go Up
 

Page created in 0.024 seconds with 19 queries.