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: how to allow anonymous to see catagories/albums but do not grant access? SOLVED  (Read 4867 times)

0 Members and 1 Guest are viewing this topic.

marky

  • Coppermine newbie
  • Offline Offline
  • Posts: 3

I looked around for similar post...but couldn't find anything via search, etc.  I would like to allow anonymous users to see catagories or albums but when they try to click on them to enter...they get directed to a "you need to register to view this" page or to the login page.

The only setting I can see is under album management and is the "Album can be viewed by "Members of the 'Registered' group", which doesn't allow unregistered users to even see that the album exists.

Updated: ok, i figured out the option to yes in "Show private album Icon to unlogged user" thnx...
« Last Edit: September 07, 2004, 07:02:03 am by GauGau »
Logged

jamurillo

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 23
    • J.A. Murillo, photographer

I get it doing this in cpg1.3.2. :

1- Open thumbnails.php
find;
Code:
require('include/init.inc.php');


Add after;
Code:
if (USER_ID){

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

   exit();
}}

2- In  the " Configuration " :
 The content of the main page : breadcrumb/anycontent/alblist
Nothing else, so unlogged users can not go in through the thumbnails.

You can see it at www.jamurillo.com/stock
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231

You should always have catlist in the list of contents of mainpage.

You should also put the if/else switch in displayimage.php.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

jamurillo

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 23
    • J.A. Murillo, photographer

Thanks Casper !

What do you means by :

You should also put the if/else switch in displayimage.php.  ???

Explain us, please !
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231

You just need to do the same thing in displayimage.php as you did in thumbnails.php.

This is explained in this mod, http://forum.coppermine-gallery.net/index.php?topic=3503.msg15506#msg15506, which makes all users log in.  For what you want, do this mod, but not to the index.php.

Then all visitors will see the cats and sub cats, but not be able to go into the albums and see the pics.  You will still be able to show random and lastup thumbs on the front page.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

irishblue

  • Coppermine newbie
  • Offline Offline
  • Posts: 9

do you mean to paste the same code in thumbnails.php into displayimage.php?
*edit: got it to work. Thanks! :)
« Last Edit: January 02, 2005, 04:56:56 pm by irishblue »
Logged

fourhour

  • Coppermine newbie
  • Offline Offline
  • Posts: 1

I tried this and you do not need to put the extra code into the thumbnails.php. If you do, when someone logs on they will see "User already logged on". Just put the code in the displayimage.php and you'll get the desired result. ;D
Logged

blackhat

  • Coppermine newbie
  • Offline Offline
  • Posts: 9

I'm trying this hack but cant get it to work
http://coppermine.sourceforge.net/faq.php?q=registeredUsersOnly#registeredUsersOnly

I get this error message if I'm logged out and trying to access the gallery url:
Quote
gallery.librarium-online.comhttp could not be found. Please check the name and try again.
I tried accessing the gallery without using the subdomain, but got the same error message. I'm also using the latest version of coppermine..

Thanks
Logged
Pages: [1]   Go Up
 

Page created in 0.025 seconds with 20 queries.