addbutton for loggedin users only addbutton for loggedin users only
 

News:

CPG Release 1.6.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

Main Menu

addbutton for loggedin users only

Started by atmorell, August 28, 2007, 12:52:04 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

atmorell

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.

Nibbler


atmorell