【问题标题】:How to manually install chat module in Humhub如何在 Humhub 中手动安装聊天模块
【发布时间】:2016-05-27 20:50:36
【问题描述】:

我刚刚安装了humhub并从github下载了聊天模块。 https://github.com/ychoucha/HUMHUB-module-chat 我将它克隆到了hubhub/protected/modules。但是,它不会显示在管理登录的模块部分中。如何在 Humhub 中安装这个或其他第三方模块?

【问题讨论】:

    标签: php chat


    【解决方案1】:

    根据此链接https://github.com/humhub/humhub/issues/165 2014 年 9 月 12 日,Luke 说:

    您也可以手动安装模块:

    1. 下载模块(例如邮件)
    2. 放入protected/modules/mail
    3. 在管理 -> 模块中启用它

    我已经尝试过使用 Tasks 模块并且它有效。确保您拥有来自 Humhub 存储库的最新稳定版本的代码。您还必须能够直接从 Administration > Modules > Find Online 下载它

    【讨论】:

      【解决方案2】:

      该模块自 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'
                  )
              ),
          ],
      ];
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2011-08-12
        • 1970-01-01
        • 1970-01-01
        • 2011-07-19
        • 2011-11-24
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多