Closed phbaudin closed 5 years ago
This will need to be done! I have a forum in a subdomain and obviously that will require having two separate variables. Will do for next release version in the next day or so!
The temporary fix I'm using is simply to replace:
'logout' => $wgPhpbbAuthForumDirectory . 'ucp.php?mode=logout&sid=' . $user->session_id
with
'logout' => $wgPhpBBAuthForumDirectory . 'ucp.php?mode=logout&sid=' . $user->session_id
on line 54 in Phpbbauth/PhpbbAuth.php
Because of a bug in the current code, both $wgPhpbbAuthForumDirectory
and $wgPhpBBAuthForumDirectory
(note the caps) need to be set for everything to work properly, so this quick fix allows me to use one variable for the location in the file system and the other for the URL.
To illustrate, my config is as follows:
$wgPhpbbAuthForumDirectory = $IP . '/../forum/'; // Internal path
$wgPhpBBAuthForumDirectory = '/./../../forum/'; // External path
I guess it's just a matter of giving those two variables clear, distinct names and we should be good.
I took two approaches for this. First I introduced a seperate variable named:
$wgPhpbbAuthAbsolutePath
This would be defined like:
$wgPhpbbAuthAbsolutePath = '//www.domain.com/forum/';
You can also change the setting in your phpBB installation iteself, to specify the domain and settings in "Server Settings". If Force server URL settings is turned on, it will take those variables specified there for the direct url to the variable.
This will be in the next release.
Fixed in version v0.0.6: https://github.com/multidimension-al/phpbbauth/releases/tag/0.0.6
Great tool! It does however use two different config variables, $wgPhpbbAuthForumDirectory and $wgPhpBBAuthForumDirectory, where only the case differs.
While merging them would solve that, wikis making use of path rewriting could use two path variables, one to the forum where it appears to be to URL-rewritten links (for hyperlinks), and one to the internal files of the forums (for file inclusion).