Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Document how to get the extension working with VisualEditor.
  • Loading branch information
kulttuuri authored Mar 6, 2019
1 parent e2ae9ec commit 7e59459
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ $wgSlackFromName = $wgSitename;
$wgWikiUrl = "http://your_wiki_url/";
// Wiki script name. Leave this to default one if you do not have URL rewriting enabled.
$wgWikiUrlEnding = "index.php?title=";
// What method will be used to send the data to Slack server. By default this is "curl" which only works if you have the curl extension enabled. This can be: "curl" or "file_get_contents". Default: "curl".
// What method will be used to send the data to Slack server. By default this is "curl" which only works if you have the curl extension enabled. This can be: "curl" or "file_get_contents". There have been cases where VisualEditor extension does not work with the curl method, so in that case the recommended solution is to use the file_get_contents method. Default: "curl".
$wgSlackSendMethod = "curl";
```

Expand All @@ -51,6 +51,14 @@ $wgSlackSendMethod = "curl";

These options can be set after including your plugin in your localSettings.php file.

### Customize request call method (Fix extension not working with VisualEditor)

By default this extension uses curl to send the requests to slack's API. If you use VisualEditor and get unknown errors, do not have curl enabled on your server or notice other problems, the recommended solution is to change method to file_get_contents.

```php
$wgSlackSendMethod = "file_get_contents";
```

### Customize room where notifications gets sent to

By default when you create incoming webhook at Slack site you'll define which room notifications go into. You can also override this in MediaWiki by setting the parameter below. Remember to also include # before your room name.
Expand Down

0 comments on commit 7e59459

Please sign in to comment.