How to hide Main Menu and Sort Order options How to hide Main Menu and Sort Order options
 

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

How to hide Main Menu and Sort Order options

Started by Cyberious, January 25, 2005, 03:39:48 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Cyberious

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!

donnoman

in your theme.php; function pageheader; find:

       '{MAIN_MENU}' => theme_main_menu(),


replace with:

       '{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.





skypanther

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

<!-- BEGIN leave_admin_mode -->
<li><a href="{USR_MODE_TGT}" title="{USR_MODE_TITLE}">{USR_MODE_LNK}</a> </li>
<!-- END leave_admin_mode -->


To

<!-- BEGIN leave_admin_mode -->
<!-- END leave_admin_mode -->


Tim

Joachim Müller

@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

donnoman

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.

Tranz

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

Joachim Müller

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