/** * Sets up different display variables for the Group Message * */ function process_display() { global $show; $show['moderation'] = $this->message['state'] == 'moderation'; $show['edit'] = can_edit_group_message($this->message, $this->group); $show['inlinemod'] = ($this->message['state'] != 'deleted' and (fetch_socialgroup_modperm('canmoderategroupmessages', $this->group) or fetch_socialgroup_modperm('candeletegroupmessages', $this->group)) or $this->message['state'] == 'deleted' and (fetch_socialgroup_modperm('candeletegroupmessages', $this->group) or fetch_socialgroup_modperm('canremovegroupmessages', $this->group))); }
// ####################################################################### if ($_REQUEST['do'] == 'search') { $navbits = array('group.php' . $vbulletin->session->vars['sessionurl_q'] => $vbphrase['social_groups'], '' => $vbphrase['advanced_search']); $templatename = 'socialgroups_search'; } // ####################################################################### if ($_REQUEST['do'] == 'message') { if (!$vbulletin->options['socnet_groups_msg_enabled']) { print_no_permission(); } if (empty($group)) { standard_error(fetch_error('invalidid', $vbphrase['social_group'], $vbulletin->options['contactuslink'])); } if ($messageinfo) { // Can we edit? if (!can_edit_group_message($messageinfo, $group)) { print_no_permission(); } } else { if (!($vbulletin->userinfo['permissions']['socialgrouppermissions'] & $vbulletin->bf_ugp_socialgrouppermissions['canpostnonmembergroup'])) { // Are we a member of this group? if ($group['membertype'] != 'member') { print_no_permission(); } } } if ($_POST['do'] == 'message') { $vbulletin->input->clean_array_gpc('p', array('message' => TYPE_STR, 'wysiwyg' => TYPE_BOOL, 'disablesmilies' => TYPE_BOOL, 'parseurl' => TYPE_BOOL, 'username' => TYPE_STR, 'ajax' => TYPE_BOOL, 'lastcomment' => TYPE_UINT, 'humanverify' => TYPE_ARRAY, 'loggedinuser' => TYPE_UINT, 'fromquickcomment' => TYPE_BOOL, 'preview' => TYPE_STR)); ($hook = vBulletinHook::fetch_hook('group_message_post_start')) ? eval($hook) : false; // unwysiwygify the incoming data if ($vbulletin->GPC['wysiwyg']) {
/** * Sets up different display variables for the Group Message * * @access protected */ function process_display() { global $show; $this->discussion = fetch_socialdiscussioninfo($this->item['discussionid']); $this->group = fetch_socialgroupinfo($this->discussion['groupid']); $this->item['is_discussion'] = $this->item['gmid'] == $this->discussion['firstpostid']; $show['moderation'] = $this->item['state'] == 'moderation'; if ($this->show_moderation_tools and !$this->force_inline_selection) { if ($this->item['is_discussion']) { $this->item['inlinemod'] = (($this->item['state'] != 'moderation' or fetch_socialgroup_modperm('canmoderatediscussions', $this->group)) and ($this->item['state'] != 'deleted' or fetch_socialgroup_modperm('canundeletediscussions', $this->group)) and (fetch_socialgroup_modperm('canmoderatediscussions') or fetch_socialgroup_modperm('candeletediscussions', $this->group) or fetch_socialgroup_modperm('canremovediscussions', $this->group))); } else { $this->item['inlinemod'] = (($this->item['state'] != 'deleted' or fetch_socialgroup_modperm('canundeletegroupmessages', $this->group)) and ($this->item['state'] != 'moderated' or fetch_socialgroup_modperm('canmoderategroupmessages', $this->group)) and (fetch_socialgroup_modperm('canmoderategroupmessages', $this->group) or fetch_socialgroup_modperm('canundeletegroupmessages', $this->group) or fetch_socialgroup_modperm('canremovegroupmessages', $this->group))); } } else { $this->item['inlinemod'] = $this->force_inline_selection; } if ($this->show_moderation_tools) { if ($this->item['is_discussion']) { $this->item['edit'] = (can_edit_group_discussion($this->discussion) or can_edit_group_message($this->item, $this->group)); } else { $this->item['edit'] = can_edit_group_message($this->item, $this->group); } } else { $show['edit'] = $this->item['edit'] = false; } // legacy $show['inlinemod'] = $this->item['inlinemod']; $show['edit'] = $this->item['edit']; }