https://www.icyphoenix.com/viewtopic.php?f=35&t=489&p=3887#p3887 ----------------------------------- moreteavicar Tue 17 Oct, 2006 00:28 Re: Quick Links (nav_quick_links.tpl) Doesn't Switch Admin ----------------------------------- This hasn't happend to me, and I also have added mg_switch_user_is_admin to some parts of nav_quick_links.tpl. I have two thoughts here. 1) How sure are you that normal users could see these links? If you are logged in as admin, then ofcourse you will see all these links. I use a test user account with normal user priveledges to check out any changes I make. At the very least, see what happens to nav quick links when you have logged out. 2) Regular users will probably have bookmarked these areas of your site, or else will go by the browser history. Simply hiding links will not prevent regular users from accessing those areas! Unfortunately there are no view permissions for some items, like sodoku, but it isn't hard to add. As it sounds you are not afraid to tweak, you can try encasing the entire tpl of soduku.tpl within Do this after: [codeblock] {L_SUDOKU} [/codeblock] Then add at the bottom, after [codeblock] {LOGGED_IN_USER_LIST} {ACTIVE_USER_LIST} [/codeblock] but before ... (this is a quick fix - I would be inclined to add another switch for normal users, that enabled a message to be displayed, such as "You are not authorised to access this"... this would require some extra logic within sodoku.php (or even page_header.php) to check that user is not admin, then parse an appropriate template variable. This is done as follows. In includes/page_header.php, a line before $template->pparse('overall_header'); add: [codeblock] if ($userdata['user_level']!=ADMIN) { $template->assign_block_vars('switch_user_not_admin', array()); } [/codeblock] and then in sodoku.tpl, after add: [codeblock] [/codeblock] Let me know if that works!
Sorry, you are not authorised to access this!