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: addbutton for loggedin users only  (Read 3486 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.016 seconds with 19 queries.