You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+61-14Lines changed: 61 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -17,24 +17,24 @@ To use, the contents of the ForumSsoProvider directory need to be placed into ex
17
17
All settings should be defined prior to calling `wfLoadExtension('ForumSsoProvider');` in your LocalSettings.php
18
18
### Path to Forum Software
19
19
20
-
$wgFSPath = '/path/to/smf/root/';
20
+
$wgFSPPath = '/path/to/smf/root/';
21
21
22
22
### Forum software. Supports smf2.0, smf2.1, elk1.0, elk1.1
23
23
24
24
$wgFSPSoftware = 'smf2.1';
25
25
26
26
# 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.
28
28
29
29
$wgFSPAllowGroups = array(5);
30
30
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.
32
32
33
33
$wgFSPDenyGroups = array(4);
34
34
35
35
### Admin Groups - Users in these groups are granted sysop access in MediaWiki.
36
36
37
-
$wgFSPAdminGroups = array(1, 3);
37
+
$wgFSPAdminGroups = array(1, 2);
38
38
39
39
### Super Groups - Users in these groups are granted bureaucrat access in MediaWiki.
40
40
@@ -44,10 +44,10 @@ All settings should be defined prior to calling `wfLoadExtension('ForumSsoProvid
44
44
45
45
$wgFSPInterfaceGroups = array(1);
46
46
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}
48
48
49
49
$wgFSPSpecialGroups = array(
50
-
3 => 'special',
50
+
11 => 'Custom_Wiki_group',
51
51
);
52
52
53
53
### 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.
79
79
define('SMF_IN_WIKI', true);
80
80
$wgSMFLogin = true;
81
81
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.
83
83
84
84
$wgSMFGroupID = array(2);
85
85
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.
87
87
88
88
$wgSMFDenyGroupID = array(4);
89
89
90
90
### Admin Groups - Users in these groups are granted sysop access in MediaWiki.
91
91
92
-
$wgSMFAdminGroupID = array(1, 3);
92
+
$wgSMFAdminGroupID = array(1, 2);
93
93
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}
95
95
96
96
$wgSMFSpecialGroups = array(
97
-
3 => 'special',
97
+
11 => 'Custom_Wiki_group',
98
98
);
99
99
100
100
### Forum Software Cookie.
101
101
102
102
$wgCookieDomain = 'domain.tld';
103
103
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.
Search for ForumSessionProvider and it will tell you what it is thinking.
112
148
113
149
This bloats pretty quickly, so you'll want to comment it out after you have resolved your problem.
114
150
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
+
115
161
----
116
162
Getting New SMF Forks In
117
163
------------------------
@@ -120,3 +166,4 @@ If you are familiar with how your fork's authentication works, feel free to subm
120
166
Issues or changes
121
167
------------------------
122
168
If an issue has occurred, please open a new issue. If you have a change, please submit a pull request.
0 commit comments