Giter Site home page Giter Site logo

discordapp's People

Contributors

archblood avatar buslov avatar cagatayldzz avatar caiqueff avatar cavp28 avatar felli avatar imgbotapp avatar scrutinizer-auto-fixer avatar webcrew avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

discordapp's Issues

Dashboard error

What steps will reproduce the problem?

Install de module
Enable
go to dashboard

What is the expected result?

see the dashboard

What do you get instead?

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();

Additional info

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.

Invite link

Can you add a invite link option to discord chat?

To-Do List

At the moment the module is broken and needs to be updated badly which will be done at some point in time.

Bugs

  • Fix back-end URL to front end render issues #10

This module literally broke my humhub.

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.

[Devlog]Roadmap v1.3.x

Core Development

  • Implement webhooks to better connect to Discord.
  • Work Discord oauth into module settings.
  • Codebase reviewing.
  • Documentations
  • Review & Insight (#21)
  • Use of either DIscord domain (#37)

Translations

  • Translations (#12)

Enh: Space & Profile Settings

Implement Space and Profile settings so that users and spaces can have their own Discord server displayed.

  • Profile Settings
  • Space Settings

Make this work in PHP 7.2

Replace class Events extends \yii\base\Object in Events.php with
class Events extends \yii\base\BaseObject

The humhub repo is missing this change.

Module only shows “connect” and opens discord site

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?

Widget 401 error

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]);
    }
}

Fixing Admin Index & Widget

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 :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.