Skip to content

Commit 3bc9ac4

Browse files
authored
Update README.md
Add information on install methods and grammar fixes
1 parent 12e1de3 commit 3bc9ac4

File tree

1 file changed

+44
-19
lines changed

1 file changed

+44
-19
lines changed

README.md

Lines changed: 44 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
This MediaWiki extension allows users in an [Elkarte Forum](https://www.elkarte.net/) or [SMF forum](https://www.simplemachines.org/) to be automatically signed in if they are of the appropriate usergroup while logged into the forum.
1+
This MediaWiki extension allows users in an [Elkarte Forum](https://www.elkarte.net/) or [SMF forum](https://www.simplemachines.org/) to be automatically signed in if they are of the appropriate user group while logged into the forum.
22

33
---
44
# Branches
@@ -8,7 +8,30 @@ This MediaWiki extension allows users in an [Elkarte Forum](https://www.elkarte.
88
| mw139 | 1.39 | 1.0,1.1 | 2.0,2.1 |
99
| mw135 | 1.35 | 1.0,1.1 | 2.0,2.1 |
1010

11-
----
11+
12+
# Install
13+
## Manual
14+
Download the repository as a zip extract to extensions/ForumSsoProvider
15+
16+
## Git
17+
If your MediaWiki install follows your internal git repository, you can add this as a sub-module
18+
```
19+
# git submodule add https://github.com/SimpleMachines/smf-mw-auth.git extensions/ForumSsoProvider
20+
```
21+
22+
## Composer
23+
We are listed on [packagist](https://packagist.org/packages/simplemachines/forum-sso-provider) and can be installed using composer. Any changes you make to files here may be lost during updates.
24+
25+
```
26+
COMPOSER=composer.local.json composer require --no-update SimpleMachines/Forum-Sso-Provider:dev-master
27+
composer update --no-dev
28+
```
29+
You can also uninstall at any time
30+
```
31+
COMPOSER=composer.local.json composer remove --no-update SimpleMachines/Forum-Sso-Provider
32+
composer update --no-dev
33+
```
34+
1235
# Configuration
1336
To use, the contents of the ForumSsoProvider directory need to be placed into extensions/ForumSsoProvider. It is then loaded using the 'new' plugin loading method in LocalSettings.php:
1437

@@ -25,11 +48,11 @@ All settings should be defined prior to calling `wfLoadExtension('ForumSsoProvid
2548
$wgFSPSoftware = 'smf2.1';
2649

2750
# Optional LocalSettings
28-
### 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.
51+
### 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) are a special group. Users are only in this group when they browse the board they were granted moderator permissions. 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.
2952

3053
$wgFSPAllowGroups = array(5);
3154

32-
### Deny Groups - Prevent users in these groups from being signed into MediaWiki, this is a deny group and takes over the login group.
55+
### Deny Groups - Prevent users in these groups from being signed into MediaWiki; this is a deny group and takes over the login group.
3356

3457
$wgFSPDenyGroups = array(4);
3558

@@ -51,7 +74,7 @@ All settings should be defined prior to calling `wfLoadExtension('ForumSsoProvid
5174
11 => 'Custom_Wiki_group',
5275
);
5376

54-
### Ban checks - Enable checking against bans in SMF. If found it prevents access to MediaWiki.
77+
### Ban checks - Enable checking against bans in SMF. If found, it prevents access to MediaWiki.
5578

5679
$wgFSPEnableBanCheck = true;
5780

@@ -84,7 +107,7 @@ These settings are used by the legacy Auth_SMF.php.
84107

85108
$wgSMFGroupID = array(2);
86109

87-
### Deny Groups - Prevent users in these groups from being signed into MediaWiki, this is a deny group and takes over the login group.
110+
### Deny Groups - Prevent users in these groups from being signed into MediaWiki; this is a deny group and takes over the login group.
88111

89112
$wgSMFDenyGroupID = array(4);
90113

@@ -119,39 +142,42 @@ Finding your SMF Group ID
119142
1. Navigate to the Admin Control Panel
120143
2. Click on Membergroups
121144
3. Click Modify on the group you are looking for.
122-
4. In the address bar, you will see `group=####`, this number is the group id.
145+
4. In the address bar, you will see `group=####`, this number is the group ID.
123146

124147
Working with Arrays
125148
---------------
126149
The configuration file uses basic PHP code.
127150

128-
When you have a single member for the array, you simply just wrap it in the array statement
151+
When you have a single member for the array, you can wrap it in the array statement.
129152
$code = array(1);
130153

131-
132154
If you have 2 members that need to go into the array, use a comma to separate them.
133155
$code = array(1,2);
134156

135-
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.
157+
When you have 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.
136158
$code = array('my string');
137159

138-
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.
160+
You may also see the shorthand square brackets to refer to arrays.
139161
$code = ['my string'];
140162

141163
Extension Troubleshooting
142164
---------------
143165

144-
Set $wgDebugLogFile in your LocalSettings.php:
166+
1. Set $wgDebugLogFile in your `LocalSettings.php`:
145167

146168
$wgDebugLogFile = "/some/private/path/MediaWiki.log";
147-
148-
Search for ForumSessionProvider and it will tell you what it is thinking.
149169

150-
This bloats pretty quickly, so you'll want to comment it out after you have resolved your problem.
170+
2. Trigger the URL either yourself or the member you are debugging.
171+
172+
3. Search the file for ForumSessionProvider.
173+
174+
4. The messages will indicate how it is processing the authorization.
175+
176+
This grows quickly and uses up storage space. You can delete the file, and it will be recreated again.
151177

152178
Wiki Troubleshooting
153179
---------------
154-
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
180+
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
155181

156182
$wgShowExceptionDetails = true;
157183
$wgShowSQLErrors = true;
@@ -162,9 +188,8 @@ Remove when you are done debugging.
162188
----
163189
Getting New SMF Forks In
164190
------------------------
165-
If you are familiar with how your fork's authentication works, feel free to submit a pull request.
191+
If you know how your fork's authentication works, feel free to submit a pull request.
166192

167193
Issues or changes
168194
------------------------
169-
If an issue has occurred, please open a new issue. If you have a change, please submit a pull request.
170-
195+
If a bug has occurred, please open a new issue. If you have a change, please submit a pull request.

0 commit comments

Comments
 (0)