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: addbutton for loggedin users only  (Read 3537 times)

0 Members and 1 Guest are viewing this topic.

atmorell

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
addbutton for loggedin users only
« on: August 28, 2007, 12:52:04 am »

Hello,

I am currently working on my first theme for coppermine. So far I have copied the menu related stuff from the sample theme and created a few links of my own. How do I only display a link when a user is logged in? This is the link I have created:

addbutton($sys_menu_buttons,'My images','{MY_IMAGES_TITLE}','thumbnails.php?album=lastupby&uid='. $USER_DATA['user_id'].'','my_images',$template_sys_menu_spacer);

Problem is that guest with no account also see the link - have searched the forum etc, but have not been able to figeure this out so yet.

Best regards.
Asbjørn.
« Last Edit: August 28, 2007, 04:41:30 pm by Nibbler »
Logged

Nibbler

  • Guest
Re: addbutton for loggedin users only
« Reply #1 on: August 28, 2007, 12:47:28 pm »

Just add

Code: [Select]
if (USER_ID)
before it.
Logged

atmorell

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: addbutton for loggedin users only
« Reply #2 on: August 28, 2007, 02:53:23 pm »

excellent ;)
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 19 queries.