• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

More elegant way to rename admin.php without hacking the core code


New member
Hi folks - I just became a customer last night after evaluating all the other forum software options.

In another thread it was suggested that I post reference to it here in the event that one of you folks felt that it was relevant and/or justifiable to code such an add-on.


Excerpt from thread:

Jake Bunce said:
Ok. This requires getting into the code. This is the relevant code:


public static function buildAdminLink($type, $data = null, array $extraParams = array()) { $type = self::_checkForFullLink($type, $fullLink, $fullLinkPrefix); $link = self::_buildLink('admin', $type, $data, $extraParams); $queryString = self::buildQueryString($extraParams); if ($queryString !== '' && $link !== '') { $append = $link . '&' . $queryString; } else { // 1 or neither of these has content $append = $link . $queryString; } if (($hashPos = strpos($type, '#')) !== false) { $append .= substr($type, $hashPos); } $outputLink = 'admin.php' . ($append !== '' ? '?' : '') . $append; if ($fullLink) { $outputLink = $fullLinkPrefix . $outputLink; } return $outputLink; }
You can see this line in there which specifies the file name:

$outputLink = 'admin.php' . ($append !== '' ? '?' : '') . $append;
If you change the file name here and then rename the file on your server then that will change the location of the Admin CP.

If you post a request in this forum then maybe some one can make an addon for this so you don't have to edit the files.
> See if that helps, but you'll lose it during upgrades unless it can be converted to an add-on.