How to add a new main category on the left, such as groups.

Leo Leonidas Posted in Technical Support 6 years ago

how to add a new main category on the left, such as groups.
Do I have to copy and edit the OSSNGroups component and just change the name?

Replies
us Rishi B Replied 6 years ago

that should say "I wouldn't exactly say..."

it's too early lol

us Rishi B Replied 6 years ago

I mean, I would exactly say you should just copy the OSSNGroups component, but it'd probably help you to look at the source. The relevant part is in ossn_com.php around lines 67-99:

//group list in newsfeed sidebar mebu
        $groups_user = ossn_get_user_groups(ossn_loggedin_user());
        if($groups_user) {
                foreach($groups_user as $group) {
                        $icon = ossn_site_url('components/OssnGroups/images/group.png');
                        ossn_register_sections_menu('newsfeed', array(
                                'text' => $group->title,
                                'name' => "groups",
                                'url' => ossn_group_url($group->guid),
                                'parent' => 'groups',
                                'icon' => $icon
                        ));
                        unset($icon);
                }
        }
        //add gorup link in sidebar
        ossn_register_sections_menu('newsfeed', array(
                'name' => 'addgroup',
                'text' => ossn_print('add:group'),
                'url' => 'javascript:void(0);',
                'id' => 'ossn-group-add',
                'parent' => 'groups',
                'icon' => ossn_site_url('components/OssnGroups/images/add.png')
        ));
        //Create link in nav to list all groups #990
        ossn_register_sections_menu('newsfeed', array(
                'name' => 'allgroups',
                'text' => ossn_print('groups'),
                'url' => ossn_site_url('search?type=groups&q='),
                'parent' => 'groups',
                'icon' => true,
        ));