Extension:XenForoAuth
此扩展目前不再活跃维护! 尽管它可能仍然工作,但任何错误报告或功能请求将很可能被忽略。 如果您对承担开发与维护该扩展的任务工作感兴趣,您可以请求自己的存储库。 As a courtesy, you may want to contact the author. 或者您应移除该模板,并在页面的{{Extension/zh }}信息框中将您自己列为扩展的维护人员。 |
XenForoAuth 发行状态: 不再維護 |
|
---|---|
实现 | 用户身份 |
描述 | Provides login with a XenForo account in a configurable XenForo forum. |
作者 | Florian Schmidt (Florianschmidtwelzow留言) |
最新版本 | 0.1.0 |
MediaWiki | 1.27+ |
PHP | 5.5+ |
数据库更改 | Yes |
许可协议 | MIT授權條款 |
下載 | |
|
|
季度下載量 | 1 (Ranked 132nd) |
前往translatewiki.net翻譯XenForoAuth扩展 | |
The XenForoAuth extension allows wiki users to login with an account of a XenForo based online-forum. The extension uses the XenForo bd Api plugin (which needs to be installed on the XenForo forum in order to work with this extension) to request basic profile information.
条件
要使用此扩展,您至少需要:
- MediaWiki 1.27+
- MySQL (现在没有PostgreSQL或SQLite支持!)
- PHP 5.5+
- An API client in the forum with which your users can authenticate
- Able to run
composer update
安裝
- 下载文件,并将解压后的
XenForoAuth
文件夹移动到extensions/
目录中。
开发者和代码贡献人员应从Git安装扩展,输入:cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/XenForoAuth - 将下列代码放置在您的LocalSettings.php 的底部:
wfLoadExtension( 'XenForoAuth' );
- 运行更新脚本,它将自动创建此扩展必须依赖的数据库表。
- 配置所需的参数
- 完成 – 在您的wiki上导航至Special:Version,以验证已成功安装扩展。
配置
The extension provides two configuration variables to set the Client ID and Client Secret (you get this pair in the API Client settings of the XenForo forum, remove "<" and ">"). You also need to configure the base url where the api can be reached.
$wgXenForoAuthClientSecret = '<your-client-secret>';
$wgXenForoAuthClientId = '<your-client-id>';
$wgXenForoAuthBaseUrl = 'https://example.com/api/';
其他配置参数
配置变量 | 默认值 | 描述 |
---|---|---|
$wgXenForoAuthButtonIcon | 'images/xenForo_icon.png'
|
The icon, which will be added to the "Log in with XenForo" button. Normally you would set the path to the icon of the forum here. The value has to be surrounded with ' .
|
$wgXenForoAuthAutoCreate | false
|
Whether users from XenForo should be autocreated in this wiki. If you set this to true and a user logs in with XenForo and doesn't have a local connected account, it will be created automatically. If the username is already registered, the user will get an error message, that he couldn't be logged in.
|
Settings for the API Client
Please make sure, that you created an API Client in XenForo.
Please also set your full URL to Special:UserLogin
into the Redirect Uri input field (e.g. https://www.example.com/wiki/Special:UserLogin
).
Please also add your domain to the White-listed Domains input field (e.g. *.example.com
).