How to manually install chat module in Humhub - php

I just installed humhub and downloaded the chat module from github. https://github.com/ychoucha/HUMHUB-module-chat
I gitcloned it to humhub/protected/modules. But, it does not show up in the modules section of administration login. How do I install this or other third part modules in Humhub?

According to this link https://github.com/humhub/humhub/issues/165 on Sep 12, 2014, Luke said:
You can also install modules manually:
Download Module (e.g. mail)
Put it into protected/modules/mail
Enable it in Administration -> Modules
I've tried with the Tasks modules and it worked. Make sure you have the latest stable version of the code from the Humhub repository. You also must be able to download that directly from the Administration > Modules > Find Online

The module no longer works since humhub v1.0.
According to the docs you need to add a config.php file.
https://www.humhub.org/docs/guide-dev-module.html
config.php (replaces 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'
)
),
],
];

Related

Yii2 doesn't upgrade yii\jui library to latest version. How to upgrade?

I tried to upgrade yii\jui library to latest version (jquery-ui 13.1) however it wasn't successful. In Yii2 it uses the outdated version which no longer has support.
I just found a solution. Bower Asset doesn't support jquery-ui 13.1 so it's useless instead you can either use npm Asset by adding "npm-asset/jquery-ui": ">=1.13.0" to your config file or you can add the following code in your Asset Manager
'bundles' => [
'yii\jui\JuiAsset' => [
'sourcePath' => null, // do not publish the bundle
'js' => [
'//code.jquery.com/ui/1.13.1/jquery-ui.min.js',
],
'css' => [
'//code.jquery.com/ui/1.13.1/themes/base/jquery-ui.css',
],
],
]

Unable to load FFMpeg in file in laravel project

i'm trying to convert a varity of audio files into a specific audio type of my chossing on my laravel project.
on my search i landed on a package called Laravel FFMpeg, i started with a fresh installation with laravel 6.2, and did the installation as it shows on github, as soon as i started using it i had this error :
FFMpeg\Exception\ExecutableNotFoundException: Unable to load FFMpeg in file C:\Users\Hatim\Desktop\Projects\Audio\vendor\php-ffmpeg\php-ffmpeg\src\FFMpeg\Driver\FFMpegDriver.php on line 55
#0 C:\Users\Hatim\Desktop\Projects\Audio\vendor\pbmedia\laravel-ffmpeg\src\Support\ServiceProvider.php(61): FFMpeg\Driver\FFMpegDriver::create(Object(Illuminate\Log\LogManager), Object(Alchemy\BinaryDriver\Configuration))
I'm currently just working with a simple thing :
FFMpeg::fromDisk('s3');
and yes I have called it my Controller: use ProtoneMedia\LaravelFFMpeg\Support\FFMpeg;
I have also tried to install the PHP-FFMpeg Package and also tried to install FFmpeg on my device and link it using the path in my config\laravel-FFmpeg
This is how it looks now without any modification, I went to my .env folder but it has nothing regarding FFmpeg so it takes the default value, that's why I tried installing it on my device and replacing the default value with the path of the FFmpeg on my device.
return [
'ffmpeg' => [
'binaries' => env('FFMPEG_BINARIES', 'ffmpeg'),
'threads' => 12,
],
'ffprobe' => [
'binaries' => env('FFPROBE_BINARIES', 'ffprobe'),
],
'timeout' => 3600,
'enable_logging' => true
];
I'm currently working on my local environment, but this has to work on a server.
I have solved the problem, this response is for future developers having a problem with the package.
first of all you have to install FFmpeg on your device, [click me][1]
chose your os and download it, unzip it rename it to FFmpeg, and then copy the folder and place it in your c: folder for example.
after that just go to your config\laravel-FFmpeg file in your project and change the defaults to the exact path in c: folder
'ffmpeg' => [
'binaries' => env('FFMPEG_BINARIES', 'C:\ffmpeg\bin\ffmpeg.exe'),
'threads' => 12,
],
'ffprobe' => [
'binaries' => env('FFPROBE_BINARIES', 'C:\ffmpeg\bin\ffprobe.exe'),
],
Like a suggestions: set in your local .env file:
FFMPEG_BINARIES=C:\bin\ffmpeg.exe
FFPROBE_BINARIES=C:\bin\ffprobe.exe

