protected function column_col3() { $words = $this->getWords(); if (!APP_user::isBWLoggedIn('NeedMore,Pending')) { $widg = $this->createWidget('LoginFormWidget'); $widg->render(); } else { ?> <h3><?php echo $words->get('GroupsLeaveNamedGroup', htmlspecialchars($this->getGroupTitle(), ENT_QUOTES)); ?> </h3> <span class="button"><a href="groups/<?php echo $this->group->id; ?> /leave/true"><?php echo $words->get('GroupsYesGetMeOut'); ?> </a></span> <span class="button"><a href="groups/<?php echo $this->group->id; ?> "><?php echo $words->get('GroupsNoIStay'); ?> </a></span> <?php } }
protected function column_col3() { $words = $this->getWords(); if (!APP_user::isBWLoggedIn('NeedMore,Pending')) { $widg = $this->createWidget('LoginFormWidget'); $widg->render(); } else { //crumbking: this is just a copy/paste of the membersettings layout with small changes in some words, needs a coder ;) $layoutkit = $this->layoutkit; $words = $layoutkit->getWords(); $formkit = $layoutkit->formkit; $callback_tag = $formkit->setPostCallback('GroupsController', 'joined'); $error = $formkit->mem_from_redirect ? $words->get('GroupsErrorJoiningGroup') : ''; $group_name_html = htmlspecialchars($this->getGroupTitle(), ENT_QUOTES); echo <<<HTML {$error} <form action="" method="post"> {$callback_tag} <fieldset> <legend>{$words->get('GroupsJoinTheGroup')} {$group_name_html}</legend> <input type='hidden' name='member_id' value='{$this->member->id}' /> <input type='hidden' name='group_id' value='{$this->group->id}' /> <label for="comment">{$words->get('GroupsMemberComments')}</label><br /> <textarea id="comment" name="membershipinfo_comment" cols="60" rows="5" class="long" ></textarea> <div class="row"> <label>{$words->get('GroupsMemberAcceptMail')}:</label> <input id='no_option' type="radio" value="no" name="membershipinfo_acceptgroupmail" /> <label for="no_option">{$words->get('no')}</label> <input id='yes_option' type="radio" value="yes" checked='checked' name="membershipinfo_acceptgroupmail" /> <label for="yes_option">{$words->get('yes')}</label><br /><br /> {$words->get('ValuesCanBeChangedLaterInMemberSettings')} </div> <!-- row --> <h3>{$words->get('GroupsJoinNamedGroup', $group_name_html)}</h3> <input type='submit' value='{$words->getSilent('GroupsGetMeIn')}' name='join'/> <span class="button"><a href="groups/{$this->group->id}">{$words->get('GroupsDontGetMeIn')}</a></span> </fieldset> </form> HTML; } }
} $suggestionsGroupId = PVars::getObj('suggestions')->groupid; if ($group_id == $suggestionsGroupId) { $showNewTopicButton = false; } echo $Forums->showExternalGroupThreads($group_id, $this->isGroupMember(), false, $showNewTopicButton); ?> </div> <!-- floatbox --> </div> <!-- subcl --> </div> <!-- c62l --> <div class="c38r"> <div class="subcr"> <?php if (!APP_user::isBWLoggedIn('NeedMore,Pending')) { // not logged in users cannot join groups echo $words->get('GroupsJoinLoginFirst'); } else { $model = new GroupsModel(); if ($this->member) { $memberId = $this->member->id; } else { $memberId = null; } switch ($model->getMembershipStatus($this->group, $memberId)) { case 'Kicked': // tell user he got banned echo $words->getSilent('GroupsBanned'); break; case 'WantToBeIn':
protected function column_col3() { $formkit = $this->layoutkit->formkit; $callbacktag = $formkit->setPostCallback('GroupsController', 'changeMemberSettings'); $words = $this->getWords(); $resultmsg = $problemmsg = ''; $redirected = $formkit->mem_from_redirect; if (is_object($redirected)) { $resultmsg = $redirected->result ? "<p class=\"note\">{$words->get('GroupMemberSettingsUpdated')}</p>" : "<p class=\"note\">{$words->get('GroupMemberSettingsNotUpdated')}</p>"; $problemmsg = $redirected->problems ? "<p class=\"error\">{$words->get('GroupMemberSettingsProblems')}</p>" : ''; } if (!APP_user::isBWLoggedIn('NeedMore,Pending')) { $widg = $this->createWidget('LoginFormWidget'); $widg->render(); } else { $membershipinfo = $this->member->getGroupMembership($this->group); ?> <?php echo $resultmsg; ?> <?php echo $problemmsg; ?> <form action="" method="post"> <?php echo $callbacktag; ?> <fieldset> <legend><?php echo $words->get('GroupsMemberSettings'); echo htmlspecialchars($this->group->Name, ENT_QUOTES); ?> </legend> <input type='hidden' name='member_id' value='<?php echo $this->member->id; ?> ' /> <input type='hidden' name='group_id' value='<?php echo $membershipinfo->IdGroup; ?> ' /> <div class="row"> <label for="comment"><?php echo $words->get('GroupsMemberComments'); ?> </label><br /> <textarea id="comment" name="membershipinfo_comment" cols="60" rows="5" class="long" ><?php echo $membershipinfo->Comment != '' ? htmlspecialchars($words->mTrad($membershipinfo->Comment)) : ''; ?> </textarea> </div> <!-- row --> <div class="row"> <label><?php echo $words->get('GroupsMemberAcceptMail'); ?> : </label> <input id='no_option' type="radio" value="no" name="membershipinfo_acceptgroupmail" <?php echo $membershipinfo->IacceptMassMailFromThisGroup == 'no' || !$membershipinfo->IacceptMassMailFromThisGroup ? 'checked="checked" ' : ''; ?> /> <label for="no_option"><?php echo $words->get('no'); ?> </label> <input id='yes_option' type="radio" value="yes" name="membershipinfo_acceptgroupmail" <?php echo $membershipinfo->IacceptMassMailFromThisGroup == 'yes' ? 'checked="checked" ' : ''; ?> /> <label for="yes_option"><?php echo $words->get('yes'); ?> </label> </div> <!-- row --> <?php if ($membershipinfo->IdMember < 0) { ?> <p><?php echo $words->get('GroupMemberSettingsDisabledInfo'); ?> </p> <?php } ?> <p style="padding-top: 2em"><input type="submit" value="<?php echo $words->getBuffered('GroupsUpdateMemberSettings'); ?> " /><?php echo $words->flushBuffer(); ?> </p> </fieldset> </form> <?php } }