/** * Creates if needed cbTabs object * * @param boolean $outputTabpaneScript * @return cbTabs */ public function &_getCbTabs($outputTabpaneScript = true) { if ($this->_cbtabs === null) { global $_CB_framework; cbimport('cb.tabs'); $this->_cbtabs = new cbTabs(0, $_CB_framework->getUi(), null, $outputTabpaneScript); } if ($outputTabpaneScript) { $this->_cbtabs->outputTabJS(); } return $this->_cbtabs; }
/** * Outputs legacy user edit display * * @deprecated 2.0 * * @param UserTable $user * @param string $option * @param int $newCBuser * @param array $postdata */ public function edituser($user, $option, $newCBuser, &$postdata) { global $_CB_framework, $_CB_Backend_Title, $_PLUGINS; $results = $_PLUGINS->trigger('onBeforeUserProfileEditDisplay', array(&$user, 2)); if ($_PLUGINS->is_errors()) { cbRedirect($_CB_framework->backendViewUrl('showusers'), $_PLUGINS->getErrorMSG(), 'error'); } _CBsecureAboveForm('edituser'); cbimport('cb.validator'); outputCbTemplate(2); initToolTip(2); outputCbJs(2); $tabs = new cbTabs($_CB_framework->getUi() == 2 && !isset($_REQUEST['tab']) ? 1 : 0, 2); // use cookies in backend to remember selected tab. $tabcontent = $tabs->getEditTabs($user, $postdata, 'htmledit', 'divs'); $_CB_Backend_Title = array(0 => array('fa fa-user', $user->id ? CBTxt::T('COMMUNITY_BUILDER_EDIT_USER_USERNAME', 'Community Builder: Edit User [[username]]', array('[username]' => $user->username)) : CBTxt::T('Community Builder: New User'))); cbValidator::loadValidation(); if (is_array($results)) { echo implode('', $results); } $return = '<form action="' . $_CB_framework->backendUrl('index.php') . '" method="post" name="adminForm" id="cbcheckedadminForm" enctype="multipart/form-data" autocomplete="off" class="cb_form form-auto cbValidation">' . $tabcontent . '<input type="hidden" name="id" value="' . (int) $user->id . '" />' . '<input type="hidden" name="newCBuser" value="' . (int) $newCBuser . '" />' . '<input type="hidden" name="option" value="com_comprofiler" />' . '<input type="hidden" name="view" value="save" />' . cbGetSpoofInputTag('user') . '<div class="cbIconsBottom">' . getFieldIcons(2, true, true, '', '', true) . '</div>' . '</form>'; echo $return; }
/** * Shows Forum Tab * * @param UserTable $viewer Viewing User * @param UserTable $user Viewed at User * @param TabTable $tab Current Tab * @param PluginTable $plugin Current Plugin * @return string */ static public function showTab( $viewer, $user, $tab, $plugin ) { global $_CB_framework; $tabs = new cbTabs( 1, 1 ); $favorites = $tab->params->get( 'tab_favs_display', 1 ); $subscriptions = $tab->params->get( 'tab_subs_display', 1 ); $tabbed = ( ( $user->id == $_CB_framework->myId() ) && ( $favorites || $subscriptions ) ? true : false ); $return = null; if ( $tabbed ) { $return .= $tabs->startPane( 'cbForumsTabs' ) . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Posts' ) ), 'cbForumsTabsPosts' ); } $return .= cbforumsModel::getPosts( $viewer, $user, $tab, $plugin ); if ( $tabbed ) { $return .= $tabs->endTab(); if ( $favorites ) { $return .= $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Favorites' ) ), 'cbForumsTabsFavorites' ) . cbforumsModel::getFavorites( $viewer, $user, $tab, $plugin ) . $tabs->endTab(); } if ( $subscriptions ) { $return .= $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Subscriptions' ) ), 'cbForumsTabsSubscriptions' ) . '<div class="tab-content">' . cbforumsModel::getCategorySubscriptions( $viewer, $user, $tab, $plugin ) . cbforumsModel::getSubscriptions( $viewer, $user, $tab, $plugin ) . '</div>' . $tabs->endTab(); } $return .= $tabs->endPane(); } return $return; }
/** * Draws the user profile tab "Subscriptions" (if enabled, user is the profile owner, and something to display. * * @param string $plansTitle * @param string $htmlPlans * @return array|null */ public function drawRegistrationPlans($plansTitle, $htmlPlans) { $this->plansTitle = $plansTitle; $this->htmlPlans = $htmlPlans; $htmlValue = $this->display(); $description = null; $uniqueId = 'cbregplans'; $displayOnTwoLines = cbpaidApp::settingsParams()->get('regDisplayLines', 2) == 2; $tab = $this->_model; if ($htmlValue) { return array(cbTabs::_createPseudoField($tab, $this->plansTitle, $htmlValue, $description, $uniqueId, $displayOnTwoLines)); } else { return null; } }
/** * render frontend category edit * * @param cbgjCategory $row * @param array $input * @param moscomprofilerUser $user * @param object $plugin */ static function showCategoryEdit( $row, $input, $user, $plugin ) { $authorized = cbgjClass::getAuthorization( $row, null, $user ); $pageTitle = CBTxt::P( ( $row->get( 'id' ) ? 'Edit [category]' : 'Create [category]' ), array( '[category]' => cbgjClass::getOverride( 'category' ) ) ); $row->setPathway( $pageTitle, cbgjClass::getPluginURL( ( $row->get( 'id' ) ? array( 'categories', 'edit', (int) $row->get( 'id' ) ) : array( 'categories', 'new', (int) $row->get( 'parent' ) ) ) ) ); $tabs = new cbTabs( 0, 1 ); $onEdit = cbgjClass::getIntegrations( 'gj_onCategoryEdit', array( $tabs, $row, $user, $plugin ), null, null ); $return = '<div class="gjCategoryEdit">' . '<form action="' . cbgjClass::getPluginURL( array( 'categories', 'save', (int) $row->get( 'id' ) ), null, true, false, null, 'current' ) . '" method="post" enctype="multipart/form-data" name="gjForm" id="gjForm" class="gjForm form-horizontal">' . '<legend class="gjEditTitle">' . $pageTitle . '</legend>'; if ( cbgjClass::hasAccess( 'usr_mod', $authorized ) || $row->getParentAccess( array( 'mod_lvl1', $user ) ) ) { $return .= '<div class="gjEditContentInput control-group">' . '<label class="gjEditContentInputTitle control-label">' . CBTxt::Th( 'Published' ) . '</label>' . '<div class="gjEditContentInputField controls">' . $input['publish'] . '<span class="gjEditContentInputIcon help-inline">' . cbgjClass::getIcon( CBTxt::P( 'Select publish status of [category]. Unpublished [categories] will not be visible to the public as well as its [groups].', array( '[category]' => cbgjClass::getOverride( 'category' ), '[categories]' => cbgjClass::getOverride( 'category', true ), '[groups]' => cbgjClass::getOverride( 'group', true ) ) ) ) . '</span>' . '</div>' . '</div>'; } if ( cbgjClass::hasAccess( 'usr_mod', $authorized ) || ( $plugin->params->get( 'category_nested', 1 ) && ( ! $row->get( 'parent' ) ) ) ) { $return .= '<div class="gjEditContentInput control-group">' . '<label class="gjEditContentInputTitle control-label">' . CBTxt::Th( 'Parent' ) . '</label>' . '<div class="gjEditContentInputField controls">' . $input['parent'] . '<span class="gjEditContentInputIcon help-inline">' . cbgjClass::getIcon( CBTxt::P( 'Select parent [category]. Selecting parent [category] allows for nested [category] display.', array( '[category]' => cbgjClass::getOverride( 'category' ) ) ) ) . '</span>' . '</div>' . '</div>'; } elseif ( $row->get( 'parent' ) ) { $return .= '<div class="gjEditContentInput control-group">' . '<label class="gjEditContentInputTitle control-label">' . CBTxt::Th( 'Parent' ) . '</label>' . '<div class="gjEditContentInputField controls">' . $row->getParent()->getName() . '<input type="hidden" id="parent" name="parent" value="' . (int) $row->get( 'parent' ) . '" />' . '</div>' . '</div>'; } $return .= '<div class="gjEditContentInput control-group">' . '<label class="gjEditContentInputTitle control-label">' . CBTxt::Th( 'Name' ) . '</label>' . '<div class="gjEditContentInputField controls">' . $input['name'] . '<span class="gjEditContentInputIcon help-inline">' . cbgjClass::getIcon( null, CBTxt::T( 'Required' ), 'icon-star' ) . cbgjClass::getIcon( CBTxt::P( 'Input [category] name. This is the name that will distinguish this [category] from others. Suggested to input something unique and intuitive.', array( '[category]' => cbgjClass::getOverride( 'category' ) ) ) ) . '</span>' . '</div>' . '</div>' . '<div class="gjEditContentInput control-group">' . '<label class="gjEditContentInputTitle control-label">' . CBTxt::Th( 'Description' ) . '</label>' . '<div class="gjEditContentInputField controls">' . $input['description'] . '<span class="gjEditContentInputIcon help-inline">' . cbgjClass::getIcon( CBTxt::P( 'Input [category] description. Your [category] description should be short and to the point; describing what your [category] is all about.', array( '[category]' => cbgjClass::getOverride( 'category' ) ) ) ) . '</span>' . '</div>' . '</div>'; if ( $input['inputlimit'] !== false ) { $return .= '<div class="gjEditContentInput control-group">' . '<label class="gjEditContentInputTitle control-label">' . CBTxt::Th( 'Input Limit' ) . '</label>' . '<div class="gjEditContentInputField controls">' . $input['inputlimit'] . '</div>' . '</div>'; } $return .= '<div class="gjEditContentInput control-group">' . '<label class="gjEditContentInputTitle control-label">' . CBTxt::Th( 'Logo' ) . '</label>' . '<div class="gjEditContentInputField controls">' . '<div style="margin-bottom: 10px;">' . $row->getLogo( true ) . '</div>' . ( $row->get( 'logo' ) ? '<div style="margin-bottom: 5px;">' . $input['del_logo'] . '</div>' : null ) . '<div>' . $input['file'] . '<span class="gjEditContentInputIcon help-inline">' . cbgjClass::getIcon( CBTxt::P( 'Select [category] logo. A logo should represent the focus of your [category]; please be respectful and tasteful when selecting a logo.', array( '[category]' => cbgjClass::getOverride( 'category' ) ) ) ) . '</span>' . '</div>' . '</div>' . '</div>'; if ( $plugin->params->get( 'category_types_config', 1 ) || cbgjClass::hasAccess( 'usr_mod', $authorized ) ) { $return .= '<div class="gjEditContentInput control-group">' . '<label class="gjEditContentInputTitle control-label">' . CBTxt::Th( 'Types' ) . '</label>' . '<div class="gjEditContentInputField controls">' . $input['types'] . '<span class="gjEditContentInputIcon help-inline">' . cbgjClass::getIcon( null, CBTxt::T( 'Required' ), 'icon-star' ) . cbgjClass::getIcon( CBTxt::P( 'Select [categories] available [group] types. Types determine the way a [group] is joined (e.g. Invite requires new [users] to be invited to join a [group]).', array( '[categories]' => cbgjClass::getOverride( 'category', true ), '[group]' => cbgjClass::getOverride( 'group' ), '[users]' => cbgjClass::getOverride( 'user', true ) ) ) ) . '</span>' . '</div>' . '</div>'; } if ( $plugin->params->get( 'category_access_config', 1 ) || cbgjClass::hasAccess( 'usr_mod', $authorized ) ) { $return .= '<div class="gjEditContentInput control-group">' . '<label class="gjEditContentInputTitle control-label">' . CBTxt::Th( 'Access' ) . '</label>' . '<div class="gjEditContentInputField controls">' . $input['access'] . '<span class="gjEditContentInputIcon help-inline">' . cbgjClass::getIcon( CBTxt::P( 'Select [category] access. Access determines who can effectively see your [category]. The group selected as well as those above it will have access (e.g. Registered will also be accessible to Author).', array( '[category]' => cbgjClass::getOverride( 'category' ) ) ) ) . '</span>' . '</div>' . '</div>'; } if ( cbgjClass::hasAccess( 'grp_create', $authorized ) ) { if ( $plugin->params->get( 'category_create_config', 1 ) || cbgjClass::hasAccess( 'usr_mod', $authorized ) ) { $return .= '<div class="gjEditContentInput control-group">' . '<label class="gjEditContentInputTitle control-label">' . CBTxt::Th( 'Create' ) . '</label>' . '<div class="gjEditContentInputField controls">' . $input['create'] . '<span class="gjEditContentInputIcon help-inline">' . cbgjClass::getIcon( CBTxt::P( 'Enable or disable the creation of [groups] in this [category]. Moderators and [owner] are exempt from this configuration and can always create [groups].', array( '[category]' => cbgjClass::getOverride( 'category' ), '[owner]' => cbgjClass::getOverride( 'owner' ), '[groups]' => cbgjClass::getOverride( 'group', true ) ) ) ) . '</span>' . '</div>' . '</div>'; } if ( $plugin->params->get( 'category_createaccess_config', 1 ) || cbgjClass::hasAccess( 'usr_mod', $authorized ) ) { $return .= '<div class="gjEditContentInput control-group">' . '<label class="gjEditContentInputTitle control-label">' . CBTxt::Th( 'Create Access' ) . '</label>' . '<div class="gjEditContentInputField controls">' . $input['create_access'] . '<span class="gjEditContentInputIcon help-inline">' . cbgjClass::getIcon( CBTxt::P( 'Select [group] create access. Create access determines who can create [groups] in this [category]. The group selected as well as those above it will have access (e.g. Registered will also be accessible to Author). Moderators and [owner] are exempt from this configuration and can always create [groups].', array( '[category]' => cbgjClass::getOverride( 'category' ), '[owner]' => cbgjClass::getOverride( 'owner' ), '[group]' => cbgjClass::getOverride( 'group' ), '[groups]' => cbgjClass::getOverride( 'group', true ) ) ) ) . '</span>' . '</div>' . '</div>'; } } if ( cbgjClass::hasAccess( 'cat_nested', $authorized ) ) { if ( $plugin->params->get( 'category_nested_config', 1 ) || cbgjClass::hasAccess( 'usr_mod', $authorized ) ) { $return .= '<div class="gjEditContentInput control-group">' . '<label class="gjEditContentInputTitle control-label">' . CBTxt::Th( 'Nested' ) . '</label>' . '<div class="gjEditContentInputField controls">' . $input['nested'] . '<span class="gjEditContentInputIcon help-inline">' . cbgjClass::getIcon( CBTxt::P( 'Enable or disable the creation of [categories] in this [category]. Moderators and [owner] are exempt from this configuration and can always create [categories].', array( '[category]' => cbgjClass::getOverride( 'category' ), '[categories]' => cbgjClass::getOverride( 'category', true ), '[owner]' => cbgjClass::getOverride( 'owner' ) ) ) ) . '</span>' . '</div>' . '</div>'; } if ( $plugin->params->get( 'category_nestedaccess_config', 1 ) || cbgjClass::hasAccess( 'usr_mod', $authorized ) ) { $return .= '<div class="gjEditContentInput control-group">' . '<label class="gjEditContentInputTitle control-label">' . CBTxt::Th( 'Nested Access' ) . '</label>' . '<div class="gjEditContentInputField controls">' . $input['nested_access'] . '<span class="gjEditContentInputIcon help-inline">' . cbgjClass::getIcon( CBTxt::P( 'Select [categories] create access. Create access determines who can create [categories] in this [category]. The group selected as well as those above it will have access (e.g. Registered will also be accessible to Author). Moderators and [owner] are exempt from this configuration and can always create [categories].', array( '[category]' => cbgjClass::getOverride( 'category' ), '[categories]' => cbgjClass::getOverride( 'category', true ), '[owner]' => cbgjClass::getOverride( 'owner' ) ) ) ) . '</span>' . '</div>' . '</div>'; } } if ( cbgjClass::hasAccess( 'usr_mod', $authorized ) ) { $return .= '<div class="gjEditContentInput control-group">' . '<label class="gjEditContentInputTitle control-label">' . cbgjClass::getOverride( 'owner' ) . '</label>' . '<div class="gjEditContentInputField controls">' . $input['owner'] . '<span class="gjEditContentInputIcon help-inline">' . cbgjClass::getIcon( null, CBTxt::T( 'Required' ), 'icon-star' ) . cbgjClass::getIcon( CBTxt::P( 'Input [category] [owner]. [category] [owner] determines the creator of the [category] specified as User ID.', array( '[category]' => cbgjClass::getOverride( 'category' ), '[owner]' => cbgjClass::getOverride( 'owner' ) ) ) ) . '</span>' . '</div>' . '</div>'; } if ( $onEdit ) { $return .= '<div class="gjEditContentInput control-group">' . '<label class="gjEditContentInputTitle control-label">' . CBTxt::Th( 'Integrations' ) . '</label>' . '<div class="gjEditContentInputField controls">' . $tabs->startPane( 'gjIntegrationsTabs' ) . $onEdit . $tabs->endPane() . '</div>' . '</div>'; } if ( $input['captcha'] !== false ) { $return .= '<div class="gjEditContentInput control-group">' . '<label class="gjEditContentInputTitle control-label">' . CBTxt::Th( 'Captcha' ) . '</label>' . '<div class="gjEditContentInputField controls">' . '<div style="margin-bottom: 5px;">' . $input['captcha']['code'] . '</div>' . '<div>' . $input['captcha']['input'] . '</div>' . '<span class="gjEditContentInputIcon help-inline">' . cbgjClass::getIcon( null, CBTxt::T( 'Required' ), 'icon-star' ) . '</span>' . '</div>' . '</div>'; } $return .= '<div class="gjButtonWrapper form-actions">' . '<input type="submit" value="' . htmlspecialchars( ( $row->get( 'id' ) ? CBTxt::P( 'Update [category]', array( '[category]' => cbgjClass::getOverride( 'category' ) ) ) : CBTxt::P( 'Create [category]', array( '[category]' => cbgjClass::getOverride( 'category' ) ) ) ) ) . '" class="gjButton gjButtonSubmit btn btn-primary" /> ' . '<input type="button" value="' . htmlspecialchars( CBTxt::T( 'Cancel' ) ) . '" class="gjButton gjButtonCancel btn btn-mini" onclick="' . cbgjClass::getPluginURL( ( $row->get( 'id' ) ? array( 'categories', 'show', (int) $row->get( 'id' ) ) : ( $row->get( 'parent' ) ? array( 'categories', 'show', (int) $row->get( 'parent' ) ) : array( 'overview' ) ) ), CBTxt::T( 'Are you sure you want to cancel? All unsaved data will be lost!' ), true, false, null, false, false, true ) . '" />' . '</div>' . cbGetSpoofInputTag( 'plugin' ) . '</form>' . '</div>'; echo $return; }
function manageConnections($userid) { global $_CB_framework, $ueConfig; if(!$ueConfig['allowConnections']) { echo _UE_FUNCTIONALITY_DISABLED; return; } if ( $_CB_framework->myId() != $userid || $_CB_framework->myId() == 0) { cbNotAuth(); return; } $cbCon = new cbConnection( $userid ); $connections = $cbCon->getActiveConnections( $userid ); $tabs = new cbTabs( 0, $_CB_framework->getUi() ); $tabs->element = ''; $pagingParams = $tabs->_getPaging( array(), array( 'connections_' ) ); $perpage = 20; //TBD unhardcode and get the code below better $total = $cbCon->getConnectionsCount( $userid, true ); if ( $pagingParams["connections_limitstart"] === null ) { $pagingParams["connections_limitstart"] = 0; } if ( $pagingParams["connections_limitstart"] > $total ) { $pagingParams["connections_limitstart"] = 0; } $offset = ( $pagingParams["connections_limitstart"] ? (int) $pagingParams["connections_limitstart"] : 0 ); $connections = $cbCon->getActiveConnections( $userid, $offset, $perpage ); $actions = $cbCon->getPendingConnections( $userid ); $connecteds = $cbCon->getConnectedToMe( $userid ); HTML_comprofiler::manageConnections( $connections, $actions, $total, $tabs, $pagingParams, $perpage, $connecteds ); }
static function showConfig( &$ueConfig, &$lists, $option ) { global $_CB_framework; HTML_comprofiler::secureAboveForm('showConfig'); outputCbTemplate(2); outputCbJs(2); global $_CB_Backend_Title; $_CB_Backend_Title = array( 0 => array( 'cbicon-48-settings', htmlspecialchars( "CB " . _UE_REG_CONFIGURATION_MANAGER ) ) ); HTML_comprofiler::_overideWebFxLayout(); ?> <div style="width:95%;text-align:center;margin-bottom:15px;"> <div style="width:88%;margin:auto;text-align:left;"> <?php update_checker(); ?> </div> </div> <form action="<?php echo $_CB_framework->backendUrl( 'index.php' ); ?>" method="post" name="adminForm"> <table cellspacing='0' cellpadding='4' border='0' width='100%'><tr><td width='100%'> <?php $tabs = new cbTabs( 0,2 ); ?> <?php echo $tabs->startPane( "CB" ); echo $tabs->startTab("CB",_UE_GENERAL,"tab1"); ?> <table cellpadding="4" cellspacing="0" border="0" width="95%" class="adminform"> <tr align="center" valign="middle"> <th width="20%"> </th> <th width="20%"><?php echo _UE_CURRENT_SETTINGS ?></th> <th width="60%"><?php echo _UE_EXPLANATION ?></th> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_NAME_STYLE ?></td> <td align="left" valign="top"><?php echo $lists['name_style']; ?></td> <td align="left" valign="top"><?php echo _UE_NAME_STYLE_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_NAME_FORMAT ?></td> <td align="left" valign="top"><?php echo $lists['name_format']; ?></td> <td align="left" valign="top"><?php echo _UE_NAME_FORMAT_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_DATE_FORMAT ?></td> <td align="left" valign="top"><?php echo $lists['date_format']; ?></td> <td align="left" valign="top"><?php echo _UE_DATE_FORMAT_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_CALENDAR_TYPE ?></td> <td align="left" valign="top"><?php echo $lists['calendar_type']; ?></td> <td align="left" valign="top"><?php echo _UE_CALENDAR_TYPE_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_ALLOW_EMAIL_DISPLAY ?></td> <td align="left" valign="top"><?php echo $lists['allow_email_display']; ?></td> <td align="left" valign="top"><?php echo _UE_ALLOW_EMAIL_DISPLAY_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_ALLOW_EMAIL_REPLYTO ?></td> <td align="left" valign="top"><?php echo $lists['allow_email_replyto']; ?></td> <td align="left" valign="top"><?php echo _UE_ALLOW_EMAIL_REPLYTO_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_ALLOW_EMAIL ?></td> <td align="left" valign="top"><?php echo $lists['allow_email']; ?></td> <td align="left" valign="top"><?php echo _UE_ALLOW_EMAIL_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_ALLOW_WEBSITE ?></td> <td align="left" valign="top"><?php echo $lists['allow_website']; ?></td> <td align="left" valign="top"><?php echo _UE_ALLOW_WEBSITE_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_ALLOW_ONLINESTATUS ?></td> <td align="left" valign="top"><?php echo $lists['allow_onlinestatus']; ?></td> <td align="left" valign="top"><?php echo _UE_ALLOW_ONLINESTATUS_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_ICONS_DISPLAY ?></td> <td align="left" valign="top"><?php echo $lists['icons_display']; ?></td> <td align="left" valign="top"><?php echo _UE_ICONS_DISPLAY_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_LOGIN_TYPE ?></td> <td align="left" valign="top"><?php echo $lists['login_type']; ?></td> <td align="left" valign="top"><?php echo _UE_LOGIN_TYPE_DESC ?></td> </tr> <tr align="center" valign="middle"> <th colspan="3"> </th> </tr> </table> <?php echo $tabs->endTab(); echo $tabs->startTab("CB",_UE_REGISTRATION,"tab2"); ?> <table cellpadding="4" cellspacing="0" border="0" width="95%" class="adminform"> <tr align="center" valign="middle"> <th width="20%"> </th> <th width="20%"><?php echo _UE_CURRENT_SETTINGS ?></th> <th width="60%"><?php echo _UE_EXPLANATION ?></th> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_REG_CB_ALLOW ?></td> <td align="left" valign="top"><?php echo $lists['admin_allowcbregistration']; ?></td> <td align="left" valign="top"><?php echo _UE_REG_CB_ALLOW_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_REG_CB_EMAILPASS ?></td> <td align="left" valign="top"><?php echo $lists['emailpass']; ?></td> <td align="left" valign="top"><?php echo _UE_REG_CB_EMAILPASS_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_REG_ADMIN_APPROVAL ?></td> <td align="left" valign="top"><?php echo $lists['admin_approval']; ?></td> <td align="left" valign="top"><?php echo _UE_REG_ADMIN_APPROVAL_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_REG_CONFIRMATION ?></td> <td align="left" valign="top"><?php echo $lists['confirmation']; ?></td> <td align="left" valign="top"><?php echo _UE_REG_CONFIRMATION_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_REG_USERNAMECHECKER ?></td> <td align="left" valign="top"><?php echo $lists['reg_username_checker']; ?></td> <td align="left" valign="top"><?php echo _UE_REG_USERNAMECHECKER_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_REG_EMAILCHECKER ?></td> <td align="left" valign="top"><?php echo $lists['reg_email_checker']; ?></td> <td align="left" valign="top"><?php if ( ! function_exists( 'getmxrr' ) ) { echo _UE_REG_EMAILCHECKER_WARNING . ' --- '; } echo _UE_REG_EMAILCHECKER_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_REG_UNIQUEEMAIL ?></td> <td align="left" valign="top"><?php echo $_CB_framework->getCfg( 'uniquemail') ? _UE_YES : _UE_NO; ?></td> <td align="left" valign="top"><?php echo _UE_REG_UNIQUEEMAIL_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_REG_SHOW_LOGIN_ON_PAGE ?></td> <td align="left" valign="top"><?php echo $lists['reg_show_login_on_page']; ?></td> <td align="left" valign="top"><?php echo _UE_REG_SHOW_LOGIN_ON_PAGE_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_REG_EMAIL_NAME ?></td> <td align="left" valign="top"><input type="text" name="cfg_reg_email_name" value="<?php echo htmlspecialchars(stripslashes($ueConfig['reg_email_name'])); ?>" /></td> <td align="left" valign="top"><?php echo _UE_REG_EMAIL_NAME_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_REG_EMAIL_FROM ?></td> <td align="left" valign="top"><input type="text" name="cfg_reg_email_from" value="<?php echo htmlspecialchars($ueConfig['reg_email_from']); ?>" /></td> <td align="left" valign="top"><?php echo _UE_REG_EMAIL_FROM_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_REG_EMAIL_REPLYTO ?></td> <td align="left" valign="top"><input type="text" name="cfg_reg_email_replyto" value="<?php echo htmlspecialchars($ueConfig['reg_email_replyto']); ?>" /></td> <td align="left" valign="top"><?php echo _UE_REG_EMAIL_REPLYTO_DESC ?></td> </tr> <tr align="left" valign="middle"> <td align="left" valign="top"></td> <td align="left" valign="top" colspan="2"><?php echo _UE_REG_EMAIL_TAGS; ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_REG_PEND_APPR_SUB ?></td> <td align="left" valign="top"><input type="text" name="cfg_reg_pend_appr_sub" size="50" value="<?php echo htmlspecialchars(stripslashes($ueConfig['reg_pend_appr_sub'])); ?>" /></td> <td align="left" valign="top"><?php echo _UE_REG_PEND_APPR_SUB_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_REG_PEND_APPR_MSG ?></td> <td align="left" valign="top" colspan=2><textarea name="cfg_reg_pend_appr_msg" cols=50 rows=6><?php echo htmlspecialchars(stripslashes($ueConfig['reg_pend_appr_msg'])); ?></textarea></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_REG_WELCOME_SUB ?></td> <td align="left" valign="top"><input type="text" name="cfg_reg_welcome_sub" size="50" value="<?php echo htmlspecialchars(stripslashes($ueConfig['reg_welcome_sub'])); ?>" /></td> <td align="left" valign="top"><?php echo _UE_REG_WELCOME_SUB_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_REG_WELCOME_MSG ?></td> <td align="left" valign="top" colspan=2><textarea name="cfg_reg_welcome_msg" cols=50 rows=6><?php echo htmlspecialchars(stripslashes($ueConfig['reg_welcome_msg'])); ?></textarea></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_REG_SHOW_ICONS_EXPLAIN ?></td> <td align="left" valign="top"><?php echo $lists['reg_show_icons_explain']; ?></td> <td align="left" valign="top"><?php echo _UE_REG_SHOW_ICONS_EXPLAIN_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_REG_INTRO_MSG ?></td> <td align="left" valign="top"><textarea name="cfg_reg_intro_msg" cols=50 rows=6><?php echo htmlspecialchars(stripslashes($ueConfig['reg_intro_msg'])); ?></textarea></td> <td align="left" valign="top"><?php echo _UE_REG_INTRO_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_REG_CONCLUSION_MSG ?></td> <td align="left" valign="top"><textarea name="cfg_reg_conclusion_msg" cols=50 rows=6><?php echo htmlspecialchars(stripslashes($ueConfig['reg_conclusion_msg'])); ?></textarea></td> <td align="left" valign="top"><?php echo _UE_REG_CONCLUSION_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_REG_TOC_MSG ?></td> <td align="left" valign="top"><?php echo $lists['reg_enable_toc']; ?></td> <td align="left" valign="top"><?php echo _UE_REG_TOC_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_REG_TOC_URL_MSG ?></td> <td align="left" valign="top"><input type="text" size="50" name="cfg_reg_toc_url" value="<?php echo htmlspecialchars($ueConfig['reg_toc_url']); ?>" /></td> <td align="left" valign="top"><?php echo _UE_REG_TOC_URL_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_REG_FIRST_VISIT_URL_MSG ?></td> <td align="left" valign="top"><input type="text" size="50" name="cfg_reg_first_visit_url" value="<?php echo htmlspecialchars($ueConfig['reg_first_visit_url']); ?>" /></td> <td align="left" valign="top"><?php echo _UE_REG_FIRST_VISIT_URL_DESC ?></td> </tr> <tr align="center" valign="middle"> <th colspan="3"> </th> </tr> </table> <?php echo $tabs->endTab(); echo $tabs->startTab("CB",_UE_USERLIST,"tab3"); ?> <table cellpadding="4" cellspacing="0" border="0" width="95%" class="adminform"> <tr align="center" valign="middle"> <th width="20%"> </th> <th width="20%"><?php echo _UE_CURRENT_SETTINGS ?></th> <th width="60%"><?php echo _UE_EXPLANATION ?></th> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_NUM_PER_PAGE ?></td> <td align="left" valign="top"><input type="text" name="cfg_num_per_page" value="<?php echo htmlspecialchars($ueConfig['num_per_page']); ?>" /></td> <td align="left" valign="top"><?php echo _UE_NUM_PER_PAGE_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_ALLOW_PROFILELINK ?></td> <td align="left" valign="top"><?php echo $lists['allow_profilelink']; ?></td> <td align="left" valign="top"><?php echo _UE_ALLOW_PROFILELINK_DESC ?></td> </tr> <tr align="center" valign="middle"> <th colspan="3"> </th> </tr> </table> <?php echo $tabs->endTab(); echo $tabs->startTab("CB",_UE_USERPROFILE,"tab4"); ?> <table cellpadding="4" cellspacing="0" border="0" width="95%" class="adminform"> <tr align="center" valign="middle"> <th width="20%"> </th> <th width="20%"><?php echo _UE_CURRENT_SETTINGS ?></th> <th width="60%"><?php echo _UE_EXPLANATION ?></th> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_USERNAME ?></td> <td align="left" valign="top"><?php echo $lists['usernameedit']; ?></td> <td align="left" valign="top"><?php echo _UE_USERNAME_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_ADMINREQUIREDFIELDS ?></td> <td align="left" valign="top"><?php echo $lists['adminrequiredfields']; ?></td> <td align="left" valign="top"><?php echo _UE_ADMINREQUIREDFIELDS_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_ALLOW_PROFILEVIEWBY ?></td> <td align="left" valign="top"><?php echo $lists['allow_profileviewbyGID']; ?></td> <td align="left" valign="top"><?php echo _UE_ALLOW_PROFILEVIEWBY_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_MINHITSINTV ?></td> <td align="left" valign="top"><input type="text" name="cfg_minHitsInterval" value="<?php echo htmlspecialchars($ueConfig['minHitsInterval']);?>" /></td> <td align="left" valign="top"><?php echo _UE_MINHITSINTV_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_TEMPLATEDIR ?></td> <td align="left" valign="top"><?php echo $lists['templatedir']; ?></td> <td align="left" valign="top"><?php echo _UE_TEMPLATEDIR_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_REG_PROFILE_2COLS ?></td> <td align="left" valign="top"><?php echo _UE_LEFT ?>: <input type="text" size="2" name="cfg_left2colsWidth" value="<?php echo htmlspecialchars($ueConfig['left2colsWidth']);?>" /> % <?php echo _UE_REG_PROFILE_2COLS_RIGHT_REST ?></td> <td align="left" valign="top"><?php echo _UE_REG_PROFILE_2COLS_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_REG_PROFILE_3COLS ?></td> <td align="left" valign="top"><?php echo _UE_LEFT ?>: <input type="text" size="2" name="cfg_left3colsWidth" value="<?php echo htmlspecialchars($ueConfig['left3colsWidth']);?>" /> % <?php echo _UE_RIGHT ?>: <input type="text" size="2" name="cfg_right3colsWidth" value="<?php echo htmlspecialchars($ueConfig['right3colsWidth']);?>" /> %</td> <td align="left" valign="top"><?php echo _UE_REG_PROFILE_3COLS_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_SHOWEMPTYTABS ?></td> <td align="left" valign="top"><?php echo $lists['showEmptyTabs']; ?></td> <td align="left" valign="top"><?php echo _UE_SHOWEMPTYTABS_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_SHOWEMPTYFIELDS ?></td> <td align="left" valign="top"><?php echo $lists['showEmptyFields']; ?></td> <td align="left" valign="top"><?php echo _UE_SHOWEMPTYFIELDS_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_EMPTYFIELDSTEXT ?></td> <td align="left" valign="top"><input type="text" name="cfg_emptyFieldsText" value="<?php echo htmlspecialchars( isset( $ueConfig['emptyFieldsText'] ) ? $ueConfig['emptyFieldsText'] : '-' );?>" /></td> <td align="left" valign="top"><?php echo _UE_EMPTYFIELDSTEXT_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_NESTTABS ?></td> <td align="left" valign="top"><?php echo $lists['nesttabs']; ?></td> <td align="left" valign="top"><?php echo _UE_NESTTABS_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_XHTMLCOMPLY ?></td> <td align="left" valign="top"><?php echo $lists['xhtmlComply']; ?></td> <td align="left" valign="top"><?php echo _UE_XHTMLCOMPLY_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_FRONTENDUSERPARAMS ?></td> <td align="left" valign="top"><?php echo $lists['frontend_userparams']; ?></td> <td align="left" valign="top"><?php echo _UE_FRONTENDUSERPARAMS_DESC ?></td> </tr> <?php if ( isset( $ueConfig['frontend_userparams'] ) ) { if ( ( $ueConfig['frontend_userparams'] == 1 ) !== in_array( $_CB_framework->getCfg( "frontend_userparams" ), array( '1', null) ) ) { //TBD in CB 1.3: move those in language strings: ?> <tr align="center" valign="middle"> <td align="left" valign="top"> </td> <td align="left" valign="top"><div class="cbSmallWarning"><?php echo htmlspecialchars( CBTxt::T('WARNING: different from the CMS setting !') ); ?></div></td> <td align="left" valign="top"><?php echo htmlspecialchars( CBTxt::T('This may be ok, but this warning is just to make you aware of the difference.') ); ?></td> </tr> <?php } } ?> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo CBTxt::Th("Use new div or old table based views") ?></td> <td align="left" valign="top"><?php echo $lists['use_divs']; ?></td> <td align="left" valign="top"><?php echo CBTxt::Th("Choose table for compatibility with old templates and div for table-less output.") ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_REG_FILTER_ALLOWED_TAGS ?></td> <td align="left" valign="top"><input type="text" name="cfg_html_filter_allowed_tags" value="<?php echo htmlspecialchars($ueConfig['html_filter_allowed_tags']);?>" /></td> <td align="left" valign="top"><?php echo _UE_REG_FILTER_ALLOWED_TAGS_DESC . '<br />' . $lists['_filteredbydefault']; ?></td> </tr> <tr align="center" valign="middle"> <th colspan="3"> </th> </tr> </table> <?php echo $tabs->endTab(); $imgToolBox = new imgToolBox(); if ( $ueConfig['im_path'] ) { $imgToolBox->_IM_path = $ueConfig['im_path']; } if ( $ueConfig['netpbm_path'] ) { $imgToolBox->_NETPBM_path = $ueConfig['netpbm_path']; } $imageLibs = $imgToolBox->getImageLibs(); echo $tabs->startTab("CB",_UE_AVATARS,"tab5"); ?> <table cellpadding="4" cellspacing="0" border="0" width="95%" class="adminform"> <tr align="center" valign="middle"> <th width="20%"> </th> <th width="20%"><?php echo _UE_CURRENT_SETTINGS ?></th> <th width="60%"><?php echo _UE_EXPLANATION ?></th> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_IMPATH;?></td> <td align="left" valign="top"> <input type="text" name="cfg_im_path" value="<?php echo ($ueConfig['im_path'] == '') ? 'auto' : htmlspecialchars($ueConfig['im_path']);?>" size="40" > </td> <td align="left" valign="top"> <?php echo _UE_IMPATH_DESC;?> </td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_NETPBMPATH;?></td> <td align="left" valign="top"> <input type="text" name="cfg_netpbm_path" value="<?php echo ($ueConfig['netpbm_path'] == '') ? 'auto' : htmlspecialchars($ueConfig['netpbm_path']);?>" size="40" > </td> <td align="left" valign="top"> <?php echo _UE_NETPBMPATH_DESC;?> </td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"> <?php echo _UE_CONVERSIONTYPE;?> </td> <td align="left" valign="top"> <?php echo $lists['conversiontype']; ?> </td> <td align="left" valign="top"> <a href="http://www.imagemagick.org" target=_blank><?php echo htmlspecialchars( CBTxt::T('ImageMagick') ); ?></a> <?php if(array_key_exists('imagemagick',$imageLibs)) echo '<strong><font color="green">'._UE_AUTODET.' '.$imageLibs['imagemagick'].'</font></strong>'; else echo '<strong><font color="red">' . _UE_ERROR_NOTINSTALLED . '</font></strong>'; ?> <br /> <a href="http://sourceforge.net/projects/netpbm" target=_blank><?php echo htmlspecialchars( CBTxt::T('NetPBM') ); ?></a> <?php if(array_key_exists('netpbm',$imageLibs)) echo '<strong><font color="green">'._UE_AUTODET.' '.$imageLibs['netpbm'].'</font></strong>'; else echo '<strong><font color="red">' . _UE_ERROR_NOTINSTALLED . '</font></strong>'; ?> <br /> <?php echo htmlspecialchars( CBTxt::T('GD1 library') ); ?> <?php if(array_key_exists('gd1',$imageLibs['gd'])) echo ' <strong><font color="green">'._UE_AUTODET.', '.$imageLibs['gd']['gd1'].'</font></strong>'; else echo '<strong><font color="red">' . _UE_ERROR_NOTINSTALLED . '</font></strong>'; ?> <br /> <?php echo htmlspecialchars( CBTxt::T('GD2 library') ); ?> <?php if(array_key_exists('gd2',$imageLibs['gd'])) echo ' <strong><font color="green">'._UE_AUTODET.', '.$imageLibs['gd']['gd2'].'</font></strong>'; else echo '<strong><font color="red">' . _UE_ERROR_NOTINSTALLED . '</font></strong>'; ?> </td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_AVATAR ?></td> <td align="left" valign="top"><?php echo $lists['allowAvatar']; ?></td> <td align="left" valign="top"><?php echo _UE_AVATAR_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_AVATARUPLOAD ?></td> <td align="left" valign="top"><?php echo $lists['allowAvatarUpload']; ?></td> <td align="left" valign="top"><?php echo _UE_AVATARUPLOAD_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_ALWAYSRESAMPLEUPLOADS ?></td> <td align="left" valign="top"><?php echo $lists['avatarResizeAlways']; ?></td> <td align="left" valign="top"><?php echo _UE_ALWAYSRESAMPLEUPLOADS_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_AVATARGALLERY ?></td> <td align="left" valign="top"><?php echo $lists['allowAvatarGallery']; ?></td> <td align="left" valign="top"><?php echo _UE_AVATARGALLERY_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_AVHEIGHT ?></td> <td align="left" valign="top"><input type="text" name="cfg_avatarHeight" value="<?php echo htmlspecialchars($ueConfig['avatarHeight']);?>" /></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_AVWIDTH ?></td> <td align="left" valign="top"><input type="text" name="cfg_avatarWidth" value="<?php echo htmlspecialchars($ueConfig['avatarWidth']);?>" /></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_AVSIZE ?></td> <td align="left" valign="top"><input type="text" name="cfg_avatarSize" value="<?php echo htmlspecialchars($ueConfig['avatarSize']);?>" /></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_TNHEIGHT ?></td> <td align="left" valign="top"><input type="text" name="cfg_thumbHeight" value="<?php echo htmlspecialchars($ueConfig['thumbHeight']);?>" /></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_TNWIDTH ?></td> <td align="left" valign="top"><input type="text" name="cfg_thumbWidth" value="<?php echo htmlspecialchars($ueConfig['thumbWidth']);?>" /></td> </tr> <tr align="center" valign="middle"> <th colspan="3"> </th> </tr> </table> <?php echo $tabs->endTab(); echo $tabs->startTab("CB",_UE_MODERATE,"tab6"); ?> <table cellpadding="4" cellspacing="0" border="0" width="95%" class="adminform"> <tr align="center" valign="middle"> <th width="20%"> </th> <th width="20%"><?php echo _UE_CURRENT_SETTINGS ?></th> <th width="60%"><?php echo _UE_EXPLANATION ?></th> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_AVATARUPLOADAPPROVALGROUP ?></td> <td align="left" valign="top"><?php echo $lists['imageApproverGid']; ?></td> <td align="left" valign="top"><?php echo _UE_AVATARUPLOADAPPROVALGROUP_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_MODERATORUSERAPPOVAL ?></td> <td align="left" valign="top"><?php echo $lists['allowModUserApproval']; ?></td> <td align="left" valign="top"><?php echo _UE_MODERATORUSERAPPOVAL_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_MODERATOREMAIL ?></td> <td align="left" valign="top"><?php echo $lists['moderatorEmail']; ?></td> <td align="left" valign="top"><?php echo _UE_MODERATOREMAIL_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_ALLOWUSERREPORTS ?></td> <td align="left" valign="top"><?php echo $lists['allowUserReports']; ?></td> <td align="left" valign="top"><?php echo _UE_ALLOWUSERREPORTS_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_AVATARUPLOADAPPROVAL ?></td> <td align="left" valign="top"><?php echo $lists['avatarUploadApproval']; ?></td> <td align="left" valign="top"><?php echo _UE_AVATARUPLOADAPPROVAL_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_ALLOWMODERATORSUSEREDIT ?></td> <td align="left" valign="top"><?php echo $lists['allowModeratorsUserEdit']; ?></td> <td align="left" valign="top"><?php echo _UE_ALLOWMODERATORSUSEREDIT_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_ALLOWUSERPROFILEBANNING ?></td> <td align="left" valign="top"><?php echo $lists['allowUserBanning']; ?></td> <td align="left" valign="top"><?php echo _UE_ALLOWUSERPROFILEBANNING_DESC ?></td> </tr> <tr align="center" valign="middle"> <th colspan="3"> </th> </tr> </table> <?php echo $tabs->endTab(); echo $tabs->startTab("CB",_UE_CONNECTION,"tab7"); ?> <table cellpadding="4" cellspacing="0" border="0" width="95%" class="adminform"> <tr align="center" valign="middle"> <th width="20%"> </th> <th width="20%"><?php echo _UE_CURRENT_SETTINGS ?></th> <th width="60%"><?php echo _UE_EXPLANATION ?></th> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_ALLOWCONNECTIONS ?></td> <td align="left" valign="top"><?php echo $lists['allowConnections']; ?></td> <td align="left" valign="top"><?php echo _UE_ALLOWCONNECTIONS_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_CONNECTIONDISPLAY ?></td> <td align="left" valign="top"><?php echo $lists['connectionDisplay']; ?></td> <td align="left" valign="top"><?php echo _UE_CONNECTIONDISPLAY_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_CONNECTIONPATH ?></td> <td align="left" valign="top"><?php echo $lists['connectionPath']; ?></td> <td align="left" valign="top"><?php echo _UE_CONNECTIONPATH_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_USEMUTUALCONNECTIONACCEPTANCE ?></td> <td align="left" valign="top"><?php echo $lists['useMutualConnections']; ?></td> <td align="left" valign="top"><?php echo _UE_USEMUTUALCONNECTIONACCEPTANCE_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_CONNECTOINNOTIFYTYPE ?></td> <td align="left" valign="top"><?php echo $lists['conNotifyTypes']; ?></td> <td align="left" valign="top"><?php echo _UE_CONNECTOINNOTIFYTYPE_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_AUTOADDCONNECTIONS ?></td> <td align="left" valign="top"><?php echo $lists['autoAddConnections']; ?></td> <td align="left" valign="top"><?php echo _UE_AUTOADDCONNECTIONS_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_CONNECTIONCATEGORIES ?></td> <td align="left" valign="top" ><textarea name="cfg_connection_categories" cols=25 rows=6><?php echo htmlspecialchars($ueConfig['connection_categories']); ?></textarea></td> <td align="left" valign="top"><?php echo _UE_CONNECTIONCATEGORIES_DESC ?></td> </tr> <tr align="center" valign="middle"> <th colspan="3"> </th> </tr> </table> <?php echo $tabs->endTab(); echo $tabs->startTab("CB",_UE_INTEGRATION,"tab8"); ?> <table cellpadding="4" cellspacing="0" border="0" width="95%" class="adminform"> <tr align="center" valign="middle"> <th width="20%"> </th> <th width="20%"><?php echo _UE_CURRENT_SETTINGS ?></th> <th width="60%"><?php echo _UE_EXPLANATION ?></th> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo CBTxt::Th('Translations highlighting') ?></td> <td align="left" valign="top"><?php echo $lists['translations_debug']; ?></td> <td align="left" valign="top"><?php echo CBTxt::Th('Here you can highlight and debug your translations in various ways.') ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_ENABLESPOOFCHECK ?></td> <td align="left" valign="top"><?php echo $lists['enableSpoofCheck']; ?></td> <td align="left" valign="top"><?php echo _UE_ENABLESPOOFCHECK_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_NOVERSIONCHECK ?></td> <td align="left" valign="top"><?php echo $lists['noVersionCheck']; ?></td> <td align="left" valign="top"><?php echo _UE_NOVERSIONCHECK_DESC ?></td> </tr> <tr align="center" valign="middle"> <td align="left" valign="top"><?php echo _UE_REG_FURTHER_SETTINGS ?></td> <td align="left" valign="top"><?php echo _UE_REG_FURTHER_SETTINGS_MORE ?></td> <td align="left" valign="top"><?php echo _UE_REG_FURTHER_SETTINGS_DESC ?></td> </tr> <tr align="center" valign="middle"> <th colspan="3"> </th> </tr> </table> <?php echo $tabs->endTab(); echo $tabs->endPane(); ?> </td></tr></table> <input type="hidden" name="task" value="" /> <input type="hidden" name="option" value="<?php echo $option; ?>" /> <input type="hidden" name="cfg_version" value="<?php echo $ueConfig['version']; ?>" /> <?php echo cbGetSpoofInputTag( 'config' ); ?> </form> <?php // flush(); // ob_flush(); ?> <div style="align:center;"> <p><?php echo _UE_BY; // Note: the line below is not translated on purpose as it is part of the copyright notice subject to the GPL: ?> <a href="http://www.joomlapolis.com" target="_blank">Community Builder Team of Joomlapolis</a> <br /> <font class="small"><?php echo _UE_VERSION ?>: <?php echo $ueConfig['version']; ?></font> <?php // update_checker(); ?> </p> </div> <?php }
static function manageConnections($connections, $actions, $total, &$connMgmtTabs, &$pagingParams, $perpage, $connecteds = null) { global $_CB_framework, $ueConfig, $_REQUEST; $Itemid = $_CB_framework->itemid(); $ui = 1; outputCbTemplate($ui); initToolTip(1); ob_start(); ?> var tabPanemyCon; function showCBTabPaneMy( sName ) { if (typeof tabPanemyCon != "undefined" ) { switch ( sName.toLowerCase() ) { case "<?php echo strtolower(_UE_MANAGEACTIONS); ?> ": case "manageactions": case "0": tabPanemyCon.setSelectedIndex( 0 ); break; case "<?php echo strtolower(_UE_MANAGECONNECTIONS); ?> ": case "manageconnections": case "1": tabPanemyCon.setSelectedIndex( 1 ); break; case "<?php echo strtolower(_UE_CONNECTEDWITH); ?> ": case "connectedfrom": case "2": tabPanemyCon.setSelectedIndex( 2 ); break; } } } <?php $cbjavascript = ob_get_contents(); ob_end_clean(); $_CB_framework->outputCbJQuery($cbjavascript); ob_start(); ?> function confirmSubmit() { if (confirm("<?php echo _UE_CONFIRMREMOVECONNECTION; ?> ")) return true ; else return false ; } <?php $cbjavascript = ob_get_contents(); ob_end_clean(); $_CB_framework->document->addHeadScriptDeclaration($cbjavascript); $tabs = new cbTabs(0, $ui); $cTypes = explode("\n", $ueConfig['connection_categories']); $connectionTypes = array(); foreach ($cTypes as $cType) { if (trim($cType) != null && trim($cType) != "") { $connectionTypes[] = moscomprofilerHTML::makeOption(trim($cType), getLangDefinition(trim($cType))); } } ?> <div class="contentheading"><?php echo _UE_MANAGECONNECTIONS; ?> </div><br /> <br /> <?php echo $tabs->startPane("myCon"); // Tab 0: Manange Actions: echo $tabs->startTab("myCon", _UE_MANAGEACTIONS . " (" . count($actions) . ")", "action"); if (!count($actions) > 0) { echo "\t\t<div class=\"tab_Description\">" . _UE_NOACTIONREQUIRED . "</div>\n"; } else { echo '<form method="post" action="' . cbSef('index.php?option=com_comprofiler&task=processConnectionActions' . ($Itemid ? "&Itemid=" . (int) $Itemid : "")) . '">'; echo "\t\t<div class=\"tab_Description\">" . _UE_CONNECT_ACTIONREQUIRED . "</div>\n"; // echo "<div style=\"width:100%;text-align:right;\"><input type=\"submit\" class=\"inputbox\" value=\""._UE_UPDATE."\" /></div>"; echo "<table cellpadding=\"5\" cellspacing=\"0\" border=\"0\" width=\"95%\">"; echo "<tr>"; echo "<td>"; foreach ($actions as $action) { $conAvatar = null; $conAvatar = getFieldValue('image', $action->avatar, $action); $onlineIMG = $ueConfig['allow_onlinestatus'] == 1 ? getFieldValue('status', $action->isOnline, $action, null, 1) : ""; $tipField = "<b>" . _UE_CONNECTIONREQUIREDON . "</b> : " . dateConverter($action->membersince, 'Y-m-d', $ueConfig['date_format']); if ($action->reason != null) { $tipField .= "<br /><b>" . _UE_CONNECTIONMESSAGE . "</b> :<br />" . htmlspecialchars($action->reason, ENT_QUOTES); } $tipTitle = _UE_CONNECTIONREQUESTDETAIL; $htmltext = $conAvatar; $style = "style=\"padding:5px;\""; $tooltip = cbFieldTip($ui, $tipField, $tipTitle, '250', '', $htmltext, '', $style, '', false); echo "<div class=\"connectionBox\">"; echo $onlineIMG . ' ' . getNameFormat($action->name, $action->username, $ueConfig['name_format']) . "<br />" . $tooltip . "<br /><img src=\"components/com_comprofiler/images/tick.png\" border=\"0\" alt=\"" . _UE_ACCEPTCONNECTION . "\" title=\"" . _UE_ACCEPTCONNECTION . "\" /><input type=\"radio\" value=\"a\" checked=\"checked\" name=\"" . $action->id . "action\"/> <img src=\"components/com_comprofiler/images/publish_x.png\" border=\"0\" alt=\"" . _UE_DECLINECONNECTION . "\" title=\"" . _UE_DECLINECONNECTION . "\" /><input type=\"radio\" value=\"d\" name=\"" . $action->id . "action\"/><input type=\"hidden\" name=\"uid[]\" value=\"" . $action->id . "\" />"; echo " </div>\n"; } echo "</td>"; echo "</tr>"; echo "</table>"; echo "<div style=\"width:100%;text-align:right;\"><input type=\"submit\" class=\"button\" value=\"" . _UE_UPDATE . "\" /></div>"; echo cbGetSpoofInputTag('manageConnections'); echo "</form>"; } echo $tabs->endTab(); // Tab 1: Manange Connections: echo $tabs->startTab("myCon", _UE_MANAGECONNECTIONS, "connections"); if (!count($connections) > 0) { echo "\t\t<div class=\"tab_Description\">" . _UE_NOCONNECTIONS . "</div>\n"; } else { ?> <form action='<?php echo cbSef('index.php?option=com_comprofiler&task=saveConnections' . ($Itemid ? "&Itemid=" . (int) $Itemid : "")); ?> ' method='post' name='userAdmin'> <div class="tab_Description"><?php echo _UE_CONNECT_MANAGECONNECTIONS; ?> </div> <table cellpadding="5" cellspacing="0" border="0" width="95%"> <thead><tr> <th style='text-align:center;'><?php echo _UE_CONNECTION; ?> </th> <th style='text-align:center;'><?php echo _UE_CONNECTIONTYPE; ?> </th> <th style='text-align:center;'><?php echo _UE_CONNECTIONCOMMENT; ?> </th> </tr></thead> <tbody> <?php $i = 1; foreach ($connections as $connection) { $k = explode('|*|', trim($connection->type)); $list = array(); $list['connectionType'] = moscomprofilerHTML::selectList($connectionTypes, $connection->id . 'connectiontype[]', 'class="inputbox" multiple="multiple" size="5"', 'value', 'text', $k, 0); $conAvatar = null; $conAvatar = getFieldValue('image', $connection->avatar, $connection); $emailIMG = getFieldValue('primaryemailaddress', $connection->email, $connection, null, 1); $pmIMG = getFieldValue('pm', $connection->username, $connection, null, 1); $onlineIMG = $ueConfig['allow_onlinestatus'] == 1 ? getFieldValue('status', $connection->isOnline, $connection, null, 1) : ""; if ($connection->accepted == 1 && $connection->pending == 1) { $actionIMG = "<img src=\"components/com_comprofiler/images/pending.png\" border=\"0\" alt=\"" . _UE_CONNECTIONPENDING . "\" title=\"" . _UE_CONNECTIONPENDING . "\" /> <a href=\"" . cbSef("index.php?option=com_comprofiler&act=connections&task=removeConnection&connectionid=" . $connection->memberid . ($Itemid ? "&Itemid=" . (int) $Itemid : "")) . "\" onclick=\"return confirmSubmit();\" ><img src=\"components/com_comprofiler/images/publish_x.png\" border=\"0\" alt=\"" . _UE_REMOVECONNECTION . "\" title=\"" . _UE_REMOVECONNECTION . "\" /></a>"; } elseif ($connection->accepted == 1 && $connection->pending == 0) { $actionIMG = "<a href=\"" . cbSef("index.php?option=com_comprofiler&act=connections&task=removeConnection&connectionid=" . $connection->memberid . ($Itemid ? "&Itemid=" . (int) $Itemid : "")) . "\" onclick=\"return confirmSubmit();\" ><img src=\"components/com_comprofiler/images/publish_x.png\" border=\"0\" alt=\"" . _UE_REMOVECONNECTION . "\" title=\"" . _UE_REMOVECONNECTION . "\" /></a>"; } elseif ($connection->accepted == 0) { $actionIMG = "<a href=\"" . cbSef("index.php?option=com_comprofiler&act=connections&task=acceptConnection&connectionid=" . $connection->memberid . ($Itemid ? "&Itemid=" . (int) $Itemid : "")) . "\"><img src=\"components/com_comprofiler/images/tick.png\" border=\"0\" alt=\"" . _UE_ACCEPTCONNECTION . "\" title=\"" . _UE_ACCEPTCONNECTION . "\" /></a> <a href=\"" . cbSef("index.php?option=com_comprofiler&act=connections&task=removeConnection&connectionid=" . $connection->memberid . ($Itemid ? "&Itemid=" . (int) $Itemid : "")) . "\"><img src=\"components/com_comprofiler/images/publish_x.png\" border=\"0\" alt=\"" . _UE_REMOVECONNECTION . "\" title=\"" . _UE_DECLINECONNECTION . "\" /></a>"; } $tipField = "<b>" . _UE_CONNECTEDSINCE . "</b> : " . dateConverter($connection->membersince, 'Y-m-d', $ueConfig['date_format']); if ($connection->type != null) { $tipField .= "<br /><b>" . _UE_CONNECTIONTYPE . "</b> : " . getConnectionTypes($connection->type); } if ($connection->description != null) { $tipField .= "<br /><b>" . _UE_CONNECTEDCOMMENT . "</b> : " . htmlspecialchars($connection->description); } $tipTitle = _UE_CONNECTEDDETAIL; $htmltext = $conAvatar; $style = "style=\"padding:5px;\""; $tooltip = cbFieldTip($ui, $tipField, $tipTitle, '200', '', $htmltext, '', $style, '', false); echo "\n<tr style='vertical-align:top;' class='sectiontableentry" . $i . "'>"; echo "\n\t<td style='text-align:center;'>" . $onlineIMG . ' ' . getNameFormat($connection->name, $connection->username, $ueConfig['name_format']) . "<br />" . $tooltip . "<br />" . $actionIMG . " <a href=\"" . cbSef("index.php?option=com_comprofiler&task=userProfile&user="******"&Itemid=" . (int) $Itemid : "")) . "\"><img src=\"components/com_comprofiler/images/profiles.gif\" border=\"0\" alt=\"" . _UE_VIEWPROFILE . "\" title=\"" . _UE_VIEWPROFILE . "\" /></a> " . $emailIMG . " " . $pmIMG . "</td>"; echo "\n\t<td style='text-align:center;'>" . $list['connectionType'] . "</td>"; echo "\n\t<td style='text-align:center;'><textarea cols=\"25\" class=\"inputbox\" rows=\"5\" name=\"" . $connection->id . "description\">" . htmlspecialchars($connection->description) . "</textarea><input type=\"hidden\" name=\"uid[]\" value=\"" . $connection->id . "\" /></td>"; echo "\n</tr>"; $i = $i == 1 ? 2 : 1; } echo "</tbody>"; echo "</table><br />"; if ($perpage < $total) { echo "<div style='width:95%;text-align:center;'>" . $connMgmtTabs->_writePaging($pagingParams, 'connections_', $perpage, $total, 'manageConnections') . "</div>"; } echo "<div style=\"width:100%;text-align:right;\"><input type=\"submit\" class=\"button\" value=\"" . _UE_UPDATE . "\" /></div>"; echo cbGetSpoofInputTag('manageConnections'); echo "</form>"; } echo $tabs->endTab(); // Tab 2: Users connected with me: if ($ueConfig['autoAddConnections'] == 0) { echo $tabs->startTab('myCon', _UE_CONNECTEDWITH, 'connected'); if (!count($connecteds) > 0) { echo _UE_NOCONNECTEDWITH; } else { // tooltip params: $width = '200'; $icon = ''; $href = ''; echo '<table cellpadding="5" cellspacing="0" border="0" width="95%">'; echo '<tr>'; echo '<td>'; foreach ($connecteds as $connected) { $conAvatar = null; $conAvatar = getFieldValue('image', $connected->avatar, $connected); $emailIMG = getFieldValue('primaryemailaddress', $connected->email, $connected, null, 1); $pmIMG = getFieldValue('pm', $connected->username, $connected, null, 1); $onlineIMG = $ueConfig['allow_onlinestatus'] == 1 ? getFieldValue('status', $connected->isOnline, $connected, null, 1) : ''; if ($connected->accepted == 1 && $connected->pending == 1) { $actionIMG = '<img src="components/com_comprofiler/images/pending.png" border="0" alt="' . _UE_CONNECTIONPENDING . '" title="' . _UE_CONNECTIONPENDING . '" /> ' . '<a href="' . cbSef('index.php?option=com_comprofiler&act=connections&task=denyConnection&connectionid=' . $connected->memberid . ($Itemid ? '&Itemid=' . (int) $Itemid : '')) . '" onclick="return confirmSubmit();">' . '<img src="components/com_comprofiler/images/publish_x.png" border="0" alt="' . _UE_REMOVECONNECTION . '" title="' . _UE_REMOVECONNECTION . '" /></a>'; } elseif ($connected->accepted == 1 && $connected->pending == 0) { $actionIMG = '<a href="' . cbSef('index.php?option=com_comprofiler&act=connections&task=denyConnection&connectionid=' . $connected->referenceid . ($Itemid ? '&Itemid=' . (int) $Itemid : '')) . '" onclick="return confirmSubmit();">' . '<img src="components/com_comprofiler/images/publish_x.png" border="0" alt="' . _UE_REMOVECONNECTION . '" title="' . _UE_REMOVECONNECTION . '" /></a>'; } elseif ($connected->accepted == 0) { $actionIMG = '<a href="' . cbSef('index.php?option=com_comprofiler&act=connections&task=acceptConnection&connectionid=' . $connected->referenceid . ($Itemid ? '&Itemid=' . (int) $Itemid : '')) . '">' . '<img src="components/com_comprofiler/images/tick.png" border="0" alt="' . _UE_ACCEPTCONNECTION . '" title="' . _UE_ACCEPTCONNECTION . '" /></a> ' . '<a href="' . cbSef('index.php?option=com_comprofiler&act=connections&task=denyConnection&connectionid=' . $connected->referenceid . ($Itemid ? '&Itemid=' . (int) $Itemid : '')) . '" onclick="return confirmSubmit();">' . '<img src="components/com_comprofiler/images/publish_x.png" border="0" alt="' . _UE_REMOVECONNECTION . '" title="' . _UE_DECLINECONNECTION . '" /></a>'; } $tipField = '<b>' . _UE_CONNECTEDSINCE . '</b> : ' . dateConverter($connected->membersince, 'Y-m-d', $ueConfig['date_format']); if (getLangDefinition($connected->type) != null) { $tipField .= '<br /><b>' . _UE_CONNECTIONTYPE . '</b> : ' . getLangDefinition($connected->type); } if ($connected->description != null) { $tipField .= '<br /><b>' . _UE_CONNECTEDCOMMENT . '</b> : ' . htmlspecialchars($connected->description); } $tipTitle = _UE_CONNECTEDDETAIL; $htmltext = $conAvatar; $style = 'style="padding:5px;"'; $tooltip = cbFieldTip($ui, $tipField, $tipTitle, $width, $icon, $htmltext, $href, $style, '', false); echo '<div class="connectionBox">'; echo $actionIMG . '<br />'; echo $tooltip . '<br />'; echo $onlineIMG . ' ' . getNameFormat($connected->name, $connected->username, $ueConfig['name_format']); echo '<br /><a href="' . cbSef('index.php?option=com_comprofiler&task=userProfile&user='******'&Itemid=' . (int) $Itemid : '')) . '"><img src="components/com_comprofiler/images/profiles.gif" border="0" alt="' . _UE_VIEWPROFILE . '" title="' . _UE_VIEWPROFILE . '" /></a> ' . $emailIMG . ' ' . $pmIMG . "\n"; echo " </div>\n"; } echo '</td>'; echo '</tr>'; echo '</table>'; } echo $tabs->endTab(); } echo $tabs->endPane(); if (isset($_REQUEST['tab'])) { $_CB_framework->outputCbJQuery("showCBTabPaneMy( '" . addslashes(urldecode(stripslashes(cbGetParam($_REQUEST, 'tab')))) . "' );"); } elseif (!(count($actions) > 0)) { $_CB_framework->outputCbJQuery("tabPanemyCon.setSelectedIndex( 1 );"); } echo '<div style="clear:both;padding:5px"><a href="' . cbSef('index.php?option=com_comprofiler' . getCBprofileItemid(true)) . '">' . _UE_BACK_TO_YOUR_PROFILE . '</a></div>'; }
/** * render frontend category main * * @param cbgjCategory $row * @param moscomprofilerUser $user * @param object $plugin * @return string */ static function showCategoryMain( $row, $user, $plugin ) { global $_CB_framework; $componentClass = new CBplug_cbgroupjive(); $authorized = cbgjClass::getAuthorization( $row, null, $user ); $tabs = new cbTabs( 1, 1 ); $newCategory = ( $plugin->params->get( 'category_new_category', 0 ) && cbgjClass::hasAccess( 'cat_nested_create', $authorized ) ); $newGroup = ( $plugin->params->get( 'category_new_group', 0 ) && cbgjClass::hasAccess( 'cat_grp_create', $authorized ) ); $hasNested = ( $row->nestedCount() && cbgjClass::hasAccess( 'cat_approved', $authorized ) ); $beforeTab = cbgjClass::getIntegrations( 'gj_onBeforeCategoryTab', array( $tabs, $row, $user, $plugin ), null, null ); $afterTab = cbgjClass::getIntegrations( 'gj_onAfterCategoryTab', array( $tabs, $row, $user, $plugin ), null, null ); $return = null; if ( ( $row->get( 'published' ) == -1 ) && $plugin->params->get( 'category_approve', 0 ) ) { $return .= '<div class="alert alert-error">' . CBTxt::P( 'This [category] is currently pending approval.', array( '[category]' => cbgjClass::getOverride( 'category' ) ) ) . '</div>'; } elseif ( ( $row->get( 'published' ) == 0 ) || ( ( $row->get( 'published' ) == 1 ) && ( ! cbgjClass::hasAccess( 'cat_approved', $authorized ) ) ) ) { $return .= '<div class="alert alert-error">' . CBTxt::P( 'This [category] is currently unpublished.', array( '[category]' => cbgjClass::getOverride( 'category' ) ) ) . '</div>'; } if ( $newCategory || $newGroup ) { $return .= '<div class="gjTop gjTopCenter">' . '<div class="btn-group">' . ( $newCategory ? '<input type="button" value="' . htmlspecialchars( CBTxt::P( 'New [category]', array( '[category]' => cbgjClass::getOverride( 'category' ) ) ) ) . '" class="gjButton btn" onclick="' . cbgjClass::getPluginURL( array( 'categories', 'new', (int) $row->get( 'id' ) ), true ) . '" />' : null ) . ( $newGroup ? '<input type="button" value="' . htmlspecialchars( CBTxt::P( 'New [group]', array( '[group]' => cbgjClass::getOverride( 'group' ) ) ) ) . '" class="gjButton btn" onclick="' . cbgjClass::getPluginURL( array( 'groups', 'new', (int) $row->get( 'id' ) ), true ) . '" />' : null ) . '</div>' . '</div>'; } if ( $beforeTab || $afterTab || $hasNested ) { $return .= $tabs->startPane( 'getCategoryTabs' ); if ( $hasNested && ( ( ( ! $row->get( 'nested' ) ) && cbgjClass::hasAccess( 'mod_lvl1', $authorized ) ) || $row->get( 'nested' ) ) ) { $return .= $tabs->startTab( null, cbgjClass::getOverride( 'category', true ), 'gjCategories' ) . '<div class="gjNestedCategories">' . $componentClass->showNestedCategories( $row, $user, $plugin ) . '</div>' . $tabs->endTab(); } $return .= $beforeTab; if ( cbgjClass::hasAccess( 'cat_approved', $authorized ) ) { $return .= $tabs->startTab( null, cbgjClass::getOverride( 'group', true ), 'gjGroups' ); } } if ( cbgjClass::hasAccess( 'cat_approved', $authorized ) ) { $return .= '<div class="gjCategoryGroups">' . $componentClass->showCategoryGroups( $row, $user, $plugin ) . '</div>'; } if ( $beforeTab || $afterTab || $hasNested ) { if ( cbgjClass::hasAccess( 'cat_approved', $authorized ) ) { $return .= $tabs->endTab(); } $return .= $afterTab . $tabs->endPane(); } if ( isset( $_GET['tab'] ) ) { $tab = urldecode( stripslashes( cbGetParam( $_GET, 'tab' ) ) ); } elseif ( isset( $_POST['tab'] ) ) { $tab = stripslashes( cbGetParam( $_POST, 'tab' ) ); } else { $tab = null; } if ( $tab ) { $js = "$( '#getCategoryTabs .tab-row .tab a' ).each( function() {" . "if ( $( this ).text().toLowerCase() == '" . addslashes( strtolower( $tab ) ) . "' ) {" . "$( this ).parent( '.tab' ).trigger( 'click' );" . "}" . "});"; $_CB_framework->outputCbJQuery( $js ); } return $return; }
/** * Saves a new or existing CB+CMS user * WARNINGS: * - You must verify authorization of user to perform this (user checkCBpermissions() ) * - You must $this->load() existing user first * * @param array $array Raw unfiltered input, typically $_POST * @param int $ui 1 = Front-end (limitted rights), 2 = Backend (almost unlimitted), 0 = automated (full) * @param string $reason 'edit' or 'register' * @return boolean */ function saveSafely(&$array, $ui, $reason) { global $_CB_framework, $_CB_database, $ueConfig, $_PLUGINS; // Get current user state and store it into $oldUserComplete: $oldUserComplete = new moscomprofilerUser($this->_db); foreach (array_keys(get_object_vars($this)) as $k) { if (substr($k, 0, 1) != '_') { // ignore internal vars $oldUserComplete->{$k} = $this->{$k}; } } if ($oldUserComplete->gids === null) { $oldUserComplete->gids = array(); } // 1) Process and validate the fields in form by CB field plugins: // 2) Bind the fields to CMS User: $bindResults = $this->bindSafely($array, $ui, $reason, $oldUserComplete); if ($bindResults) { // During bindSafely, in saveTabContents, the validations have already taken place, for mandatory fields. if ($this->name == '' && $this->username == '' && $this->email != '') { $this->username = $this->email; $this->_cmsUser->username = $this->username; } // Checks that name is set. If not, uses the username as name, as Mambo/Joola mosUser::store() uses name for ACL // and ACL bugs with no name. if ($this->name == '') { $this->name = $this->username; $this->_cmsUser->name = $this->name; } elseif ($this->username == '') { $this->username = $this->name; $this->_cmsUser->username = $this->username; } if (!$this->checkSafely()) { $bindResults = false; } } // For new registrations or backend user creations, set registration date and password if neeeded: $isNew = !$this->id; $newCBuser = $oldUserComplete->user_id == null; if ($isNew) { if (checkJversion() != 1) { // J1.5 works better with null here... has bug that it offsets the time by server date, others need this: $this->registerDate = $_CB_framework->dateDbOfNow(); } } if ($bindResults) { if ($isNew) { if ($this->password == null) { $this->setRandomPassword(); $ueConfig['emailpass'] = 1; // set this global to 1 to force password to be sent to new users. } } // In backend only: if group has been changed and where original group was a Super Admin: check if there is at least a super-admin left: if ($ui == 2) { $myGids = $_CB_framework->acl->get_groups_below_me(null, true); $cms_admin = $_CB_framework->acl->mapGroupNamesToValues('Administrator'); $cms_super_admin = $_CB_framework->acl->mapGroupNamesToValues('Superadministrator'); $i_am_super_admin = $_CB_framework->acl->amIaSuperAdmin(); $i_am_admin = in_array($cms_admin, $myGids); if (!$isNew) { if (checkJversion() == 2) { if ($i_am_super_admin && $_CB_framework->myId() == $this->id) { // Check that a fool Super User does not block himself: if ($this->block && !$oldUserComplete->block) { $this->_error = 'Super Users can not block themselves'; return false; } // Check that a fool Super User does not demote himself from Super-User rights: if ($this->gids != $oldUserComplete->gids) { $staysSuperUser = $_CB_framework->acl->authorizeGroupsForAction($this->gids, 'core.admin', null); if (!$staysSuperUser) { $this->_error = 'You cannot demote yourself from your Super User permission'; return false; } } } // Check that a non-Super User/non-admin does not demote an admin or a Super user: if ($this->gids != $oldUserComplete->gids) { if (!$i_am_super_admin && !(CBuser::getMyInstance()->authoriseAction('core.admin') || CBuser::getMyInstance()->authoriseAction('core.manage', 'com_users') && CBuser::getMyInstance()->authoriseAction('core.edit', 'com_users') && CBuser::getMyInstance()->authoriseAction('core.edit.state', 'com_users'))) { // I am not a Super User and not an Users administrator: $userIsSuperUser = JUser::getInstance($this->id)->authorise('core.admin'); // User is super-user: Check if he stays so: if ($userIsSuperUser) { $staysSuperUser = $_CB_framework->acl->authorizeGroupsForAction($this->gids, 'core.admin', null); if (!$staysSuperUser) { $this->_error = 'You cannot remove a Super User permission. Only Super Users can do that.'; return false; } } $userCanAdminUsers = (CBuser::getInstance($this->id)->authoriseAction('core.manage', 'com_users') || CBuser::getInstance($this->id)->authoriseAction('core.manage')) && CBuser::getInstance($this->id)->authoriseAction('core.edit', 'com_users') && CBuser::getInstance($this->id)->authoriseAction('core.edit.state', 'com_users'); // User is users-administrator: check if he can stay so: if ($userCanAdminUsers) { $staysUserAdmin = ($_CB_framework->acl->authorizeGroupsForAction($this->gids, 'core.manage', 'com_users') || $_CB_framework->acl->authorizeGroupsForAction($this->gids, 'core.manage')) && $_CB_framework->acl->authorizeGroupsForAction($this->gids, 'core.edit', 'com_users') && $_CB_framework->acl->authorizeGroupsForAction($this->gids, 'core.edit.state', 'com_users'); if (!$staysUserAdmin) { $this->_error = 'An users manager cannot be demoted by a non-administrator'; return false; } } } } } else { if ($this->gid != $oldUserComplete->gid) { if ($oldUserComplete->gid == $cms_super_admin) { // count number of active super admins $query = 'SELECT COUNT( id )' . "\n FROM #__users" . "\n WHERE gid = " . (int) $cms_super_admin . "\n AND block = 0"; $_CB_database->setQuery($query); $count = $_CB_database->loadResult(); if ($count <= 1) { // disallow change if only one Super Admin exists $this->_error = 'You cannot change this users Group as it is the only active Super Administrator for your site'; return false; } } $user_group = strtolower($_CB_framework->acl->get_group_name($oldUserComplete->gid, 'ARO')); if ($user_group == 'super administrator' && !$i_am_super_admin) { // disallow change of super-Admin by non-super admin $this->_error = 'You cannot change this users Group as you are not a Super Administrator for your site'; return false; } elseif ($this->id == $_CB_framework->myId() && $i_am_super_admin) { // CB-specific: disallow change of own Super Admin group: $this->_error = 'You cannot change your own Super Administrator status for your site'; return false; } else { if (!$i_am_super_admin && $i_am_admin && $oldUserComplete->gid == $cms_admin) { // disallow change of super-Admin by non-super admin $this->_error = 'You cannot change the Group of another Administrator as you are not a Super Administrator for your site'; return false; } elseif (in_array($oldUserComplete->gid, $myGids) && !in_array($this->gid, $myGids)) { // disallow change of group of user into a group that is not child of admin/superadmin: $this->_error = 'You cannot change the Group of this user to a group that is not child of Registered or Manager as otherwise that user cannot login. If you really need to do that, you can do it in Joomla User Manager.'; return false; } } } // ensure user can't add group higher than themselves done below } } // Security check to avoid creating/editing user to higher level than himself: CB response to artf4529. if (!$i_am_super_admin && $this->gids != $oldUserComplete->gids) { // Does user try to edit a user that has higher groups ? if (count(array_diff($this->gids, $myGids)) != 0) { $this->_error = 'Unauthorized attempt to change an user at higher level than allowed !'; return false; } // Does the user try to demote higher levels ? if (array_diff($this->gids, $myGids) != array_diff($oldUserComplete->gids, $myGids)) { $this->_error = 'Unauthorized attempt to change higher groups of an user than allowed !'; return false; } } } } if ($reason == 'edit') { if ($ui == 1) { $_PLUGINS->trigger('onBeforeUserUpdate', array(&$this, &$this, &$oldUserComplete, &$oldUserComplete)); } elseif ($ui == 2) { if ($isNew || $newCBuser) { $_PLUGINS->trigger('onBeforeNewUser', array(&$this, &$this, false)); } else { $_PLUGINS->trigger('onBeforeUpdateUser', array(&$this, &$this, &$oldUserComplete)); } } } elseif ($reason == 'register') { $_PLUGINS->trigger('onBeforeUserRegistration', array(&$this, &$this)); } $beforeResult = !$_PLUGINS->is_errors(); if (!$beforeResult) { $this->_error = $_PLUGINS->getErrorMSG(false); // $_PLUGIN collects all error messages, incl. previous ones. } // Saves tab plugins: // on edits, user params and block/email/approved/confirmed are done in cb.core predefined fields. // So now calls this and more (CBtabs are already created in $this->bindSafely() ). $pluginTabsResult = true; if ($reason == 'edit') { $this->_cbTabs->savePluginTabs($this, $array); $pluginTabsResult = !$_PLUGINS->is_errors(); if (!$pluginTabsResult) { $this->_error = $_PLUGINS->getErrorMSG(false); // $_PLUGIN collects all error messages, incl. previous ones. } } if ($bindResults && $beforeResult && $pluginTabsResult) { // Hashes password for CMS storage: $clearTextPassword = $this->password; if ($clearTextPassword) { $hashedPassword = $this->hashAndSaltPassword($clearTextPassword); $this->password = $hashedPassword; } // Stores user if it's a new user: if ($isNew) { if (!$this->store()) { return false; } } // Restores cleartext password for the saveRegistrationPluginTabs: $this->password = $clearTextPassword; if ($isNew) { // Sets the instance of user, to avoid reload from database, and loss of the cleartext password. CBuser::setUserGetCBUserInstance($this); } } if ($reason == 'register') { // call here since we got to have a user id: $registerResults = array(); $registerResults['tabs'] = $this->_cbTabs->saveRegistrationPluginTabs($this, $array); if ($_PLUGINS->is_errors()) { if ($bindResults && $beforeResult && $pluginTabsResult) { $plugins_error = $_PLUGINS->getErrorMSG(false); // $_PLUGIN collects all error messages, incl. previous ones. if ($isNew) { // if it was a new user, and plugin gave error, revert the creation: $this->delete(); } $this->_error = $plugins_error; } else { $this->_error = $_PLUGINS->getErrorMSG(false); // $_PLUGIN collects all error messages, incl. previous ones. } $pluginTabsResult = false; } } if ($bindResults && $beforeResult && $pluginTabsResult) { $this->_cbTabs->commitTabsContents($this, $array, $reason); $commit_errors = $_PLUGINS->getErrorMSG(false); if (count($commit_errors) > 0) { $this->_error = $commit_errors; $bindResults = false; } } if (!($bindResults && $beforeResult && $pluginTabsResult)) { $this->_cbTabs->rollbackTabsContents($this, $array, $reason); // Normal error exit point: $_PLUGINS->trigger('onSaveUserError', array(&$this, $this->_error, $reason)); if (is_array($this->_error)) { $this->_error = implode('<br />', $this->_error); } return false; } // Stores the user (again if it's a new as the plugins might have changed the user record): if ($clearTextPassword) { $this->password = $hashedPassword; } if (!$this->store()) { return false; } // Restores cleartext password for the onAfter and activation events: $this->password = $clearTextPassword; // Triggers onAfter and activateUser events: if ($reason == 'edit') { if ($ui == 1) { $_PLUGINS->trigger('onAfterUserUpdate', array(&$this, &$this, $oldUserComplete)); } elseif ($ui == 2) { if ($isNew || $newCBuser) { if ($isNew) { $ueConfig['emailpass'] = 1; // set this global to 1 to force password to be sent to new users. } $_PLUGINS->trigger('onAfterNewUser', array(&$this, &$this, false, true)); if ($this->block == 0 && $this->approved == 1 && $this->confirmed) { activateUser($this, 2, 'NewUser', false, $isNew); } } else { if (!(($oldUserComplete->approved == 1 || $oldUserComplete->approved == 2) && $oldUserComplete->confirmed) && ($this->approved == 1 && $this->confirmed)) { // first time a just registered and confirmed user got approved in backend through save user: if (isset($ueConfig['emailpass']) && $ueConfig['emailpass'] == "1" && $this->password == '') { // generate the password is auto-generated and not set by the admin at this occasion: $this->setRandomPassword(); $pwd = $this->hashAndSaltPassword($this->password); $_CB_database->setQuery("UPDATE #__users SET password="******" WHERE id = " . (int) $this->id); $_CB_database->query(); } } $_PLUGINS->trigger('onAfterUpdateUser', array(&$this, &$this, $oldUserComplete)); if (!(($oldUserComplete->approved == 1 || $oldUserComplete->approved == 2) && $oldUserComplete->confirmed) && ($this->approved == 1 && $this->confirmed)) { // first time a just registered and confirmed user got approved in backend through save user: activateUser($this, 2, 'UpdateUser', false); } } } } elseif ($reason == 'register') { $registerResults['after'] = $_PLUGINS->trigger('onAfterUserRegistration', array(&$this, &$this, true)); $registerResults['ok'] = true; return $registerResults; } return true; }
/** * render frontend group * * @param GroupTable $row * @param mixed $users * @param mixed $invites * @param UserTable $user * @param CBplug_cbgroupjive $plugin * @return string */ static function showGroup( $row, $users, $invites, $user, $plugin ) { global $_CB_framework, $_PLUGINS; $_CB_framework->setPageTitle( htmlspecialchars( CBTxt::T( $row->get( 'name' ) ) ) ); initToolTip(); $js = "$( '.gjGroupTabsMenuNavBar' ).on( 'click', '.navbar-toggle', function() {" . "if ( ! $( this ).hasClass( 'dropdown-toggle' ) ) {" . "var navbar = $( this ).closest( '.gjGroupTabsMenuNavBar' ).find( '.navbar-collapse' );" . "var toggle = $( this ).closest( '.gjGroupTabsMenuNavBar' ).find( '.navbar-toggle' );" . "if ( toggle.hasClass( 'collapsed' ) ) {" . "navbar.addClass( 'in' );" . "toggle.removeClass( 'collapsed' );" . "} else {" . "navbar.removeClass( 'in' );" . "toggle.addClass( 'collapsed' );" . "}" . "}" . "}).find( '.cbScroller' ).cbscroller({" . "height: false" . "});" . "$( '.gjGroupTabs' ).on( 'cbtabs.selected', function( e, event, cbtabs, tab ) {" . "var dropdownNav = $( event.target ).closest( '.gjGroupTabsMenuNavBar' );" . "if ( dropdownNav.length ) {" . "var toggle = dropdownNav.find( '.navbar-toggle' );" . "if ( ! toggle.hasClass( 'collapsed' ) ) {" . "toggle.click();" . "}" . "}" . "});"; $_CB_framework->outputCbJQuery( $js, 'cbscroller' ); $isModerator = CBGroupJive::isModerator( $user->get( 'id' ) ); $isOwner = ( $user->get( 'id' ) == $row->get( 'user_id' ) ); $userStatus = CBGroupJive::getGroupStatus( $user, $row ); $counters = array(); $buttons = array(); $menu = array(); $tabs = new cbTabs( 1, 1 ); $return = null; $integrations = $_PLUGINS->trigger( 'gj_onBeforeDisplayGroup', array( &$return, &$row, &$users, &$invites, &$counters, &$buttons, &$menu, &$tabs, $user ) ); $return .= '<div class="gjGroup">' . '<div class="gjGroupCanvas gjPageHeader border-default">' . '<div class="gjPageHeaderCanvas">' . '<div class="gjPageHeaderCanvasBackground">' . $row->canvas() . '</div>' . '<div class="gjPageHeaderCanvasLogo">' . $row->logo() . '</div>'; if ( $isModerator || $isOwner || ( ( ! $isOwner ) && ( ( $userStatus === null ) || ( $userStatus === 0 ) || ( $userStatus >= 1 ) ) ) || $buttons || $menu ) { $return .= '<div class="gjPageHeaderCanvasButtons text-right">' . ( $buttons ? ' <span class="gjPageHeaderCanvasButton">' . implode( '</span> <span class="gjPageHeaderCanvasButton">', $buttons ) . '</span>' : null ); if ( $isModerator && ( $row->get( 'published' ) == -1 ) && $plugin->params->get( 'groups_create_approval', 0 ) ) { $return .= ' <span class="gjPageHeaderCanvasButton">' . '<button type="button" onclick="window.location.href=\'' . $_CB_framework->pluginClassUrl( $plugin->element, true, array( 'action' => 'groups', 'func' => 'publish', 'id' => (int) $row->get( 'id' ) ) ) . '\';" class="gjButton gjButtonApprove btn btn-xs btn-success">' . CBTxt::T( 'Approve' ) . '</button>' . '</span>'; } elseif ( ! $isOwner ) { if ( $userStatus === null ) { $return .= ' <span class="gjPageHeaderCanvasButton">' . ( $row->get( '_invite_id' ) ? '<button type="button" onclick="cbjQuery.cbconfirm( \'' . addslashes( CBTxt::T( 'Are you sure you want to reject all invites to this Group?' ) ) . '\' ).done( function() { window.location.href = \'' . $_CB_framework->pluginClassUrl( $plugin->element, false, array( 'action' => 'groups', 'func' => 'reject', 'id' => (int) $row->get( 'id' ) ) ) . '\'; })" class="gjButton gjButtonReject btn btn-xs btn-danger">' . CBTxt::T( 'Reject' ) . '</button> ' : null ) . '<button type="button" onclick="window.location.href=\'' . $_CB_framework->pluginClassUrl( $plugin->element, true, array( 'action' => 'groups', 'func' => 'join', 'id' => (int) $row->get( 'id' ) ) ) . '\';" class="gjButton gjButtonJoin btn btn-xs btn-success">' . ( $row->get( '_invite_id' ) ? CBTxt::T( 'Accept Invite' ) : CBTxt::T( 'Join' ) ) . '</button>' . '</span>'; } elseif ( $userStatus === 0 ) { $return .= ' <span class="gjPageHeaderCanvasButton">' . '<button type="button" onclick="cbjQuery.cbconfirm( \'' . addslashes( CBTxt::T( 'Are you sure you want to cancel your pending join request to this Group?' ) ) . '\' ).done( function() { window.location.href = \'' . $_CB_framework->pluginClassUrl( $plugin->element, false, array( 'action' => 'groups', 'func' => 'cancel', 'id' => (int) $row->get( 'id' ) ) ) . '\'; })" class="gjButton gjButtonCancel btn btn-xs btn-danger">' . CBTxt::T( 'Cancel' ) . '</button> ' . '<span class="gjButton gjButtonPending btn btn-xs btn-warning disabled">' . CBTxt::T( 'Pending Approval' ) . '</span>' . '</span>'; } } if ( $isModerator || $isOwner || $menu || ( $userStatus >= 1) ) { $menuItems = '<ul class="gjGroupMenuItems dropdown-menu" style="display: block; position: relative; margin: 0;">'; if ( $isModerator || $isOwner ) { $menuItems .= '<li class="gjGroupMenuItem"><a href="' . $_CB_framework->pluginClassUrl( $plugin->element, true, array( 'action' => 'groups', 'func' => 'edit', 'id' => (int) $row->get( 'id' ) ) ) . '"><span class="fa fa-edit"></span> ' . CBTxt::T( 'Edit' ) . '</a></li>'; if ( ( $row->get( 'published' ) == -1 ) && $plugin->params->get( 'groups_create_approval', 0 ) ) { if ( $isModerator ) { $menuItems .= '<li class="gjGroupMenuItem"><a href="' . $_CB_framework->pluginClassUrl( $plugin->element, true, array( 'action' => 'groups', 'func' => 'publish', 'id' => (int) $row->get( 'id' ) ) ) . '"><span class="fa fa-check"></span> ' . CBTxt::T( 'Approve' ) . '</a></li>'; } } elseif ( $row->get( 'published' ) == 1 ) { $menuItems .= '<li class="gjGroupMenuItem"><a href="javascript: void(0);" onclick="cbjQuery.cbconfirm( \'' . addslashes( CBTxt::T( 'Are you sure you want to unpublish this Group?' ) ) . '\' ).done( function() { window.location.href = \'' . $_CB_framework->pluginClassUrl( $plugin->element, false, array( 'action' => 'groups', 'func' => 'unpublish', 'id' => (int) $row->get( 'id' ) ) ) . '\'; })"><span class="fa fa-times-circle"></span> ' . CBTxt::T( 'Unpublish' ) . '</a></li>'; } else { $menuItems .= '<li class="gjGroupMenuItem"><a href="' . $_CB_framework->pluginClassUrl( $plugin->element, true, array( 'action' => 'groups', 'func' => 'publish', 'id' => (int) $row->get( 'id' ) ) ) . '"><span class="fa fa-check"></span> ' . CBTxt::T( 'Publish' ) . '</a></li>'; } } if ( $plugin->params->get( 'notifications', 1 ) && ( $isModerator || ( ( $row->get( 'published' ) == 1 ) && ( $isOwner || ( $userStatus >= 1 ) ) ) ) ) { $menuItems .= '<li class="gjGroupMenuItem"><a href="' . $_CB_framework->pluginClassUrl( $plugin->element, true, array( 'action' => 'groups', 'func' => 'notifications', 'id' => (int) $row->get( 'id' ) ) ) . '"><span class="fa fa-envelope"></span> ' . CBTxt::T( 'Notifications' ) . '</a></li>'; } if ( $isModerator || ( ( $row->get( 'published' ) == 1 ) && $plugin->params->get( 'groups_message', 0 ) && ( $isOwner || ( $userStatus >= 3 ) ) ) ) { $delay = false; if ( ( ! $isModerator ) && $row->params()->get( 'messaged' ) && $plugin->params->get( 'groups_message_delay', 60 ) ) { $seconds = (int) $plugin->params->get( 'groups_message_delay', 60 ); if ( $seconds ) { $diff = Application::Date( 'now', 'UTC' )->diff( $row->get( 'messaged' ) ); if ( ( $diff === false ) || ( $diff->s < $seconds ) ) { $delay = true; } } } if ( ! $delay ) { $menuItems .= '<li class="gjGroupMenuItem"><a href="' . $_CB_framework->pluginClassUrl( $plugin->element, true, array( 'action' => 'groups', 'func' => 'message', 'id' => (int) $row->get( 'id' ) ) ) . '"><span class="fa fa-comment"></span> ' . CBTxt::T( 'Message' ) . '</a></li>'; } } if ( ( ! $isOwner ) && ( $userStatus >= 1 ) ) { $menuItems .= '<li class="gjGroupMenuItem"><a href="javascript: void(0);" onclick="cbjQuery.cbconfirm( \'' . addslashes( CBTxt::T( 'Are you sure you want to leave this Group?' ) ) . '\' ).done( function() { window.location.href = \'' . $_CB_framework->pluginClassUrl( $plugin->element, false, array( 'action' => 'groups', 'func' => 'leave', 'id' => (int) $row->get( 'id' ) ) ) . '\'; })"><span class="fa fa-minus-circle"></span> ' . CBTxt::T( 'Leave' ) . '</a></li>'; } if ( $menu ) { $menuItems .= '<li class="gjGroupMenuItem">' . implode( '</li><li class="gjGroupMenuItem">', $menu ) . '</li>'; } if ( $isModerator || $isOwner ) { $menuItems .= '<li class="gjGroupMenuItem"><a href="javascript: void(0);" onclick="cbjQuery.cbconfirm( \'' . addslashes( CBTxt::T( 'Are you sure you want to delete this Group?' ) ) . '\' ).done( function() { window.location.href = \'' . $_CB_framework->pluginClassUrl( $plugin->element, false, array( 'action' => 'groups', 'func' => 'delete', 'id' => (int) $row->get( 'id' ) ) ) . '\'; })"><span class="fa fa-trash-o"></span> ' . CBTxt::T( 'Delete' ) . '</a></li>'; } $menuItems .= '</ul>'; $menuAttr = cbTooltip( 1, $menuItems, null, 'auto', null, null, null, 'class="btn btn-default btn-xs" data-cbtooltip-menu="true" data-cbtooltip-classes="qtip-nostyle"' ); $return .= ' <span class="gjPageHeaderCanvasButton">' . '<div class="gjGroupMenu btn-group">' . '<button type="button" ' . trim( $menuAttr ) . '><span class="fa fa-cog"></span> <span class="fa fa-caret-down"></span></button>' . '</div>' . '</span>'; } $return .= '</div>'; } $return .= '</div>' . '<div class="gjPageHeaderBar border-default">' . '<div class="gjPageHeaderBarTitle text-primary">' . '<strong>' . htmlspecialchars( CBTxt::T( $row->get( 'name' ) ) ) . '</strong>' . '</div>' . '<div class="gjPageHeaderBarCounters text-muted small">'; if ( $row->get( 'category' ) ) { $return .= '<span class="gjPageHeaderBarCounter"><span class="gjGroupCategoryIcon fa-before fa-folder">' . ' <a href="' . $_CB_framework->pluginClassUrl( $plugin->element, true, array( 'action' => 'categories', 'func' => 'show', 'id' => (int) $row->get( 'category' ) ) ) . '">' . CBTxt::T( $row->category()->get( 'name' ) ) . '</a>' . '</span></span>'; } $return .= ' <span class="gjPageHeaderBarCounter"><span class="gjGroupTypeIcon fa-before fa-globe"> ' . $row->type() . '</span></span>' . ' <span class="gjPageHeaderBarCounter"><span class="gjGroupUsersIcon fa-before fa-user"> ' . CBTxt::T( 'GROUP_USERS_COUNT', '%%COUNT%% User|%%COUNT%% Users', array( '%%COUNT%%' => (int) $row->get( '_users', 0 ) ) ) . '</span></span>' . ( $counters ? ' <span class="gjPageHeaderBarCounter">' . implode( '</span> <span class="gjPageHeaderBarCounter">', $counters ) . '</span>' : null ) . '</div>' . ( $row->get( 'description' ) ? ' <div class="gjPageHeaderBarDescription">' . cbTooltip( 1, CBTxt::T( $row->get( 'description' ) ), CBTxt::T( $row->get( 'name' ) ), 400, null, '<span class="fa fa-info-circle text-muted"></span>' ) . '</div>' : null ) . '</div>' . '</div>' . '<div class="gjGroupTabs cbTabs cbTabsMenu" id="cbtabsgrouptab" data-cbtabs-use-cookies="true">' . '<div class="gjGroupTabsMenuNavBar cbTabsMenuNavBar navbar navbar-default">' . '<div class="container-fluid">' . '<div class="navbar-header">' . '<button type="button" class="gjGroupTabsMenuNavBarToggle cbTabsMenuNavBarToggle navbar-toggle collapsed">' . '<span class="icon-bar"></span>' . '<span class="icon-bar"></span>' . '<span class="icon-bar"></span>' . '</button>' . '</div>' . '<div class="collapse navbar-collapse cbScroller">' . '<div class="cbScrollerLeft hidden">' . '<button type="button" class="btn btn-xs btn-default"><span class="fa fa-angle-left"></span></button>' . '</div>' . '<ul class="gjGroupTabsNav cbTabsNav cbTabsMenuNav nav navbar-nav cbScrollerContent"></ul>' . '<div class="cbScrollerRight hidden">' . '<button type="button" class="btn btn-xs btn-default"><span class="fa fa-angle-right"></span></button>' . '</div>' . '</div>' . '</div>' . '</div>' . '<div class="cbTabsContent cbTabsMenuContent tab-content">'; foreach ( $integrations as $integration ) { if ( ( ! $integration ) || ( ! isset( $integration['id'] ) ) || ( ! isset( $integration['title'] ) ) || ( ! isset( $integration['content'] ) ) ) { continue; } $return .= $tabs->startTab( null, $integration['title'], 'grouptab' . $integration['id'], array( 'tab' => 'cbTabNavMenu', 'pane' => 'tab-pane cbTabPaneMenu', 'override' => true ) ) . '<div class="cb_tab_content cb_tab_menu">' . $integration['content'] . '</div>' . $tabs->endTab(); } if ( $users ) { $return .= $tabs->startTab( null, CBTxt::T( 'GROUP_USERS', 'Users' ), 'grouptabusers', array( 'tab' => 'cbTabNavMenu', 'pane' => 'tab-pane cbTabPaneMenu', 'override' => true ) ) . '<div class="cb_tab_content cb_tab_menu">' . $users . '</div>' . $tabs->endTab(); } if ( $invites ) { $return .= $tabs->startTab( null, CBTxt::T( 'Invites' ), 'grouptabinvites', array( 'tab' => 'cbTabNavMenu', 'pane' => 'tab-pane cbTabPaneMenu', 'override' => true ) ) . '<div class="cb_tab_content cb_tab_menu">' . $invites . '</div>' . $tabs->endTab(); } $return .= '</div>' . '</div>' . '</div>'; $_PLUGINS->trigger( 'gj_onAfterDisplayGroup', array( &$return, $row, $users, $invites, $user ) ); $_CB_framework->setMenuMeta(); echo $return; }
/** * render frontend group main * * @param cbgjGroup $row * @param cbgjCategory $category * @param moscomprofilerUser $user * @param object $plugin * @return string */ static function showGroupMain( $row, $category, $user, $plugin ) { global $_CB_framework; $componentClass = new CBplug_cbgroupjive(); $authorized = cbgjClass::getAuthorization( $category, $row, $user ); $tabs = new cbTabs( 1, 1 ); $beforeTab = cbgjClass::getIntegrations( 'gj_onBeforeGroupTab', array( $tabs, $row, $category, $user, $plugin ), null, null ); $afterTab = cbgjClass::getIntegrations( 'gj_onAfterGroupTab', array( $tabs, $row, $category, $user, $plugin ), null, null ); $return = null; if ( ( $row->get( 'published' ) == -1 ) && $plugin->params->get( 'group_approve', 0 ) ) { $return .= '<div class="alert alert-error">' . CBTxt::P( 'This [group] is currently pending approval.', array( '[group]' => cbgjClass::getOverride( 'group' ) ) ) . '</div>'; } elseif ( ( $row->get( 'published' ) == 0 ) || ( ( $row->get( 'published' ) == 1 ) && ( ! cbgjClass::hasAccess( 'grp_approved', $authorized ) ) ) ) { $return .= '<div class="alert alert-error">' . CBTxt::P( 'This [group] is currently unpublished.', array( '[group]' => cbgjClass::getOverride( 'group' ) ) ) . '</div>'; } else { if ( $user->id ) { if ( ( $row->get( 'type' ) == 2 ) && cbgjClass::hasAccess( 'grp_usr_inactive', $authorized ) ) { $return .= '<div class="alert alert-error">' . CBTxt::P( '[group] join request awaiting approval.', array( '[group]' => cbgjClass::getOverride( 'group' ) ) ) . '</div>'; } } } if ( $plugin->params->get( 'group_new_group', 0 ) && cbgjClass::hasAccess( 'grp_nested_create', $authorized ) ) { $return .= '<div class="gjTop gjTopCenter">' . '<div class="btn-group">' . '<input type="button" value="' . htmlspecialchars( CBTxt::P( 'New [group]', array( '[group]' => cbgjClass::getOverride( 'group' ) ) ) ) . '" class="gjButton btn" onclick="' . cbgjClass::getPluginURL( array( 'groups', 'new', (int) $category->get( 'id' ), (int) $row->get( 'id' ) ), true ) . '" />' . '</div>' . '</div>'; } $return .= $tabs->startPane( 'gjGroupTabs' ); $tabContent = false; if ( cbgjClass::hasAccess( 'grp_approved', $authorized ) && $row->nestedCount() && ( ( ( ! $row->get( 'nested' ) ) && cbgjClass::hasAccess( 'mod_lvl2', $authorized ) ) || $row->get( 'nested' ) ) ) { $return .= $tabs->startTab( null, cbgjClass::getOverride( 'group', true ), 'gjGroups' ) . '<div class="gjNestedGroups">' . $componentClass->showNestedGroups( $row, $category, $user, $plugin ) . '</div>' . $tabs->endTab(); $tabContent = true; } $return .= $beforeTab; if ( cbgjClass::hasAccess( 'grp_approved', $authorized ) && ( ( ( ! $row->get( 'users' ) ) && cbgjClass::hasAccess( 'mod_lvl5', $authorized ) ) || $row->users ) ) { $return .= $tabs->startTab( null, cbgjClass::getOverride( 'user', true ), 'gjUsers' ) . '<div class="gjUsers">' . $componentClass->showUsers( $row, $category, $user, $plugin ) . '</div>' . $tabs->endTab(); $tabContent = true; } if ( cbgjClass::hasAccess( array( 'grp_approved', 'grp_invite' ), $authorized, true ) ) { $return .= $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Invites' ) ), 'gjInvites' ) . '<div class="gjInvites">' . $componentClass->showInvites( $category, $row, $user, $plugin ) . '</div>' . $tabs->endTab(); $tabContent = true; } if ( ( ! $tabContent ) && ( ! $beforeTab ) && ( ! $afterTab ) ) { if ( $user->id ) { if ( cbgjClass::hasAccess( 'grp_approved', $authorized ) && ( ! ( $row->get( 'type' ) == 2 ) && cbgjClass::hasAccess( 'grp_usr_inactive', $authorized ) ) ) { $return .= '<div>' . CBTxt::Ph( 'Please join the [group] to view its content.', array( '[group]' => cbgjClass::getOverride( 'group' ) ) ) . '</div>'; } } else { $return .= '<div>' . CBTxt::Ph( 'Please login or register to view [group] content.', array( '[group]' => cbgjClass::getOverride( 'group' ) ) ) . '</div>'; } } $return .= $afterTab . $tabs->endPane(); if ( isset( $_GET['tab'] ) ) { $tab = urldecode( stripslashes( cbGetParam( $_GET, 'tab' ) ) ); } elseif ( isset( $_POST['tab'] ) ) { $tab = stripslashes( cbGetParam( $_POST, 'tab' ) ); } else { $tab = null; } if ( $tab ) { $js = "$( '#gjGroupTabs .tab-row .tab a' ).each( function() {" . "if ( $( this ).text().toLowerCase() == '" . addslashes( strtolower( $tab ) ) . "' ) {" . "$( this ).parent( '.tab' ).trigger( 'click' );" . "}" . "});"; $_CB_framework->outputCbJQuery( $js ); } return $return; }
/** * @param array $connections * @param array $actions * @param int $total * @param cbTabs $connMgmtTabs * @param array $pagingParams * @param int $perpage * @param array|null $connecteds */ static function manageConnections($connections, $actions, $total, &$connMgmtTabs, &$pagingParams, $perpage, $connecteds = null) { global $_CB_framework, $ueConfig, $_PLUGINS, $_REQUEST; $results = $_PLUGINS->trigger('onBeforeManageConnectionsFormDisplay', array(&$connections, &$actions, &$total, &$connMgmtTabs, &$pagingParams, &$perpage, &$connecteds)); if ($_PLUGINS->is_errors()) { echo "<script type=\"text/javascript\">alert(\"" . $_PLUGINS->getErrorMSG() . "\"); window.history.go(-1); </script>\n"; exit; } outputCbTemplate(1); initToolTip(1); cbValidator::loadValidation(); $js = "if ( typeof confirmSubmit != 'function' ) {" . "function confirmSubmit() {" . "if ( confirm( '" . addslashes(CBTxt::T('UE_CONFIRMREMOVECONNECTION', 'Are you sure you want to remove this connection?')) . "' ) ) {" . "return true;" . "} else {" . "return false;" . "}" . "};" . "}"; $_CB_framework->document->addHeadScriptDeclaration($js); $connectionCategories = explode("\n", $ueConfig['connection_categories']); $connectionTypes = array(); if ($connectionCategories) { foreach ($connectionCategories as $connectionCategory) { if (trim($connectionCategory) != null && trim($connectionCategory) != "") { $connectionTypes[] = moscomprofilerHTML::makeOption(trim($connectionCategory), CBTxt::T(trim($connectionCategory))); } } } $tabs = new cbTabs(0, 1); $pageClass = $_CB_framework->getMenuPageClass(); $return = '<div class="cbManageConnections cb_template cb_template_' . selectTemplate('dir') . ($pageClass ? ' ' . htmlspecialchars($pageClass) : null) . '">'; if (is_array($results)) { $return .= implode('', $results); } $return .= '<div class="page-header"><h3>' . CBTxt::Th('UE_MANAGECONNECTIONS', 'Manage Connections') . '</h3></div>' . $tabs->startPane('myCon') . $tabs->startTab('myCon', CBTxt::Th('UE_MANAGEACTIONS', 'Manage Actions') . ' <span class="badge">' . count($actions) . '</span>', 'action'); if (!count($actions) > 0) { $return .= '<div class="form-group cb_form_line clearfix tab_description">' . CBTxt::Th('UE_NOACTIONREQUIRED', 'No Pending Actions') . '</div>' . '<div class="form-group cb_form_line clearfix">' . '<input type="button" class="btn btn-default cbMngConnCancel" value="' . htmlspecialchars(CBTxt::Th('UE_CANCEL', 'Cancel')) . '" onclick="window.location=\'' . $_CB_framework->userProfileUrl() . '\'; return false;" />' . '</div>'; } else { $return .= '<form action="' . $_CB_framework->viewUrl('processconnectionactions') . '" method="post" id="adminForm" name="adminForm" class="cb_form form-auto cbValidation">' . '<div class="form-group cb_form_line clearfix tab_description">' . CBTxt::Th('UE_CONNECT_ACTIONREQUIRED', 'Below you see users proposing to connect with you. You have the choice to accept or decline their request.') . '</div>' . '<div class="table">'; foreach ($actions as $action) { $cbUser = CBuser::getInstance((int) $action->id, false); $tipField = '<b>' . CBTxt::Th('UE_CONNECTIONREQUIREDON', 'Connection Required on') . '</b>: ' . $_CB_framework->getUTCDate(array($ueConfig['date_format'], 'Y-m-d'), $action->membersince); if ($action->reason != null) { $tipField .= '<br /><b>' . CBTxt::Th('UE_CONNECTIONMESSAGE', 'Personal message included') . '</b>: <br />' . htmlspecialchars($action->reason, ENT_QUOTES); } $tipTitle = CBTxt::Th('UE_CONNECTIONREQUESTDETAIL', 'Connection Request Details'); $htmlText = $cbUser->getField('avatar', null, 'html', 'none', 'list', 0, true); $tooltip = cbTooltip(1, $tipField, $tipTitle, 300, null, $htmlText, null, 'style="display: inline-block; padding: 5px;"'); $return .= '<div class="containerBox img-thumbnail">' . '<div class="containerBoxInner" style="min-height: 130px; min-width: 90px;">' . $cbUser->getField('onlinestatus', null, 'html', 'none', 'profile', 0, true, array('_imgMode' => 1)) . ' ' . $cbUser->getField('formatname', null, 'html', 'none', 'list', 0, true) . '<br />' . $tooltip . '<br />' . '<span class="fa fa-check" title="' . htmlspecialchars(CBTxt::T('UE_ACCEPTCONNECTION', 'Accept Connection')) . '"></span>' . ' <input type="radio" name="' . (int) $action->id . 'action" value="a" checked="checked" />' . ' <span class="fa fa-times" title="' . htmlspecialchars(CBTxt::T('UE_DECLINECONNECTION', 'Decline Connection')) . '"></span>' . ' <input type="radio" name="' . (int) $action->id . 'action" value="d" />' . '<input type="hidden" name="uid[]" value="' . (int) $action->id . '" />' . '</div>' . '</div>'; } $return .= '</div>' . '<div class="form-group cb_form_line clearfix">' . '<input type="submit" class="btn btn-primary cbMngConnSubmit" value="' . htmlspecialchars(CBTxt::Th('UE_UPDATE', 'Update')) . '"' . cbValidator::getSubmitBtnHtmlAttributes() . ' />' . ' <input type="button" class="btn btn-default cbMngConnCancel" value="' . htmlspecialchars(CBTxt::Th('UE_CANCEL', 'Cancel')) . '" onclick="window.location=\'' . $_CB_framework->userProfileUrl() . '\'; return false;" />' . '</div>' . cbGetSpoofInputTag('manageconnections') . '</form>'; } $return .= $tabs->endTab() . $tabs->startTab('myCon', CBTxt::Th('UE_MANAGECONNECTIONS', 'Manage Connections'), 'connections'); if (!count($connections) > 0) { $return .= '<div class="form-group cb_form_line clearfix tab_description">' . CBTxt::Th('UE_NOCONNECTIONS', 'This user has no current connections.') . '</div>' . '<div class="form-group cb_form_line clearfix">' . '<input type="button" class="btn btn-default cbMngConnCancel" value="' . htmlspecialchars(CBTxt::Th('UE_CANCEL', 'Cancel')) . '" onclick="window.location=\'' . $_CB_framework->userProfileUrl() . '\'; return false;" />' . '</div>'; } else { $return .= '<form action="' . $_CB_framework->viewUrl('saveconnections') . '" method="post" id="adminForm" name="adminForm" class="cb_form form-auto cbValidation">' . '<div class="form-group cb_form_line clearfix tab_description">' . CBTxt::Th('UE_CONNECT_MANAGECONNECTIONS', 'Below you see users to whom you are connected directly. ') . '</div>' . '<table class="table table-hover table-responsive">' . '<thead>' . '<tr>' . '<th style="width: 25%;" class="text-center">' . CBTxt::Th('UE_CONNECTION', 'Connections') . '</th>' . '<th style="width: 35%;" class="text-center">' . CBTxt::Th('UE_CONNECTIONTYPE', 'Type') . '</th>' . '<th style="width: 40%;" class="text-center">' . CBTxt::Th('UE_CONNECTIONCOMMENT', 'Comment') . '</th>' . '</tr>' . '</thead>' . '<tbody>'; $i = 1; foreach ($connections as $connection) { $cbUser = CBuser::getInstance((int) $connection->id, false); $tipField = '<b>' . CBTxt::Th('UE_CONNECTEDSINCE', 'Connected Since') . '</b>: ' . $_CB_framework->getUTCDate(array($ueConfig['date_format'], 'Y-m-d'), $connection->membersince); if ($connection->type != null) { $tipField .= '<br /><b>' . CBTxt::Th('UE_CONNECTIONTYPE', 'Type') . '</b>: ' . getConnectionTypes($connection->type); } if ($connection->description != null) { $tipField .= '<br /><b>' . CBTxt::Th('UE_CONNECTEDCOMMENT', 'Comment') . '</b>: ' . htmlspecialchars($connection->description); } $tipTitle = CBTxt::Th('UE_CONNECTEDDETAIL', 'Connection Details'); $htmlText = $cbUser->getField('avatar', null, 'html', 'none', 'list', 0, true); $tooltip = cbTooltip(1, $tipField, $tipTitle, 300, null, $htmlText, null, 'style="display: inline-block; padding: 5px;"'); if ($connection->accepted == 1 && $connection->pending == 1) { $actionImg = '<span class="fa fa-clock-o" title="' . htmlspecialchars(CBTxt::T('UE_CONNECTIONPENDING', 'Connection Pending')) . '"></span>' . ' <a href="' . $_CB_framework->viewUrl('removeconnection', true, array('act' => 'manage', 'connectionid' => (int) $connection->memberid)) . '" onclick="return confirmSubmit();" >' . '<span class="fa fa-times-circle-o" title="' . htmlspecialchars(CBTxt::T('UE_REMOVECONNECTION', 'Remove Connection')) . '"></span>' . '</a>'; } elseif ($connection->accepted == 1 && $connection->pending == 0) { $actionImg = '<a href="' . $_CB_framework->viewUrl('removeconnection', true, array('act' => 'manage', 'connectionid' => (int) $connection->memberid)) . '" onclick="return confirmSubmit();" >' . '<span class="fa fa-times-circle-o" title="' . htmlspecialchars(CBTxt::T('UE_REMOVECONNECTION', 'Remove Connection')) . '"></span>' . '</a>'; } elseif ($connection->accepted == 0) { $actionImg = '<a href="' . $_CB_framework->viewUrl('acceptconnection', true, array('act' => 'manage', 'connectionid' => (int) $connection->memberid)) . '" onclick="return confirmSubmit();" >' . '<span class="fa fa-check-circle-o" title="' . htmlspecialchars(CBTxt::T('UE_ACCEPTCONNECTION', 'Accept Connection')) . '"></span>' . '</a>' . ' <a href="' . $_CB_framework->viewUrl('removeconnection', true, array('act' => 'manage', 'connectionid' => (int) $connection->memberid)) . '" onclick="return confirmSubmit();" >' . '<span class="fa fa-times-circle-o" title="' . htmlspecialchars(CBTxt::T('UE_REMOVECONNECTION', 'Remove Connection')) . '"></span>' . '</a>'; } else { $actionImg = null; } $return .= '<tr>' . '<td class="text-center">' . $cbUser->getField('onlinestatus', null, 'html', 'none', 'profile', 0, true, array('_imgMode' => 1)) . ' ' . $cbUser->getField('formatname', null, 'html', 'none', 'list', 0, true) . '<br />' . $tooltip . '<br />' . $actionImg . ' <a href="' . $_CB_framework->userProfileUrl((int) $connection->memberid) . '">' . '<span class="fa fa-user" title="' . htmlspecialchars(CBTxt::T('UE_VIEWPROFILE', 'View Profile')) . '"></span>' . '</a>' . ' ' . $cbUser->getField('email', null, 'html', 'none', 'profile', 0, true, array('_imgMode' => 1)) . ' ' . $cbUser->getField('pm', null, 'html', 'none', 'profile', 0, true, array('_imgMode' => 1)) . '</td>' . '<td class="text-center">' . moscomprofilerHTML::selectList($connectionTypes, $connection->id . 'connectiontype[]', 'class="form-control" multiple="multiple" size="5"', 'value', 'text', explode('|*|', trim($connection->type)), 0) . '</td>' . '<td class="text-center">' . '<textarea cols="25" class="form-control" rows="5" name="' . (int) $connection->id . 'description">' . htmlspecialchars($connection->description) . '</textarea>' . '<input type="hidden" name="uid[]" value="' . (int) $connection->id . '" />' . '</td>' . '</tr>'; $i = $i == 1 ? 2 : 1; } $return .= '</tbody>' . '</table>'; if ($perpage < $total) { $return .= '<div class="form-group cb_form_line text-center clearfix">' . $connMgmtTabs->_writePaging($pagingParams, 'connections_', $perpage, $total, 'manageconnections') . '</div>'; } $return .= '<div class="form-group cb_form_line clearfix">' . '<input type="submit" class="btn btn-primary cbMngConnSubmit" value="' . htmlspecialchars(CBTxt::Th('UE_UPDATE', 'Update')) . '"' . cbValidator::getSubmitBtnHtmlAttributes() . ' />' . ' <input type="button" class="btn btn-default cbMngConnCancel" value="' . htmlspecialchars(CBTxt::Th('UE_CANCEL', 'Cancel')) . '" onclick="window.location=\'' . $_CB_framework->userProfileUrl() . '\'; return false;" />' . '</div>' . cbGetSpoofInputTag('manageconnections') . '</form>'; } $return .= $tabs->endTab(); if ($ueConfig['autoAddConnections'] == 0) { $return .= $tabs->startTab('myCon', CBTxt::Th('UE_CONNECTEDWITH', 'Manage Connections With Me'), 'connected'); if (!count($connecteds) > 0) { $return .= '<div class="form-group cb_form_line clearfix tab_description">' . CBTxt::Th('UE_NOCONNECTEDWITH', 'There are currently no users connected with you.') . '</div>' . '<div class="form-group cb_form_line clearfix">' . '<input type="button" class="btn btn-default cbMngConnCancel" value="' . htmlspecialchars(CBTxt::Th('UE_CANCEL', 'Cancel')) . '" onclick="window.location=\'' . $_CB_framework->userProfileUrl() . '\'; return false;" />' . '</div>'; } else { $htmlConnectedWidth = CBTxt::Th('UE_CONNECT_CONNECTEDWITH', ''); $return .= ($htmlConnectedWidth ? '<div class="form-group cb_form_line clearfix tab_description">' . $htmlConnectedWidth . '</div>' : null) . '<div class="table">'; foreach ($connecteds as $connected) { $cbUser = CBuser::getInstance((int) $connected->id, false); $tipField = '<b>' . CBTxt::Th('UE_CONNECTEDSINCE', 'Connected Since') . '</b>: ' . $_CB_framework->getUTCDate(array($ueConfig['date_format'], 'Y-m-d'), $connected->membersince); if ($connected->type != null) { $tipField .= '<br /><b>' . CBTxt::Th('UE_CONNECTIONTYPE', 'Type') . '</b>: ' . getConnectionTypes($connected->type); } if ($connected->description != null) { $tipField .= '<br /><b>' . CBTxt::Th('UE_CONNECTEDCOMMENT', 'Comment') . '</b>: ' . htmlspecialchars($connected->description); } $tipTitle = CBTxt::Th('UE_CONNECTEDDETAIL', 'Connection Details'); $htmlText = $cbUser->getField('avatar', null, 'html', 'none', 'list', 0, true); $tooltip = cbTooltip(1, $tipField, $tipTitle, 300, null, $htmlText, null, 'style="padding: 5px;"'); if ($connected->accepted == 1 && $connected->pending == 1) { $actionImg = '<span class="fa fa-clock-o" title="' . htmlspecialchars(CBTxt::T('UE_CONNECTIONPENDING', 'Connection Pending')) . '"></span>' . ' <a href="' . $_CB_framework->viewUrl('removeconnection', true, array('act' => 'manage', 'connectionid' => (int) $connected->memberid)) . '" >' . '<span class="fa fa-times-circle-o" title="' . htmlspecialchars(CBTxt::T('UE_REMOVECONNECTION', 'Remove Connection')) . '"></span>' . '</a>'; } elseif ($connected->accepted == 1 && $connected->pending == 0) { $actionImg = '<a href="' . $_CB_framework->viewUrl('denyconnection', true, array('act' => 'manage', 'connectionid' => (int) $connected->referenceid)) . '" >' . '<span class="fa fa-times-circle-o" title="' . htmlspecialchars(CBTxt::T('UE_REMOVECONNECTION', 'Remove Connection')) . '"></span>' . '</a>'; } elseif ($connected->accepted == 0) { $actionImg = '<a href="' . $_CB_framework->viewUrl('acceptconnection', true, array('act' => 'manage', 'connectionid' => (int) $connected->referenceid)) . '" >' . '<span class="fa fa-check-circle-o" title="' . htmlspecialchars(CBTxt::T('UE_ACCEPTCONNECTION', 'Accept Connection')) . '"></span>' . '</a>' . ' <a href="' . $_CB_framework->viewUrl('denyconnection', true, array('act' => 'manage', 'connectionid' => (int) $connected->referenceid)) . '" >' . '<span class="fa fa-times-circle-o" title="' . htmlspecialchars(CBTxt::T('UE_REMOVECONNECTION', 'Remove Connection')) . '"></span>' . '</a>'; } else { $actionImg = null; } $return .= '<div class="containerBox img-thumbnail">' . '<div class="containerBoxInner" style="min-height: 130px; min-width: 90px;">' . $actionImg . '<br />' . $cbUser->getField('onlinestatus', null, 'html', 'none', 'profile', 0, true, array('_imgMode' => 1)) . ' ' . $cbUser->getField('formatname', null, 'html', 'none', 'list', 0, true) . '<br />' . $tooltip . '<br />' . ' <a href="' . $_CB_framework->userProfileUrl((int) $connected->referenceid) . '">' . '<span class="fa fa-user" title="' . htmlspecialchars(CBTxt::T('UE_VIEWPROFILE', 'View Profile')) . '"></span>' . '</a>' . ' ' . $cbUser->getField('email', null, 'html', 'none', 'profile', 0, true, array('_imgMode' => 1)) . ' ' . $cbUser->getField('pm', null, 'html', 'none', 'profile', 0, true, array('_imgMode' => 1)) . '</div>' . '</div>'; } $return .= '</div>' . '<div class="form-group cb_form_line clearfix">' . '<input type="button" class="btn btn-default cbMngConnCancel" value="' . htmlspecialchars(CBTxt::Th('UE_CANCEL', 'Cancel')) . '" onclick="window.location=\'' . $_CB_framework->userProfileUrl() . '\'; return false;" />' . '</div>'; } $return .= $tabs->endTab(); } $return .= $tabs->endPane() . '</div>' . cbPoweredBy(); echo $return; $_CB_framework->setMenuMeta(); }
/** * @param string $photos * @param string $files * @param string $videos * @param string $music * @param UserTable $viewer * @param UserTable $user * @param TabTable $tab * @param cbTabHandler $plugin * @return string */ static public function showTab( $photos, $files, $videos, $music, $viewer, $user, $tab, $plugin ) { global $_PLUGINS; $_PLUGINS->trigger( 'gallery_onBeforeDisplayTab', array( &$photos, &$files, &$videos, &$music, $viewer, $user, $tab, $plugin ) ); $tabs = new cbTabs( 1, 1 ); $return = null; $count = 0; if ( $photos ) { $count++; } if ( $files ) { $count++; } if ( $videos ) { $count++; } if ( $music ) { $count++; } $tabbed = ( $count > 1 ); if ( $tabbed ) { $return .= $tabs->startPane( 'galleryTabs' ); } if ( $photos ) { if ( $tabbed ) { $return .= $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'TAB_PHOTOS', 'Photos' ) ), 'galleryTabPhotos' ) . $photos . $tabs->endTab(); } else { $return .= $photos; } } if ( $files ) { if ( $tabbed ) { $return .= $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'TAB_FILES', 'Files' ) ), 'galleryTabFiles' ) . $files . $tabs->endTab(); } else { $return .= $files; } } if ( $videos ) { if ( $tabbed ) { $return .= $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'TAB_VIDEOS', 'Videos' ) ), 'galleryTabVideos' ) . $videos . $tabs->endTab(); } else { $return .= $videos; } } if ( $music ) { if ( $tabbed ) { $return .= $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'TAB_MUSIC', 'Music' ) ), 'galleryTabMusic' ) . $music . $tabs->endTab(); } else { $return .= $music; } } if ( $tabbed ) { $return .= $tabs->endPane(); } return $return; }
/** * render backend config * * @param array $input * @param moscomprofilerUser $user * @param object $plugin */ static public function showConfig( $input, $user, $plugin ) { global $_CB_framework; HTML_cbgjAdmin::setTitle( CBTxt::T( 'Configuration' ), 'cbicon-48-gjconfig' ); $tabs = new cbTabs( 1, 2 ); $return = '<form action="' . $_CB_framework->backendUrl( 'index.php' ) . '" method="post" name="adminForm" enctype="multipart/form-data" id="adminForm" class="adminform">' . $tabs->startPane( 'gjConfig' ) . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'General' ) ), 'gjGeneral' ) . $tabs->startPane( 'gjGeneralTabs' ) . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Global' ) ), 'gjGeneralGlobal' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Title' ) . '</th>' . '<td width="40%">' . $input['general_title'] . '</td>' . '<td>' . CBTxt::Th( 'Optionally replace breadcrumb title from plugin name (CB GroupJive).' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Template' ) . '</th>' . '<td width="40%">' . $input['general_template'] . '</td>' . '<td>' . CBTxt::Ph( 'Select template to be used for all of GroupJive. If template is incomplete then missing files will be used from the default template. Template files can be located at the following location: [rel_path]/templates', array( '[rel_path]' => $plugin->relPath ) ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Class' ) . '</th>' . '<td width="40%">' . $input['general_class'] . '</td>' . '<td>' . CBTxt::Th( 'Optionally add a class suffix to surrounding DIV encasing all of GroupJive.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Item ID' ) . '</th>' . '<td width="40%">' . $input['general_itemid'] . '</td>' . '<td>' . CBTxt::Th( 'Optionally add an Item ID override.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Dynamic ID' ) . '</th>' . '<td width="40%">' . $input['general_dynamicid'] . '</td>' . '<td>' . CBTxt::Th( 'Optionally obtain Item ID for every URL. Please note this will perform a query for every URL in attempt to find its menu link.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Tooltips' ) . '</th>' . '<td width="40%">' . $input['general_tooltips'] . '</td>' . '<td>' . CBTxt::Th( 'Select method for tooltip display. Applies to frontend only.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Panes' ) . '</th>' . '<td width="40%">' . $input['general_panes'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable usage of Panes. Please note this will remove ALL menu structures. Only use if another means of menu display is available.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Validation' ) . '</th>' . '<td width="40%">' . $input['general_validate'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable usage of jQuery form validation. This will prevent users from submitting forms without the required inputs complete. Validation is always done after form submit regardless of this parameter.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Folder Permission' ) . '</th>' . '<td width="40%">' . $input['general_dirperms'] . '</td>' . '<td>' . CBTxt::Th( 'Optionally input folder permissions used for folder creation. Only configure if you are sure you know what you are doing.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'File Permission' ) . '</th>' . '<td width="40%">' . $input['general_fileperms'] . '</td>' . '<td>' . CBTxt::Th( 'Optionally input file permissions used for file creation. Only configure if you are sure you know what you are doing.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Word Filter' ) . '</th>' . '<td width="40%">' . $input['general_wordfilter'] . '</td>' . '<td>' . CBTxt::Th( 'Optionally input word filtering applied to all locations user text can be supplied. Separate a filter and its replacement with an equal (=) sign (e.g. idiot=genius). Separate multiple filters by a linebreak. Lanugage strings are supported. Leave replacement blank to simply remove the word (e.g. idiot=). Note only whole words will be replaced.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Logos' ) ), 'gjGeneralLogos' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Size' ) . '</th>' . '<td width="40%">' . $input['logo_size'] . '</td>' . '<td>' . CBTxt::Th( 'Input maximum file size for logos. If blank Community Builder avatar size will be used.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Width' ) . '</th>' . '<td width="40%">' . $input['logo_width'] . '</td>' . '<td>' . CBTxt::Th( 'Input maximum logo width. If blank Community Builder avatar width will be used.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Height' ) . '</th>' . '<td width="40%">' . $input['logo_height'] . '</td>' . '<td>' . CBTxt::Th( 'Input maximum logo height. If blank Community Builder avatar height will be used.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Thumbnail Width' ) . '</th>' . '<td width="40%">' . $input['logo_thumbwidth'] . '</td>' . '<td>' . CBTxt::Th( 'Input maximum logo thumbnail width. If blank Community Builder avatar thumbnail width will be used.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Thumbnail Height' ) . '</th>' . '<td width="40%">' . $input['logo_thumbheight'] . '</td>' . '<td>' . CBTxt::Th( 'Input maximum logo thumbnail height. If blank Community Builder avatar thumbnail height will be used.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Overrides' ) ), 'gjGeneralOverrides' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th colspan="3" style="text-align: center;">' . CBTxt::Th( 'Please note overrides may not function for all languages dependant on if the language uses variable nouns. Simply exclude the substitution (e.g. [category]) from your translation (e.g. "[category] Forums" => "Category Forums"). See documentation for further details on translating without Overrides as are completely optional within the translation.' ) . '</th>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Overview' ) . '</th>' . '<td width="40%">' . $input['override_overview_s'] . '</td>' . '<td>' . CBTxt::Th( 'Singular string override for Overview.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Panel' ) . '</th>' . '<td width="40%">' . $input['override_panel_s'] . '</td>' . '<td>' . CBTxt::Th( 'Singular string override for Panel.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Category' ) . '</th>' . '<td width="40%">' . '<div style="margin-bottom:5px;">' . CBTxt::P( 'Singular: [category]', array( '[category]' => $input['override_category_s'] ) ) . '</div>' . '<div>' . CBTxt::Ph( 'Plural: [categories]', array( '[categories]' => $input['override_category_p'] ) ) . '</div>' . '</td>' . '<td>' . CBTxt::Th( 'Singular and Plural string override for category.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Group' ) . '</th>' . '<td width="40%">' . '<div style="margin-bottom:5px;">' . CBTxt::P( 'Singular: [group]', array( '[group]' => $input['override_group_s'] ) ) . '</div>' . '<div>' . CBTxt::Ph( 'Plural: [groups]', array( '[groups]' => $input['override_group_p'] ) ) . '</div>' . '</td>' . '<td>' . CBTxt::Th( 'Singular and Plural string override for Group.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'User' ) . '</th>' . '<td width="40%">' . '<div style="margin-bottom:5px;">' . CBTxt::P( 'Singular: [user]', array( '[user]' => $input['override_user_s'] ) ) . '</div>' . '<div>' . CBTxt::Ph( 'Plural: [users]', array( '[users]' => $input['override_user_p'] ) ) . '</div>' . '</td>' . '<td>' . CBTxt::Th( 'Singular and Plural string override for User.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Owner' ) . '</th>' . '<td width="40%">' . $input['override_owner_s'] . '</td>' . '<td>' . CBTxt::Th( 'Singular string override for owner.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Moderator' ) . '</th>' . '<td width="40%">' . '<div style="margin-bottom:5px;">' . CBTxt::P( 'Singular: [mod]', array( '[mod]' => $input['override_mod_s'] ) ) . '</div>' . '<div>' . CBTxt::Ph( 'Plural: [users]', array( '[users]' => $input['override_mod_p'] ) ) . '</div>' . '</td>' . '<td>' . CBTxt::Th( 'Singular and Plural string override for Moderator.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Admin' ) . '</th>' . '<td width="40%">' . '<div style="margin-bottom:5px;">' . CBTxt::P( 'Singular: [admin]', array( '[admin]' => $input['override_admin_s'] ) ) . '</div>' . '<div>' . CBTxt::Ph( 'Plural: [admins]', array( '[admins]' => $input['override_admin_p'] ) ) . '</div>' . '</td>' . '<td>' . CBTxt::Th( 'Singular and Plural string override for Admin.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->endPane() . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Notifications' ) ), 'gjNotifications' ) . $tabs->startPane( 'gjNotificationsTabs' ) . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Global' ) ), 'gjNotificationsGlobal' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Notifications' ) . '</th>' . '<td width="40%">' . $input['general_notifications'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable sending and configuration of notifications. Moderators are exempt from this configuration.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Notify By' ) . '</th>' . '<td width="40%">' . $input['general_notifyby'] . '</td>' . '<td>' . CBTxt::Th( 'Select method for notifications. Notify By determines how users are contacted when a notification is sent.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'From Name' ) . '</th>' . '<td width="40%">' . $input['notifications_from_name'] . '</td>' . '<td>' . CBTxt::Th( 'Optionally input notification email name. This will override the users name sent with email.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'From Address' ) . '</th>' . '<td width="40%">' . $input['notifications_from_address'] . '</td>' . '<td>' . CBTxt::Th( 'Optionally input notification email address. This will override the users email address sent with email.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Description' ) . '</th>' . '<td width="40%">' . $input['notifications_desc'] . '</td>' . '<td>' . CBTxt::Th( 'Optionally add description to be shown above notifications display.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Content Plugins' ) . '</th>' . '<td width="40%">' . $input['notifications_desc_content'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable processing of content plugins on notifications description.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'General' ) ), 'gjNotificationsGeneral' ) . $tabs->startPane( 'gjNotificationsGeneralTabs' ) . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Display' ) ), 'gjNotificationsGeneralDisplay' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Description' ) . '</th>' . '<td width="40%">' . $input['notifications_desc_gen'] . '</td>' . '<td>' . CBTxt::Th( 'Optionally add description to be shown above general notifications display.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Content Plugins' ) . '</th>' . '<td width="40%">' . $input['notifications_desc_gen_content'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable processing of content plugins on general notifications description.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Defaults' ) ), 'gjNotificationsGeneralDefaults' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Create Category' ) . '</th>' . '<td width="40%">' . $input['notifications_general_categorynew'] . '</td>' . '<td>' . CBTxt::Th( 'Select default value for general notification parameter "Create of new category".' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Category Approval' ) . '</th>' . '<td width="40%">' . $input['notifications_general_categoryapprove'] . '</td>' . '<td>' . CBTxt::Th( 'Select default value for general notification parameter "New category requires approval".' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Update Category' ) . '</th>' . '<td width="40%">' . $input['notifications_general_categoryupdate'] . '</td>' . '<td>' . CBTxt::Th( 'Select default value for general notification parameter "Update of existing category".' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Delete Category' ) . '</th>' . '<td width="40%">' . $input['notifications_general_categorydelete'] . '</td>' . '<td>' . CBTxt::Th( 'Select default value for general notification parameter "Delete of existing category".' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->endPane() . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Categories' ) ), 'gjNotificationsCategories' ) . $tabs->startPane( 'gjNotificationsCategoriesTabs' ) . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Display' ) ), 'gjNotificationsCategoriesDisplay' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Description' ) . '</th>' . '<td width="40%">' . $input['notifications_desc_cat'] . '</td>' . '<td>' . CBTxt::Th( 'Optionally add description to be shown above categories notifications display.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Content Plugins' ) . '</th>' . '<td width="40%">' . $input['notifications_desc_cat_content'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable processing of content plugins on categories notifications description.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Defaults' ) ), 'gjNotificationsCategoriesDefaults' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Create Nested' ) . '</th>' . '<td width="40%">' . $input['notifications_category_nestednew'] . '</td>' . '<td>' . CBTxt::Th( 'Select default value for category notification parameter "Create of new nested category".' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Nested Approval' ) . '</th>' . '<td width="40%">' . $input['notifications_category_nestedapprove'] . '</td>' . '<td>' . CBTxt::Th( 'Select default value for category notification parameter "New nested category requires approval".' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Update Nested' ) . '</th>' . '<td width="40%">' . $input['notifications_category_nestedupdate'] . '</td>' . '<td>' . CBTxt::Th( 'Select default value for category notification parameter "Update of existing nested category".' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Delete Nested' ) . '</th>' . '<td width="40%">' . $input['notifications_category_nesteddelete'] . '</td>' . '<td>' . CBTxt::Th( 'Select default value for category notification parameter "Delete of existing nested category".' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Create Group' ) . '</th>' . '<td width="40%">' . $input['notifications_category_groupnew'] . '</td>' . '<td>' . CBTxt::Th( 'Select default value for category notification parameter "Create of new group".' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Group Approval' ) . '</th>' . '<td width="40%">' . $input['notifications_category_groupapprove'] . '</td>' . '<td>' . CBTxt::Th( 'Select default value for category notification parameter "New group requires approval".' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Update Group' ) . '</th>' . '<td width="40%">' . $input['notifications_category_groupupdate'] . '</td>' . '<td>' . CBTxt::Th( 'Select default value for category notification parameter "Update of existing group".' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Delete Group' ) . '</th>' . '<td width="40%">' . $input['notifications_category_groupdelete'] . '</td>' . '<td>' . CBTxt::Th( 'Select default value for category notification parameter "Delete of existing group".' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->endPane() . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Groups' ) ), 'gjNotificationsGroups' ) . $tabs->startPane( 'gjNotificationsGroupsTabs' ) . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Display' ) ), 'gjNotificationsGroupsDisplay' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Description' ) . '</th>' . '<td width="40%">' . $input['notifications_desc_grp'] . '</td>' . '<td>' . CBTxt::Th( 'Optionally add description to be shown above groups notifications display.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Content Plugins' ) . '</th>' . '<td width="40%">' . $input['notifications_desc_grp_content'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable processing of content plugins on groups notifications description.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Defaults' ) ), 'gjNotificationsGroupsDefaults' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Create Nested' ) . '</th>' . '<td width="40%">' . $input['notifications_group_nestednew'] . '</td>' . '<td>' . CBTxt::Th( 'Select default value for group notification parameter "Create of new nested group".' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Nested Approval' ) . '</th>' . '<td width="40%">' . $input['notifications_group_nestedapprove'] . '</td>' . '<td>' . CBTxt::Th( 'Select default value for group notification parameter "New nested group requires approval".' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Update Nested' ) . '</th>' . '<td width="40%">' . $input['notifications_group_nestedupdate'] . '</td>' . '<td>' . CBTxt::Th( 'Select default value for group notification parameter "Update of existing nested group".' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Delete Nested' ) . '</th>' . '<td width="40%">' . $input['notifications_group_nesteddelete'] . '</td>' . '<td>' . CBTxt::Th( 'Select default value for group notification parameter "Delete of existing nested group".' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'User Join' ) . '</th>' . '<td width="40%">' . $input['notifications_group_userjoin'] . '</td>' . '<td>' . CBTxt::Th( 'Select default value for group notification parameter "Join of new user".' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'User Leave' ) . '</th>' . '<td width="40%">' . $input['notifications_group_userleave'] . '</td>' . '<td>' . CBTxt::Th( 'Select default value for group notification parameter "Leave of existing user".' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Invite Sent' ) . '</th>' . '<td width="40%">' . $input['notifications_group_userinvite'] . '</td>' . '<td>' . CBTxt::Th( 'Select default value for group notification parameter "Invite of new user".' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'User Approval' ) . '</th>' . '<td width="40%">' . $input['notifications_group_userapprove'] . '</td>' . '<td>' . CBTxt::Th( 'Select default value for group notification parameter "New user requires approval".' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Invite Accepted' ) . '</th>' . '<td width="40%">' . $input['notifications_group_inviteaccept'] . '</td>' . '<td>' . CBTxt::Th( 'Select default value for group notification parameter "My group invite requests accepted".' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->endPane() . $tabs->endTab() . $tabs->endPane() . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Overview' ) ), 'gjOverview' ) . $tabs->startPane( 'gjOverviewTabs' ) . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Display' ) ), 'gjOverviewDisplay' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Logo' ) . '</th>' . '<td width="40%">' . $input['overview_logo'] . '</td>' . '<td>' . CBTxt::Ph( 'Select logo to be used on overview pane display. Logo images can be located at the following location: [rel_path]/images', array( '[rel_path]' => $plugin->relPath ) ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Description' ) . '</th>' . '<td width="40%">' . $input['overview_desc'] . '</td>' . '<td>' . CBTxt::Th( 'Optionally add description to be shown on overview pane display.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Content Plugins' ) . '</th>' . '<td width="40%">' . $input['overview_desc_content'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable processing of content plugins on overview description.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'New Category' ) . '</th>' . '<td width="40%">' . $input['overview_new_category'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable display of quick new category link on overview.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'New Group' ) . '</th>' . '<td width="40%">' . $input['overview_new_group'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable display of quick new group link on overview.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Messages' ) ), 'gjOverviewMessages' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Editor' ) . '</th>' . '<td width="40%">' . $input['overview_message_editor'] . '</td>' . '<td>' . CBTxt::Th( 'Select editor for overview messaging.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Categories' ) ), 'gjOverviewCategories' ) . $tabs->startPane( 'gjOverviewCategoriesTabs' ) . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Display' ) ), 'gjOverviewCategoriesDisplay' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Description Length' ) . '</th>' . '<td width="40%">' . $input['overview_cat_desc_limit'] . '</td>' . '<td>' . CBTxt::Th( 'Optionally input maxiumum description length of categories. Leave blank or 0 for no limit.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Order By' ) . '</th>' . '<td width="40%">' . $input['overview_orderby'] . '</td>' . '<td>' . CBTxt::Th( 'Select ordering of categories.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Paging' ) ), 'gjOverviewCategoriesPaging' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Paging' ) . '</th>' . '<td width="40%">' . $input['overview_paging'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable usage of paging on categories overview.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::T( 'Page Limitbox' ) . '</th>' . '<td width="50%">' . $input['overview_limitbox'] . '</td>' . '<td>' . CBTxt::T( 'Enable or disable usage of page limit on categories overview. Requires Paging to be Enabled.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::T( 'Page Limit' ) . '</th>' . '<td width="50%">' . $input['overview_limit'] . '</td>' . '<td>' . CBTxt::T( 'Input default page limit on categories overview. Page limit determines how many categories are displayed per page.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Search' ) . '</th>' . '<td width="40%">' . $input['overview_search'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable usage of searching on categories overview.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->endPane() . $tabs->endTab() . $tabs->endPane() . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Panel' ) ), 'gjPanel' ) . $tabs->startPane( 'gjPanelTabs' ) . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'General' ) ), 'gjPanelGeneral' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Panel' ) . '</th>' . '<td width="40%">' . $input['overview_panel'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable display and usage of panel. Moderators are exempt from this configuration.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Logo' ) . '</th>' . '<td width="40%">' . $input['panel_logo'] . '</td>' . '<td>' . CBTxt::Ph( 'Select logo to be used on Panel pane display. Logo images can be located at the following location: [rel_path]/images', array( '[rel_path]' => $plugin->relPath ) ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Description' ) . '</th>' . '<td width="40%">' . $input['panel_desc'] . '</td>' . '<td>' . CBTxt::Th( 'Optionally add description to be shown on panel pane display.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Content Plugins' ) . '</th>' . '<td width="40%">' . $input['panel_desc_content'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable processing of content plugins on panel description.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'New Category' ) . '</th>' . '<td width="40%">' . $input['panel_new_category'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable display of quick new category link on panel.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'New Group' ) . '</th>' . '<td width="40%">' . $input['panel_new_group'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable display of quick new group link on panel.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Categories' ) ), 'gjPanelCategories' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Display' ) . '</th>' . '<td width="40%">' . $input['panel_category_display'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable display of categories menu link on Panel.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Groups' ) ), 'gjPanelGroups' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Display' ) . '</th>' . '<td width="40%">' . $input['panel_group_display'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable display of groups menu link on Panel.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Joined' ) ), 'gjPanelJoined' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Display' ) . '</th>' . '<td width="40%">' . $input['panel_joined_display'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable display of Joined menu link on Panel.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Invites' ) ), 'gjPanelInvites' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Display' ) . '</th>' . '<td width="40%">' . $input['panel_invites_display'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable display of Invites menu link on Panel.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Invited' ) ), 'gjPanelInvited' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Display' ) . '</th>' . '<td width="40%">' . $input['panel_invited_display'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable display of Invited To menu link on Panel.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->endPane() . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Categories' ) ), 'gjCategories' ) . $tabs->startPane( 'gjCategoriesTabs' ) . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'General' ) ), 'gjCategoriesGeneral' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Logo' ) . '</th>' . '<td width="40%">' . $input['category_logo'] . '</td>' . '<td>' . CBTxt::Ph( 'Select default logo for newly created categories or categories without a logo. Logo images can be located at the following location: [rel_path]/images', array( '[rel_path]' => $plugin->relPath ) ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Create' ) . '</th>' . '<td width="40%">' . $input['category_create'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable the creation of categories. Moderators are exempt from this configuration.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Create Access' ) . '</th>' . '<td width="40%">' . $input['category_create_access'] . '</td>' . '<td>' . CBTxt::Th( 'Select category create access. Access determines who can create categories. The group selected as well as those above it will have access (e.g. Registered will also be accessible to Author). Moderators are exempt from this configuration.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Nested' ) . '</th>' . '<td width="40%">' . $input['category_nested'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable nested categories. Nested categories allow categories within categories. Moderatorsa are exempt from this configuration and can always create nested categories.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Nested Access' ) . '</th>' . '<td width="40%">' . $input['category_nested_access'] . '</td>' . '<td>' . CBTxt::Th( 'Select category nested access. Access determines who can create nested categories. The group selected as well as those above it will have access (e.g. Registered will also be accessible to Author). Moderators are exempt from this configuration.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Approve' ) . '</th>' . '<td width="40%">' . $input['category_approve'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable approval of newly created categories. Categories will require approval by a Moderator to be published. Moderators are exempt from this configuration.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Limit' ) . '</th>' . '<td width="40%">' . $input['category_limit'] . '</td>' . '<td>' . CBTxt::Th( 'Set the number of categories a user is allowed to create. Total is based off published and unpublished categories. Leave blank or 0 for unlimited. Moderators are exempt from this configuration.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Captcha' ) . '</th>' . '<td width="40%">' . $input['category_captcha'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable usage of Captcha on new category creation. Requires latest CB Captcha or integrated Captcha to be installed and published. Moderators are exempt from this configuration.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'New Category' ) . '</th>' . '<td width="40%">' . $input['category_new_category'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable display of quick new nested category link on categories.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'New Group' ) . '</th>' . '<td width="40%">' . $input['category_new_group'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable display of quick new group link on categories.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Hide Empty' ) . '</th>' . '<td width="40%">' . $input['category_hide_empty'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable display of categories with no groups for all displays. Note users with permission to create groups or nested categories will see the category. Group count check only includes a categories direct groups and does not check for nested category groups.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Description' ) ), 'gjCategoriesDescription' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Editor' ) . '</th>' . '<td width="40%">' . $input['category_editor'] . '</td>' . '<td>' . CBTxt::Th( 'Select editor for category description.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Input Limit' ) . '</th>' . '<td width="40%">' . $input['category_desc_inputlimit'] . '</td>' . '<td>' . CBTxt::Th( 'Input category description character count limit. If left blank or zero no limit will be applied. Moderators are exempt from this configuration.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Content Plugins' ) . '</th>' . '<td width="40%">' . $input['category_desc_content'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable processing of content plugins on category description.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Messages' ) ), 'gjCategoriesMessages' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Display' ) . '</th>' . '<td width="40%">' . $input['category_message'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable messaging of a categories groups. Moderators are exempt from this configuration.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Editor' ) . '</th>' . '<td width="40%">' . $input['category_message_editor'] . '</td>' . '<td>' . CBTxt::Th( 'Select editor for category messaging.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Captcha' ) . '</th>' . '<td width="40%">' . $input['category_message_captcha'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable usage of Captcha on category messaging. Requires latest CB Captcha or integrated Captcha to be installed and published. Moderators are exempt from this configuration.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Nested' ) ), 'gjCategoriesNested' ) . $tabs->startPane( 'gjCategoriesNestedTabs' ) . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Display' ) ), 'gjCategoriesNestedDisplay' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Description Length' ) . '</th>' . '<td width="40%">' . $input['category_nested_desc_limit'] . '</td>' . '<td>' . CBTxt::Th( 'Optionally input maxiumum description length of categories. Leave blank or 0 for no limit.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Order By' ) . '</th>' . '<td width="40%">' . $input['category_nested_orderby'] . '</td>' . '<td>' . CBTxt::Th( 'Select ordering of categories.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Paging' ) ), 'gjCategoriesNestedPaging' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Paging' ) . '</th>' . '<td width="40%">' . $input['category_nested_paging'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable usage of paging on categories.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::T( 'Page Limitbox' ) . '</th>' . '<td width="50%">' . $input['category_nested_limitbox'] . '</td>' . '<td>' . CBTxt::T( 'Enable or disable usage of page limit on categories. Requires Paging to be Enabled.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::T( 'Page Limit' ) . '</th>' . '<td width="50%">' . $input['category_nested_limit'] . '</td>' . '<td>' . CBTxt::T( 'Input default page limit on categories. Page limit determines how many categories are displayed per page.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Search' ) . '</th>' . '<td width="40%">' . $input['category_nested_search'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable usage of searching on categories.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->endPane() . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'All' ) ), 'gjCategoriesAll' ) . $tabs->startPane( 'gjCategoriesAllTabs' ) . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Display' ) ), 'gjCategoriesAllDisplay' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Description Length' ) . '</th>' . '<td width="40%">' . $input['category_all_desc_limit'] . '</td>' . '<td>' . CBTxt::Th( 'Optionally input maxiumum description length of categories. Leave blank or 0 for no limit.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Order By' ) . '</th>' . '<td width="40%">' . $input['category_all_orderby'] . '</td>' . '<td>' . CBTxt::Th( 'Select ordering of categories.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Paging' ) ), 'gjCategoriesAllPaging' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Paging' ) . '</th>' . '<td width="40%">' . $input['category_all_paging'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable usage of paging on categories.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::T( 'Page Limitbox' ) . '</th>' . '<td width="50%">' . $input['category_all_limitbox'] . '</td>' . '<td>' . CBTxt::T( 'Enable or disable usage of page limit on categories. Requires Paging to be Enabled.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::T( 'Page Limit' ) . '</th>' . '<td width="50%">' . $input['category_all_limit'] . '</td>' . '<td>' . CBTxt::T( 'Input default page limit on categories. Page limit determines how many categories are displayed per page.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Search' ) . '</th>' . '<td width="40%">' . $input['category_all_search'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable usage of searching on categories.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->endPane() . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Approval' ) ), 'gjCategoriesApproval' ) . $tabs->startPane( 'gjCategoriesApprovalTabs' ) . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Display' ) ), 'gjCategoriesApprovalDisplay' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Description Length' ) . '</th>' . '<td width="40%">' . $input['category_approval_desc_limit'] . '</td>' . '<td>' . CBTxt::Th( 'Optionally input maxiumum description length of categories. Leave blank or 0 for no limit.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Order By' ) . '</th>' . '<td width="40%">' . $input['category_approval_orderby'] . '</td>' . '<td>' . CBTxt::Th( 'Select ordering of categories.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Paging' ) ), 'gjCategoriesApprovalPaging' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Paging' ) . '</th>' . '<td width="40%">' . $input['category_approval_paging'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable usage of paging on categories.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::T( 'Page Limitbox' ) . '</th>' . '<td width="50%">' . $input['category_approval_limitbox'] . '</td>' . '<td>' . CBTxt::T( 'Enable or disable usage of page limit on categories. Requires Paging to be Enabled.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::T( 'Page Limit' ) . '</th>' . '<td width="50%">' . $input['category_approval_limit'] . '</td>' . '<td>' . CBTxt::T( 'Input default page limit on categories. Page limit determines how many categories are displayed per page.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Search' ) . '</th>' . '<td width="40%">' . $input['category_approval_search'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable usage of searching on categories.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->endPane() . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Groups' ) ), 'gjCategoriesGroups' ) . $tabs->startPane( 'gjCategoriesGroupsTabs' ) . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Display' ) ), 'gjCategoriesGroupsDisplay' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Description Length' ) . '</th>' . '<td width="40%">' . $input['category_groups_desc_limit'] . '</td>' . '<td>' . CBTxt::Th( 'Optionally input maxiumum description length of groups. Leave blank or 0 for no limit.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Order By' ) . '</th>' . '<td width="40%">' . $input['category_groups_orderby'] . '</td>' . '<td>' . CBTxt::Th( 'Select ordering of groups.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Paging' ) ), 'gjCategoriesGroupsPaging' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Paging' ) . '</th>' . '<td width="40%">' . $input['category_groups_paging'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable usage of paging on groups.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::T( 'Page Limitbox' ) . '</th>' . '<td width="50%">' . $input['category_groups_limitbox'] . '</td>' . '<td>' . CBTxt::T( 'Enable or disable usage of page limit on groups. Requires Paging to be Enabled.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::T( 'Page Limit' ) . '</th>' . '<td width="50%">' . $input['category_groups_limit'] . '</td>' . '<td>' . CBTxt::T( 'Input default page limit on groups. Page limit determines how many groups are displayed per page.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Search' ) . '</th>' . '<td width="40%">' . $input['category_groups_search'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable usage of searching on groups.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->endPane() . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Defaults' ) ), 'gjCategoriesDefaults' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Types' ) . '</th>' . '<td width="40%">' . $input['category_types_default'] . ' ' . $input['category_types_config'] . '</td>' . '<td>' . CBTxt::Th( 'Select default value for category parameter "Types". Additionally select the display of the "Types" category parameter. Moderators are exempt from this configuration.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Access' ) . '</th>' . '<td width="40%">' . $input['category_access_default'] . ' ' . $input['category_access_config'] . '</td>' . '<td>' . CBTxt::Th( 'Select default value for category parameter "Access". Additionally select the display of the "Access" category parameter. Moderators are exempt from this configuration.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Create' ) . '</th>' . '<td width="40%">' . $input['category_create_default'] . ' ' . $input['category_create_config'] . '</td>' . '<td>' . CBTxt::Th( 'Select default value for category parameter "Create". Additionally select the display of the "Create" category parameter. Moderators are exempt from this configuration.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Create Access' ) . '</th>' . '<td width="40%">' . $input['category_createaccess_default'] . ' ' . $input['category_createaccess_config'] . '</td>' . '<td>' . CBTxt::Th( 'Select default value for category parameter "Create Access". Additionally select the display of the "Create Access" category parameter. Moderators are exempt from this configuration.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Nested' ) . '</th>' . '<td width="40%">' . $input['category_nested_default'] . ' ' . $input['category_nested_config'] . '</td>' . '<td>' . CBTxt::Th( 'Select default value for category parameter "Nested". Additionally select the display of the "Nested" category parameter. Moderators are exempt from this configuration.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Nested Access' ) . '</th>' . '<td width="40%">' . $input['category_nestedaccess_default'] . ' ' . $input['category_nestedaccess_config'] . '</td>' . '<td>' . CBTxt::Th( 'Select default value for category parameter "Nested Access". Additionally select the display of the "Nested Access" category parameter. Moderators are exempt from this configuration.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->endPane() . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Groups' ) ), 'gjGroups' ) . $tabs->startPane( 'gjGroupsTabs' ) . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'General' ) ), 'gjGroupsGeneral' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Logo' ) . '</th>' . '<td width="40%">' . $input['group_logo'] . '</td>' . '<td>' . CBTxt::Ph( 'Select default logo for newly created groups or groups without a logo. Logo images can be located at the following location: [rel_path]/images', array( '[rel_path]' => $plugin->relPath ) ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Create' ) . '</th>' . '<td width="40%">' . $input['group_create'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable the creation of groups. Moderators and category owners are exempt from this configuration.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Create Access' ) . '</th>' . '<td width="40%">' . $input['group_create_access'] . '</td>' . '<td>' . CBTxt::Th( 'Select group create access. Access determines who can create groups. The group selected as well as those above it will have access (e.g. Registered will also be accessible to Author). Moderators are exempt from this configuration.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Nested' ) . '</th>' . '<td width="40%">' . $input['group_nested'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable nested groups. Nested groups allow groups within groups. Moderators are exempt from this configuration.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Nested Access' ) . '</th>' . '<td width="40%">' . $input['group_nested_access'] . '</td>' . '<td>' . CBTxt::Th( 'Select group nested access. Access determines who can create nested groups. The group selected as well as those above it will have access (e.g. Registered will also be accessible to Author). Moderators are exempt from this configuration.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Approve' ) . '</th>' . '<td width="40%">' . $input['group_approve'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable approval of newly created groups. Groups will require approval by category owner or a moderator to be published. Moderators and category owners are exempt from this configuration.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Leave' ) . '</th>' . '<td width="40%">' . $input['group_leave'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable users leaving groups. Moderators and category owners are exempt from this configuration.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Limit' ) . '</th>' . '<td width="40%">' . $input['group_limit'] . '</td>' . '<td>' . CBTxt::Th( 'Set the number of groups a user is allowed to create. Total is based off published and unpublished groups. Leave blank or 0 for unlimited. Moderators are exempt from this configuration.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Toggle' ) . '</th>' . '<td width="40%">' . $input['group_toggle'] . '</td>' . '<td>' . CBTxt::Th( 'Select if group tabs new content display is toggled or always shown.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Captcha' ) . '</th>' . '<td width="40%">' . $input['group_captcha'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable usage of captcha on new group creation. Requires latest CB Captcha or integrated captcha to be installed and published. Moderators are exempt from this configuration.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'New Group' ) . '</th>' . '<td width="40%">' . $input['group_new_group'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable display of quick new nested group link on groups.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Description' ) ), 'gjGroupsDescription' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Editor' ) . '</th>' . '<td width="40%">' . $input['group_editor'] . '</td>' . '<td>' . CBTxt::Th( 'Select editor for group description.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Input Limit' ) . '</th>' . '<td width="40%">' . $input['group_desc_inputlimit'] . '</td>' . '<td>' . CBTxt::Th( 'Input group description character count limit. If left blank or zero no limit will be applied. Moderators are exempt from this configuration.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Content Plugins' ) . '</th>' . '<td width="40%">' . $input['group_desc_content'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable processing of content plugins on group description.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Messages' ) ), 'gjGroupsMessages' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Display' ) . '</th>' . '<td width="40%">' . $input['group_message'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable messaging of a groups users. Moderators and category owners are exempt from this configuration and can always message.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Access' ) . '</th>' . '<td width="40%">' . $input['group_message_perm'] . '</td>' . '<td>' . CBTxt::Th( 'Select group message access. Message access determines what type of users can message group users (e.g. Users signify only those a member of the group can message). The users above the selected will also have permission. Moderators and category owners are exempt from this configuration.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Editor' ) . '</th>' . '<td width="40%">' . $input['group_message_editor'] . '</td>' . '<td>' . CBTxt::Th( 'Select editor for Group messaging.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Captcha' ) . '</th>' . '<td width="40%">' . $input['group_message_captcha'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable usage of Captcha on Group messaging. Requires latest CB Captcha or integrated Captcha to be installed and published. Moderators are exempt from this configuration.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Nested' ) ), 'gjGroupsNested' ) . $tabs->startPane( 'gjGroupsNestedTabs' ) . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Display' ) ), 'gjGroupsNestedDisplay' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Description Length' ) . '</th>' . '<td width="40%">' . $input['group_nested_desc_limit'] . '</td>' . '<td>' . CBTxt::Th( 'Optionally input maxiumum description length of groups. Leave blank or 0 for no limit.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Order By' ) . '</th>' . '<td width="40%">' . $input['group_nested_orderby'] . '</td>' . '<td>' . CBTxt::Th( 'Select ordering of groups.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Paging' ) ), 'gjGroupsNestedPaging' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Paging' ) . '</th>' . '<td width="40%">' . $input['group_nested_paging'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable usage of paging on groups.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::T( 'Page Limitbox' ) . '</th>' . '<td width="50%">' . $input['group_nested_limitbox'] . '</td>' . '<td>' . CBTxt::T( 'Enable or disable usage of page limit on groups. Requires Paging to be Enabled.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::T( 'Page Limit' ) . '</th>' . '<td width="50%">' . $input['group_nested_limit'] . '</td>' . '<td>' . CBTxt::T( 'Input default page limit on groups. Page limit determines how many groups are displayed per page.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Search' ) . '</th>' . '<td width="40%">' . $input['group_nested_search'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable usage of searching on groups.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->endPane() . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'All' ) ), 'gjGroupsAll' ) . $tabs->startPane( 'gjGroupsAllTabs' ) . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Display' ) ), 'gjGroupsAllDisplay' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Description Length' ) . '</th>' . '<td width="40%">' . $input['group_all_desc_limit'] . '</td>' . '<td>' . CBTxt::Th( 'Optionally input maxiumum description length of groups. Leave blank or 0 for no limit.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Order By' ) . '</th>' . '<td width="40%">' . $input['group_all_orderby'] . '</td>' . '<td>' . CBTxt::Th( 'Select ordering of groups.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Paging' ) ), 'gjGroupsAllPaging' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Paging' ) . '</th>' . '<td width="40%">' . $input['group_all_paging'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable usage of paging on groups.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::T( 'Page Limitbox' ) . '</th>' . '<td width="50%">' . $input['group_all_limitbox'] . '</td>' . '<td>' . CBTxt::T( 'Enable or disable usage of page limit on groups. Requires Paging to be Enabled.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::T( 'Page Limit' ) . '</th>' . '<td width="50%">' . $input['group_all_limit'] . '</td>' . '<td>' . CBTxt::T( 'Input default page limit on groups. Page limit determines how many groups are displayed per page.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Search' ) . '</th>' . '<td width="40%">' . $input['group_all_search'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable usage of searching on groups.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->endPane() . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Approval' ) ), 'gjGroupsApproval' ) . $tabs->startPane( 'gjGroupsApprovalTabs' ) . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Display' ) ), 'gjGroupsApprovalDisplay' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Description Length' ) . '</th>' . '<td width="40%">' . $input['group_approval_desc_limit'] . '</td>' . '<td>' . CBTxt::Th( 'Optionally input maxiumum description length of groups. Leave blank or 0 for no limit.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Order By' ) . '</th>' . '<td width="40%">' . $input['group_approval_orderby'] . '</td>' . '<td>' . CBTxt::Th( 'Select ordering of groups.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Paging' ) ), 'gjGroupsApprovalPaging' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Paging' ) . '</th>' . '<td width="40%">' . $input['group_approval_paging'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable usage of paging on groups.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::T( 'Page Limitbox' ) . '</th>' . '<td width="50%">' . $input['group_approval_limitbox'] . '</td>' . '<td>' . CBTxt::T( 'Enable or disable usage of page limit on groups. Requires Paging to be Enabled.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::T( 'Page Limit' ) . '</th>' . '<td width="50%">' . $input['group_approval_limit'] . '</td>' . '<td>' . CBTxt::T( 'Input default page limit on groups. Page limit determines how many groups are displayed per page.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Search' ) . '</th>' . '<td width="40%">' . $input['group_approval_search'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable usage of searching on groups.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->endPane() . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Users' ) ), 'gjGroupsUsers' ) . $tabs->startPane( 'gjGroupsUsersTabs' ) . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Paging' ) ), 'gjGroupsUsersPaging' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Paging' ) . '</th>' . '<td width="40%">' . $input['group_users_paging'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable usage of paging on users.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::T( 'Page Limitbox' ) . '</th>' . '<td width="50%">' . $input['group_users_limitbox'] . '</td>' . '<td>' . CBTxt::T( 'Enable or disable usage of page limit on users. Requires Paging to be Enabled.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::T( 'Page Limit' ) . '</th>' . '<td width="50%">' . $input['group_users_limit'] . '</td>' . '<td>' . CBTxt::T( 'Input default page limit on users. Page limit determines how many users are displayed per page.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Search' ) . '</th>' . '<td width="40%">' . $input['group_users_search'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable usage of searching on users.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Approval' ) ), 'gjGroupsUsersApproval' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Paging' ) . '</th>' . '<td width="40%">' . $input['group_users_approval_paging'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable usage of paging on users.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::T( 'Page Limitbox' ) . '</th>' . '<td width="50%">' . $input['group_users_approval_limitbox'] . '</td>' . '<td>' . CBTxt::T( 'Enable or disable usage of page limit on users. Requires Paging to be Enabled.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::T( 'Page Limit' ) . '</th>' . '<td width="50%">' . $input['group_users_approval_limit'] . '</td>' . '<td>' . CBTxt::T( 'Input default page limit on users. Page limit determines how many users are displayed per page.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Search' ) . '</th>' . '<td width="40%">' . $input['group_users_approval_search'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable usage of searching on users.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->endPane() . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Invites' ) ), 'gjGroupsInvites' ) . $tabs->startPane( 'gjGroupsInvitesTabs' ) . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'General' ) ), 'gjGroupsInvitesGeneral' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Display' ) . '</th>' . '<td width="40%">' . $input['group_invites_display'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable display of invites tab on groups.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Invite By' ) . '</th>' . '<td width="40%">' . $input['group_invites_by'] . '</td>' . '<td>' . CBTxt::Th( 'Select how users may invite others to join groups. At least one method is required to be provided.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Captcha' ) . '</th>' . '<td width="40%">' . $input['group_invites_captcha'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable usage of Captcha on Invites tab. Requires latest CB Captcha or integrated Captcha to be installed and published. Moderators are exempt from this configuration.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Connections' ) . '</th>' . '<td width="40%">' . $input['group_invites_list'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable usage of connections dropdown list. This will allow quickly selecting a connected user to invite.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Auto Accept' ) . '</th>' . '<td width="40%">' . $input['group_invites_accept'] . '</td>' . '<td>' . CBTxt::Th( 'Enabled or disable auto accept of group invites on registration.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Paging' ) ), 'gjGroupsInvitesPaging' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Paging' ) . '</th>' . '<td width="40%">' . $input['group_invites_paging'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable usage of paging on invites group tab.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::T( 'Page Limitbox' ) . '</th>' . '<td width="50%">' . $input['group_invites_limitbox'] . '</td>' . '<td>' . CBTxt::T( 'Enable or disable usage of page limit on invites group tab. Requires Paging to be Enabled.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::T( 'Page Limit' ) . '</th>' . '<td width="50%">' . $input['group_invites_limit'] . '</td>' . '<td>' . CBTxt::T( 'Input default page limit on invites group tab. Page limit determines how many invites are displayed per page.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Search' ) . '</th>' . '<td width="40%">' . $input['group_invites_search'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable usage of searching on invites group tab.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->endPane() . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Defaults' ) ), 'gjGroupsDefaults' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Type' ) . '</th>' . '<td width="40%">' . $input['group_type_default'] . ' ' . $input['group_type_config'] . '</td>' . '<td>' . CBTxt::Th( 'Select default value for group parameter "Type". Additionally select the display of the "Type" group parameter. Moderators are exempt from this configuration.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Group Access' ) . '</th>' . '<td width="40%">' . $input['group_access_default'] . ' ' . $input['group_access_config'] . '</td>' . '<td>' . CBTxt::Th( 'Select default value for group parameter "Group Access". Additionally select the display of the "Group Access" group parameter. Moderators are exempt from this configuration.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Invite Access' ) . '</th>' . '<td width="40%">' . $input['group_invite_default'] . ' ' . $input['group_invite_config'] . '</td>' . '<td>' . CBTxt::Th( 'Select default value for group parameter "Invite Access". Additionally select the display of the "Invite Access" group parameter. Moderators are exempt from this configuration.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Users Public' ) . '</th>' . '<td width="40%">' . $input['group_users_default'] . ' ' . $input['group_users_config'] . '</td>' . '<td>' . CBTxt::Th( 'Select default value for group parameter "Users Public". Additionally select the display of the "Users Public" group parameter. Moderators are exempt from this configuration.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Nested' ) . '</th>' . '<td width="40%">' . $input['group_nested_default'] . ' ' . $input['group_nested_config'] . '</td>' . '<td>' . CBTxt::Th( 'Select default value for group parameter "Nested". Additionally select the display of the "Nested" group parameter. Moderators are exempt from this configuration.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Nested Access' ) . '</th>' . '<td width="40%">' . $input['group_nestedaccess_default'] . ' ' . $input['group_nestedaccess_config'] . '</td>' . '<td>' . CBTxt::Th( 'Select default value for group parameter "Nested Access". Additionally select the display of the "Nested Access" group parameter. Moderators are exempt from this configuration.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->endPane() . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Tabs' ) ), 'gjTabs' ) . $tabs->startPane( 'gjTabsTabs' ) . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'General' ) ), 'gjTabsGeneral' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'New Category' ) . '</th>' . '<td width="40%">' . $input['tab_new_category'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable display of quick new category link on profile tab.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'New Group' ) . '</th>' . '<td width="40%">' . $input['tab_new_group'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable display of quick new group link on profile tab.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Categories' ) ), 'gjTabsCategories' ) . $tabs->startPane( 'gjTabsCategoriesTabs' ) . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'General' ) ), 'gjTabsCategoriesGeneral' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Display' ) . '</th>' . '<td width="40%">' . $input['category_tab_display'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable display of categories profile tab.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Description Length' ) . '</th>' . '<td width="40%">' . $input['category_tab_desc_limit'] . '</td>' . '<td>' . CBTxt::Th( 'Optionally input maxiumum description length of categories. Leave blank or 0 for no limit.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Order By' ) . '</th>' . '<td width="40%">' . $input['category_tab_orderby'] . '</td>' . '<td>' . CBTxt::Th( 'Select ordering of categories.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Paging' ) ), 'gjTabsCategoriesPaging' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Paging' ) . '</th>' . '<td width="40%">' . $input['category_tab_paging'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable usage of paging on categories profile tab.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::T( 'Page Limitbox' ) . '</th>' . '<td width="50%">' . $input['category_tab_limitbox'] . '</td>' . '<td>' . CBTxt::T( 'Enable or disable usage of page limit on categories profile tab. Requires Paging to be Enabled.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::T( 'Page Limit' ) . '</th>' . '<td width="50%">' . $input['category_tab_limit'] . '</td>' . '<td>' . CBTxt::T( 'Input default page limit on categories profile tab. Page limit determines how many categories are displayed per page.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Search' ) . '</th>' . '<td width="40%">' . $input['category_tab_search'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable usage of searching on categories profile tab.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->endPane() . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Groups' ) ), 'gjTabsGroups' ) . $tabs->startPane( 'gjTabsGroupsTabs' ) . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'General' ) ), 'gjTabsGroupsGeneral' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Display' ) . '</th>' . '<td width="40%">' . $input['group_tab_display'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable display of groups profile tab.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Joined' ) . '</th>' . '<td width="40%">' . $input['group_tab_joined'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable inclusion of Joined groups in addition to Owned groups on groups profile tab.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Description Length' ) . '</th>' . '<td width="40%">' . $input['group_tab_desc_limit'] . '</td>' . '<td>' . CBTxt::Th( 'Optionally input maxiumum description length of groups. Leave blank or 0 for no limit.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Order By' ) . '</th>' . '<td width="40%">' . $input['group_tab_orderby'] . '</td>' . '<td>' . CBTxt::Th( 'Select ordering of groups.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Paging' ) ), 'gjTabsGroupsPaging' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Paging' ) . '</th>' . '<td width="40%">' . $input['group_tab_paging'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable usage of paging on groups profile tab.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::T( 'Page Limitbox' ) . '</th>' . '<td width="50%">' . $input['group_tab_limitbox'] . '</td>' . '<td>' . CBTxt::T( 'Enable or disable usage of page limit on groups profile tab. Requires Paging to be Enabled.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::T( 'Page Limit' ) . '</th>' . '<td width="50%">' . $input['group_tab_limit'] . '</td>' . '<td>' . CBTxt::T( 'Input default page limit on groups profile tab. Page limit determines how many groups are displayed per page.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Search' ) . '</th>' . '<td width="40%">' . $input['group_tab_search'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable usage of searching on groups profile tab.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->endPane() . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Joined' ) ), 'gjTabsJoined' ) . $tabs->startPane( 'gjTabsJoinedTabs' ) . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'General' ) ), 'gjTabsJoinedGeneral' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Display' ) . '</th>' . '<td width="40%">' . $input['joined_tab_display'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable display of Joined profile tab.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Owned' ) . '</th>' . '<td width="40%">' . $input['joined_tab_owned'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable inclusion of Owned groups in addition to Joined groups on Joined profile tab.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Description Length' ) . '</th>' . '<td width="40%">' . $input['joined_tab_desc_limit'] . '</td>' . '<td>' . CBTxt::Th( 'Optionally input maxiumum description length of groups. Leave blank or 0 for no limit.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Order By' ) . '</th>' . '<td width="40%">' . $input['joined_tab_orderby'] . '</td>' . '<td>' . CBTxt::Th( 'Select ordering of groups.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Paging' ) ), 'gjTabsJoinedPaging' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Paging' ) . '</th>' . '<td width="40%">' . $input['joined_tab_paging'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable usage of paging on joined profile tab.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::T( 'Page Limitbox' ) . '</th>' . '<td width="50%">' . $input['joined_tab_limitbox'] . '</td>' . '<td>' . CBTxt::T( 'Enable or disable usage of page limit on joined profile tab. Requires Paging to be Enabled.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::T( 'Page Limit' ) . '</th>' . '<td width="50%">' . $input['joined_tab_limit'] . '</td>' . '<td>' . CBTxt::T( 'Input default page limit on joined profile tab. Page limit determines how many groups are displayed per page.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Search' ) . '</th>' . '<td width="40%">' . $input['joined_tab_search'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable usage of searching on joined profile tab.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->endPane() . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Invites' ) ), 'gjTabsInvites' ) . $tabs->startPane( 'gjTabsInvitesTabs' ) . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'General' ) ), 'gjTabsInvitesGeneral' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Display' ) . '</th>' . '<td width="40%">' . $input['invites_tab_display'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable display of Invites profile tab.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Paging' ) ), 'gjTabsInvitesPaging' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Paging' ) . '</th>' . '<td width="40%">' . $input['invites_tab_paging'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable usage of paging on invites profile tab.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::T( 'Page Limitbox' ) . '</th>' . '<td width="50%">' . $input['invites_tab_limitbox'] . '</td>' . '<td>' . CBTxt::T( 'Enable or disable usage of page limit on invites profile tab. Requires Paging to be Enabled.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::T( 'Page Limit' ) . '</th>' . '<td width="50%">' . $input['invites_tab_limit'] . '</td>' . '<td>' . CBTxt::T( 'Input default page limit on invites profile tab. Page limit determines how many invites are displayed per page.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Search' ) . '</th>' . '<td width="40%">' . $input['invites_tab_search'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable usage of searching on invites profile tab.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->endPane() . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Invited' ) ), 'gjTabsInvited' ) . $tabs->startPane( 'gjTabsInvitedTabs' ) . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'General' ) ), 'gjTabsInvitedGeneral' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Display' ) . '</th>' . '<td width="40%">' . $input['invited_tab_display'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable display of Invited To profile tab.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Description Length' ) . '</th>' . '<td width="40%">' . $input['invited_tab_desc_limit'] . '</td>' . '<td>' . CBTxt::Th( 'Optionally input maxiumum description length of groups. Leave blank or 0 for no limit.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Order By' ) . '</th>' . '<td width="40%">' . $input['invited_tab_orderby'] . '</td>' . '<td>' . CBTxt::Th( 'Select ordering of groups.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Paging' ) ), 'gjTabsInvitedPaging' ) . '<table class="adminlist" width="100%" cellspacing="0" cellpadding="4" border="0">' . '<tbody>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Paging' ) . '</th>' . '<td width="40%">' . $input['invited_tab_paging'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable usage of paging on invited to profile tab.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::T( 'Page Limitbox' ) . '</th>' . '<td width="50%">' . $input['invited_tab_limitbox'] . '</td>' . '<td>' . CBTxt::T( 'Enable or disable usage of page limit on invited to profile tab. Requires Paging to be Enabled.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::T( 'Page Limit' ) . '</th>' . '<td width="50%">' . $input['invited_tab_limit'] . '</td>' . '<td>' . CBTxt::T( 'Input default page limit on invited to profile tab. Page limit determines how many invites are displayed per page.' ) . '</td>' . '</tr>' . '<tr>' . '<th width="15%">' . CBTxt::Th( 'Search' ) . '</th>' . '<td width="40%">' . $input['invited_tab_search'] . '</td>' . '<td>' . CBTxt::Th( 'Enable or disable usage of searching on invited to profile tab.' ) . '</td>' . '</tr>' . '</tbody>' . '</table>' . $tabs->endTab() . $tabs->endPane() . $tabs->endTab() . $tabs->endPane() . $tabs->endTab() . $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'Integrations' ) ), 'gjIntegrations' ) . $tabs->startPane( 'gjIntegrationsTabs' ) . cbgjClass::getIntegrations( 'gj_onConfigIntegrations', array( $tabs, $user, $plugin ), CBTxt::Th( 'There are no integrations available.' ), null ) . $tabs->endPane() . $tabs->endTab() . $tabs->endPane() . '<input type="hidden" id="option" name="option" value="' . htmlspecialchars( $plugin->option ) . '" />' . '<input type="hidden" id="task" name="task" value="editPlugin" />' . '<input type="hidden" id="cid" name="cid" value="' . (int) $plugin->id . '" />' . '<input type="hidden" id="action" name="action" value="config.save" />' . cbGetSpoofInputTag( 'plugin' ) . '</form>'; echo $return; }
function manageConnections($userid) { global $_CB_framework, $ueConfig, $_PLUGINS; if (!$ueConfig['allowConnections']) { $msg = CBTxt::Th('UE_FUNCTIONALITY_DISABLED', 'This functionality is currently disabled.'); } elseif ($_CB_framework->myId() != $userid || $_CB_framework->myId() == 0) { $msg = CBTxt::Th('UE_NOT_AUTHORIZED', 'You are not authorized to view this page!'); } else { $msg = null; } $_PLUGINS->loadPluginGroup('user'); $_PLUGINS->trigger('onBeforeManageConnectionsRequest', array($userid, &$msg)); if ($msg) { $_CB_framework->enqueueMessage($msg, 'error'); return; } $cbCon = new cbConnection($userid); $tabs = new cbTabs(0, $_CB_framework->getUi()); $tabs->element = ''; $pagingParams = $tabs->_getPaging(array(), array('connections_')); $perpage = 20; //TBD unhardcode and get the code below better $total = $cbCon->getConnectionsCount($userid, true); if ($pagingParams["connections_limitstart"] === null) { $pagingParams["connections_limitstart"] = 0; } if ($pagingParams["connections_limitstart"] > $total) { $pagingParams["connections_limitstart"] = 0; } $offset = $pagingParams["connections_limitstart"] ? (int) $pagingParams["connections_limitstart"] : 0; $connections = $cbCon->getActiveConnections($userid, $offset, $perpage); $actions = $cbCon->getPendingConnections($userid); $connecteds = $cbCon->getConnectedToMe($userid); HTML_comprofiler::manageConnections($connections, $actions, $total, $tabs, $pagingParams, $perpage, $connecteds); }
/** * Generates the HTML to display the registration tab/area * @param moscomprofilerTab $tab the tab database entry * @param moscomprofilerUser $user the user being displayed * @param int $ui 1 for front-end, 2 for back-end * @param array $postdata _POST data for saving edited tab content as generated with getEditTab * @return mixed either string HTML for tab content, or false if ErrorMSG generated */ function getDisplayRegistration($tab, $user, $ui, $postdata) { global $my, $_CB_framework, $_POST, $mainframe; // $mainframe needed by the require $return = null; if ($this->_CheckYancInstalled()) { require_once $_CB_framework->getCfg('absolute_path') . _NEWSLETTERFILE; $newslettersSubscriptions = new YancSubscription(); $params = $this->params; $newslettersRegList = $params->get('newslettersRegList'); $listsArray = isset($newslettersRegList) ? explode("|*|", $newslettersRegList) : null; $lists = $newslettersSubscriptions->getLists($my, $listsArray); if (count($lists) > 0) { $postedLists = cbGetParam($_POST, 'newsLitems', array(0)); $postedHtml = cbGetParam($_POST, 'newsLhtml', 1); $lists[0]->receive_html = $postedHtml; for ($i = 0, $n = count($lists); $i < $n; $i++) { $lists[$i]->subscribed = in_array($lists[$i]->id, $postedLists); $lists[$i]->confirmed = $lists[$i]->subscribed; // avoid display "not confirmed" on registration server-validation error. } $htmlValue = $this->_getFormattedNewsletters($lists, true, _UE_NEWSLETTER_NAME_REG, _UE_NEWSLETTER_DESCRIPTION_REG); $return = array(cbTabs::_createPseudoField($tab, rtrim(_UE_NEWSLETTER_SUBSCRIBE, ':'), $htmlValue, _UE_NEWSLETTER_DESCRIPTION_REG, 'cbregNewsletter', false)); } } return $return; }
/** * @param string $blocks * @param string $whitelists * @param string $attempts * @param string $logs * @param UserTable $viewer * @param UserTable $user * @param TabTable $tab * @param cbTabHandler $plugin * @return string */ static public function showTab( $blocks, $whitelists, $attempts, $logs, $viewer, $user, $tab, $plugin ) { $tabs = new cbTabs( 1, 1 ); $return = null; $count = 0; if ( $blocks ) { $count++; } if ( $whitelists ) { $count++; } if ( $attempts ) { $count++; } if ( $logs ) { $count++; } $tabbed = ( $count > 1 ); if ( $tabbed ) { $return .= $tabs->startPane( 'blocksTabs' ); } if ( $blocks ) { if ( $tabbed ) { $return .= $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'TAB_BLOCKS', 'Blocks' ) ), 'blocksTabBlocks' ) . $blocks . $tabs->endTab(); } else { $return .= $blocks; } } if ( $whitelists ) { if ( $tabbed ) { $return .= $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'TAB_WHITELISTS', 'Whitelists' ) ), 'blocksTabWhitelists' ) . $whitelists . $tabs->endTab(); } else { $return .= $whitelists; } } if ( $attempts ) { if ( $tabbed ) { $return .= $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'TAB_ATTEMPTS', 'Attempts' ) ), 'blocksTabAttempts' ) . $attempts . $tabs->endTab(); } else { $return .= $attempts; } } if ( $logs ) { if ( $tabbed ) { $return .= $tabs->startTab( null, htmlspecialchars( CBTxt::T( 'TAB_LOGS', 'Logs' ) ), 'blocksTabLogs' ) . $logs . $tabs->endTab(); } else { $return .= $logs; } } if ( $tabbed ) { $return .= $tabs->endPane(); } return $return; }
function edituser($user, $option, $newCBuser, &$postdata) { global $_CB_framework, $_PLUGINS; $results = $_PLUGINS->trigger('onBeforeUserProfileEditDisplay', array(&$user, 2)); if ($_PLUGINS->is_errors()) { echo "<script type=\"text/javascript\">alert(\"" . str_replace(array("\n", '<br />'), array('\\n', '\\n'), addslashes($_PLUGINS->getErrorMSG())) . "\"); window.history.go(-1); </script>\n"; exit; } _CBsecureAboveForm('edituser'); outputCbTemplate(2); initToolTip(2); $tabs = new cbTabs($_CB_framework->getUi() == 2 && !isset($_REQUEST['tab']) ? 1 : 0, 2); // use cookies in backend to remember selected tab. $tabcontent = $tabs->getEditTabs($user, $postdata); outputCbJs(2); global $_CB_Backend_Title; //OLD: $_CB_Backend_Title = array( 0 => array( 'cbicon-48-users', "Community Builder User: <small>" . ( $user->id ? "Edit" . ' [ '. $user->username .' ]' : "New" ) . '</small>' ) ); //NEW: $_CB_Backend_Title = array(0 => array('cbicon-48-users', CBTxt::T('Community Builder User') . ": <small>" . ($user->id ? CBTxt::T('Edit') . ' [ ' . $user->username . ' ]' : CBTxt::T('New')) . '</small>')); ob_start(); if (defined('_CB_VALIDATE_NEW')) { cbimport('cb.validator'); cbValidator::renderGenericJs(); ?> $('div.cbtoolbaractions .cbtoolbaraction').click( function() { if ( $(this).attr('href') ) { var taskVal = $(this).attr('href').substring(1); } else if ( $(this).attr('value') ) { taskVal = $(this).attr('value').substring(1); } $('#cbcheckedadminForm input[name=task]').val( taskVal ); if (taskVal == 'showusers') { $('#cbcheckedadminForm')[0].submit(); } else { $('#cbcheckedadminForm').submit(); } return false; } ); <?php $cbjavascript = ob_get_contents(); ob_end_clean(); $_CB_framework->outputCbJQuery($cbjavascript, array('metadata', 'validate')); } else { // old way: ?> var cbDefaultFieldbackgroundColor; function cbFrmSubmitButton() { var me = this.elements; <?php $version = checkJversion(); if ($version == 1) { // var r = new RegExp("^[a-zA-Z](([\.\-a-zA-Z0-9@])?[a-zA-Z0-9]*)*$", "i"); ?> var r = new RegExp("^[\<|\>|\"|\'|\%|\;|\(|\)|\&|\+|\-]*$", "i"); <?php } elseif ($version == -1) { ?> var r = new RegExp("[^A-Za-z0-9]", "i"); <?php } else { ?> var r = new RegExp("[\<|\>|\"|\'|\%|\;|\(|\)|\&|\+|\-]", "i"); <?php } ?> var errorMSG = ''; var iserror=0; if (cbDefaultFieldbackgroundColor === undefined) cbDefaultFieldbackgroundColor = ((me['username'].style.getPropertyValue) ? me['username'].style.getPropertyValue("backgroundColor") : me['username'].style.backgroundColor); <?php echo $tabs->fieldJS; ?> if (me['username'].value == "") { errorMSG += "<?php echo str_replace(array("\n", "\r"), ' ', CBTxt::html_entity_decode(_REGWARN_UNAME)); ?> \n"; me['username'].style.backgroundColor = "red"; iserror=1; } else if (r.exec(me['username'].value) || (me['username'].value.length < 3)) { errorMSG += "<?php echo str_replace(array("\n", "\r"), ' ', sprintf(CBTxt::html_entity_decode(_VALID_AZ09), CBTxt::html_entity_decode(_PROMPT_UNAME), 2)); ?> \n"; me['username'].style.backgroundColor = "red"; iserror=1; } else if (me['username'].style.backgroundColor.slice(0,3)=="red") { me['username'].style.backgroundColor = cbDefaultFieldbackgroundColor; } if ((me['password'].value != "") && (me['password'].value != me['password__verify'].value)){ errorMSG += "<?php echo CBTxt::html_entity_decode(_REGWARN_VPASS2); ?> \n"; me['password'].style.backgroundColor = "red"; me['password__verify'].style.backgroundColor = "red"; iserror=1; } else { if (me['password'].style.backgroundColor.slice(0,3)=="red") me['password'].style.backgroundColor = cbDefaultFieldbackgroundColor; if (me['password__verify'].style.backgroundColor.slice(0,3)=="red") me['password__verify'].style.backgroundColor = cbDefaultFieldbackgroundColor; } if (!$('input[name^=\"gid\"],select[name^=\"gid\"]').val()) { errorMSG += '<?php echo addslashes(CBTxt::T('You must assign user to a group.')); ?> ' + "\n"; iserror=1; } // loop through all input elements in form var fieldErrorMessages = new Array; for (var i=0; i < me.length; i++) { // check if element is mandatory; here mosReq=1 if ( (typeof(me[i].getAttribute('mosReq')) != "undefined") && ( me[i].getAttribute('mosReq') == 1) ) { if (me[i].type == 'radio' || me[i].type == 'checkbox') { var rOptions = me[me[i].getAttribute('name')]; var rChecked = 0; if(rOptions.length > 1) { for (var r=0; r < rOptions.length; r++) { if ( (typeof(rOptions[r].getAttribute('mosReq')) != "undefined") && ( rOptions[r].getAttribute('mosReq') == 1) ) { if (rOptions[r].checked) { rChecked=1; } } } } else { if (me[i].checked) { rChecked=1; } } if(rChecked==0) { for (var k=0; k < me.length; k++) { if (me[i].getAttribute('name') == me[k].getAttribute('name')) { if (me[k].checked) { rChecked=1; break; } } } } if(rChecked==0) { var alreadyFlagged = false; for (var j = 0, n = fieldErrorMessages.length; j < n; j++) { if (fieldErrorMessages[j] == me[i].getAttribute('name')) { alreadyFlagged = true; break } } if ( ! alreadyFlagged ) { fieldErrorMessages.push(me[i].getAttribute('name')); // add up all error messages errorMSG += me[i].getAttribute('mosLabel') + ' : <?php echo CBTxt::html_entity_decode(_UE_REQUIRED_ERROR); ?> \n'; // notify user by changing background color, in this case to red me[i].style.backgroundColor = "red"; iserror=1; } } else if (me[i].style.backgroundColor.slice(0,3)=="red") me[i].style.backgroundColor = cbDefaultFieldbackgroundColor; } if (me[i].value == '') { // add up all error messages errorMSG += me[i].getAttribute('mosLabel') + ' : <?php echo CBTxt::html_entity_decode(_UE_REQUIRED_ERROR); ?> \n'; // notify user by changing background color, in this case to red me[i].style.backgroundColor = "red"; iserror=1; } else if (me[i].style.backgroundColor.slice(0,3)=="red") me[i].style.backgroundColor = cbDefaultFieldbackgroundColor; } } if(iserror==1) { alert(errorMSG); return false; } else { return true; } } $('#cbcheckedadminForm').submit( cbFrmSubmitButton ); $('div.cbtoolbaractions .cbtoolbaraction').click( function() { if ( $(this).attr('href') ) { var taskVal = $(this).attr('href').substring(1); } else if ( $(this).attr('value') ) { taskVal = $(this).attr('value').substring(1); } $('#cbcheckedadminForm input[name=task]').val( taskVal ); if (taskVal == 'showusers') { $('#userEditTable input').val(''); $('#cbcheckedadminForm')[0].submit(); } else { $('#cbcheckedadminForm').submit(); } return false; } ); <?php $cbjavascript = ob_get_contents(); ob_end_clean(); $_CB_framework->outputCbJQuery($cbjavascript); // end of old way } if (is_array($results)) { echo implode('', $results); } $this->_overideWebFxLayout(); ?> <div id="cbErrorMessages"></div> <form action="<?php echo $_CB_framework->backendUrl('index.php'); ?> " method="post" name="adminForm" id="cbcheckedadminForm" enctype="multipart/form-data" autocomplete="off"> <?php echo "<table cellspacing='0' cellpadding='4' border='0' width='100%' id='userEditTable'><tr><td width='100%'>\n"; echo $tabcontent; echo "</td></tr></table>"; ?> <input type="hidden" name="id" value="<?php echo $user->id; ?> " /> <input type="hidden" name="newCBuser" value="<?php echo $newCBuser; ?> " /> <input type="hidden" name="option" value="<?php echo $option; ?> " /> <input type="hidden" name="task" value="save" /> <?php echo cbGetSpoofInputTag('user'); ?> </form> <div style="align:center;"> <?php echo getFieldIcons(2, true, true, "", "", true); if (isset($_REQUEST['tab'])) { $_CB_framework->outputCbJQuery("showCBTab( '" . addslashes(urldecode(stripslashes(cbGetParam($_REQUEST, 'tab')))) . "' );"); } ?> </div> <?php }
/** * Saves a new or existing CB+CMS user * WARNINGS: * - You must verify authorization of user to perform this (user checkCBpermissions() ) * - You must $this->load() existing user first * * @param array $array Raw unfiltered input, typically $_POST * @param int $ui 1 = Front-end (limitted rights), 2 = Backend (almost unlimitted), 0 = automated (full) * @param string $reason 'edit' or 'register' * @return boolean */ function saveSafely( &$array, $ui, $reason ) { global $_CB_framework, $_CB_database, $ueConfig, $_PLUGINS; // Get current user state and store it into $oldUserComplete: $oldUserComplete = new moscomprofilerUser( $this->_db ); foreach ( array_keys( get_object_vars( $this ) ) as $k ) { if( substr( $k, 0, 1 ) != '_' ) { // ignore internal vars $oldUserComplete->$k = $this->$k; } } // 1) Process and validate the fields in form by CB field plugins: // 2) Bind the fields to CMS User: $bindResults = $this->bindSafely( $array, $ui, $reason, $oldUserComplete ); if ( $bindResults ) { // During bindSafely, in saveTabContents, the validations have already taken place, for mandatory fields. if ( ( $this->name == '' ) && ( $this->username == '' ) && ( $this->email != '' ) ) { $this->username = $this->email; $this->_cmsUser->username = $this->username; } // Checks that name is set. If not, uses the username as name, as Mambo/Joola mosUser::store() uses name for ACL // and ACL bugs with no name. if ( $this->name == '' ) { $this->name = $this->username; $this->_cmsUser->name = $this->name; } elseif ( $this->username == '' ) { $this->username = $this->name; $this->_cmsUser->username = $this->username; } if ( ! $this->checkSafely() ) { $bindResults = false; } } // For new registrations or backend user creations, set registration date and password if neeeded: $isNew = ( ! $this->id ); $newCBuser = ( $oldUserComplete->user_id == null ); if ( $isNew ) { if ( checkJversion() != 1 ) { // J1.5 works better with null here... has bug that it offsets the time by server date, others need this: $this->registerDate = date('Y-m-d H:i:s', $_CB_framework->now() ); } } if ( $bindResults ) { if ( $isNew ) { if ( $this->password == null ) { $this->setRandomPassword(); $ueConfig['emailpass'] = 1; // set this global to 1 to force password to be sent to new users. } } // In backend only: if group has been changed and where original group was a Super Admin: check if there is at least a super-admin left: if ( $ui == 2 ) { $myGid = userGID( $_CB_framework->myId() ); $cms_admin = $_CB_framework->acl->mapGroupNamesToValues( 'Administrator' ); $cms_super_admin = $_CB_framework->acl->mapGroupNamesToValues( 'Superadministrator' ); if ( ! $isNew ) { if ( $this->gid != $oldUserComplete->gid ) { if ( $oldUserComplete->gid == $cms_super_admin ) { // count number of active super admins if ( checkJversion() == 2 ) { $query = 'SELECT COUNT( a.id )' . "\n FROM #__users AS a" . "\n INNER JOIN #__user_usergroup_map AS b" . ' ON b.user_id = a.id' . "\n WHERE b.group_id = " . (int) $cms_super_admin . "\n AND a.block = 0" ; } else { $query = 'SELECT COUNT( id )' . "\n FROM #__users" . "\n WHERE gid = " . (int) $cms_super_admin . "\n AND block = 0" ; } $_CB_database->setQuery( $query ); $count = $_CB_database->loadResult(); if ( $count <= 1 ) { // disallow change if only one Super Admin exists $this->_error = 'You cannot change this users Group as it is the only active Super Administrator for your site'; return false; } } $user_group = strtolower( $_CB_framework->acl->get_group_name( $oldUserComplete->gid, 'ARO' ) ); if ( ( $user_group == 'super administrator' && $myGid != $cms_super_admin ) ) { // disallow change of super-Admin by non-super admin $this->_error = 'You cannot change this users Group as you are not a Super Administrator for your site'; return false; } elseif ( $this->id == $_CB_framework->myId() && $myGid == $cms_super_admin ) { // CB-specific: disallow change of own Super Admin group: $this->_error = 'You cannot change your own Super Administrator status for your site'; return false; } else if ( $myGid == $cms_admin && $oldUserComplete->gid == $cms_admin ) { // disallow change of super-Admin by non-super admin $this->_error = 'You cannot change the Group of another Administrator as you are not a Super Administrator for your site'; return false; } // ensure user can't add group higher than themselves done below } } // Security check to avoid creating/editing user to higher level than himself: CB response to artf4529. if ( ! in_array( $this->gid, getChildGIDS( $myGid ) ) ) { $this->_error = 'illegal attempt to set user at higher level than allowed !'; return false; } } } if ( $reason == 'edit' ) { if ( $ui == 1 ) { $_PLUGINS->trigger( 'onBeforeUserUpdate', array( &$this, &$this, &$oldUserComplete, &$oldUserComplete ) ); } elseif ( $ui == 2 ) { if ( $isNew || $newCBuser ) { $_PLUGINS->trigger( 'onBeforeNewUser', array( &$this, &$this, false ) ); } else { $_PLUGINS->trigger( 'onBeforeUpdateUser', array( &$this, &$this, &$oldUserComplete ) ); } } } elseif ( $reason == 'register' ) { $_PLUGINS->trigger( 'onBeforeUserRegistration', array( &$this, &$this ) ); } $beforeResult = ! $_PLUGINS->is_errors(); if ( ! $beforeResult ) { $this->_error = $_PLUGINS->getErrorMSG( false ); // $_PLUGIN collects all error messages, incl. previous ones. } // Saves tab plugins: // on edits, user params and block/email/approved/confirmed are done in cb.core predefined fields. // So now calls this and more (CBtabs are already created in $this->bindSafely() ). $pluginTabsResult = true; if ( $reason == 'edit' ) { $this->_cbTabs->savePluginTabs( $this, $array ); $pluginTabsResult = ! $_PLUGINS->is_errors(); if ( ! $pluginTabsResult ) { $this->_error = $_PLUGINS->getErrorMSG( false ); // $_PLUGIN collects all error messages, incl. previous ones. } } if ( $bindResults && $beforeResult && $pluginTabsResult ) { // Hashes password for CMS storage: $clearTextPassword = $this->password; if ( $clearTextPassword ) { $hashedPassword = $this->hashAndSaltPassword( $clearTextPassword ); $this->password = $hashedPassword; } // Stores user if it's a new user: if ( $isNew ) { if ( ! $this->store() ) { return false; } } // Restores cleartext password for the saveRegistrationPluginTabs: $this->password = $clearTextPassword; } if ( $reason == 'register' ) { if ( $bindResults && $beforeResult && $pluginTabsResult ) { // Sets the instance of user, to avoid reload from database, and loss of the cleartext password. CBuser::setUserGetCBUserInstance( $this ); } // call here since we got to have a user id: $registerResults = array(); $registerResults['tabs'] = $this->_cbTabs->saveRegistrationPluginTabs( $this, $array ); if ( $_PLUGINS->is_errors() ) { if ( $bindResults && $beforeResult && $pluginTabsResult ) { $plugins_error = $_PLUGINS->getErrorMSG( false ); // $_PLUGIN collects all error messages, incl. previous ones. if ( $isNew ) { // if it was a new user, and plugin gave error, revert the creation: $this->delete(); } $this->_error = $plugins_error; } else { $this->_error = $_PLUGINS->getErrorMSG( false ); // $_PLUGIN collects all error messages, incl. previous ones. } $pluginTabsResult = false; } } if ( ! ( $bindResults && $beforeResult && $pluginTabsResult ) ) { // Normal error exit point: $_PLUGINS->trigger( 'onSaveUserError', array( &$this, $this->_error, $reason ) ); if ( is_array( $this->_error ) ) { $this->_error = implode( '<br />', $this->_error ); } return false; } // Stores the user (again if it's a new as the plugins might have changed the user record): if ( $clearTextPassword ) { $this->password = $hashedPassword; } if ( ! $this->store() ) { return false; } // Restores cleartext password for the onAfter and activation events: $this->password = $clearTextPassword; // Triggers onAfter and activateUser events: if ( $reason == 'edit' ) { if ( $ui == 1 ) { $_PLUGINS->trigger( 'onAfterUserUpdate', array( &$this, &$this, $oldUserComplete ) ); } elseif ( $ui == 2 ) { if ( $isNew || $newCBuser ) { if ( $isNew ) { $ueConfig['emailpass'] = 1; // set this global to 1 to force password to be sent to new users. } $_PLUGINS->trigger( 'onAfterNewUser', array( &$this, &$this, false, true ) ); if ( $this->block == 0 && $this->approved == 1 && $this->confirmed ) { activateUser( $this, 2, 'NewUser', false, $isNew ); } } else { if ( ( ! ( ( $oldUserComplete->approved == 1 || $oldUserComplete->approved == 2 ) && $oldUserComplete->confirmed ) ) && ($this->approved == 1 && $this->confirmed ) ) { // first time a just registered and confirmed user got approved in backend through save user: if( isset( $ueConfig['emailpass'] ) && ( $ueConfig['emailpass'] == "1" ) && ( $this->password == '' ) ) { // generate the password is auto-generated and not set by the admin at this occasion: $this->setRandomPassword(); $pwd = $this->hashAndSaltPassword( $this->password ); $_CB_database->setQuery( "UPDATE #__users SET password="******" WHERE id = " . (int) $this->id ); $_CB_database->query(); } } $_PLUGINS->trigger( 'onAfterUpdateUser', array( &$this, &$this, $oldUserComplete ) ); if ( ( ! ( ( $oldUserComplete->approved == 1 || $oldUserComplete->approved == 2 ) && $oldUserComplete->confirmed ) ) && ($this->approved == 1 && $this->confirmed ) ) { // first time a just registered and confirmed user got approved in backend through save user: activateUser( $this, 2, 'UpdateUser', false ); } } } } elseif ( $reason == 'register' ) { $registerResults['after'] = $_PLUGINS->trigger( 'onAfterUserRegistration', array( &$this, &$this, true ) ); $registerResults['ok'] = true; return $registerResults; } return true; }
/** * Draws Users list (ECHO) * * @param int $userId * @param int $listId * @param array $postData * @return void */ public function drawUsersList($userId, $listId, $postData) { global $_CB_database, $_PLUGINS; $_PLUGINS->loadPluginGroup('user'); $searchData = cbGetParam($postData, 'search'); $limitstart = (int) cbGetParam($postData, 'limitstart'); $searchMode = (int) cbGetParam($postData, 'searchmode', 0); $random = (int) cbGetParam($postData, 'rand', 0); $cbUser = CBuser::getInstance((int) $userId, false); $user = $cbUser->getUserData(); $search = null; $input = array(); $publishedLists = array(); $query = 'SELECT *' . "\n FROM " . $_CB_database->NameQuote('#__comprofiler_lists') . "\n WHERE " . $_CB_database->NameQuote('published') . " = 1" . "\n AND " . $_CB_database->NameQuote('viewaccesslevel') . " IN " . $_CB_database->safeArrayOfIntegers(Application::MyUser()->getAuthorisedViewLevels()) . "\n ORDER BY " . $_CB_database->NameQuote('ordering'); $_CB_database->setQuery($query); /** @var ListTable[] $userLists */ $userLists = $_CB_database->loadObjectList(null, '\\CB\\Database\\Table\\ListTable', array($_CB_database)); if ($userLists) { foreach ($userLists as $userList) { $publishedLists[] = moscomprofilerHTML::makeOption((int) $userList->listid, strip_tags($cbUser->replaceUserVars($userList->title, false, false))); if (!$listId && $userList->default) { $listId = (int) $userList->listid; } } if (!$listId) { $listId = (int) $userLists[0]->listid; } } if (!$listId) { echo CBTxt::Th('UE_NOLISTFOUND', 'There are no published user lists!'); return; } if ($userLists) { $input['plists'] = moscomprofilerHTML::selectList($publishedLists, 'listid', 'class="form-control input-block" onchange="this.form.submit();"', 'value', 'text', (int) $listId, 1); } $row = self::getInstance((int) $listId); if (!$row) { echo CBTxt::Th('UE_LIST_DOES_NOT_EXIST', 'This list does not exist'); return; } if (!$cbUser->authoriseView('userslist', $row->listid)) { echo CBTxt::Th('UE_NOT_AUTHORIZED', 'You are not authorized to view this page!'); return; } $params = new Registry($row->params); if ($params->get('hotlink_protection', 0) == 1) { if ($searchData !== null || $limitstart) { cbSpoofCheck('userslist', 'GET'); } } $limit = (int) $params->get('list_limit', 30); if (!$limit) { $limit = 30; } if ($params->get('list_paging', 1) != 1) { $limitstart = 0; } $isModerator = Application::MyUser()->isGlobalModerator(); $_PLUGINS->trigger('onStartUsersList', array(&$listId, &$row, &$search, &$limitstart, &$limit)); // Prepare query variables: $userGroupIds = explode('|*|', $row->usergroupids); $orderBy = self::getSorting($listId, $userId, $random); $filterBy = self::getFiltering($listId, $userId); $columns = self::getColumns($listId, $userId); // Grab all the fields the $user can access: $tabs = new cbTabs(0, 1); $fields = $tabs->_getTabFieldsDb(null, $user, 'list'); // Build the field SQL: $tableReferences = array('#__comprofiler' => 'ue', '#__users' => 'u'); $searchableFields = array(); $fieldsSQL = cbUsersList::getFieldsSQL($columns, $fields, $tableReferences, $searchableFields, $params); $_PLUGINS->trigger('onAfterUsersListFieldsSql', array(&$columns, &$fields, &$tableReferences)); // Build the internal joins and where statements best off list parameters: $tablesSQL = array(); $joinsSQL = array(); $tablesWhereSQL = array(); if ($isModerator) { if (!$params->get('list_show_blocked', 0)) { $tablesWhereSQL['block'] = 'u.block = 0'; } if (!$params->get('list_show_banned', 1)) { $tablesWhereSQL['banned'] = 'ue.banned = 0'; } if (!$params->get('list_show_unapproved', 0)) { $tablesWhereSQL['approved'] = 'ue.approved = 1'; } if (!$params->get('list_show_unconfirmed', 0)) { $tablesWhereSQL['confirmed'] = 'ue.confirmed = 1'; } } else { $tablesWhereSQL = array('block' => 'u.block = 0', 'approved' => 'ue.approved = 1', 'confirmed' => 'ue.confirmed = 1', 'banned' => 'ue.banned = 0'); } $joinsSQL[] = 'JOIN #__user_usergroup_map g ON g.`user_id` = u.`id`'; if ($userGroupIds) { $tablesWhereSQL['gid'] = 'g.group_id IN ' . $_CB_database->safeArrayOfIntegers($userGroupIds); } foreach ($tableReferences as $table => $name) { if ($name == 'u') { $tablesSQL[] = $table . ' ' . $name; } else { $joinsSQL[] = 'JOIN ' . $table . ' ' . $name . ' ON ' . $name . '.`id` = u.`id`'; } } // Build the search criteria: $searchValues = new stdClass(); $searchesFromFields = $tabs->applySearchableContents($searchableFields, $searchValues, $postData, $params->get('list_compare_types', 0)); $whereFields = $searchesFromFields->reduceSqlFormula($tableReferences, $joinsSQL, true); if ($whereFields) { $tablesWhereSQL[] = '(' . $whereFields . ')'; } $_PLUGINS->trigger('onBeforeUsersListBuildQuery', array(&$tablesSQL, &$joinsSQL, &$tablesWhereSQL)); // Construct the FROM and WHERE for the userlist query: $queryFrom = "FROM " . implode(', ', $tablesSQL) . (count($joinsSQL) ? "\n " . implode("\n ", $joinsSQL) : '') . "\n WHERE " . implode("\n AND ", $tablesWhereSQL) . " " . $filterBy; $_PLUGINS->trigger('onBeforeUsersListQuery', array(&$queryFrom, 1, $listId)); // $ui = 1 (frontend) $errorMsg = null; // Checks if the list is being actively searched and it allows searching; otherwise reset back to normal: $searchCount = count(get_object_vars($searchValues)); if ($params->get('list_search', 1) > 0 && $params->get('list_search_empty', 0) && !$searchCount) { $searchMode = 1; $listAll = false; } else { $listAll = $searchCount ? true : false; } if ($searchMode == 0 || $searchMode == 1 && $searchCount || $searchMode == 2) { // Prepare the userlist count query for pagination: $_CB_database->setQuery("SELECT COUNT( DISTINCT u.id ) " . $queryFrom); $total = $_CB_database->loadResult(); if ($limit > $total || $limitstart >= $total) { $limitstart = 0; } // Prepare the actual userlist query to build a list of users: $query = "SELECT DISTINCT ue.*, u.*, '' AS 'NA' " . ($fieldsSQL ? ", " . $fieldsSQL . " " : '') . $queryFrom . " " . $orderBy; $_CB_database->setQuery($query, (int) $limitstart, (int) $limit); /** @var UserTable[] $users */ $users = $_CB_database->loadObjectList(null, '\\CB\\Database\\Table\\UserTable', array($_CB_database)); if (!$_CB_database->getErrorNum()) { $profileLink = $params->get('allow_profilelink', 1); // If users exist lets cache them and disable profile linking if necessary: if ($users) { foreach (array_keys($users) as $k) { // Add this user to cache: CBuser::setUserGetCBUserInstance($users[$k]); if (!$profileLink) { $users[$k]->set('_allowProfileLink', 0); } } } } else { $errorMsg = CBTxt::T('UE_ERROR_IN_QUERY_TURN_SITE_DEBUG_ON_TO_VIEW', 'There is an error in the database query. Site admin can turn site debug to on to view and fix the query.'); } if ($searchCount) { $search = ''; } else { $search = null; } if ($search === null && ($searchMode == 1 && $searchCount || $searchMode == 2)) { $search = ''; } } else { $total = 0; $users = array(); if ($search === null) { $search = ''; } } $pageNav = new cbPageNav($total, $limitstart, $limit); HTML_comprofiler::usersList($row, $users, $columns, $fields, $input, $search, $searchMode, $pageNav, $user, $searchableFields, $searchValues, $tabs, $errorMsg, $listAll, $random); }