} if (!empty($vbulletin->GPC['picturelimit'])) { if ($vbulletin->GPC['pictureless'] == 1) { $filters['picture_lteq'] = $vbulletin->GPC['picturelimit']; } else { $filters['picture_gteq'] = $vbulletin->GPC['picturelimit']; } $picturelessselected[$vbulletin->GPC['pictureless']] = 'selected="selected"'; $picturelimit = $vbulletin->GPC['picturelimit']; } foreach ($filters as $key => $value) { $socialgroupsearch->add($key, $value); } } ($hook = vBulletinHook::fetch_hook('group_list_filter')) ? eval($hook) : false; $totalgroups = $socialgroupsearch->execute(true); $grouplist = ''; if ($socialgroupsearch->has_errors()) { $errorlist = ''; foreach ($socialgroupsearch->generator->errors as $error) { $errorlist .= "<li>{$error}</li>"; } $show['errors'] = $vbulletin->GPC['dofilter']; // don't show the error box if we didn't actually do a search } else { sanitize_pageresults($totalgroups, $pagenumber, $perpage); $socialgroupsearch->limit(($pagenumber - 1) * $perpage, $perpage); $groups = $socialgroupsearch->fetch_results(); $show['gminfo'] = $vbulletin->options['socnet_groups_msg_enabled']; $show['pictureinfo'] = ($vbulletin->options['socnet'] & $vbulletin->bf_misc_socnet['enable_albums'] and $vbulletin->options['socnet_groups_albums_enabled']) ? true : false; $picturealt = $show['gminfo'] ? 'alt2' : 'alt1';
$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(); } }