Recent Topics

1 Sep 06, 2005 10:57    

Hello,

I want to hide the Admin link on the templates, since the people who are registered are on level 1 and have no rights except to post comments. Clicking on admin does nothing for them.

i apologize if this is in the wrong area.

2 Sep 06, 2005 17:31

This can be done, but it requires a modification to a core file. Do this at your own risk, and back up first. Open up /b2evocore/_functions_users.php and find this section:

function user_admin_link( $before = '', $after = '', $page = 'b2edit.php', $link_text = '', $link_title = '#' )
{
        global $admin_url, $blog, $current_User;

        if( ! is_logged_in() ) return false;

        if( $current_User->get('level') == 0 )
        { // If user is NOT active:
                return false;
        }


change it to this:

function user_admin_link( $before = '', $after = '', $page = 'b2edit.php', $link_text = '', $link_title = '#' )
{
        global $admin_url, $blog, $current_User;

        if( ! is_logged_in() ) return false;

        if( $current_User->get('level') < 2 )
        { // If user is NOT at least level 2, then don't show the admin link:
                return false;
        }


That, or something like it should do the trick. Then, of course, set your low-level users to level 1 and they won't be able to see the admin link.

3 Sep 07, 2005 02:11

awesome, thank-you very much!

4 Sep 07, 2005 08:42

Closing topic since original question is answered


Form is loading...