dvox
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.
http://xenforo.com/community/threads/xf-admin-php-conflicts-with-existing-redirect-on-server.15975/
Excerpt from thread:
Jake Bunce said: ↑
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.
http://xenforo.com/community/threads/xf-admin-php-conflicts-with-existing-redirect-on-server.15975/
Excerpt from thread:
Jake Bunce said: ↑
Ok. This requires getting into the code. This is the relevant code:
library/XenForo/Link.php
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:
Code:
$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.library/XenForo/Link.php
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:
Code:
$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.