How to install the Restful client of codeigniter?

I am trying to install the Restful client of CodeIgniter: https://github.com/philsturgeon/codeigniter-restclient.
For the moment I just copy the Rest.php file in the libraries directory. But when I load the library via:
$this->load->library('rest', array(
'server' => 'http://localhost/restserver/index.php/api/api',
'http_user' => 'admin',
'http_pass' => '1234',
'http_auth' => 'basic' // or 'digest'
));
It rediects me to the GitHub website. How can I install it correctly?

Zendframework 2 with memcache not working

I am trying to get memcache to work with Zendframework 2. How do I get Zendframework 2 to see memcache correct so I don't get the error I have listed below? I want to use memcache instead of memcached.
Error:
Exception - An abstract factory could not create an instance of memcache(alias: memcache).
Previous exceptions - An exception was raised while creating "memcache"; no instance returned
The option "liboptions" does not have a matching setLiboptions setter method which must be defined
I get this error when just trying to test it with this line in a controller
echo $this->getServiceLocator()->get('memcache')->getVersion();
Details:
I'm running windows 7 64 bit with a local instance of IIS7 up and running.
I used this guide to install memecache on my pc: How to Install Memcache on Windows 7
I verified the memcache service is up and running
I verified that using memecache outside of Zendframework 2 works.
So next I followed this guide to get it to work in Zendframework 2: How to setup Zendframework 2 to use Memcached I know this guide is for memcached and not memcache but I used it as a base
Troubleshooting I've done already:
Verified service is running
Verified phpinfo() shows the memcache section so I know the php extension is loading from the php.ini
Since I'm still hazy on memcache vs memcached I've tried setting the config files and above echo to try and use the string
'memcached' and 'memcache' to see if that would help find it, but
didn't work.
I read some things online about how a 'Di' thing can conflict with this. I verified my config does not load anything with 'Di'
Verified that the abstract factory setting is loaded in the config under Service Manager
Code:
config var_dump showing the abstract factory part is loading
$sm = $this->getServiceLocator();
$config = $sm->get('config');
var_dump($config);die();
'service_manager' =>
array (size=3)
'abstract_factories' =>
array (size=2)
0 => string 'Zend\Cache\Service\StorageCacheAbstractServiceFactory' (length=53)
1 => string 'Zend\Log\LoggerAbstractServiceFactory' (length=37)
'aliases' =>
array (size=2)
'translator' => string 'MvcTranslator' (length=13)
'db' => string 'Zend\Db\Adapter\Adapter' (length=23)
'factories' =>
array (size=1)
'Zend\Db\Adapter\Adapter' => string 'Zend\Db\Adapter\AdapterServiceFactory' (length=37)
My cache.local.php and it's in the autoload directory of zendframework 2 (taken from above tutorial link and removed the 'd')
I think this is what I need to change just not sure how....
return array(
'caches' => array(
'memcache' => array( //can be called directly via SM in the name of 'memcache'
'adapter' => array(
'name' =>'memcache',
'lifetime' => 86400, //24 hours
'options' => array(
'servers' => array(
array(
'127.0.0.1',11211 //Server IP, Port
)
),
'namespace' => 'MYMEMCACHENAMESPACE',
'liboptions' => array (
'COMPRESSION' => true,
'binary_protocol' => true,
'no_block' => true,
'connect_timeout' => 120
)
)
),
'plugins' => array(
'exception_handler' => array(
'throw_exceptions' => false
),
),
),
),
);
You need to install the PHP library memcached so you can use ZFs Memcached Adaptor. ZF does not have an adaptor for the memcache library so it's trying to use the library directly which does not have a setter for liboptions. Either install memcached or remove liboptions in your config and you should be all set.

Yii RBAC issue in putty

In the slides im reading for creating user auth i have to install rbaccommand.php in the protect/commands/shell folder.
My Rbac is the one found here http://pastebin.com/uENRQ5Nz
i have this in my config/main.php
'authManager'=>array(
'class' => 'CDbAuthManager',
'connectionID' => 'db',
),
and this is the line i put into the command line. php yiic.php shell config/main.php i'm supposed to type yes afterwards but it states rbac isn't found.
Am i missing a step?
Sam

Categories