forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Themes/Skins/Templates => Topic started by: Cyberious on January 25, 2005, 03:39:48 am

Title: How to hide Main Menu and Sort Order options
Post by: Cyberious 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!
Title: Re: How to hide Main Menu and Sort Order options
Post by: donnoman 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.




Title: Re: How to hide Main Menu and Sort Order options
Post by: skypanther 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
Title: Re: How to hide Main Menu and Sort Order options
Post by: Joachim Müller 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
Title: Re: How to hide Main Menu and Sort Order options
Post by: donnoman 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.
Title: Re: How to hide Main Menu and Sort Order options
Post by: Tranz 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
Title: Re: How to hide Main Menu and Sort Order options
Post by: Joachim Müller 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