$templater->register('memberaction_dropdown', $memberaction_dropdown); $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');
if ($messageinfo['state'] == 'moderation' and !fetch_socialgroup_modperm('canmoderategroupmessages', $group) and $messageinfo['postuserid'] != $vbulletin->userinfo['userid']) { standard_error(fetch_error('invalidid', $vbphrase['message'], $vbulletin->options['contactuslink'])); } } } ($hook = vBulletinHook::fetch_hook('group_start_postcheck')) ? eval($hook) : false; // ####################################################################### if ($_REQUEST['do'] == 'grouplist' or $_REQUEST['do'] == 'invitations' or $_REQUEST['do'] == 'requests' or $_REQUEST['do'] == 'moderatedgms') { require_once DIR . '/includes/class_socialgroup_search.php'; $socialgroupsearch = new vB_SGSearch($vbulletin); switch ($_REQUEST['do']) { case 'invitations': if (!$vbulletin->userinfo['userid']) { print_no_permission(); } $socialgroupsearch->add('member', $vbulletin->userinfo['userid']); $socialgroupsearch->add('membertype', 'invited'); $grouplisttitle = $navphrase = $vbphrase['your_invites']; $doaction = 'invitations'; break; case 'requests': $socialgroupsearch->add('creator', $vbulletin->userinfo['userid']); $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']);
$filters['date_gteq'] = $vbulletin->GPC['date_gteq']; } if (!empty($vbulletin->GPC['members_lteq'])) { $filters['members_lteq'] = $vbulletin->GPC['members_lteq']; } if (!empty($vbulletin->GPC['members_gteq'])) { $filters['members_gteq'] = $vbulletin->GPC['members_gteq']; } if (!empty($vbulletin->GPC['creatoruserid'])) { $filters['creator'] = $vbulletin->GPC['creatoruserid']; } if (!empty($vbulletin->GPC['type'])) { $filters['type'] = $vbulletin->GPC['type']; } foreach ($filters as $key => $value) { $socialgroupsearch->add($key, $value); } $groups = $socialgroupsearch->fetch_results(); if (!empty($groups)) { print_form_header('socialgroups', 'delete'); print_table_header($vbphrase['search_results']); echo ' <tr> <td class="thead"><input type="checkbox" name="allbox" id="cb_checkall" onclick="js_check_all(this.form)" /></td> <td width="100%" class="thead"><label for="cb_checkall">' . $vbphrase['check_uncheck_all'] . '</label></td> </tr>'; foreach ($groups as $group) { $group = prepare_socialgroup($group); $cell = '<span class="shade smallfont" style="float: ' . $stylevar['right'] . '; text-align: ' . $stylevar['right'] . ';">' . $vbphrase['group_desc_' . $group['type']] . '<br />' . construct_phrase($vbphrase['x_members'], $group['members']); if ($group['moderatedmembers']) { $cell .= '<br />' . construct_phrase($vbphrase['x_awaiting_moderation'], $group['moderatedmembers']);