Example #1
0
            $templater->register('threadid', $threadid);
            $threadbits .= $templater->render();
            $numthreads++;
        }
        $show['threads'] = true;
    }
}
// ############################## start subscribed to groups #################################
$show['socialgroups'] = false;
if ($vbulletin->options['socnet'] & $vbulletin->bf_misc_socnet['enable_groups'] and $vbulletin->userinfo['permissions']['socialgrouppermissions'] & $vbulletin->bf_ugp_socialgrouppermissions['canviewgroups'] and $vbulletin->options['socnet_groups_msg_enabled']) {
    require_once DIR . '/includes/functions_socialgroup.php';
    require_once DIR . '/includes/class_socialgroup_search.php';
    $socialgroupsearch = new vB_SGSearch($vbulletin);
    $socialgroupsearch->add('subscribed', $vbulletin->userinfo['userid']);
    $socialgroupsearch->set_sort('lastpost', 'ASC');
    $socialgroupsearch->check_read($vbulletin->options['threadmarking']);
    ($hook = vBulletinHook::fetch_hook('group_list_filter')) ? eval($hook) : false;
    if ($numsocialgroups = $socialgroupsearch->execute(true)) {
        $groups = $socialgroupsearch->fetch_results();
        $show['pictureinfo'] = $vbulletin->options['socnet_groups_pictures_enabled'] ? true : false;
        $lastpostalt = $show['pictureinfo'] ? 'alt2' : 'alt1';
        if (is_array($groups)) {
            $grouplist = '';
            foreach ($groups as $group) {
                $group = prepare_socialgroup($group);
                $show['pending_link'] = (fetch_socialgroup_modperm('caninvitemoderatemembers', $group) and $group['moderatedmembers'] > 0);
                $show['lastpostinfo'] = $group['lastpost'];
                ($hook = vBulletinHook::fetch_hook('group_list_groupbit')) ? eval($hook) : false;
                $templater = vB_Template::create('socialgroups_groupmodlist_bit');
                $templater->register('group', $group);
                $grouplist .= $templater->render();
Example #2
0
         $socialgroupsearch->add('pending', true);
         $grouplisttitle = $navphrase = $vbphrase['your_groups_in_need_of_attention'];
         $doaction = 'requests';
         break;
     case 'moderatedgms':
         if (!$vbulletin->userinfo['permissions']['socialgrouppermissions'] & $vbulletin->bf_ugp_socialgrouppermissions['canmanageowngroups']) {
             print_no_permission();
         }
         $socialgroupsearch->add('creator', $vbulletin->userinfo['userid']);
         $socialgroupsearch->add('moderatedgms', true);
         $grouplisttitle = $navphrase = $vbphrase['your_groups_with_moderated_messages'];
         $doaction = 'moderatedgms';
         break;
 }
 if (!$vbulletin->options['threadmarking']) {
     $socialgroupsearch->check_read(false);
 }
 $doaction = $doaction ? $doaction : 'grouplist';
 $vbulletin->input->clean_array_gpc('r', array('perpage' => TYPE_UINT, 'pagenumber' => TYPE_UINT, 'sortfield' => TYPE_NOHTML, 'sortorder' => TYPE_NOHTML, 'cat' => TYPE_UINT, 'owngrouppage' => TYPE_UINT));
 $vbulletin->input->clean_array_gpc('r', array('dofilter' => TYPE_BOOL));
 if ($vbulletin->GPC['cat']) {
     $vbulletin->GPC['dofilter'] = true;
 }
 if (empty($grouplisttitle)) {
     if (empty($mygroup_bits)) {
         $grouplisttitle = $vbphrase['social_groups'];
     } else {
         $grouplisttitle = $vbphrase['available_groups'];
     }
 }
 // start processing group list