Ejemplo n.º 1
0
         $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';
     $lastpostalt = $show['pictureinfo'] ? 'alt1' : 'alt2';
     if (is_array($groups)) {
         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;
             eval('$grouplist .= "' . fetch_template("socialgroups_grouplist_bit") . '";');
         }
     }
     $sorturl = 'group.php?' . $vbulletin->session->vars['sessionurl'] . "do={$doaction}" . ($perpage != 20 ? "&amp;pp={$perpage}" : '');