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: How to hide Main Menu and Sort Order options  (Read 3336 times)

0 Members and 1 Guest are viewing this topic.

Cyberious

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
    • Custom Web Site Design, Flash
How to hide Main Menu and Sort Order options
« on: January 25, 2005, 03:39:48 am »

Is it possible to hide the Main Menu from visitors? I just want the Admin to see this.

Also how do I remove the Sort Order option links at the upper right corner?


thanks!
« Last Edit: March 11, 2005, 06:44:31 am by GauGau »
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: How to hide Main Menu and Sort Order options
« Reply #1 on: January 25, 2005, 05:24:59 am »

in your theme.php; function pageheader; find:
Code: [Select]
       '{MAIN_MENU}' => theme_main_menu(),

replace with:
Code: [Select]
       '{MAIN_MENU}' => GALLERY_ADMIN_MODE ? theme_main_menu() : '',

note that is two single quote marks before the last comma.

You will need to manually call /login.php in order to get logged in as admin.

edit $template_thumb_view_title_row in your theme.php to get rid of the sort options.




Logged

skypanther

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: How to hide Main Menu and Sort Order options
« Reply #2 on: March 10, 2005, 11:01:24 pm »

I tried the solution that donnoman suggested. ... it works with a bit of a glitch. If I click the "User Mode" link while I'm logged in as admin I lose the Main and Admin menus. I found I had to re-hack the theme.php file to undo my changes to get it back.

So, in addition to making the change donnoman suggested, I also made the following change (approx lines 52-54 in the reynolds theme):

Change

Code: [Select]
<!-- BEGIN leave_admin_mode -->
<li><a href="{USR_MODE_TGT}" title="{USR_MODE_TITLE}">{USR_MODE_LNK}</a> </li>
<!-- END leave_admin_mode -->

To

Code: [Select]
<!-- BEGIN leave_admin_mode -->
<!-- END leave_admin_mode -->

Tim
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: How to hide Main Menu and Sort Order options
« Reply #3 on: March 11, 2005, 06:44:15 am »

@dev team: that's one of the reasons why I voted for getting rid of user mode completely, as it doesn't do any good, it's just confusing ;)
@skypanther: thanks for returning and posting your solution.

Joachim
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: How to hide Main Menu and Sort Order options
« Reply #4 on: March 11, 2005, 08:27:44 am »

I use the user mode button now more than ever with minicms, I think with the possibilites of plugins it's still a very useful feature for the admin.

Its just something one has to take into account, when trying to hack out functions that are in the core.
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: How to hide Main Menu and Sort Order options
« Reply #5 on: March 11, 2005, 08:57:34 am »

I think we are/were discussing removing admin mode for regular users who are not really gallery admins, and we would keep the toggle for the gallery administrator.

If not, then I would protest, too. :D
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: How to hide Main Menu and Sort Order options
« Reply #6 on: March 11, 2005, 09:12:48 am »

hehe, don't worry - this issue has been agreed upon on the dev board: user mode stays for admins and will be removed for non-admins, that's it. I didn't want to stir a discussion over this issue.

Joachim
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 21 queries.