We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Dashboard - view my invite groups in widget | Forum

Michal Sekela
Michal Sekela Jun 10 '15
Hello,
Please help with a plugin for oxwall Group. Solve the problem in the file user_groups_widget.php. I would like the dashboard display their group. Groups I get when I do a mod moderation.


widget not showing my hidden groups

 I think that would be enough to modify the terms of this code, but you do not know was repeated advice.


    $userId = $params->additionalParamList['entityId'];
        $count = ( empty($params->customParamList['count']) ) ? 3 : (int) $params->customParamList['count'];

        // privacy check
        $viewerId = OW::getUser()->getId();
        $ownerMode = $userId == $viewerId;
        $modPermissions = OW::getUser()->isAuthorized('groups');

        if ( !$ownerMode && !$modPermissions )
        {
            $privacyParams = array('action' => GROUPS_BOL_Service::PRIVACY_ACTION_VIEW_MY_GROUPS, 'ownerId' => $userId, 'viewerId' => $viewerId);
            $event = new OW_Event('privacy_check_permission', $privacyParams);

            try {
                OW::getEventManager()->trigger($event);
            }
            catch ( RedirectException $e )
            {
                $this->setVisible(false);

                return;
            }
        }

        $userName = BOL_UserService::getInstance()->findUserById($userId)->getUsername();
        if ( !$this->assignList($userId, $count) )
        {
            $this->setVisible($params->customizeMode);

            return;
        }

        $this->setSettingValue(self::SETTING_TOOLBAR, array(array(
            'label' => OW::getLanguage()->text('groups', 'widget_user_groups_view_all'),
            'href' => OW::getRouter()->urlForRoute('groups-user-groups', array('user' => $userName))
        )));

    }


thank you very much
The Forum post is edited by Michal Sekela Jun 10 '15
Attachments:
  Bez názvu.png (53Kb)
  Bez názvu2.png (73Kb)
Taissa Team
Taissa Jun 11 '15
Topic was moved from General Questions.
Michal Sekela
Michal Sekela Jun 11 '15
Anyone not think of anything? I just need to show a dashboard widget and hidden groups in which I am adding. Now I only appear in public that I added. A hidden up when I click to view all groups.

Thank you for your help