Change Admin Directory

Modifications for phpBB3.
Try the Mods here and share Your own Mods
Forum rules
You dont have to use ModX or make your mod AutoMod compatible. A simple textfile is fine
But if you post Mods here You also have to give support

Change Admin Directory

Post 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

Post 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

Post 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

Post 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

Post by Stoker »

Should be doable Ed.