if (empty($grouplisttitle)) { if (empty($mygroup_bits)) { $grouplisttitle = $vbphrase['social_groups']; } else { $grouplisttitle = $vbphrase['available_groups']; } } // start processing group list $sortfield = $vbulletin->GPC['sortfield']; $perpage = $vbulletin->GPC['perpage']; $pagenumber = $vbulletin->GPC['pagenumber']; if (empty($sortfield)) { $sortfield = 'lastpost'; } $perpage = $perpage ? $perpage : 20; $socialgroupsearch->set_sort($sortfield, $vbulletin->GPC['sortorder']); if ($vbulletin->GPC['dofilter']) { $vbulletin->input->clean_array_gpc('r', array('filtertext' => TYPE_NOHTML, 'memberlimit' => TYPE_UINT, 'memberless' => TYPE_UINT, 'messagelimit' => TYPE_UINT, 'messageless' => TYPE_UINT, 'picturelimit' => TYPE_UINT, 'pictureless' => TYPE_UINT, 'filter_date_gteq' => TYPE_UNIXTIME, 'filter_date_lteq' => TYPE_UNIXTIME)); $filters = array(); if (!empty($vbulletin->GPC['filtertext'])) { $filters['text'] = $vbulletin->GPC['filtertext']; } if (!empty($vbulletin->GPC['filter_date_lteq'])) { $filters['date_lteq'] = $vbulletin->GPC['filter_date_lteq']; } if (!empty($vbulletin->GPC['filter_date_gteq'])) { $filters['date_gteq'] = $vbulletin->GPC['filter_date_gteq']; } if (!empty($vbulletin->GPC['memberlimit'])) { if ($vbulletin->GPC['memberless'] == 1) { $filters['members_lteq'] = $vbulletin->GPC['memberlimit'];
$templater->register('thread', $thread); $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);