From 7e594598562c26ce107efde42831cad2090a2d74 Mon Sep 17 00:00:00 2001 From: Aleksi Postari Date: Wed, 6 Mar 2019 14:23:20 +0200 Subject: [PATCH] Update README.md Document how to get the extension working with VisualEditor. --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e284a60..1a3bd63 100644 --- a/README.md +++ b/README.md @@ -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"; ``` @@ -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.