greenmeteor / discordapp Goto Github PK
View Code? Open in Web Editor NEWDiscord Module for Humhub
Home Page: https://www.humhub.org/en/marketplace/details?id=31
Discord Module for Humhub
Home Page: https://www.humhub.org/en/marketplace/details?id=31
Install de module
Enable
go to dashboard
see the dashboard
This error
PHP Notice – yii\base\ErrorException
Undefined variable: options
1. in C:\_webs_\humhub.1.2.2.test.desarrollo.online\public\protected\modules\discordapp\widgets\views\discordappframe.php at line 16
7891011121314151617181920
\humhub\modules\discordapp\Assets::register($this);
?>
<div class="panel">
<div class="panel-heading">
<?=Yii::t('DiscordappModule.base', '<strong>Discord</strong> Chat'); ?>
</div>
<div class="panel-body">
<?= Html::beginTag('div', $options) ?>
<iframe src="<?= $discordappUrl; ?>" id="discordAPPFrame" width="100%" height="500" allowtransparency="true" frameborder="0" name="iframeContainer"></iframe>
<?= Html::endTag('div'); ?>
</div>
</div>
2. in C:\_webs_\humhub.1.2.2.test.desarrollo.online\public\protected\modules\discordapp\widgets\views\discordappframe.php at line 16 – yii\base\ErrorHandler::handleError(8, 'Undefined variable: options', 'C:\_webs_\humhub.1.2.2.test.desa...', 16, ...)
1011121314151617181920
<div class="panel">
<div class="panel-heading">
<?=Yii::t('DiscordappModule.base', '<strong>Discord</strong> Chat'); ?>
</div>
<div class="panel-body">
<?= Html::beginTag('div', $options) ?>
<iframe src="<?= $discordappUrl; ?>" id="discordAPPFrame" width="100%" height="500" allowtransparency="true" frameborder="0" name="iframeContainer"></iframe>
<?= Html::endTag('div'); ?>
</div>
</div>
3. in C:\_webs_\humhub.1.2.2.test.desarrollo.online\public\protected\vendor\yiisoft\yii2\base\View.php at line 330 – require('C:\_webs_\humhub.1.2.2.test.desa...')
4. in C:\_webs_\humhub.1.2.2.test.desarrollo.online\public\protected\vendor\yiisoft\yii2\base\View.php at line 250 – yii\base\View::renderPhpFile('C:\_webs_\humhub.1.2.2.test.desa...', ['discordappUrl' => 'https://discordapp.com/widget?id...'])
5. in C:\_webs_\humhub.1.2.2.test.desarrollo.online\public\protected\vendor\yiisoft\yii2\base\View.php at line 152 – yii\base\View::renderFile('C:\_webs_\humhub.1.2.2.test.desa...', ['discordappUrl' => 'https://discordapp.com/widget?id...'], humhub\modules\discordapp\widgets\DiscordappFrame)
6. in C:\_webs_\humhub.1.2.2.test.desarrollo.online\public\protected\vendor\yiisoft\yii2\base\Widget.php at line 234 – yii\base\View::render('discordappframe', ['discordappUrl' => 'https://discordapp.com/widget?id...'], humhub\modules\discordapp\widgets\DiscordappFrame)
7. in C:\_webs_\humhub.1.2.2.test.desarrollo.online\public\protected\modules\discordapp\widgets\DiscordappFrame.php at line 25 – yii\base\Widget::render('discordappframe', ['discordappUrl' => 'https://discordapp.com/widget?id...'])
19202122232425262728
* @inheritdoc
*/
public function run()
{
$url = Yii::$app->getModule('discordapp')->getServerUrl() . '/widget?id=';
return $this->render('discordappframe', [
'discordappUrl' => $url
]);
}
}
8. in C:\_webs_\humhub.1.2.2.test.desarrollo.online\public\protected\humhub\components\Widget.php at line 58 – humhub\modules\discordapp\widgets\DiscordappFrame::run()
52535455565758596061626364
ob_implicit_flush(false);
try {
/* @var $widget Widget */
$widget = Yii::createObject($config);
$out = '';
if ($widget->beforeRun()) {
$result = $widget->run();
$out = $widget->afterRun($result);
}
} catch (\Exception $e) {
// close the output buffer opened above if it has not been closed already
if (ob_get_level() > 0) {
ob_end_clean();
9. in C:\_webs_\humhub.1.2.2.test.desarrollo.online\public\protected\humhub\widgets\BaseStack.php at line 85 – humhub\components\Widget::widget(['class' => 'humhub\modules\discordapp\widget...'])
79808182838485868788899091
$i = 0;
foreach ($this->getWidgets() as $widget) {
$i++;
$widgetClass = $widget[0];
$out = $widgetClass::widget($widget[1]);
if (!empty($out)) {
$content .= $out;
if ($i != count($this->getWidgets())) {
$content .= $this->seperator;
}
10. in C:\_webs_\humhub.1.2.2.test.desarrollo.online\public\protected\vendor\yiisoft\yii2\base\Widget.php at line 139 – humhub\widgets\BaseStack::run()
11. in C:\_webs_\humhub.1.2.2.test.desarrollo.online\public\protected\humhub\modules\dashboard\views\dashboard\index.php at line 20 – yii\base\Widget::widget(['widgets' => [['humhub\modules\activity\widgets\...', ['streamAction' => '/dashboard/dashboard/stream'], ['sortOrder' => 150]]], 'class' => 'humhub\modules\dashboard\widgets...'])
14151617181920212223242526
'showProfilePostForm' => $showProfilePostForm
])?>
</div>
<div class="col-md-4 layout-sidebar-container">
<?php
echo \humhub\modules\dashboard\widgets\Sidebar::widget([
'widgets' => [
[
\humhub\modules\activity\widgets\Stream::className(),
['streamAction' => '/dashboard/dashboard/stream'],
['sortOrder' => 150]
]
]
12. in C:\_webs_\humhub.1.2.2.test.desarrollo.online\public\protected\vendor\yiisoft\yii2\base\View.php at line 330 – require('C:\_webs_\humhub.1.2.2.test.desa...')
13. in C:\_webs_\humhub.1.2.2.test.desarrollo.online\public\protected\vendor\yiisoft\yii2\base\View.php at line 250 – yii\base\View::renderPhpFile('C:\_webs_\humhub.1.2.2.test.desa...', ['showProfilePostForm' => '1', 'contentContainer' => humhub\modules\user\models\User])
14. in C:\_webs_\humhub.1.2.2.test.desarrollo.online\public\protected\vendor\yiisoft\yii2\base\View.php at line 152 – yii\base\View::renderFile('C:\_webs_\humhub.1.2.2.test.desa...', ['showProfilePostForm' => '1', 'contentContainer' => humhub\modules\user\models\User], humhub\modules\dashboard\controllers\DashboardController)
15. in C:\_webs_\humhub.1.2.2.test.desarrollo.online\public\protected\vendor\yiisoft\yii2\base\Controller.php at line 381 – yii\base\View::render('index', ['showProfilePostForm' => '1', 'contentContainer' => humhub\modules\user\models\User], humhub\modules\dashboard\controllers\DashboardController)
16. in C:\_webs_\humhub.1.2.2.test.desarrollo.online\public\protected\humhub\modules\dashboard\controllers\DashboardController.php at line 62 – yii\base\Controller::render('index', ['showProfilePostForm' => '1', 'contentContainer' => humhub\modules\user\models\User])
565758596061626364656667
{
if (Yii::$app->user->isGuest) {
return $this->render('index_guest', []);
} else {
return $this->render('index', [
'showProfilePostForm' => Yii::$app->getModule('dashboard')->settings->get('showProfilePostForm'),
'contentContainer' => Yii::$app->user->getIdentity()
]);
}
}
}
17. humhub\modules\dashboard\controllers\DashboardController::actionIndex()
18. in C:\_webs_\humhub.1.2.2.test.desarrollo.online\public\protected\vendor\yiisoft\yii2\base\InlineAction.php at line 57 – call_user_func_array([humhub\modules\dashboard\controllers\DashboardController, 'actionIndex'], [])
19. in C:\_webs_\humhub.1.2.2.test.desarrollo.online\public\protected\vendor\yiisoft\yii2\base\Controller.php at line 156 – yii\base\InlineAction::runWithParams([])
20. in C:\_webs_\humhub.1.2.2.test.desarrollo.online\public\protected\vendor\yiisoft\yii2\base\Module.php at line 523 – yii\base\Controller::runAction('', [])
21. in C:\_webs_\humhub.1.2.2.test.desarrollo.online\public\protected\vendor\yiisoft\yii2\web\Application.php at line 102 – yii\base\Module::runAction('dashboard/dashboard', [])
22. in C:\_webs_\humhub.1.2.2.test.desarrollo.online\public\protected\vendor\yiisoft\yii2\base\Application.php at line 380 – yii\web\Application::handleRequest(humhub\components\Request)
23. in C:\_webs_\humhub.1.2.2.test.desarrollo.online\public\index.php at line 19 – yii\base\Application::run()
13141516171819
require(__DIR__ . '/protected/humhub/config/web.php'),
(is_readable(__DIR__ . '/protected/config/dynamic.php')) ? require(__DIR__ . '/protected/config/dynamic.php') : [],
require(__DIR__ . '/protected/config/common.php'),
require(__DIR__ . '/protected/config/web.php')
);
(new humhub\components\Application($config))->run();
Q | A |
---|---|
HumHub version | 1.? |
PHP version | |
Operating system |
Note: Also provide the full error stacks from
ACP --> Information --> Logging
and errors from your browser console.
Can you add a invite link option to discord chat?
Using https://discordapp.com/widget?id=
as getServerUrl
doesn't help when adding a discord server id to ACP --> Discord Settings
Can user select a theme from light to dark ?
At the moment the module is broken and needs to be updated badly which will be done at some point in time.
The following is for the number of languages supported or needs to be supported
More will be added if asked.
I am using humhub version 1.2.2 and upon install of this module, my humhub just constantly shows a page that says "An internal server error occurred." I tried deleting the folder from the modules folder, and it still says ^ I cant go to my admin panel, or nothing.
Implement Space and Profile settings so that users and spaces can have their own Discord server displayed.
Replace class Events extends \yii\base\Object in Events.php with
class Events extends \yii\base\BaseObject
The humhub repo is missing this change.
Implement the use of discordapp.com
or discord.com
Installed everything as per instructions. Module shows my channel and online user (me). There is a button “connect” and that’s it. If I press connect, it will open a new browser screen to logon in again on discord.
Going back to humbug still shows the connect button...
What have I missed?
The link is used to crawl a widget is
https://discordapp.com/api/guilds/XXXXXX/widget?id=/widget.json
the right url is now:
https://discordapp.com/api/guilds/XXXXXX/widget.json
The changes is in DiscordappFrame.php
public function run()
{
$url = Yii::$app->getModule('discordapp')->getServerUrl() . '/widget?id=';
return $this->render('discordappframe', ['discordappUrl' => $url]);
}
}
to
public function run()
{
$url = Yii::$app->getModule('discordapp')->getServerUrl();
return $this->render('discordappframe', ['discordappUrl' => $url]);
}
}
There is only one thing left to do now, all other things are working now, I did a huge update.
You have to edit widgets/view/discordframe.php line 11 and put in your own code - then the module is 100% done :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.