Hide Administrator options
otografias
Joined: 2011-10-20
Posts: 41 |
![]() |
Hello everybody! At the time: 1) Duplicate theme, and in a new theme, in "screen.CSS" file of my new theme folder copy this code that i find in forums #g-site-menu li:nth-child(4) { 2) Duplicate admin theme too, and hide all menu, removing <?= $theme->admin_menu() ?> from admin.html.php 3) Hide home link and 4) Use Custom menus to make a new administrator menu linked to all ok but have two bugs (known at this time). At the moment I´m tried to add the same of "custom menus" links to a "pages settings" module. a new page only visible by admin. its posible? thanks to all |
|
tempg
Joined: 2005-12-17
Posts: 1857 |
![]() |
otografias wrote:
this menu its visible for all users (only admin can use but its is very ugly) I think you can wrap the admin part in an if statement that shows only if I'm not 100% sure, but try EDIT: As a side note, couldn't you just add them as a user with all of the permissions they'll need? You'd be the only true admin, but they could do whatever else needs to be done on the site. |
|
otografias
Joined: 2011-10-20
Posts: 41 |
![]() |
Not sure about how to do it. adding code to module "custom menu" will hide menu to no admin users? sorry for dumbs questions but I'm just a photographer, and is a little hard for me to work with programming... :-S Quote:
EDIT: As a side note, couldn't you just add them as a user with all of the permissions they'll need? You'd be the only true admin, but they could do whatever else needs to be done on the site. I don´t know the way to make a user permission to admins users.... |
|
tempg
Joined: 2005-12-17
Posts: 1857 |
![]() |
otografias wrote:
adding code to module "custom menu" will hide menu to no admin users? I don't know the details of how you made the custom menu. otografias wrote:
and forget the site in assured that I will not give me problems You still need to make periodic backups of the site contents/code and database. |
|
otografias
Joined: 2011-10-20
Posts: 41 |
![]() |
I give up! :-P If somebody would find the site where the code print the menu on page... i would be so grateful! Quote:
<?php defined("SYSPATH") or die("No direct script access."); |
|
tempg
Joined: 2005-12-17
Posts: 1857 |
![]() |
Restore that file back to its original state. Open the views file. Try adding |
|
otografias
Joined: 2011-10-20
Posts: 41 |
![]() |
Ups... nothing change in folder /modules/Custom_menus/view/admin_custom_menus.html.php I would be modify to this way: Quote:
<?php defined("SYSPATH") or die("No direct script access.") ?> i think its ok... but nothing change bodas.otografias.com thanks for your time |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
Quote:
4) Use Custom menus to make a new administrator menu linked to Why? Why not just use the regular menu for access these functions then they show properly checking permissions along the way. Your going to have to edit the module to remove them. Then I suspect in the future your going to add items to the menu that the guest or others will have access to and then your going to wonder why they don;t show up for them. one could hide the li with jquery : lots of jquery tutorials on selectors on the web. Dave |
|
otografias
Joined: 2011-10-20
Posts: 41 |
![]() |
I tried with all my might, but i´m afraid jquery its to mess to me. don´t understand anything, its more easy to me try to do in a classical html. think its possible? |
|
otografias
Joined: 2011-10-20
Posts: 41 |
![]() |
I´m very delighted. you used Jquery to delete options? |
|
otografias
Joined: 2011-10-20
Posts: 41 |
![]() |
Im Very Near to get it! I Resume : 1) I change the theme to clean-canvas. Quote:
#g-site-menu li:nth-child(4) { 3) In Module Pages create a Page called "Administrator_Menu" and hide in top menu bar (put only in sidebar) Problems: i find the code to hide this menu definitely, using "Safari Develop menu" but... I can´t find in themes files. Here you can see a graphical explain of the problem and a possible solution |
|
otografias
Joined: 2011-10-20
Posts: 41 |
![]() |
thanks Temp!!! i make my own admin menu with "Pages" module, adding link in sidebar, and it´s only visible for admins because insert your code in module Pages/views/pages_sidebar.html.php Quote:
<?php defined("SYSPATH") or die("No direct script access.") ?> all ok!! only need the way to permanently hide the admin menu for all users in the next Post may be... |
|