forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: atmorell on August 28, 2007, 12:52:04 am

Title: addbutton for loggedin users only
Post by: atmorell 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.
Title: Re: addbutton for loggedin users only
Post by: Nibbler on August 28, 2007, 12:47:28 pm
Just add

Code: [Select]
if (USER_ID)
before it.
Title: Re: addbutton for loggedin users only
Post by: atmorell on August 28, 2007, 02:53:23 pm
excellent ;)