Change Admin Directory

Mixed forum with code snippets, guides and styles
Forum rules
Everything in this forum is for everybody
But support only for Donators!
Post Reply
User avatar
Stoker
Site Admin
Site Admin
Posts: 3536
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

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 :)
Board rules! No PM support
User avatar
Solidjeuh
BBCoder IV
BBCoder IV
Posts: 257
Joined: 16 Oct 2011, 02:15
BBCodes: 7
Favourite MOD: Top stats
Location: Aalst / Belgium
Contact:

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'

;)
Wij promoten UW muziek in ons forum & delen alles via Sociale media!
Mail uw single + hoesje + info naar: info@muziekpromo.net of Solidjeuh@textradio.be
===============
Onze Website: https://www.muziekpromo.net
User avatar
martin123456
BBCoder VI
BBCoder VI
Posts: 765
Joined: 25 Jul 2011, 13:29
BBCodes: 34
Favourite MOD: Ban button
Location: Down south!
Contact:

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
User avatar
Vox Populi
BBCoder III
BBCoder III
Posts: 135
Joined: 27 Jul 2011, 15:44
BBCodes: 51
Favourite BBCode: YouTube
Favourite MOD: mChat, Welcome on Index
Location: Index,WA
Contact:

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???
Be who you are and say what you feel.
Those who mind don't matter.
Those who matter don't mind.
- Dr. Seuss
User avatar
Stoker
Site Admin
Site Admin
Posts: 3536
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Change Admin Directory

Post by Stoker »

Should be doable Ed.
Board rules! No PM support
Post Reply