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: hide description  (Read 4232 times)

0 Members and 1 Guest are viewing this topic.

blue_eyed_devil

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
hide description
« on: August 19, 2012, 02:05:53 pm »

Is there any way How I can hide album description from guests? I was looking for hide bbcode but it seems that nothing like that exists for coppermine.
Logged

blue_eyed_devil

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: hide description
« Reply #1 on: August 20, 2012, 07:51:34 pm »

I see that I have to answer myself :D

so open the file include/themes.inc.php.

FIND (2 occurences)
Code: [Select]
        foreach($alb_list as $album) {
            $count ++;

AFTER ON NEW LINE ADD
Code: [Select]
//to hide description from unlogged users
            if(!USER_ID){
                $album['album_desc'] = '<a href="login.php?referer=index.php">Login</a> or <a href="register.php">Register</a> to see the Download Link';
            }
Logged

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: hide description
« Reply #2 on: August 20, 2012, 08:54:49 pm »

Glad you found the answer. Thank you for resolving your thread.
Logged
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: hide description
« Reply #3 on: August 27, 2012, 04:04:51 pm »

open the file include/themes.inc.php.
Even better: copy the needed functions from themes/sample/theme.php to your theme's theme.php file and apply the modification in that file.
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 19 queries.