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: hide description  (Read 4295 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.025 seconds with 19 queries.