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: Anyway to hide 'Admin' Link  (Read 4301 times)

0 Members and 1 Guest are viewing this topic.

fightrice

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Anyway to hide 'Admin' Link
« on: July 18, 2005, 11:55:07 pm »

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.
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Anyway to hide 'Admin' Link
« Reply #1 on: July 19, 2005, 07:02:24 am »

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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Anyway to hide 'Admin' Link
« Reply #2 on: July 19, 2005, 09:13:12 am »

edit themes/yourtheme/theme.php, find
Code: [Select]
<!-- 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
Code: [Select]
<!-- 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.
Logged
Pages: [1]   Go Up
 

Page created in 0.016 seconds with 20 queries.