Skip to content

Commit e3a5dc1

Browse files
authored
Update the readme (#26)
Improve the readme from feedback on #25
1 parent 34ae468 commit e3a5dc1

File tree

1 file changed

+61
-14
lines changed

1 file changed

+61
-14
lines changed

README.md

Lines changed: 61 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,24 @@ To use, the contents of the ForumSsoProvider directory need to be placed into ex
1717
All settings should be defined prior to calling `wfLoadExtension('ForumSsoProvider');` in your LocalSettings.php
1818
### Path to Forum Software
1919

20-
$wgFSPath = '/path/to/smf/root/';
20+
$wgFSPPath = '/path/to/smf/root/';
2121

2222
### Forum software. Supports smf2.0, smf2.1, elk1.0, elk1.1
2323

2424
$wgFSPSoftware = 'smf2.1';
2525

2626
# Optional LocalSettings
27-
### Login Groups - Users in this group are signed into MediaWiki. Group 2 in SMF is a fake group relating to all users.
27+
### Login Groups - Users in this group are signed into MediaWiki. SMF does not have a real group for "Regular" members, it is a pseudo group. Additionally, Local Moderators (Group ID 3) is a special group. Users are only in this group when they are on a board they have been granted moderator permissions on. If you do not specify this, users are granted permission to the wiki by default. If you specify this, users must be in the associated groups to have access to the wiki.
2828

2929
$wgFSPAllowGroups = array(5);
3030

31-
### Deny Groups - Prevent users in these groups from being signed into MediaWiki, this is a deny group and takes over the login group. In SMF group 4 is the Newbie group.
31+
### Deny Groups - Prevent users in these groups from being signed into MediaWiki, this is a deny group and takes over the login group.
3232

3333
$wgFSPDenyGroups = array(4);
3434

3535
### Admin Groups - Users in these groups are granted sysop access in MediaWiki.
3636

37-
$wgFSPAdminGroups = array(1, 3);
37+
$wgFSPAdminGroups = array(1, 2);
3838

3939
### Super Groups - Users in these groups are granted bureaucrat access in MediaWiki.
4040

@@ -44,10 +44,10 @@ All settings should be defined prior to calling `wfLoadExtension('ForumSsoProvid
4444

4545
$wgFSPInterfaceGroups = array(1);
4646

47-
### Special Groups - An key-valued array of smf_group_id => mediawiki_group_name
47+
### Special Groups - An key-valued array of {SMF Group ID} => {MediaWiki Group Name}
4848

4949
$wgFSPSpecialGroups = array(
50-
3 => 'special',
50+
11 => 'Custom_Wiki_group',
5151
);
5252

5353
### Ban checks - Enable checking against bans in SMF. If found it prevents access to MediaWiki.
@@ -79,39 +79,85 @@ These settings are used by the legacy Auth_SMF.php.
7979
define('SMF_IN_WIKI', true);
8080
$wgSMFLogin = true;
8181

82-
### Login Groups - Users in this group are signed into MediaWiki. Group 2 in SMF is a fake group relating to all users.
82+
### Login Groups - Users in this group are signed into MediaWiki.
8383

8484
$wgSMFGroupID = array(2);
8585

86-
### Deny Groups - Prevent users in these groups from being signed into MediaWiki, this is a deny group and takes over the login group. In SMF group 4 is the Newbie group.
86+
### Deny Groups - Prevent users in these groups from being signed into MediaWiki, this is a deny group and takes over the login group.
8787

8888
$wgSMFDenyGroupID = array(4);
8989

9090
### Admin Groups - Users in these groups are granted sysop access in MediaWiki.
9191

92-
$wgSMFAdminGroupID = array(1, 3);
92+
$wgSMFAdminGroupID = array(1, 2);
9393

94-
### Special Groups - An key-valued array of smf_group_id => mediawiki_group_name
94+
### Special Groups - An key-valued array of {SMF Group ID} => {MediaWiki Group Name}
9595

9696
$wgSMFSpecialGroups = array(
97-
3 => 'special',
97+
11 => 'Custom_Wiki_group',
9898
);
9999

100100
### Forum Software Cookie.
101101

102102
$wgCookieDomain = 'domain.tld';
103103

104-
Troubleshooting
104+
SMF Default Groups
105+
---------------
106+
| Group ID | Group Name | Post Group |
107+
| ---- | --------- | --- |
108+
| 1 | Administrator | No |
109+
| 2 | Global Moderator | No |
110+
| 4 | Newbie | Yes |
111+
| 5 | Jr. Member | Yes |
112+
| 6 | Full Member | Yes |
113+
| 7 | Sr. Member | Yes |
114+
| 8 | Hero Member | Yes |
115+
116+
Finding your SMF Group ID
117+
---------------
118+
1. Navigate to the Admin Control Panel
119+
2. Click on Membergroups
120+
3. Click Modify on the group you are looking for.
121+
4. In the address bar, you will see `group=####`, this number is the group id.
122+
123+
Working with Arrays
124+
---------------
125+
The configuration file uses basic PHP code.
126+
127+
When you have a single member for the array, you simply just wrap it in the array statement
128+
$code = array(1);
129+
130+
131+
If you have 2 members that need to go into the array, use a comma to separate them.
132+
$code = array(1,2);
133+
134+
For strings, wrap them in quotes. SMF coding style recommends using single quotes unless necessary. Double quotes signal the PHP parser to use special handling, which might interpret variables and other logic inside the string. This is typically not necessary in the configuration.
135+
$code = array('my string');
136+
137+
You may also see the shorthand square brackets to refer to arrays. This is valid as well, but not used in the configuration for simplificy.
138+
$code = ['my string'];
139+
140+
Extension Troubleshooting
105141
---------------
106142

107143
Set $wgDebugLogFile in your LocalSettings.php:
108144

109-
$wgDebugLogFile = "/some/private/path/mediawiki.log";
110-
145+
$wgDebugLogFile = "/some/private/path/MediaWiki.log";
146+
111147
Search for ForumSessionProvider and it will tell you what it is thinking.
112148

113149
This bloats pretty quickly, so you'll want to comment it out after you have resolved your problem.
114150

151+
Wiki Troubleshooting
152+
---------------
153+
MediaWiki has built in methods for debugging it. If the extension is acting up and the debugging log is not providing information. Add the following to your LocalSettings.php. This should not be run in a production forum as it may expose sensitive details
154+
155+
$wgShowExceptionDetails = true;
156+
$wgShowSQLErrors = true;
157+
$wgDebugDumpSql = true;
158+
$wgShowDBErrorBacktrace = true;
159+
Remove when you are done debugging.
160+
115161
----
116162
Getting New SMF Forks In
117163
------------------------
@@ -120,3 +166,4 @@ If you are familiar with how your fork's authentication works, feel free to subm
120166
Issues or changes
121167
------------------------
122168
If an issue has occurred, please open a new issue. If you have a change, please submit a pull request.
169+

0 commit comments

Comments
 (0)