Page 1 of 1

Change Admin Directory

Posted: 12 Mar 2012, 12:30
by Stoker
Change Admin Directory
Written by Stoker
Credits to imkingdavid

You can easily change your admin directory with a few steps.
Default the phpbb admin directory is: http://www.domain.com/adm/index.php

Step 1
Open includes/functions.php
Find:

Code: Select all

'U_ACP' => ($auth->acl_get('a_') && !empty($user->data['is_registered'])) ? append_sid("{$phpbb_root_path}adm/index.$phpEx", false, true, $user->session_id) : '')
Replace with:

Code: Select all

'U_ACP' => ($auth->acl_get('a_') && !empty($user->data['is_registered'])) ? append_sid("{$phpbb_root_path}new_name/index.$phpEx", false, true, $user->session_id) : '')

Step 2
Open memberlist.php
Find:

Code: Select all

'U_USER_ADMIN'			=> ($auth->acl_get('a_user')) ? append_sid("{$phpbb_root_path}adm/index.$phpEx", 'i=users&mode=overview&u=' . $user_id, true, $user->session_id) : '',]
Replace with:

Code: Select all

'U_USER_ADMIN'			=> ($auth->acl_get('a_user')) ? append_sid("{$phpbb_root_path}new_name/index.$phpEx", 'i=users&mode=overview&u=' . $user_id, true, $user->session_id) : '',

Step 3
Open your FTP program and login to your domain.
Change the adm folder
Rename the "adm" folder to new_name

Thats it :)

Change Admin Directory

Posted: 12 Mar 2012, 12:41
by Solidjeuh
Works great! Have done this 2 weeks ago..
But you need to check other php files also ( Installed mods )
Cause some needs this change to. Like 'Invite mod'

;)

Change Admin Directory

Posted: 12 Mar 2012, 13:27
by martin123456
IF you use the full style refresh mod you also need to add the new file name to that too in Functions.php

Find:

Code: Select all

'U_FULL_REFRESH' => ($auth->acl_get('a_') && !empty($user->data['is_registered'])) ? append_sid("{$phpbb_root_path}adm/index.$phpEx", array('i' => 'styles', 'mode' => 'full_refresh', 'redirect' => urlencode('../' . build_url())), false, $user->session_id) : '')
Replace:

Code: Select all

'U_FULL_REFRESH' => ($auth->acl_get('a_') && !empty($user->data['is_registered'])) ? append_sid("{$phpbb_root_path}new_name/index.$phpEx", array('i' => 'styles', 'mode' => 'full_refresh', 'redirect' => urlencode('../' . build_url())), false, $user->session_id) : '')
Change new_name to what ever you named it.

Thanx stoker another great piece

Change Admin Directory

Posted: 12 Mar 2012, 16:54
by Vox Populi
I'm wondering, just wondering mind you, could you not rename the Admin directory and then use .htaccess to point to the correct directory without going through all the files?

I have not tried this but it seems a redirect of sorts may work???

Change Admin Directory

Posted: 12 Mar 2012, 17:24
by Stoker
Should be doable Ed.