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!
User avatar
Stoker
Site Admin
Site Admin
Posts: 3511
Joined: 12 May 2008, 21:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark

Change Admin Directory

Post by Stoker » 12 Mar 2012, 10:30

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
Sure, I can install the Mod for you ;)
Like the site? Then buy me a bear


User avatar
Solidjeuh
BBCoder IV
BBCoder IV
Posts: 257
Joined: 16 Oct 2011, 00:15
BBCodes: 7
Favourite MOD: Top stats
Location: Aalst / Belgium

Change Admin Directory

Post by Solidjeuh » 12 Mar 2012, 10:41

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'

;)
Yeah I'm crazy.. So What!?! Live Your Life The Way You Want It To be!
Download +30.000 arcade extension games @ ~ http://www.froddelpower.be ~

User avatar
martin123456
BBCoder VI
BBCoder VI
Posts: 764
Joined: 25 Jul 2011, 11:29
BBCodes: 34
Favourite MOD: Ban button
Location: Down south!

Change Admin Directory

Post by martin123456 » 12 Mar 2012, 11:27

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, 13:44
BBCodes: 51
Favourite BBCode: YouTube
Favourite MOD: mChat, Welcome on Index
Location: Index,WA

Change Admin Directory

Post by Vox Populi » 12 Mar 2012, 14:54

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: 3511
Joined: 12 May 2008, 21:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark

Change Admin Directory

Post by Stoker » 12 Mar 2012, 15:24

Should be doable Ed.
Board rules! No PM support
Sure, I can install the Mod for you ;)
Like the site? Then buy me a bear