【发布时间】:2016-05-27 20:50:36
【问题描述】:
我刚刚安装了humhub并从github下载了聊天模块。 https://github.com/ychoucha/HUMHUB-module-chat 我将它克隆到了hubhub/protected/modules。但是,它不会显示在管理登录的模块部分中。如何在 Humhub 中安装这个或其他第三方模块?
【问题讨论】:
我刚刚安装了humhub并从github下载了聊天模块。 https://github.com/ychoucha/HUMHUB-module-chat 我将它克隆到了hubhub/protected/modules。但是,它不会显示在管理登录的模块部分中。如何在 Humhub 中安装这个或其他第三方模块?
【问题讨论】:
根据此链接https://github.com/humhub/humhub/issues/165 2014 年 9 月 12 日,Luke 说:
您也可以手动安装模块:
我已经尝试过使用 Tasks 模块并且它有效。确保您拥有来自 Humhub 存储库的最新稳定版本的代码。您还必须能够直接从 Administration > Modules > Find Online 下载它
【讨论】:
该模块自 humhub v1.0 起不再工作。
根据文档,您需要添加一个 config.php 文件。 https://www.humhub.org/docs/guide-dev-module.html
config.php(替换 autostart.php)
<?php
use humhub\modules\dashboard\widgets\Sidebar;
return [
'id' => 'chat',
'class' => 'humhub\modules\chat\ChatModule',
'namespace' => 'humhub\modules\chat',
'events' => [
array(
'class' => Sidebar::className(),
'event' => Sidebar::EVENT_INIT,
'callback' => array(
'humhub\modules\chat\ChatModule',
'onSidebarInit'
)
),
],
];
【讨论】: