1 配置文件LocalSettings.php
2.1 配置邮件系统
配置SMTP
<?php
// ...
$wgEnableEmail = true;
$wgEnableUserEmail = true; # UPO
$wgEmergencyContact = "humaninfo@novogene.com"; # 和username保持一致
$wgPasswordSender = "humaninfo@novogene.com";
$wgSMTP = array(
'host' => 'smtp.exmail.qq.com', # 腾讯企业邮箱
'port' => 587, # For阿里云服务器
'auth' => true,
'username' => 'humaninfo@novogene.com',
'password' => 'your_password'
);
$wgEnotifUserTalk = false; # UPO
$wgEnotifWatchlist = false; # UPO
$wgEmailAuthentication = true;
2.2 加载插件
插件目录为extensions
, 默认包含一些插件,想增加插件只需把新的插件解压到该目录下
开启指定插件
<?php
wfLoadExtension( 'WikiEditor' ); # 可视化编辑器
wfLoadExtension( 'CodeEditor' );
wfLoadExtension( 'SyntaxHighlight_GeSHi' ); # 语法高亮
wfLoadExtension( 'ImageMap' );
wfLoadExtension( 'PdfHandler' );
wfLoadExtension( 'PageImages' );
wfLoadExtension( 'ParserFunctions' );
2.3 匿名用户权限
配置匿名用户是否可以创建账号,读权限,编辑权限
<?php
$wgGroupPermissions['*']['createaccount'] = true;
$wgGroupPermissions['*']['read'] = true;
$wgGroupPermissions['*']['edit'] = false;
2.4 其他
<?php
// 网站图标
$wgLogo = "$wgResourceBasePath/resources/assets/logo.png";
// 默认皮肤
$wgDefaultSkin = "vector";