Anyway to hide 'Admin' Link Anyway to hide 'Admin' Link
 

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]

Main Menu

Anyway to hide 'Admin' Link

Started by fightrice, July 18, 2005, 11:55:07 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

fightrice

I need to hide the Admin Album link from regular registered users, but still have it accessible to me as an admin.

I was thinking an if statement would work just fine, but i'm not sure how to phrase it, but i do know where i need to edit it at.

Tranz

I'm not sure what you mean? Which link? Have you created a test user account to see if you see that admin link?

Joachim Müller

edit themes/yourtheme/theme.php, find<!-- BEGIN enter_admin_mode -->
                        <a href="{ADM_MODE_TGT}" title="{ADM_MODE_TITLE}">{ADM_MODE_LNK}</a> ::
<!-- END enter_admin_mode -->
<!-- BEGIN leave_admin_mode -->
                        <a href="{USR_MODE_TGT}" title="{USR_MODE_TITLE}">{USR_MODE_LNK}</a> ::
<!-- END leave_admin_mode -->
and replace with<!-- BEGIN enter_admin_mode -->
                        <!--<a href="{ADM_MODE_TGT}" title="{ADM_MODE_TITLE}">{ADM_MODE_LNK}</a> ::-->
<!-- END enter_admin_mode -->
<!-- BEGIN leave_admin_mode -->
                        <!--<a href="{USR_MODE_TGT}" title="{USR_MODE_TITLE}">{USR_MODE_LNK}</a> ::-->
<!-- END leave_admin_mode -->
Do not delete it, just uncomment as I suggested. Don't worry about the "admin mode" link, it won't make the user an admin, it just toggles the controls the user can see for creating/maintaining his albums (if you allow him to have personal albums at all). If you don't allow him to have personal albums (set this up on the groups page), he won't have those options at all.
As Thu suggested: create yourself a user (non-admin) account to see what the "regular" user will see. You'll find out that there's no need to be alarmed.