예제 #1
0
	/**
	 * render frontend group panes
	 *
	 * @param cbgjGroup $row
	 * @param cbgjCategory $category
	 * @param moscomprofilerUser $user
	 * @param object $plugin
	 * @return string
	 */
	static function showGroupPanes( $row, $category, $user, $plugin ) {
		$authorized		=	cbgjClass::getAuthorization( $category, $row, $user );

		if ( $row->get( 'published' ) == 1 ) {
			$state		=	'<div><i class="icon-ban-circle"></i> <a href="javascript: void(0);" onclick="' . cbgjClass::getPluginURL( array( 'groups', 'unpublish', (int) $category->get( 'id' ), (int) $row->get( 'id' ) ), CBTxt::P( 'Are you sure you want to unpublish this [group]?', array( '[group]' => cbgjClass::getOverride( 'group' ) ) ) ) . '">' . CBTxt::Ph( 'Unpublish [group]', array( '[group]' => cbgjClass::getOverride( 'group' ) ) ) . '</a></div>';
		} else {
			$state		=	'<div><i class="icon-ok"></i> <a href="' . cbgjClass::getPluginURL( array( 'groups', 'publish', (int) $category->get( 'id' ), (int) $row->get( 'id' ) ) ) . '">' . CBTxt::Ph( 'Publish [group]', array( '[group]' => cbgjClass::getOverride( 'group' ) ) ) . '</a></div>';
		}

		$groupAdmins	=	$row->getAdmins();
		$groupMods		=	$row->getModerators();

		$return			=	'<legend class="gjHeaderTitle">' . $row->getName() . '</legend>'
						.	'<div class="gjGrid row-fluid">'
						.		'<div class="gjGridLeft span9">'
						.			'<div class="gjGridLeftLogo span4">'
						.				$row->getLogo( true )
						.			'</div>'
						.			'<div class="gjGridLeftInfo span8">'
						.				cbgjClass::getIntegrations( 'gj_onBeforeGroupInfo', array( $row, $category, $user, $plugin ) )
						.				( ( ( ( ! $row->get( 'nested' ) ) && cbgjClass::hasAccess( 'mod_lvl2', $authorized ) ) || $row->get( 'nested' ) ) && $row->nestedCount() ? '<div>' . cbgjClass::getOverride( 'group', true ) . ': ' . $row->nestedCount() . '</div>' : null )
						.				( $row->userCount() ? '<div>' . cbgjClass::getOverride( 'user', true ) . ': ' . $row->userCount() . '</div>' : null )
						.				( $row->get( 'user_id' ) ? '<div>' . cbgjClass::getOverride( 'owner' ) . ': ' . $row->getOwnerName( true ) . '</div>' : null )
						.				( ! empty( $groupMods ) ? '<div>' . cbgjClass::getOverride( 'moderator', true ) . ': ' . implode( ', ', $groupMods ) . '</div>' : null )
						.				( ! empty( $groupAdmins ) ? '<div>' . cbgjClass::getOverride( 'admin', true ) . ': ' . implode( ', ', $groupAdmins ) . '</div>' : null )
						.				'<div>' . CBTxt::Ph( 'Type: [grp_type]', array( '[grp_type]' => $row->getType() ) ) . '</div>'
						.				'<div>' . CBTxt::Ph( 'Access: [grp_access]', array( '[grp_access]' => $row->getAccess() ) ) . '</div>'
						.				'<div>' . cbgjClass::getOverride( 'category' ) . ': ' . $category->getName( 0, true ) . '</div>'
						.				( $row->get( 'parent' ) ? '<div>' . cbgjClass::getOverride( 'group' ) . ': ' . $row->getParent()->getName( 0, true ) . '</div>' : null )
						.				'<div>' . CBTxt::Ph( 'Created: [grp_date]', array( '[grp_date]' => cbFormatDate( $row->get( 'date' ), 1, false ) ) ) . '</div>'
						.				cbgjClass::getIntegrations( 'gj_onAfterGroupInfo', array( $row, $category, $user, $plugin ) )
						.			'</div>';

		if ( $row->get( 'description' ) ) {
			$return		.=			'<div class="gjGridLeftDesc span12 well well-small">'
						.				$row->getDescription()
						.			'</div>';
		}

		$return			.=		'</div>'
						.		'<div class="gjGridRight span3">'
						.			cbgjClass::getIntegrations( 'gj_onBeforeGroupMenu', array( $row, $category, $user, $plugin ), null, null )
						.			( cbgjClass::hasAccess( array( 'grp_join', 'grp_approved' ), $authorized, true ) ? '<div><i class="icon-plus"></i> <a href="' . cbgjClass::getPluginURL( array( 'groups', 'join', (int) $category->get( 'id' ), (int) $row->get( 'id' ) ) ) . '">' . ( cbgjClass::hasAccess( 'grp_invited', $authorized ) ? CBTxt::Th( 'Accept Invite' ) : CBTxt::Ph( 'Join [group]', array( '[group]' => cbgjClass::getOverride( 'group' ) ) ) ) . '</a></div>' : null )
						.			( cbgjClass::hasAccess( array( 'grp_nested_create', 'grp_approved' ), $authorized, true ) ? '<div><i class="icon-plus"></i> <a href="' . cbgjClass::getPluginURL( array( 'groups', 'new', (int) $category->get( 'id' ), (int) $row->get( 'id' ) ) ) . '">' . CBTxt::Ph( 'New [group]', array( '[group]' => cbgjClass::getOverride( 'group' ) ) ) . '</a></div>' : null )
						.			( cbgjClass::hasAccess( array( 'grp_leave', 'grp_approved' ), $authorized, true ) ? '<div><i class="icon-minus"></i> <a href="javascript: void(0);" onclick="' . cbgjClass::getPluginURL( array( 'groups', 'leave', (int) $category->get( 'id' ), (int) $row->get( 'id' ) ), CBTxt::P( 'Are you sure you want to leave this [group]?', array( '[group]' => cbgjClass::getOverride( 'group' ) ) ) ) . '">' . CBTxt::Ph( 'Leave [group]', array( '[group]' => cbgjClass::getOverride( 'group' ) ) ) . '</a></div>' : null )
						.			( cbgjClass::hasAccess( 'mod_lvl3', $authorized ) ? '<div><i class="icon-pencil"></i> <a href="' . cbgjClass::getPluginURL( array( 'groups', 'edit', (int) $category->get( 'id' ), (int) $row->get( 'id' ) ) ) . '">' . CBTxt::Ph( 'Edit [group]', array( '[group]' => cbgjClass::getOverride( 'group' ) ) ) . '</a></div>' : null )
						.			( cbgjClass::hasAccess( 'grp_message', $authorized ) && $row->userCount() ? '<div><i class="icon-envelope"></i> <a href="' . cbgjClass::getPluginURL( array( 'groups', 'message', (int) $category->get( 'id' ), (int) $row->get( 'id' ) ) ) . '">' . CBTxt::Ph( 'Message [users]', array( '[users]' => cbgjClass::getOverride( 'user', true ) ) ) . '</a></div>' : null )
						.			( cbgjClass::hasAccess( 'grp_can_publish', $authorized ) ? $state : null )
						.			( cbgjClass::hasAccess( 'mod_lvl2', $authorized ) ? '<div><i class="icon-remove"></i> <a href="javascript: void(0);" onclick="' . cbgjClass::getPluginURL( array( 'groups', 'delete', (int) $category->get( 'id' ), (int) $row->get( 'id' ) ), CBTxt::P( 'Are you sure you want to delete this [group] and all its associated [users]?', array( '[group]' => cbgjClass::getOverride( 'group' ), '[users]' => cbgjClass::getOverride( 'user', true ) ) ) ) . '">' . CBTxt::Ph( 'Delete [group]', array( '[group]' => cbgjClass::getOverride( 'group' ) ) ) . '</a></div>' : null )
						.			cbgjClass::getIntegrations( 'gj_onAfterGroupMenu', array( $row, $category, $user, $plugin ), null, null )
						.			( cbgjClass::hasAccess( 'grp_usr_notifications', $authorized ) ? '<div><i class="icon-info-sign"></i> <a href="' . cbgjClass::getPluginURL( array( 'notifications', 'show', (int) $category->get( 'id' ), (int) $row->get( 'id' ) ) ) . '">' . CBTxt::Th( 'Notifications' ) . '</a></div>' : null )
						.			( $row->get( 'parent' ) ? '<div><i class="icon-share-alt"></i> <a href="' . $row->getParent()->getUrl() . '">' . CBTxt::Ph( 'Back to [group]', array( '[group]' => cbgjClass::getOverride( 'group' ) ) ) . '</a></div>' : null )
						.			( ! $row->get( 'parent' ) ? '<div><i class="icon-share-alt"></i> <a href="' . $category->getUrl() . '">' . CBTxt::Ph( 'Back to [category]', array( '[category]' => cbgjClass::getOverride( 'category' ) ) ) . '</a></div>' : null )
						.		'</div>'
						.	'</div>';

		return $return;
	}
예제 #2
0
	/**
	 * render frontend category panes
	 *
	 * @param cbgjCategory $row
	 * @param moscomprofilerUser $user
	 * @param object $plugin
	 * @return string
	 */
	static function showCategoryPanes( $row, $user, $plugin ) {
		$authorized		=	cbgjClass::getAuthorization( $row, null, $user );

		if ( $row->get( 'published' ) == 1 ) {
			$state		=	'<div><i class="icon-ban-circle"></i> <a href="javascript: void(0);" onclick="' . cbgjClass::getPluginURL( array( 'categories', 'unpublish', (int) $row->get( 'id' ) ), CBTxt::P( 'Are you sure you want to unpublish this [category]?', array( '[category]' => cbgjClass::getOverride( 'category' ) ) ) ) . '">' . CBTxt::Ph( 'Unpublish [category]', array( '[category]' => cbgjClass::getOverride( 'category' ) ) ) . '</a></div>';
		} else {
			$state		=	'<div><i class="icon-ok"></i> <a href="' . cbgjClass::getPluginURL( array( 'categories', 'publish', (int) $row->get( 'id' ) ) ) . '">' . CBTxt::Ph( 'Publish [category]', array( '[category]' => cbgjClass::getOverride( 'category' ) ) ) . '</a></div>';
		}

		$return			=	'<legend class="gjHeaderTitle">' . $row->getName() . '</legend>'
						.	'<div class="gjGrid row-fluid">'
						.		'<div class="gjGridLeft span9">'
						.			'<div class="gjGridLeftLogo span4">'
						.				$row->getLogo( true )
						.			'</div>'
						.			'<div class="gjGridLeftInfo span8">'
						.				cbgjClass::getIntegrations( 'gj_onBeforeCategoryInfo', array( $row, $user, $plugin ) )
						.				( ( ( ( ! $row->get( 'nested' ) ) && cbgjClass::hasAccess( 'mod_lvl1', $authorized ) ) || $row->get( 'nested' ) ) && $row->nestedCount() ? '<div>' . cbgjClass::getOverride( 'category', true ) . ': ' . $row->nestedCount() . '</div>' : null )
						.				( $row->groupCount() ? '<div>' . cbgjClass::getOverride( 'group', true ) . ': ' . $row->groupCount() . '</div>' : null )
						.				( $row->get( 'user_id' ) ? '<div>' . cbgjClass::getOverride( 'owner' ) . ': ' . $row->getOwnerName( true ) . '</div>' : null )
						.				'<div>' . CBTxt::Ph( 'Types: [cat_types]', array( '[cat_types]' => implode( ', ', $row->getTypes() ) ) ) . '</div>'
						.				'<div>' . CBTxt::Ph( 'Access: [cat_access]', array( '[cat_access]' => $row->getAccess() ) ) . '</div>'
						.				( $row->get( 'parent' ) ? '<div>' . cbgjClass::getOverride( 'category' ) . ': ' . $row->getParent()->getName( 0, true ) . '</div>' : null )
						.				'<div>' . CBTxt::Ph( 'Created: [cat_date]', array( '[cat_date]' => cbFormatDate( $row->get( 'date' ), 1, false ) ) ) . '</div>'
						.				cbgjClass::getIntegrations( 'gj_onAfterCategoryInfo', array( $row, $user, $plugin ) )
						.			'</div>';

		if ( $row->get( 'description' ) ) {
			$return		.=			'<div class="gjGridLeftDesc span12 well well-small">'
						.				$row->getDescription()
						.			'</div>';
		}

		$return			.=		'</div>'
						.		'<div class="gjGridRight span3">'
						.			cbgjClass::getIntegrations( 'gj_onBeforeCategoryMenu', array( $row, $user, $plugin ), null, null )
						.			( cbgjClass::hasAccess( 'cat_nested_create', $authorized ) ? '<div><i class="icon-plus"></i> <a href="' . cbgjClass::getPluginURL( array( 'categories', 'new', (int) $row->get( 'id' ) ) ) . '">' . CBTxt::Ph( 'New [category]', array( '[category]' => cbgjClass::getOverride( 'category' ) ) ) . '</a></div>' : null )
						.			( cbgjClass::hasAccess( 'cat_grp_create', $authorized ) ? '<div><i class="icon-plus"></i> <a href="' . cbgjClass::getPluginURL( array( 'groups', 'new', (int) $row->get( 'id' ) ) ) . '">' . CBTxt::Ph( 'New [group]', array( '[group]' => cbgjClass::getOverride( 'group' ) ) ) . '</a></div>' : null )
						.			( cbgjClass::hasAccess( 'mod_lvl1', $authorized ) ? '<div><i class="icon-pencil"></i> <a href="' . cbgjClass::getPluginURL( array( 'categories', 'edit', (int) $row->get( 'id' ) ) ) . '">' . CBTxt::Ph( 'Edit [category]', array( '[category]' => cbgjClass::getOverride( 'category' ) ) ) . '</a></div>' : null )
						.			( cbgjClass::hasAccess( 'cat_message', $authorized ) && $row->groupCount() ? '<div><i class="icon-envelope"></i> <a href="' . cbgjClass::getPluginURL( array( 'categories', 'message', (int) $row->get( 'id' ) ) ) . '">' . CBTxt::Ph( 'Message [groups]', array( '[groups]' => cbgjClass::getOverride( 'group', true ) ) ) . '</a></div>' : null )
						.			( cbgjClass::hasAccess( 'cat_can_publish', $authorized ) ? $state : null )
						.			( cbgjClass::hasAccess( 'mod_lvl1', $authorized ) ? '<div><i class="icon-remove"></i> <a href="javascript: void(0);" onclick="' . cbgjClass::getPluginURL( array( 'categories', 'delete', (int) $row->get( 'id' ) ), CBTxt::P( 'Are you sure you want to delete this [category] and all its associated [groups]?', array( '[category]' => cbgjClass::getOverride( 'category' ), '[groups]' => cbgjClass::getOverride( 'group', true ) ) ) ) . '">' . CBTxt::Ph( 'Delete [category]', array( '[category]' => cbgjClass::getOverride( 'category' ) ) ) . '</a></div>' : null )
						.			cbgjClass::getIntegrations( 'gj_onAfterCategoryMenu', array( $row, $user, $plugin ), null, null )
						.			( cbgjClass::hasAccess( 'cat_usr_notifications', $authorized ) ? '<div><i class="icon-info-sign"></i> <a href="' . cbgjClass::getPluginURL( array( 'notifications', 'show', (int) $row->get( 'id' ) ) ) . '">' . CBTxt::Th( 'Notifications' ) . '</a></div>' : null )
						.			( $row->get( 'parent' ) ? '<div><i class="icon-share-alt"></i> <a href="' . $row->getParent()->getUrl() . '">' . CBTxt::Ph( 'Back to [category]', array( '[category]' => cbgjClass::getOverride( 'category' ) ) ) . '</a></div>' : null )
						.			( ! $row->get( 'parent' ) ? '<div><i class="icon-share-alt"></i> <a href="' . cbgjClass::getPluginURL( array( 'overview' ) ) . '">' . CBTxt::Ph( 'Back to [overview]', array( '[overview]' => cbgjClass::getOverride( 'overview' ) ) ) . '</a></div>' : null )
						.		'</div>'
						.	'</div>';

		return $return;
	}
예제 #3
0
	/**
	 * render frontend category message
	 *
	 * @param cbgjCategory $row
	 * @param array $input
	 * @param moscomprofilerUser $user
	 * @param object $plugin
	 */
	static function showCategoryMessage( $row, $input, $user, $plugin ) {
		$row->setPathway( CBTxt::P( 'Message [groups]', array( '[groups]' => cbgjClass::getOverride( 'group', true ) ) ), cbgjClass::getPluginURL( array( 'categories', 'message', (int) $row->get( 'id' ) ) ) );

		$return			=	'<div class="gjCategoryMessage">'
						.		'<form action="' . cbgjClass::getPluginURL( array( 'categories', 'send', (int) $row->get( 'id' ) ) ) . '" method="post" enctype="multipart/form-data" name="gjForm" id="gjForm" class="gjForm form-horizontal">'
						.			'<legend class="gjEditTitle">' . CBTxt::Ph( 'Message [groups]', array( '[groups]' => cbgjClass::getOverride( 'group', true ) ) ) . '</legend>'
						.			'<div class="gjEditContentInput control-group">'
						.				'<label class="gjEditContentInputTitle control-label">' . CBTxt::Th( 'Subject' ) . '</label>'
						.				'<div class="gjEditContentInputField controls">'
						.					$input['subject']
						.					'<span class="gjEditContentInputIcon help-inline">'
						.						cbgjClass::getIcon( null, CBTxt::T( 'Required' ), 'icon-star' )
						.						cbgjClass::getIcon( CBTxt::P( 'Input [groups] message subject.', array( '[groups]' => cbgjClass::getOverride( 'group', true ) ) ) )
						.					'</span>'
						.				'</div>'
						.			'</div>'
						.			'<div class="gjEditContentInput control-group">'
						.				'<label class="gjEditContentInputTitle control-label">' . CBTxt::Th( 'Body' ) . '</label>'
						.				'<div class="gjEditContentInputField controls">'
						.					$input['body']
						.					'<span class="gjEditContentInputIcon help-inline">'
						.						cbgjClass::getIcon( null, CBTxt::T( 'Required' ), 'icon-star' )
						.						cbgjClass::getIcon( CBTxt::P( 'Input [groups] message body.', array( '[groups]' => cbgjClass::getOverride( 'group', true ) ) ) )
						.					'</span>'
						.				'</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( CBTxt::T( 'Send Message' ) ) . '" class="gjButton gjButtonSubmit btn btn-primary" />&nbsp;'
						.				'<input type="button" value="' . htmlspecialchars( CBTxt::T( 'Cancel' ) ) . '" class="gjButton gjButtonCancel btn btn-mini" onclick="' . cbgjClass::getPluginURL( array( 'categories', 'show', (int) $row->get( 'id' ) ), CBTxt::T( 'Are you sure you want to cancel? All unsaved data will be lost!' ) ) . '" />'
						.			'</div>'
						.			cbGetSpoofInputTag( 'plugin' )
						.		'</form>'
						.	'</div>';

		echo $return;
	}
예제 #4
0
	/**
	 * render frontend overview panes
	 *
	 * @param moscomprofilerUser $user
	 * @param object $plugin
	 * @return string
	 */
	static function showOverviewPanes( $user, $plugin ) {
		$overviewDesc			=	CBTxt::Th( $plugin->params->get( 'overview_desc', null ) );
		$authorized				=	cbgjClass::getAuthorization( null, null, $user );
		$categoryCount			=	count( cbgjData::getCategories( array( 'cat_access', 'mod_lvl1' ), array( 'parent', '=', 0 ) ) );

		$return					=	'<legend class="gjHeaderTitle">' . cbgjClass::getOverride( 'category', true ) . ' ' . cbgjClass::getOverride( 'overview' ) . '</legend>'
								.	'<div class="gjGrid row-fluid">'
								.		'<div class="gjGridLeft span9">'
								.			'<div class="gjGridLeftLogo span4">'
								.				'<img alt="' . htmlspecialchars( CBTxt::T( 'Logo' ) ) . '" src="' . $plugin->livePath . '/images/' . $plugin->params->get( 'overview_logo', 'default_overview.png' ) . '" class="gjLogoDefault img-polaroid" />'
								.			'</div>'
								.			'<div class="gjGridLeftInfo span8">'
								.				cbgjClass::getIntegrations( 'gj_onBeforeOverviewInfo', array( $user, $plugin ) )
								.				( $categoryCount ? '<div>' . cbgjClass::getOverride( 'category', true ) . ': ' . $categoryCount . '</div>' : null )
								.				cbgjClass::getIntegrations( 'gj_onAfterOverviewInfo', array( $user, $plugin ) )
								.			'</div>';

		if ( $overviewDesc ) {
			if ( $plugin->params->get( 'overview_desc_content', 0 ) ) {
				$overviewDesc	=	cbgjClass::prepareContentPlugins( $overviewDesc );
			}

			$return				.=			'<div class="gjGridLeftDesc span12 well well-small">' . $overviewDesc . '</div>';
		}

		$return					.=		'</div>'
								.		'<div class="gjGridRight span3">'
								.			cbgjClass::getIntegrations( 'gj_onBeforeOverviewMenu', array( $user, $plugin ), null, null )
								.			( cbgjClass::hasAccess( 'cat_create', $authorized ) ? '<div><i class="icon-plus"></i> <a href="' . cbgjClass::getPluginURL( array( 'categories', 'new' ) ) . '">' . CBTxt::Ph( 'New [category]', array( '[category]' => cbgjClass::getOverride( 'category' ) ) ) . '</a></div>' : null )
								.			( cbgjClass::hasAccess( 'usr_mod', $authorized ) && $categoryCount ? '<div><i class="icon-envelope"></i> <a href="' . cbgjClass::getPluginURL( array( 'overview', 'message' ) ) . '">' . CBTxt::Ph( 'Message [categories]', array( '[categories]' => cbgjClass::getOverride( 'category', true ) ) ) . '</a></div>' : null )
								.			( cbgjClass::hasAccess( 'usr_panel', $authorized ) ? '<div><i class="icon-home"></i> <a href="' . cbgjClass::getPluginURL( array( 'panel' ) ) . '">' . CBTxt::Ph( 'My [panel]', array( '[panel]' => cbgjClass::getOverride( 'panel' ) ) ) . '</a></div>' : null )
								.			cbgjClass::getIntegrations( 'gj_onAfterOverviewMenu', array( $user, $plugin ), null, null )
								.			( cbgjClass::hasAccess( 'gen_usr_notifications', $authorized ) ? '<div><i class="icon-info-sign"></i> <a href="' . cbgjClass::getPluginURL( array( 'notifications', 'show' ) ) . '">' . CBTxt::Th( 'Notifications' ) . '</a></div>' : null )
								.		'</div>'
								.	'</div>';

		return $return;
	}
예제 #5
0
	/**
	 * render frontend users
	 *
	 * @param object $rows
	 * @param object $pageNav
	 * @param cbgjCategory $category
	 * @param cbgjGroup $group
	 * @param moscomprofilerUser $user
	 * @param object $plugin
	 * @return string
	 */
	static function showUsers( $rows, $pageNav, $category, $group, $user, $plugin ) {
		$groupUsersSearch		=	$plugin->params->get( 'group_users_search', 1 );
		$groupUsersPaging		=	$plugin->params->get( 'group_users_paging', 1 );
		$groupUsersLimitbox		=	$plugin->params->get( 'group_users_limitbox', 1 );

		$return					=	'<form action="' . $group->getUrl() . '" method="post" name="gjForm_users" id="gjForm_users" class="gjUsers_form">'
								.		( $groupUsersSearch && ( $pageNav->searching || $pageNav->total ) ? '<div class="gjTop gjTopRight">' . $pageNav->search . '</div>' : null );

		if ( $rows ) {
			$return				.=		'<div class="gjContent">';

			foreach ( $rows as $row ) {
				$authorized		=	cbgjClass::getAuthorization( $category, $group, $user, $row->getOwner() );
				$adminUrl		=	cbgjClass::getPluginURL( array( 'users', 'admin', (int) $category->get( 'id' ), (int) $group->get( 'id' ), (int) $row->get( 'id' ) ), CBTxt::P( 'Are you sure you want to set this [user] to [admin]?', array( '[user]' => cbgjClass::getOverride( 'user' ), '[admin]' => cbgjClass::getOverride( 'admin' ) ) ) );
				$modUrl			=	cbgjClass::getPluginURL( array( 'users', 'mod', (int) $category->get( 'id' ), (int) $group->get( 'id' ), (int) $row->get( 'id' ) ), CBTxt::P( 'Are you sure you want to set this [user] to [mod]?', array( '[user]' => cbgjClass::getOverride( 'user' ), '[mod]' => cbgjClass::getOverride( 'moderator' ) ) ) );
				$activeUrl		=	cbgjClass::getPluginURL( array( 'users', 'active', (int) $category->get( 'id' ), (int) $group->get( 'id' ), (int) $row->get( 'id' ) ), CBTxt::P( 'Are you sure you want to set this [user] as Active?', array( '[user]' => cbgjClass::getOverride( 'user' ) ) ) );
				$inactiveUrl	=	cbgjClass::getPluginURL( array( 'users', 'inactive', (int) $category->get( 'id' ), (int) $group->get( 'id' ), (int) $row->get( 'id' ) ), CBTxt::P( 'Are you sure you want to set this [user] as Inactive?', array( '[user]' => cbgjClass::getOverride( 'user' ) ) ) );
				$banUrl			=	cbgjClass::getPluginURL( array( 'users', 'ban', (int) $category->get( 'id' ), (int) $group->get( 'id' ), (int) $row->get( 'id' ) ), CBTxt::P( 'Are you sure you want to ban this [user]?', array( '[user]' => cbgjClass::getOverride( 'user' ) ) ) );
				$deleteUrl		=	cbgjClass::getPluginURL( array( 'users', 'delete', (int) $category->get( 'id' ), (int) $group->get( 'id' ), (int) $row->get( 'id' ) ), CBTxt::P( 'Are you sure you want to delete this [user]?', array( '[user]' => cbgjClass::getOverride( 'user' ) ) ) );

				if ( $row->get( 'status' ) == 0 ) {
					$typeClass	=	'gjUserTypePENDING';
					$type		=	CBTxt::Th( 'Pending' );
				} elseif ( $row->get( 'status' ) == -1 ) {
					$typeClass	=	'gjUserTypeBANNED';
					$type		=	CBTxt::Th( 'Banned' );
				} elseif ( $row->get( 'status' ) == 2 ) {
					$typeClass	=	'gjUserTypeMOD';
					$type		=	cbgjClass::getOverride( 'moderator' );
				} elseif ( $row->get( 'status' ) == 3 ) {
					$typeClass	=	'gjUserTypeADMIN';
					$type		=	cbgjClass::getOverride( 'admin' );
				} elseif ( $row->get( 'status' ) == 4 ) {
					$typeClass	=	'gjUserTypeOWNER';
					$type		=	cbgjClass::getOverride( 'owner' );
				} else {
					$typeClass	=	'gjUserTypeUSER';
					$type		=	cbgjClass::getOverride( 'user' );
				}

				if ( ( ! in_array( $row->get( 'status' ), array( -1, 4 ) ) ) && ( ( $row->get( 'status' ) != 3 ) || cbgjClass::hasAccess( 'mod_lvl2', $authorized ) ) && cbgjClass::hasAccess( 'mod_lvl3', $authorized ) ) {
					$ban		=	'<div><a href="javascript: void(0);" onclick="' . $banUrl . '"><i class="icon-lock"></i> ' . CBTxt::T( 'Ban' ) . '</a></div>';
				} elseif ( ( $row->get( 'status' ) == -1 ) && cbgjClass::hasAccess( 'mod_lvl3', $authorized ) ) {
					$ban		=	'<div><a href="javascript: void(0);" onclick="' . $activeUrl . '"><i class="icon-ok"></i> ' . CBTxt::T( 'Unban' ) . '</a></div>';
				} else {
					$ban		=	null;
				}

				if ( ( $row->get( 'status' ) == 1 ) && cbgjClass::hasAccess( 'mod_lvl3', $authorized ) ) {
					$promote	=	'<div><a href="javascript: void(0);" onclick="' . $modUrl . '"><i class="icon-thumbs-up"></i> ' . CBTxt::T( 'Promote' ) . '</a></div>';
				} elseif ( ( $row->get( 'status' ) == 2 ) && cbgjClass::hasAccess( 'mod_lvl2', $authorized ) ) {
					$promote	=	'<div><a href="javascript: void(0);" onclick="' . $adminUrl . '"><i class="icon-thumbs-up"></i> ' . CBTxt::T( 'Promote' ) . '</a></div>';
				} else {
					$promote	=	null;
				}

				if ( ( $row->get( 'status' ) == 2 ) && cbgjClass::hasAccess( 'mod_lvl3', $authorized ) ) {
					$demote		=	'<div><a href="javascript: void(0);" onclick="' . $activeUrl . '"><i class="icon-thumbs-down"></i> ' . CBTxt::T( 'Demote' ) . '</a></div>';
				} elseif ( ( $row->get( 'status' ) == 3 ) && cbgjClass::hasAccess( 'mod_lvl2', $authorized ) ) {
					$demote		=	'<div><a href="javascript: void(0);" onclick="' . $modUrl . '"><i class="icon-thumbs-down"></i> ' . CBTxt::T( 'Demote' ) . '</a></div>';
				} elseif ( ( $row->get( 'status' ) == 1 ) && cbgjClass::hasAccess( 'mod_lvl4', $authorized ) ) {
					$demote		=	'<div><a href="javascript: void(0);" onclick="' . $inactiveUrl . '"><i class="icon-thumbs-down"></i> ' . CBTxt::T( 'Demote' ) . '</a></div>';
				} else {
					$demote		=	null;
				}

				if ( ( $row->get( 'status' ) != 4 ) && cbgjClass::hasAccess( 'mod_lvl2', $authorized ) ) {
					$delete		=	'<div><a href="javascript: void(0);" onclick="' . $deleteUrl . '"><i class="icon-remove"></i> ' . CBTxt::T( 'Delete' ) . '</a></div>';
				} else {
					$delete		=	null;
				}

				$beforeMenu		=	cbgjClass::getIntegrations( 'gj_onBeforeGroupUserMenu', array( $row, $group, $category, $user, $plugin ) );
				$afterMenu		=	cbgjClass::getIntegrations( 'gj_onAfterGroupUserMenu', array( $row, $group, $category, $user, $plugin ) );

				$return			.=			'<div class="gjContentBox mini-layout">'
								.				'<div class="gjContentBoxRow">' . $row->getOwnerName( true ) . '</div>'
								.				'<div class="gjContentBoxRow">' . $row->getOwnerAvatar( true ) . '</div>'
								.				'<div class="gjContentBoxRow">' . $row->getOwnerOnline() . '</div>'
								.				'<div class="gjContentBoxRow">'
								.					cbgjClass::getIntegrations( 'gj_onBeforeGroupUserInfo', array( $row, $group, $category, $user, $plugin ) )
								.					'<span class="' . $typeClass . '" title="' . cbFormatDate( $row->get( 'date' ), 1, false ) . '">' . $type . '</span>'
								.					cbgjClass::getIntegrations( 'gj_onAfterGroupUserInfo', array( $row, $group, $category, $user, $plugin ) )
								.				'</div>';

				if ( ( $row->get( 'status' ) == 0 ) && cbgjClass::hasAccess( 'mod_lvl4', $authorized ) ) {
					$return		.=				'<div class="gjContentBoxRow">'
								.					'<input type="button" value="' . htmlspecialchars( CBTxt::Th( 'Approve' ) ) . '" class="gjButton btn btn-mini btn-success" onclick="' . cbgjClass::getPluginURL( array( 'users', 'active', (int) $category->get( 'id' ), (int) $group->get( 'id' ), (int) $row->get( 'id' ) ), CBTxt::P( 'Are you sure you want to set this [user] as Active?', array( '[user]' => cbgjClass::getOverride( 'user' ) ) ), true ) . '" />'
								.				'</div>';
				}

				if ( $beforeMenu || $ban || $delete || $promote || $demote || $afterMenu ) {
					$return		.=				'<div class="gjContentBoxRow">'
								.					cbgjClass::getDropdown( ( $beforeMenu . $ban . $delete . $promote . $demote . $afterMenu ), CBTxt::T( 'Menu' ) )
								.				'</div>';
				}

				$return			.=			'</div>';
			}

			$return				.=		'</div>';
		} else {
			$return				.=		'<div class="gjContent">';

			if ( $groupUsersSearch && $pageNav->searching ) {
				$return			.=			CBTxt::Ph( 'No [user] search results found.', array( '[user]' => cbgjClass::getOverride( 'user' ) ) );
			} else {
				$return			.=			CBTxt::Ph( 'There are no [users] available.', array( '[users]' => cbgjClass::getOverride( 'user', true ) ) );
			}

			$return				.=		'</div>';
		}

		if ( $groupUsersPaging ) {
			$return				.=		'<div class="gjPaging pagination pagination-centered">'
								.			( $pageNav->total > $pageNav->limit ? $pageNav->pagelinks : null )
								.			( ! $groupUsersLimitbox ? $pageNav->getLimitBox( false ) : ( $pageNav->total ? '<div class="gjPagingLimitbox">' . $pageNav->limitbox . '</div>' : null ) )
								.		'</div>';
		}

		$return					.=		cbGetSpoofInputTag( 'plugin' )
								.	'</form>';

		return $return;
	}
예제 #6
0
	/**
	 * render frontend overview main
	 *
	 * @param object $rows
	 * @param object $pageNav
	 * @param moscomprofilerUser $user
	 * @param object $plugin
	 * @return string
	 */
	static function showOverviewMain( $rows, $pageNav, $user, $plugin ) {
		$authorized			=	cbgjClass::getAuthorization( null, null, $user );
		$overviewSearch		=	$plugin->params->get( 'overview_search', 1 );
		$overviewPaging		=	$plugin->params->get( 'overview_paging', 1 );
		$overviewLimitbox	=	$plugin->params->get( 'overview_limitbox', 1 );
		$categoryDescLimit	=	(int) $plugin->params->get( 'overview_cat_desc_limit', 150 );
		$categoryApprove	=	$plugin->params->get( 'category_approve', 0 );
		$newCategory		=	( $plugin->params->get( 'overview_new_category', 0 ) && cbgjClass::hasAccess( 'cat_create', $authorized ) );
		$newGroup			=	( $plugin->params->get( 'overview_new_group', 0 ) && cbgjClass::hasAccess( 'grp_create', $authorized ) );

		$return				=	null;

		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' ), 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' ), true, true, false, null, true ) . '" />' : null )
							.		'</div>'
							.	'</div>';
		}

		$return				.=	'<form action="' . cbgjClass::getPluginURL( array( 'overview' ) ) . '" method="post" name="gjForm" id="gjForm" class="gjForm">'
							.		( $overviewSearch && ( $pageNav->searching || $pageNav->total ) ? '<div class="gjTop gjTopRight">' . $pageNav->search . '</div>' : null );

		if ( $rows ) foreach ( $rows as $row ) {
			$authorized		=	cbgjClass::getAuthorization( $row, null, $user );

			if ( $row->get( 'published' ) == 1 ) {
				$state		=	'<div><a href="javascript: void(0);" onclick="' . cbgjClass::getPluginURL( array( 'categories', 'unpublish', (int) $row->get( 'id' ) ), CBTxt::P( 'Are you sure you want to unpublish this [category]?', array( '[category]' => cbgjClass::getOverride( 'category' ) ) ), true, false, null, true ) . '"><i class="icon-ban-circle"></i> ' . CBTxt::Th( 'Unpublish' ) . '</a></div>';
			} else {
				$state		=	'<div><a href="' . cbgjClass::getPluginURL( array( 'categories', 'publish', (int) $row->get( 'id' ) ), null, true, false, null, true ) . '"><i class="icon-ok"></i> ' . CBTxt::Th( 'Publish' ) . '</a></div>';
			}

			$canApprove		=	( $categoryApprove && ( $row->get( 'published' ) == -1 ) && cbgjClass::hasAccess( 'cat_can_publish', $authorized ) );

			$beforeMenu		=	cbgjClass::getIntegrations( 'gj_onBeforeOverviewCategoryMenu', array( $row, $user, $plugin ) );
			$afterMenu		=	cbgjClass::getIntegrations( 'gj_onAfterOverviewCategoryMenu', array( $row, $user, $plugin ) );

			$return			.=		'<div class="gjContent row-fluid">'
							.			'<div class="gjContentLogo span2">' . $row->getLogo( true, true, true ) . '</div>'
							.			'<div class="gjContentBody mini-layout span10">'
							.				'<div class="gjContentBodyHeader row-fluid">'
							.					'<div class="gjContentBodyTitle span9"><h5>' . $row->getName( 0, true ) . '<small> ' . cbFormatDate( $row->get( 'date' ), 1, false ) . '</small></h5></div>'
							.					'<div class="gjContentBodyMenu span3">';

			if ( $canApprove ) {
				$return		.=						'<input type="button" value="' . htmlspecialchars( CBTxt::T( 'Approve' ) ) . '" class="gjButton btn btn-mini btn-success" onclick="' . cbgjClass::getPluginURL( array( 'categories', 'publish', (int) $row->get( 'id' ) ), true, true, false, null, true ) . '" />';
			} else {
				if ( ( $row->get( 'published' ) == 0 ) || ( ( $row->get( 'published' ) == 1 ) && ( ! cbgjClass::hasAccess( 'cat_approved', $authorized ) ) ) ) {
					$return	.=						cbgjClass::getIcon( null, CBTxt::P( 'This [category] is currently unpublished.', array( '[category]' => cbgjClass::getOverride( 'category' ) ) ), 'icon-eye-close' );
				}
			}

			if ( $beforeMenu || cbgjClass::hasAccess( array( 'mod_lvl1', 'cat_can_publish' ), $authorized ) || $afterMenu ) {
				$menuItems	=	$beforeMenu
							.	( cbgjClass::hasAccess( 'mod_lvl1', $authorized ) ? '<div><a href="' . cbgjClass::getPluginURL( array( 'categories', 'edit', (int) $row->get( 'id' ) ), null, true, false, null, true ) . '"><i class="icon-pencil"></i> ' . CBTxt::Th( 'Edit' ) . '</a></div>' : null )
							.	( ( ! $canApprove ) && cbgjClass::hasAccess( 'cat_can_publish', $authorized ) ? $state : null )
							.	( cbgjClass::hasAccess( 'mod_lvl1', $authorized ) ? '<div><a href="javascript: void(0);" onclick="' . cbgjClass::getPluginURL( array( 'categories', 'delete', (int) $row->get( 'id' ) ), CBTxt::P( 'Are you sure you want to delete this [category] and all its associated [groups]?', array( '[category]' => cbgjClass::getOverride( 'category' ), '[groups]' => cbgjClass::getOverride( 'group', true ) ) ), true, false, null, true ) . '"><i class="icon-remove"></i> ' . CBTxt::Th( 'Delete' ) . '</a></div>' : null )
							.	$afterMenu;

				$return		.=						cbgjClass::getDropdown( $menuItems, CBTxt::Th( 'Menu' ) );
			}

			$return			.=					'</div>'
							.				'</div>'
							.				'<div class="gjContentBodyInfo">' . ( $row->getDescription( $categoryDescLimit ) ? '<div class="well well-small">' . $row->getDescription( $categoryDescLimit ) . '</div>' : null ) . '</div>'
							.				'<div class="gjContentDivider"></div>'
							.				'<div class="gjContentBodyFooter">'
							.					cbgjClass::getIntegrations( 'gj_onBeforeOverviewCategoryInfo', array( $row, $user, $plugin ), null, 'span' )
							.					( ( ( ( ! $row->get( 'nested' ) ) && cbgjClass::hasAccess( 'mod_lvl1', $authorized ) ) || $row->get( 'nested' ) ) && $row->nestedCount() ? cbgjClass::getOverride( 'category', $row->nestedCount() ) . ' | ' : null )
							.					( $row->groupCount() ? cbgjClass::getOverride( 'group', $row->groupCount() ) . ' | ' : null )
							.					implode( ', ', $row->getTypes() )
							.					cbgjClass::getIntegrations( 'gj_onAfterOverviewCategoryInfo', array( $row, $user, $plugin ), null, 'span' )
							.				'</div>'
							.			'</div>'
							.		'</div>';
		} else {
			$return			.=		'<div class="gjContent">';

			if ( $overviewSearch && $pageNav->searching ) {
				$return		.=			CBTxt::Ph( 'No [category] search results found.', array( '[category]' => cbgjClass::getOverride( 'category' ) ) );
			} else {
				$return		.=			CBTxt::Ph( 'There are no [categories] available.', array( '[categories]' => cbgjClass::getOverride( 'category', true ) ) );
			}

			$return			.=		'</div>';
		}

		if ( $overviewPaging ) {
			$return			.=		'<div class="gjPaging pagination pagination-centered">'
							.			( $pageNav->total > $pageNav->limit ? $pageNav->pagelinks : null )
							.			( ! $overviewLimitbox ? $pageNav->getLimitBox( false ) : ( $pageNav->total ? '<div class="gjPagingLimitbox">' . $pageNav->limitbox . '</div>' : null ) )
							.		'</div>';
		}

		$return				.=		cbGetSpoofInputTag( 'plugin' )
							.	'</form>';

		return $return;
	}
예제 #7
0
    function edittab(&$row, $option, &$lists, $tabid, &$paramsEditorHtml)
    {
        global $_CB_framework, $task, $_CB_database, $_PLUGINS;
        _CBsecureAboveForm('edittab');
        outputCbTemplate(2);
        outputCbJs(2);
        initToolTip(2);
        $_CB_framework->outputCbJQuery('');
        global $_CB_Backend_Title;
        $_CB_Backend_Title = array(0 => array('cbicon-48-tabs', CBTxt::T('Community Builder Tab') . ": <small>" . ($row->tabid ? CBTxt::T('Edit') . ' [ ' . htmlspecialchars(getLangDefinition($row->title)) . ' ]' : CBTxt::T('New')) . '</small>'));
        if ($row->tabid && !$row->enabled) {
            echo '<div class="cbWarning">' . CBTxt::T('Tab is not published') . '</div>' . "\n";
        }
        $editorSave_description = $_CB_framework->saveCmsEditorJS('description');
        ob_start();
        ?>
		function submitbutton(pressbutton) {
			var form = document.adminForm;
			if (pressbutton == 'showTab') {
		        <?php 
        echo $editorSave_description;
        ?>
				cbsubmitform( pressbutton );
				return;
			}
			var r = new RegExp("[^0-9A-Za-z]", "i");

			// do field validation
			if (jQuery.trim(form.title.value) == "") {
				alert('<?php 
        echo addslashes(CBTxt::T('You must provide a title.'));
        ?>
');
			} else {
		        <?php 
        echo $editorSave_description;
        ?>
				cbsubmitform( pressbutton );
			}
		}
<?php 
        $js = ob_get_contents();
        ob_end_clean();
        $_CB_framework->document->addHeadScriptDeclaration($js);
        ?>
	<div id="overDiv" style="position:absolute; visibility:hidden; z-index:10000;"></div>

	<form action="<?php 
        echo $_CB_framework->backendUrl('index.php?option=com_comprofiler&task=saveTab');
        ?>
" method="POST" name="adminForm">
	<table cellspacing="0" cellpadding="0" width="100%">
	<tr valign="top">
		<td width="60%" valign="top">
			<table class="adminform">
			<tr>
				<th colspan="3">
				<?php 
        echo CBTxt::T('Tab Details');
        ?>
				</th>
			</tr>
			<tr>
				<td width="20%"><?php 
        echo CBTxt::T('Title');
        ?>
:</td>
				<td width="35%"><input type="text" name="title" class="inputbox" size="40" value="<?php 
        echo htmlspecialchars($row->title);
        ?>
" /></td>
				<td width="45%"><?php 
        echo CBTxt::T('Title as will appear on tab.');
        ?>
</td>
			</tr>
			<tr>
				<td colspan="3"><?php 
        echo CBTxt::T('Description: This description appears only on user edit, not on profile (For profile text, use delimiter fields)');
        ?>
:</td>
			</tr>
			<tr>
				<td colspan="3" align="left"><?php 
        echo $_CB_framework->displayCmsEditor('description', $row->description, 600, 200, 50, 10);
        // <textarea name="description" class="inputbox" cols="40" rows="10">< ?php echo htmlspecialchars( $row->description ); ? ></textarea>
        ?>
</td>
			</tr>
			<tr>
				<td><?php 
        echo CBTxt::T('Publish');
        ?>
:</td>
				<td><?php 
        echo $lists['enabled'];
        ?>
</td>
				<td>&nbsp;</td>
			</tr>
			<tr>
				<td><?php 
        echo CBTxt::T('Profile ordering');
        ?>
:</td>
				<td><?php 
        echo $lists['ordering'];
        ?>
</td>
				<td><?php 
        echo CBTxt::T('Tabs and fields on profile are ordered as follows:');
        ?>
<ol>
				    <li><?php 
        echo CBTxt::T('position of tab on user profile (top-down, left-right)');
        ?>
</li>
				    <li><?php 
        echo CBTxt::T('This ordering of tab on position of user profile');
        ?>
</li>
				    <li><?php 
        echo CBTxt::T('ordering of field within tab position of user profile.');
        ?>
</li></ol>
				</td>
			</tr>
			<tr>
				<td><?php 
        echo CBTxt::T('Registration ordering');
        ?>
<br /><?php 
        echo CBTxt::T('(default value: 10)');
        ?>
:</td>
				<td><?php 
        echo $lists['ordering_register'];
        ?>
</td>
				<td><?php 
        echo CBTxt::T('Tabs and fields on registration are ordered as follows:');
        ?>
<ol>
					<li><?php 
        echo CBTxt::T('This registration ordering of tab');
        ?>
</li>
				    <li><?php 
        echo CBTxt::T('position of tab on user profile (top-down, left-right)');
        ?>
</li>
				    <li><?php 
        echo CBTxt::T('ordering of tab on position of user profile');
        ?>
</li>
				    <li><?php 
        echo CBTxt::T('ordering of field within tab position of user profile.');
        ?>
</li></ol>
				</td>
			</tr>
			<tr>
				<td><?php 
        echo CBTxt::T('Position');
        ?>
:</td>
				<td><?php 
        echo $lists['position'];
        ?>
</td>
				<td><?php 
        echo CBTxt::T('Position on profile and ordering on registration.');
        ?>
</td>
			</tr>
			<tr>
				<td><?php 
        echo CBTxt::T('Display type');
        ?>
:</td>
				<td><?php 
        echo $lists['displaytype'];
        ?>
</td>
				<td><?php 
        echo CBTxt::T('In which way the content of this tab will be displayed on the profile.');
        ?>
</td>
			</tr>
			<tr>
				<td><?php 
        echo CBTxt::Th('View Access Level');
        ?>
:</td>
				<td><?php 
        echo $lists['viewaccesslevel'];
        ?>
</td>
				<td><?php 
        echo CBTxt::Th('Only users which are in groups assigned to this View Access Level will see this tab.') . ($lists['useraccessgroup'] ? ' (' . CBTxt::Th('New method working in all Joomla and Mambo versions') . ')' : '');
        ?>
</td>
			</tr>
			<?php 
        if ($lists['useraccessgroup']) {
            ?>
			<tr>
				<td><?php 
            echo CBTxt::Th('User Group to allow access to') . (checkJversion() >= 2 ? '<br /><em>(' . CBTxt::Th("Old deprecated method of Joomla 1.5, do not use here") . '. ' . CBTxt::Th('Keep setting "-- Everybody --" and Use View Access Level above instead') . ')</em>' : '');
            ?>
:</td>
				<td><?php 
            echo $lists['useraccessgroup'];
            ?>
</td>
				<td><?php 
            echo CBTxt::Ph('Old Joomla [VERSION] method', array('[VERSION]' => '1.0 and 1.5 and Mambo')) . ': ' . CBTxt::Th('This method is kept for backwards compatibility but will be removed at next major Community Builder version.') . '<br />' . CBTxt::Th('Use View Access Level above instead and set this Group setting to - "Everybody" -.') . ' ' . CBTxt::Th('All groups above that level will also have access to this tab.');
            ?>
				</td>
			</tr>
			<?php 
        }
        ?>
			</table>
		</td>
		<td width="40%">
			<table class="adminform">
			<tr>
				<th colspan="2">
				<?php 
        echo CBTxt::T('Parameters');
        ?>
				</th>
			</tr>
			<tr>
				<td>
				<?php 
        if ($row->tabid && $row->pluginid > 0) {
            $plugin = new moscomprofilerPlugin($_CB_database);
            $plugin->load((int) $row->pluginid);
            // fail if checked out not by 'me'
            if ($plugin->checked_out && $plugin->checked_out != $_CB_framework->myId()) {
                echo "<script type=\"text/javascript\">alert('" . addslashes(sprintf(CBTxt::T('The plugin %s is currently being edited by another administrator'), $plugin->name)) . "'); document.location.href='" . $_CB_framework->backendUrl("index.php?option={$option}") . "'</script>\n";
                exit(0);
            }
            // get params values
            if ($plugin->type !== "language" && $plugin->id) {
                $_PLUGINS->loadPluginGroup($plugin->type, array((int) $plugin->id), 0);
            }
            $element = $_PLUGINS->loadPluginXML('editTab', $row->pluginclass, $plugin->id);
            /*
            					$xmlfile = $_CB_framework->getCfg('absolute_path') . '/components/com_comprofiler/plugin/' .$plugin->type . '/'.$plugin->folder . '/' . $plugin->element .'.xml';
            					// $params = new cbParameters( $row->params, $xmlfile );
            					cbimport('cb.xml.simplexml');
            					$xmlDoc = new CBSimpleXML();
            					if ( $xmlDoc->loadFile( $xmlfile ) ) {
            						$element =& $xmlDoc->document;
            					} else {
            						$element = null;
            					}
            */
            $pluginParams = new cbParamsBase($plugin->params);
            $params = new cbParamsEditorController($row->params, $element, $element, $plugin, $row->tabid);
            $params->setPluginParams($pluginParams);
            $options = array('option' => $option, 'task' => $task, 'pluginid' => $row->pluginid, 'tabid' => $row->tabid);
            $params->setOptions($options);
            echo $params->draw('params', 'tabs', 'tab', 'class', $row->pluginclass);
        } else {
            echo '<em>' . CBTxt::T('No Parameters') . '</em>';
        }
        if ($paramsEditorHtml) {
            foreach ($paramsEditorHtml as $paramsEditorHtmlBlock) {
                ?>
					<table class="adminform" cellspacing="0" cellpadding="0" width="100%">
						<tr>
							<th colspan="2">
								<?php 
                echo $paramsEditorHtmlBlock['title'];
                ?>
							</th>
						</tr>
						<tr>
							<td>
								<?php 
                echo $paramsEditorHtmlBlock['content'];
                ?>
							</td>
						</tr>
					</table>
<?php 
            }
        }
        ?>
				</td>
			</tr>
			</table>
		</td>
	</tr>
	</table>
  <input type="hidden" name="tabid" value="<?php 
        echo $row->tabid;
        ?>
" />
  <input type="hidden" name="option" value="<?php 
        echo $option;
        ?>
" />
  <input type="hidden" name="task" value="" />
  <?php 
        if (!$lists['useraccessgroup']) {
            ?>
  <input type="hidden" name="useraccessgroupid" value="-2" />
  <?php 
        }
        echo cbGetSpoofInputTag('tab');
        ?>
</form>
<?php 
    }
예제 #8
0
	/**
	 * render frontend panel panes
	 *
	 * @param moscomprofilerUser $user
	 * @param object $plugin
	 * @return string
	 */
	static function showPanelPanes( $user, $plugin ) {
		$panelDesc				=	CBTxt::Th( $plugin->params->get( 'panel_desc', null ) );
		$panelCategoryDisplay	=	$plugin->params->get( 'panel_category_display', 1 );
		$panelGroupDisplay		=	$plugin->params->get( 'panel_group_display', 1 );
		$panelJoinedDisplay		=	$plugin->params->get( 'panel_joined_display', 1 );
		$panelInvitesDisplay	=	$plugin->params->get( 'panel_invites_display', 1 );
		$panelInvitedDisplay	=	$plugin->params->get( 'panel_invited_display', 1 );
		$authorized				=	cbgjClass::getAuthorization( null, null, $user );
		$ownedCategories		=	count( cbgjData::getCategories( null, array( 'user_id', '=', $user->id ) ) );

		if ( $plugin->params->get( 'group_tab_joined', 0 ) ) {
			$access				=	array( 'user_id', '=', (int) $user->id, array( 'e.user_id', '=', (int) $user->id, 'e.status', '!IN', array( -1, 0, 4 ) ) );
		} else {
			$access				=	array( 'user_id', '=', (int) $user->id );
		}

		$ownedGroups			=	count( cbgjData::getGroups( null, $access ) );

		if ( $plugin->params->get( 'joined_tab_owned', 0 ) ) {
			$access				=	array( 'user_id', '=', (int) $user->id, array( 'e.user_id', '=', (int) $user->id, 'e.status', '!IN', array( -1, 0, 4 ) ) );
		} else {
			$access				=	array( 'e.user_id', '=', (int) $user->id, 'e.status', '!IN', array( -1, 0, 4 ) );
		}

		$joinedGroups			=	count( cbgjData::getGroups( null, $access ) );
		$ownedInvites			=	count( cbgjData::getInvites( null, array( 'user_id', '=', (int) $user->id ) ) );
		$invitedTo				=	count( cbgjData::getInvites( null, array( 'user', '=', (int) $user->id, array( 'email', '=', $user->email ) ) ) );

		$return					=	'<legend class="gjHeaderTitle">' . cbgjClass::getOverride( 'panel' ) . '</legend>'
								.	'<div class="gjGrid row-fluid">'
								.		'<div class="gjGridLeft span9">'
								.			'<div class="gjGridLeftLogo span4">'
								.				'<img alt="' . htmlspecialchars( CBTxt::Th( 'Logo' ) ) . '" src="' . $plugin->livePath . '/images/' . $plugin->params->get( 'panel_logo', 'default_panel.png' ) . '" class="gjLogoDefault img-polaroid" />'
								.			'</div>'
								.			'<div class="gjGridLeftInfo span8">'
								.				cbgjClass::getIntegrations( 'gj_onBeforePanelInfo', array( $user, $plugin ) )
								.				( $panelCategoryDisplay && $ownedCategories ? '<div>' . cbgjClass::getOverride( 'category', true ) . ': ' . $ownedCategories . '</div>' : null )
								.				( $panelGroupDisplay && $ownedGroups ? '<div>' . cbgjClass::getOverride( 'group', true ) . ': ' . $ownedGroups . '</div>' : null )
								.				( $panelJoinedDisplay && $joinedGroups ? '<div>' . CBTxt::Ph( 'Joined: [grp_joined_count]', array( '[grp_joined_count]' => $joinedGroups ) ) . '</div>' : null )
								.				( $panelInvitesDisplay && $ownedInvites ? '<div>' . CBTxt::Ph( 'Invites: [grp_invite_count]', array( '[grp_invite_count]' => $ownedInvites ) ) . '</div>' : null )
								.				( $panelInvitedDisplay && $invitedTo ? '<div>' . CBTxt::Ph( 'Invited: [grp_invited_count]', array( '[grp_invited_count]' => $invitedTo ) ) . '</div>' : null )
								.				cbgjClass::getIntegrations( 'gj_onAfterPanelInfo', array( $user, $plugin ) )
								.			'</div>';

		if ( $panelDesc ) {
			if ( $plugin->params->get( 'panel_desc_content', 0 ) ) {
				$panelDesc		=	cbgjClass::prepareContentPlugins( $panelDesc );
			}

			$return				.=			'<div class="gjGridLeftDesc span12 well well-small">' . $panelDesc . '</div>';
		}

		$return					.=		'</div>'
								.		'<div class="gjGridRight span3">'
								.			cbgjClass::getIntegrations( 'gj_onBeforePanelMenu', array( $user, $plugin ) )
								.			( $panelCategoryDisplay && cbgjClass::hasAccess( 'usr_reg', $authorized ) ? '<div><i class="icon-home"></i> <a href="' . cbgjClass::getPluginURL( array( 'panel', 'categories' ) ) . '">' . CBTxt::Ph( 'My [categories]', array( '[categories]' => cbgjClass::getOverride( 'category', true ) ) ) . '</a></div>' : null )
								.			( $panelGroupDisplay && cbgjClass::hasAccess( 'usr_reg', $authorized ) ? '<div><i class="icon-user"></i> <a href="' . cbgjClass::getPluginURL( array( 'panel', 'groups' ) ) . '">' . CBTxt::Ph( 'My [groups]', array( '[groups]' => cbgjClass::getOverride( 'group', true ) ) ) . '</a></div>' : null )
								.			( $panelJoinedDisplay && cbgjClass::hasAccess( 'usr_reg', $authorized ) ? '<div><i class="icon-user"></i> <a href="' . cbgjClass::getPluginURL( array( 'panel', 'joined' ) ) . '">' . CBTxt::Ph( 'Joined [groups]', array( '[groups]' => cbgjClass::getOverride( 'group', true ) ) ) . '</a></div>' : null )
								.			( $panelInvitesDisplay && cbgjClass::hasAccess( 'usr_reg', $authorized ) ? '<div><i class="icon-inbox"></i> <a href="' . cbgjClass::getPluginURL( array( 'panel', 'invites' ) ) . '">' . CBTxt::Th( 'My Invites' ) . '</a></div>' : null )
								.			( $panelInvitedDisplay && cbgjClass::hasAccess( 'usr_reg', $authorized ) ? '<div><i class="icon-inbox"></i> <a href="' . cbgjClass::getPluginURL( array( 'panel', 'invited' ) ) . '">' . CBTxt::Th( 'Invited To' ) . '</a></div>' : null )
								.			cbgjClass::getIntegrations( 'gj_onAfterPanelMenu', array( $user, $plugin ) )
								.			( cbgjClass::hasAccess( 'gen_usr_notifications', $authorized ) ? '<div><i class="icon-info-sign"></i> <a href="' . cbgjClass::getPluginURL( array( 'notifications', 'show' ) ) . '">' . CBTxt::Th( 'Notifications' ) . '</a></div>' : null )
								.			'<div><i class="icon-share-alt"></i> <a href="' . cbgjClass::getPluginURL( array( 'overview' ) ) . '">' . CBTxt::Ph( 'Back to [overview]', array( '[overview]' => cbgjClass::getOverride( 'overview' ) ) ) . '</a></div>'
								.		'</div>'
								.	'</div>';

		return $return;
	}
예제 #9
0
	/**
	 * render frontend all groups
	 *
	 * @param boolean $self
	 * @param object $rows
	 * @param object $pageNav
	 * @param moscomprofilerUser $user
	 * @param object $plugin
	 * @return mixed
	 */
	static function showGroupAll( $self, $rows, $pageNav, $user, $plugin ) {
		global $_CB_framework, $_LANG;

		$generalTitle			=	$plugin->params->get( 'general_title', $plugin->name );

		$_CB_framework->setPageTitle( cbgjClass::getOverride( 'group', true ) );

		if ( $generalTitle != '' ) {
			$_CB_framework->appendPathWay( htmlspecialchars( CBTxt::T( $generalTitle ) ), cbgjClass::getPluginURL() );
		}

		$_CB_framework->appendPathWay( cbgjClass::getOverride( 'group', true ), cbgjClass::getPluginURL( array( 'groups', ( $self ? 'allmy' : 'all' ) ) ) );

		$groupAllSearch			=	$plugin->params->get( 'group_all_search', 1 );
		$groupAllPaging			=	$plugin->params->get( 'group_all_paging', 1 );
		$groupAllLimitbox		=	$plugin->params->get( 'group_all_limitbox', 1 );
		$groupAllDescLimit		=	(int) $plugin->params->get( 'group_all_desc_limit', 150 );
		$groupApprove			=	$plugin->params->get( 'group_approve', 0 );
		$authorized				=	cbgjClass::getAuthorization( null, null, $user );
		$return					=	'<div class="gjGroupAll">';

		if ( cbgjClass::hasAccess( 'grp_create', $authorized ) ) {
			$return				.=		'<div class="gjTop gjTopCenter">'
								.			'<input type="button" value="' . htmlspecialchars( CBTxt::P( 'New [group]', array( '[group]' => cbgjClass::getOverride( 'group' ) ) ) ) . '" class="gjButton btn" onclick="' . cbgjClass::getPluginURL( array( 'groups', 'new' ), true, true, false, null, true ) . '" />'
								.		'</div>';
		}

		$return					.=		'<form action="' . cbgjClass::getPluginURL( array( 'groups', ( $self ? 'allmy' : 'all' ) ) ) . '" method="post" name="gjForm" id="gjForm" class="gjForm">'
								.			( $groupAllSearch && ( $pageNav->searching || $pageNav->total ) ? '<div class="gjTop gjTopRight">' . $pageNav->search . '</div>' : null );

		if ( $rows ) foreach ( $rows as $row ) {
			$category			=	$row->getCategory();
			$authorized			=	cbgjClass::getAuthorization( $category, $row, $user );

			if ( $row->get( 'published' ) == 1 ) {
				$state			=	'<div><a href="javascript: void(0);" onclick="' . cbgjClass::getPluginURL( array( 'groups', 'unpublish', (int) $category->get( 'id' ), (int) $row->get( 'id' ) ), CBTxt::P( 'Are you sure you want to unpublish this [group]?', array( '[group]' => cbgjClass::getOverride( 'group' ) ) ), true, false, null, true ) . '"><i class="icon-ban-circle"></i> ' . CBTxt::Th( 'Unpublish' ) . '</a></div>';
			} else {
				$state			=	'<div><a href="' . cbgjClass::getPluginURL( array( 'groups', 'publish', (int) $category->get( 'id' ), (int) $row->get( 'id' ) ), null, true, false, null, true ) . '"><i class="icon-ok"></i> ' . CBTxt::Th( 'Publish' ) . '</a></div>';
			}

			$canApprove			=	( $groupApprove && ( $row->get( 'published' ) == -1 ) && cbgjClass::hasAccess( 'grp_can_publish', $authorized ) );

			$beforeMenu			=	cbgjClass::getIntegrations( 'gj_onBeforeCategoryGroupMenu', array( $row, $category, $user, $plugin ) );
			$afterMenu			=	cbgjClass::getIntegrations( 'gj_onAfterCategoryGroupMenu', array( $row, $category, $user, $plugin ) );

			$return				.=			'<div class="gjContent row-fluid">'
								.				'<div class="gjContentLogo span2">' . $row->getLogo( true, true, true ) . '</div>'
								.				'<div class="gjContentBody mini-layout span10">'
								.					'<div class="gjContentBodyHeader row-fluid">'
								.						'<div class="gjContentBodyTitle span9"><h5>' . $row->getName( 0, true ) . '<small> ' . cbFormatDate( $row->get( 'date' ), 1, false ) . ' - ' . $category->getName( 0, true ) . ( $row->get( 'parent' ) ? ' - ' . $row->getParent()->getName( 0, true ) : null ) . '</small></h5></div>'
								.						'<div class="gjContentBodyMenu span3">';

			if ( $canApprove ) {
				$return			.=							'<input type="button" value="' . htmlspecialchars( CBTxt::T( 'Approve' ) ) . '" class="gjButton btn btn-mini btn-success" onclick="' . cbgjClass::getPluginURL( array( 'groups', 'publish', (int) $category->get( 'id' ), (int) $row->get( 'id' ) ), true, true, false, null, true ) . '" />';
			} else {
				if ( ( $row->get( 'published' ) == 0 ) || ( ( $row->get( 'published' ) == 1 ) && ( ! cbgjClass::hasAccess( 'grp_approved', $authorized ) ) ) ) {
					$return		.=							cbgjClass::getIcon( null, CBTxt::P( 'This [group] is currently unpublished.', array( '[group]' => cbgjClass::getOverride( 'group' ) ) ), 'icon-eye-close' );
				}

				if ( cbgjClass::hasAccess( 'grp_join', $authorized ) ) {
					$return		.=							' <input type="button" value="' . htmlspecialchars( ( cbgjClass::hasAccess( 'grp_invited', $authorized ) ? CBTxt::T( 'Accept Invite' ) : CBTxt::T( 'Join' ) ) ) . '" class="gjButton gjButtonCancel btn btn-mini btn-success" onclick="' . cbgjClass::getPluginURL( array( 'groups', 'join', (int) $category->get( 'id' ), (int) $row->get( 'id' ) ), true, true, false, null, true ) . '" />';
				}
			}

			if ( $beforeMenu || cbgjClass::hasAccess( array( 'grp_leave', 'mod_lvl2', 'mod_lvl3' ), $authorized ) || $afterMenu || ( ( ! $canApprove ) && cbgjClass::hasAccess( 'grp_can_publish', $authorized ) ) || ( $canApprove && cbgjClass::hasAccess( 'grp_join', $authorized ) ) ) {
				$menuItems		=	$beforeMenu
								.	( $canApprove && cbgjClass::hasAccess( 'grp_join', $authorized ) ? '<div><a href="javascript: void(0);" onclick="' . cbgjClass::getPluginURL( array( 'groups', 'join', (int) $category->get( 'id' ), (int) $row->get( 'id' ) ), null, true, false, null, true ) . '"><i class="icon-plus"></i> ' . CBTxt::Th( 'Join' ) . '</a></div>' : null )
								.	( cbgjClass::hasAccess( 'grp_leave', $authorized ) ? '<div><a href="javascript: void(0);" onclick="' . cbgjClass::getPluginURL( array( 'groups', 'leave', (int) $category->get( 'id' ), (int) $row->get( 'id' ) ), CBTxt::P( 'Are you sure you want to leave this [group]?', array( '[group]' => cbgjClass::getOverride( 'group' ) ) ), true, false, null, true ) . '"><i class="icon-minus"></i> ' . CBTxt::Th( 'Leave' ) . '</a></div>' : null )
								.	( cbgjClass::hasAccess( 'mod_lvl3', $authorized ) ? '<div><a href="' . cbgjClass::getPluginURL( array( 'groups', 'edit', (int) $category->get( 'id' ), (int) $row->get( 'id' ) ), null, true, false, null, true ) . '"><i class="icon-pencil"></i> ' . CBTxt::Th( 'Edit' ) . '</a></div>' : null )
								.	( ( ! $canApprove ) && cbgjClass::hasAccess( 'grp_can_publish', $authorized ) ? $state : null )
								.	( cbgjClass::hasAccess( 'mod_lvl2', $authorized ) ? '<div><a href="javascript: void(0);" onclick="' . cbgjClass::getPluginURL( array( 'groups', 'delete', (int) $category->get( 'id' ), (int) $row->get( 'id' ) ), CBTxt::P( 'Are you sure you want to delete this [group] and all its associated [users]?', array( '[group]' => cbgjClass::getOverride( 'group' ), '[users]' => cbgjClass::getOverride( 'user', true ) ) ), true, false, null, true ) . '"><i class="icon-remove"></i> ' . CBTxt::Th( 'Delete' ) . '</a></div>' : null )
								.	$afterMenu;

				$return			.=							cbgjClass::getDropdown( $menuItems, CBTxt::Th( 'Menu' ) );
			}

			$return				.=						'</div>'
								.					'</div>'
								.					'<div class="gjContentBodyInfo">' . ( $row->getDescription( $groupAllDescLimit ) ? '<div class="well well-small">' . $row->getDescription( $groupAllDescLimit ) . '</div>' : null ) . '</div>'
								.					'<div class="gjContentDivider"></div>'
								.					'<div class="gjContentBodyFooter">'
								.						cbgjClass::getIntegrations( 'gj_onBeforeCategoryGroupInfo', array( $row, $category, $user, $plugin ), null, 'span' )
								.						( ( ( ( ! $row->get( 'nested' ) ) && cbgjClass::hasAccess( 'mod_lvl2', $authorized ) ) || $row->get( 'nested' ) ) && $row->nestedCount() ? cbgjClass::getOverride( 'group', $row->nestedCount() ) . ' | ' : null )
								.						( $row->userCount() ? cbgjClass::getOverride( 'user', $row->userCount() ) . ' | ' : null )
								.						$row->getType()
								.						cbgjClass::getIntegrations( 'gj_onAfterCategoryGroupInfo', array( $row, $category, $user, $plugin ), null, 'span' )
								.					'</div>'
								.				'</div>'
								.			'</div>';
		} else {
			$return				.=			'<div class="gjContent">';

			if ( $groupAllSearch && $pageNav->searching ) {
				$return			.=				CBTxt::Ph( 'No [group] search results found.', array( '[group]' => cbgjClass::getOverride( 'group' ) ) );
			} else {
				$return			.=				CBTxt::Ph( 'There are no [groups] available.', array( '[groups]' => cbgjClass::getOverride( 'group', true ) ) );
			}

			$return				.=			'</div>';
		}

		if ( $groupAllPaging ) {
			$return				.=			'<div class="gjPaging pagination pagination-centered">'
								.				( $pageNav->total > $pageNav->limit ? $pageNav->pagelinks : null )
								.				( ! $groupAllLimitbox ? $pageNav->getLimitBox( false ) : ( $pageNav->total ? '<div class="gjPagingLimitbox">' . $pageNav->limitbox . '</div>' : null ) )
								.			'</div>';
		}

		$return					.=			cbGetSpoofInputTag( 'plugin' )
								.		'</form>'
								.	'</div>';

		echo $return;
	}
    static function editList(&$row, $lists, $fields, $option, $tabid, $paramsEditorHtml)
    {
        global $_CB_database, $_CB_framework;
        HTML_comprofiler::secureAboveForm('editList');
        outputCbTemplate(2);
        outputCbJs(2);
        initToolTip(2);
        global $_CB_Backend_Title;
        $_CB_Backend_Title = array(0 => array('cbicon-48-lists', htmlspecialchars(CBTxt::T('Community Builder List')) . ": <small>" . ($row->listid ? htmlspecialchars(CBTxt::T('Edit')) . ' [ ' . htmlspecialchars(getLangDefinition($row->title)) . ' ]' : htmlspecialchars(CBTxt::T('New'))) . '</small>'));
        if ($row->listid && !$row->published) {
            echo '<div class="cbWarning">' . htmlspecialchars(CBTxt::T('List is not published')) . '</div>' . "\n";
        }
        $notFoundFielIds = array();
        $fieldids = array();
        $col1options = "";
        $col2options = "";
        $col3options = "";
        $col4options = "";
        if ($tabid > 0) {
            $col1fields = explode('|*|', $row->col1fields);
            for ($i = 0, $n = count($col1fields); $i < $n; $i++) {
                $col1field = $col1fields[$i];
                if (trim($col1field) != '' && trim($col1field) != null) {
                    $exists = array_key_exists($col1field, $fields);
                    if ($exists) {
                        $col1options .= "<option value=\"" . $col1field . "\">" . htmlspecialchars(getLangDefinition($fields[$col1field])) . "\n";
                        $fieldids[] = $col1field;
                    } else {
                        $notFoundFielIds[] = $col1field;
                    }
                }
            }
            $col2fields = explode('|*|', $row->col2fields);
            for ($i = 0, $n = count($col2fields); $i < $n; $i++) {
                $col2field = $col2fields[$i];
                if (trim($col2field) != '' && trim($col2field) != null) {
                    $exists = array_key_exists($col2field, $fields);
                    if ($exists) {
                        $col2options .= "<option value=\"" . $col2field . "\">" . htmlspecialchars(getLangDefinition($fields[$col2field])) . "\n";
                        $fieldids[] = $col2field;
                    } else {
                        $notFoundFielIds[] = $col2field;
                    }
                }
            }
            $col3fields = explode('|*|', $row->col3fields);
            for ($i = 0, $n = count($col3fields); $i < $n; $i++) {
                $col3field = $col3fields[$i];
                if (trim($col3field) != '' && trim($col3field) != null) {
                    $exists = array_key_exists($col3field, $fields);
                    if ($exists) {
                        $col3options .= "<option value=\"" . $col3field . "\">" . htmlspecialchars(getLangDefinition($fields[$col3field])) . "\n";
                        $fieldids[] = $col3field;
                    } else {
                        $notFoundFielIds[] = $col3field;
                    }
                }
            }
            $col4fields = explode('|*|', $row->col4fields);
            for ($i = 0, $n = count($col4fields); $i < $n; $i++) {
                $col4field = $col4fields[$i];
                if (trim($col4field) != '' && trim($col4field) != null) {
                    $exists = array_key_exists($col4field, $fields);
                    if ($exists) {
                        $col4options .= "<option value=\"" . $col4field . "\">" . htmlspecialchars(getLangDefinition($fields[$col4field])) . "\n";
                        $fieldids[] = $col4field;
                    } else {
                        $notFoundFielIds[] = $col4field;
                    }
                }
            }
        }
        // this query is for listing displayable fields which are not yet in a column:
        $fieldsRemaining = array_diff(array_keys($fields), $fieldids);
        if (count($fieldsRemaining) > 0) {
            $_CB_database->setQuery("SELECT f.fieldid, f.title, f.name" . "\n FROM #__comprofiler_fields f" . "\n INNER JOIN #__comprofiler_plugin AS p ON (f.pluginid = p.id)" . "\n WHERE f.fieldid IN (" . implode(',', $fieldsRemaining) . ')' . "\n  AND p.published = 1");
            $fields = $_CB_database->loadObjectList();
        } else {
            $fields = array();
        }
        $stripME = array(" ASC", " DESC", "`");
        $sortsArray = explode(', ', $row->sortfields);
        $SQLfunctions = array();
        $k = -1;
        foreach ($sortsArray as $k => $v) {
            $WhereIn = trim(str_replace($stripME, "", $v));
            if (substr($WhereIn, -1, 1) == ')') {
                $SQLfunctions[] = $WhereIn;
                unset($sortsArray[$k]);
            } else {
                $sortsArray[$k] = $_CB_database->Quote($WhereIn);
            }
        }
        $sortsArray[$k + 1] = $_CB_database->Quote('onlinestatus');
        //TBD: refactor to field, temporarly in here...
        // this query is for listing sortable fields
        // sortsArray never empty, so this is ok:
        $_CB_database->setQuery("SELECT f.title, f.name" . "\n FROM #__comprofiler_fields f" . "\n INNER JOIN #__comprofiler_plugin AS p ON (f.pluginid = p.id)" . "\n WHERE ( f.published = 1 OR f.name IN ('name','username') )" . "\n  AND f.name <> 'NA'" . "\n  AND f.tablecolumns <> ''" . "\n  AND p.published = 1" . "\n AND f.name NOT IN(" . implode(',', $sortsArray) . ")");
        /*
        		$stripME = array(" ASC", " DESC","`");
        		$WhereIn = str_replace($stripME, "", $row->sortfields);
        		$WhereIn = "'".str_replace(", ","','",$WhereIn)."'";
        		$_CB_database->setQuery( "SELECT f.title, f.name"
        			. "\nFROM #__comprofiler_fields f"
        			. "\nWHERE f.published = 1 AND f.name!='NA'"
        			. "\nAND f.name NOT IN(".$WhereIn.")"
        		);
        */
        $sortfields = $_CB_database->loadObjectList();
        if (!$_CB_database->getErrorNum() && count($sortfields) > 0 && !in_array('RAND()', $SQLfunctions)) {
            $randomSort = new stdClass();
            $randomSort->title = CBTxt::T('Sort Randomly');
            $randomSort->name = "RAND()";
            $sortfields[] = $randomSort;
        }
        // this query is for listing filterable fields
        $_CB_database->setQuery("SELECT f.title, f.name" . "\n FROM #__comprofiler_fields f" . "\n INNER JOIN #__comprofiler_plugin AS p ON (f.pluginid = p.id)" . "\n WHERE f.published = 1" . "\n  AND f.name <> 'NA'" . "\n  AND f.tablecolumns <> ''" . "\n  AND p.published = 1" . "\n   OR f.name IN ('name','username')");
        $filterfields = $_CB_database->loadObjectList();
        $sortlists = explode(", ", str_replace("`", "", $row->sortfields));
        $sortparts = array();
        $i = 0;
        foreach ($sortlists as $sortlist) {
            $sortlistpart = array();
            $sortlistpart = explode(" ", $sortlist);
            if (!isset($sortlistpart[1])) {
                $sortlistpart[1] = "";
            }
            $sortparts[$i]['field'] = $sortlistpart[0];
            $sortparts[$i]['dir'] = $sortlistpart[1];
            if (substr($sortlistpart[0], -1, 1) != ')') {
                $_CB_database->setQuery("SELECT title FROM #__comprofiler_fields WHERE name='" . $sortlistpart[0] . "'", 0, 1);
                $sortparts[$i]['title'] = $_CB_database->loadResult();
            } else {
                switch ($sortlistpart[0]) {
                    case 'RAND()':
                        $sortparts[$i]['title'] = CBTxt::T('Sort Randomly');
                        break;
                    default:
                        $sortparts[$i]['title'] = CBTxt::T('Non-existing field') . ": " . $sortlistpart[0];
                        break;
                }
            }
            $i++;
        }
        if (count($notFoundFielIds) > 0) {
            cbArrayToInts($notFoundFielIds);
            $_CB_database->setQuery("SELECT f.name, f.title, f.published, f.profile, p.published AS pluginpublished, p.name AS pluginname" . "\n FROM #__comprofiler_fields AS f" . "\n INNER JOIN #__comprofiler_plugin AS p ON (f.pluginid = p.id)" . "\n WHERE f.fieldid IN (" . implode(',', $notFoundFielIds) . ")" . "\n ORDER BY f.ordering");
            $problemFields = $_CB_database->loadObjectList();
            if (!$_CB_database->getErrorNum() && count($problemFields) > 0) {
                echo '<div class="cbWarning">' . htmlspecialchars(CBTxt::T('Following fields are in list but not visible in here for following reason(s)')) . ':<ul>';
                foreach ($problemFields as $f) {
                    if ($f->published != 1) {
                        echo '<li>' . htmlspecialchars(sprintf(CBtxt::T('Field "%s (%s)" is not published !'), getLangDefinition($f->title), $f->name)) . '</li>';
                    }
                    if ($f->profile <= 0) {
                        echo '<li>' . htmlspecialchars(sprintf(CBtxt::T('Field "%s (%s)" is not displayed on profile !'), getLangDefinition($f->title), $f->name)) . '</li>';
                    }
                    if ($f->pluginpublished != 1) {
                        echo '<li>' . htmlspecialchars(sprintf(CBtxt::T('Field "%s (%s)" is from plugin "%s" but this plugin is not published !'), getLangDefinition($f->title), $f->name, $f->pluginname)) . '</li>';
                    }
                }
                echo '</ul>' . htmlspecialchars(CBTxt::T('If you save this users list now, the fields listed above will be removed from this users list. If you want to keep these fields in this list, cancel now and go to Components / Community Builder / Field Manager.')) . '</div>' . "\n";
            }
        }
        $editorSave_description = $_CB_framework->saveCmsEditorJS('description');
        ob_start();
        ?>
function getObject(obj) {
	return document.getElementById(obj);
}
function shDiv(objID,sh) {
	var strObj;
	strObj = getObject(objID);
	if(sh==0) {
	strObj.style.display="none";
	} else {
	strObj.style.display="block";
	}
}
		function submitbutton(pressbutton) {
			if (pressbutton == 'showLists') {
		        <?php 
        echo $editorSave_description;
        ?>
				cbsubmitform( pressbutton );
				return;
			}
			var coll = document.adminForm;
			var errorMSG = '';
			var iserror=0;
			if (coll.col1enabled.checked == true) coll.col1title.setAttribute('mosReq',1);
			if (coll.col2enabled.checked == true) coll.col2title.setAttribute('mosReq',1);
			if (coll.col3enabled.checked == true) coll.col3title.setAttribute('mosReq',1);
			if (coll.col4enabled.checked == true) coll.col4title.setAttribute('mosReq',1);
			getSortList(document.adminForm.sort);
			getFilterList(document.adminForm.filter);
		     if (coll != null) {
		       var elements = coll.elements;
		       // loop through all input elements in form
		       for (var i=0; i < elements.length; i++) {
		         // check if element is mandatory; here mosReq=1
		         if ((typeof(elements.item(i).getAttribute('mosReq')) != "undefined") && (elements.item(i).getAttribute('mosReq') == 1)) {
		           if (elements.item(i).value == '') {
		             //alert(elements.item(i).getAttribute('mosLabel') + ':' + elements.item(i).getAttribute('mosReq'));
		             // add up all error messages
		             errorMSG += elements.item(i).getAttribute('mosLabel') + ' : <?php 
        echo _UE_REQUIRED_ERROR;
        ?>
\n';
		             // notify user by changing background color, in this case to red
		             elements.item(i).style.backgroundColor = "red";
		             iserror=1;
		           }
		         }
		       }
		     }
			if(iserror==1) { alert(errorMSG); }
			else {
				selectAll(document.adminForm.col1);
				selectAll(document.adminForm.col2);
				selectAll(document.adminForm.col3);
				selectAll(document.adminForm.col4);
		        <?php 
        echo $editorSave_description;
        ?>
				cbsubmitform( pressbutton );
			}

		}

    function addOption(selectObj, value)
    {
      optionSelected = (value == null);
      if(value == null) value = prompt('', '');
      if(value != null)
      {
        if(value.indexOf(',') != -1)
          alert('<?php 
        echo addslashes(CBTxt::T('Commas are not allowed in size values'));
        ?>
');
        else
        {
          var i = selectObj.options.length;
          // value = value.replace(/1\/2/g, '1/2');
          selectObj.options.length = i + 1;
          selectObj.options[i].value = (value != '' && value != ' ') ? value : ' ';
          selectObj.options[i].text = (value != '' && value != ' ') ? value : '[empty]';
          selectObj.options[i].selected = optionSelected;
// uncomment the line below if you want the select list to change it's size to match the number of options it contains.
//          selectObj.size = selectObj.options.length;
        }
      }
    }

    function editOptions(selectObj)
    {
      for(var i = 0; i < selectObj.options.length; i++)
      {
        if(selectObj.options[i].selected)
        {
          var value = prompt('', selectObj.options[i].value);
          if(value != null)
          {
            if(value.indexOf(',') != -1)
              alert('<?php 
        echo addslashes(CBTxt::T('Commas are not allowed in size values'));
        ?>
');
            else
            {
              selectObj.options[i].value = value;
              selectObj.options[i].text = (value != '') ? value : '[empty]';
              selectObj.options[i].selected = true;
            }
          }
        }
      }
    }

    function deleteOptions(selectObj)
    {
      for(var i = 0; i < selectObj.options.length; i++)
      {
        if(selectObj.options[i].selected)
        {
          for(var j = i; j < selectObj.options.length - 1; j++)
          {
            selectObj.options[j].value = selectObj.options[j + 1].value;
            selectObj.options[j].text = selectObj.options[j + 1].text;
            selectObj.options[j].selected = selectObj.options[j + 1].selected;
          }
          selectObj.options.length = selectObj.options.length - 1;
          i--;
        }
      }
    }

    function moveOptions(selectObj, direction)
    {
      if(selectObj.selectedIndex != -1)
      {
        if(direction < 0)
        {
          for(i = 0; i < selectObj.options.length; i++)
          {
            swapValue = (i == 0 || selectObj.options[i + direction].selected) ? null : selectObj.options[i + direction].value;
            swapText = (i == 0 || selectObj.options[i + direction].selected) ? null : selectObj.options[i + direction].text;
            if(selectObj.options[i].selected && swapValue != null && swapText != null)
            {
              thisValue = selectObj.options[i].value;
              thisText = selectObj.options[i].text;
              selectObj.options[i].value = swapValue;
              selectObj.options[i].text = swapText;
              selectObj.options[i + direction].value = thisValue;
              selectObj.options[i + direction].text = thisText;
              selectObj.options[i].selected = false;
              selectObj.options[i + direction].selected = true;
            }
          }
        }
        else
        {
          for(i = selectObj.options.length - 1; i >= 0; i--)
          {
            swapValue = (i == selectObj.options.length - 1 || selectObj.options[i + direction].selected) ? null : selectObj.options[i + direction].value;
            swapText = (i == selectObj.options.length - 1 || selectObj.options[i + direction].selected) ? null : selectObj.options[i + direction].text;
            if(selectObj.options[i].selected && swapValue != null && swapText != null)
            {
              thisValue = selectObj.options[i].value;
              thisText = selectObj.options[i].text;
              selectObj.options[i].value = swapValue;
              selectObj.options[i].text = swapText;
              selectObj.options[i + direction].value = thisValue;
              selectObj.options[i + direction].text = thisText;
              selectObj.options[i].selected = false;
              selectObj.options[i + direction].selected = true;
            }
          }
        }
      }
    }
    var NS4 = (document.layers);

    function moveOption(fromObj, toObj)
    {
      for(var i = fromObj.options.length - 1; i >= 0; i--)
      {
        if(fromObj.options[i].selected)
        {
          fromObj.options[i].selected = false;
          var optionText = fromObj.options[i].text.replace(' [ASC]','');
	      optionText = optionText.replace(' [DESC]','');
          var optionValue = fromObj.options[i].value.replace(' ASC','');
	      optionValue = optionValue.replace(' DESC','');
          for(var j = i; j < fromObj.options.length - 1; j++)
          {
            fromObj.options[j].text = fromObj.options[j + 1].text;
            fromObj.options[j].value = fromObj.options[j + 1].value;
          }
          fromObj.options.length = fromObj.options.length - 1;
          toObjIndex = toObj.options.length;
          toObj.options.length = toObj.options.length + 1;
          toObj.options[toObjIndex].text = optionText;
          toObj.options[toObjIndex].value = optionValue;
          if(NS4)
            history.go(0);
        }
      }
    }

    function moveOption2(fromObj, toObj, appendValue)
    {
        if(fromObj.options[fromObj.selectedIndex].selected)
        {
	  fromObjIndex=fromObj.selectedIndex;
          fromObj.options[fromObjIndex].selected = false;
          optionText = fromObj.options[fromObjIndex].text+ ' ['+appendValue+']';
          optionValue = fromObj.options[fromObjIndex].value+' '+appendValue;
          for(var j = fromObjIndex; j < fromObj.options.length - 1; j++)
          {
            fromObj.options[j].text = fromObj.options[j + 1].text;
            fromObj.options[j].value = fromObj.options[j + 1].value;
          }
          fromObj.options.length = fromObj.options.length - 1;
          toObjIndex = toObj.options.length;
          toObj.options.length = toObj.options.length + 1;
          toObj.options[toObjIndex].text = optionText;
          toObj.options[toObjIndex].value = optionValue;
	  toObj.options[toObjIndex].selected=false;
          if(NS4)
            history.go(0);
        }

    }

    function moveOption3(fromObj, toObj, comparison, condition)
    {
        if(fromObj.options[fromObj.selectedIndex].selected)
        {
	  if((condition=='' || condition==null) && document.adminForm.condition.getAttribute('Req')==1) {
		alert('<?php 
        echo addslashes(CBTxt::T('You must define a condition text!'));
        ?>
');
		return;
	  }
	  fromObjIndex=fromObj.selectedIndex;
          fromObj.options[fromObjIndex].selected = false;
          optionText = fromObj.options[fromObjIndex].text+ ' '+comparison+' '+condition;
	  condition=condition.replace("'", "\\'");
	  if(condition!='' && condition!=null) condition="'"+escape(condition)+"'";
          optionValue = fromObj.options[fromObjIndex].value+' '+comparison+condition;
          toObjIndex = toObj.options.length;
          toObj.options.length = toObj.options.length + 1;
          toObj.options[toObjIndex].text = optionText;
          toObj.options[toObjIndex].value = optionValue;
	  toObj.options[toObjIndex].selected=false;
          if(NS4)
            history.go(0);
        }

    }
    function moveOption4(fromObj, toObj)
    {
      for(var i = fromObj.options.length - 1; i >= 0; i--)
      {
        if(fromObj.options[i].selected)
        {
          fromObj.options[i].selected = false;
          for(var j = i; j < fromObj.options.length - 1; j++)
          {
            fromObj.options[j].text = fromObj.options[j + 1].text;
            fromObj.options[j].value = fromObj.options[j + 1].value;
          }
          fromObj.options.length = fromObj.options.length - 1;
          if(NS4)
            history.go(0);
        }
      }
    }


    function getSortList(selectObj) {
    	var sortfields='';
    	var j=0;
    	selectAll(selectObj);
    	if(selectObj.selectedIndex != -1)
    	{
    		for(i = 0; i < selectObj.options.length; i++)
    		{
    			if(j>0) sortfields +=  ', ';
    			sortfields +=  selectObj.options[i].value;
    			j++;
    		}
    		//alert(sortfields);
    		document.adminForm.sortfields.value=sortfields;
    	}
    }

	function getFilterList(selectObj) {
		var filterfields='';
		var j=0;
		var advType=getObject('ft2');
		var simType=getObject('ft1');
		//alert(simType.checked);
		if(simType.checked) {
			selectAll(selectObj);
			if(selectObj.selectedIndex != -1) {
				for(i = 0; i < selectObj.options.length; i++) {
					if(j>0) filterfields +=  ' AND ';
					filterfields +=  selectObj.options[i].value;
					j++;
				}
			}
			if(filterfields!="") {
				document.adminForm.filterfields.value="s("+filterfields+")";
			} else {
				document.adminForm.filterfields.value="";
			}
		} else {
			if(document.adminForm.advFilterText.value!="") {
				document.adminForm.filterfields.value="a("+escape(document.adminForm.advFilterText.value)+")";
			} else {
				document.adminForm.filterfields.value="";
			}
		}
	}

    function selectAll(selectObj)
    {
      if(selectObj.options.length)
        for(i = 0; i < selectObj.options.length; i++)
          selectObj.options[i].selected = true;
      return false;
    }

    function loadUGIDs(selectObj)
    {
	var UGIDs='';
	var j=0;
      if(selectObj.selectedIndex != -1)
      {
          for(i = 0; i < selectObj.options.length; i++)
          {
		if(selectObj.options[i].selected) {
			if(j>0) UGIDs +=  ', ';
			UGIDs +=  selectObj.options[i].value;
			j++;
		}
          }
		document.adminForm.usergroupids.value=UGIDs;
        }
    }
    function enableListColumn(colnum) {
	var oForm;
	var colName;
	oForm=document.adminForm;
	colName="col"+colnum+"enabled";
	if(oForm.elements[colName].checked) {
		//alert("Enabled");
		oForm.col1title.readOnly=false;
		oForm.col1captions.disabled=false;
		//document.col1.disabled=false;
		oForm.col1up.disabled=false;
		oForm.col1down.disabled=false;
		oForm.col1remove.disabled=false;
		oForm.addcol1.disabled=false;
	} else {
		//alert("Disabled");
		oForm.col1title.readOnly=true;
		oForm.col1captions.disabled=true;
		//document.col1.disabled=true;
		oForm.col1up.disabled=true;
		oForm.col1down.disabled=true;
		oForm.col1remove.disabled=true;
		oForm.addcol1.disabled=true;
	}

    }
	function filterCondition(needCond) {
		if(needCond==0) {
			document.adminForm.condition.value="";
			document.adminForm.condition.readOnly=true;
			document.adminForm.condition.setAttribute("Req",0);
		} else {
			document.adminForm.condition.value="";
			document.adminForm.condition.readOnly=false;
			document.adminForm.condition.setAttribute("Req",1);
		}

	}

<?php 
        $jsListsJs = ob_get_contents();
        ob_end_clean();
        $_CB_framework->document->addHeadScriptDeclaration($jsListsJs);
        ?>
	<form action="<?php 
        echo $_CB_framework->backendUrl('index.php?option=com_comprofiler&task=saveList');
        ?>
" method="POST" name="adminForm">
	<table cellpadding="4" cellspacing="1" border="0" width="100%" class="adminform">
		<tr>
			<td width="20%"><?php 
        echo htmlspecialchars(CBTxt::T('URL for menu link to this list'));
        ?>
:</td>
			<td align=left  width="40%"><?php 
        if ($row->listid) {
            $url = 'index.php?option=com_comprofiler&amp;task=usersList&amp;listid=' . (int) $row->listid;
            echo '<a href="' . $_CB_framework->getCfg('live_site') . '/' . $url . '" target="_blank">' . $url . '</a>';
        } else {
            echo htmlspecialchars(CBTxt::T('You need to save this new list first to see the direct menu link url.'));
        }
        ?>
</td>
			<td width="40%">&nbsp;</td>
		</tr>
		<tr>
			<td width="20%"><?php 
        echo htmlspecialchars(CBTxt::T('URL for search link to this list'));
        ?>
:</td>
			<td align=left  width="40%"><?php 
        if ($row->listid) {
            $url = 'index.php?option=com_comprofiler&amp;task=usersList&amp;listid=' . (int) $row->listid . '&amp;searchmode=1';
            echo '<a href="' . $_CB_framework->getCfg('live_site') . '/' . $url . '" target="_blank">' . $url . '</a>';
        } else {
            echo htmlspecialchars(CBTxt::T('You need to save this new list first to see the direct menu link url.'));
        }
        ?>
</td>
			<td width="40%"><?php 
        echo htmlspecialchars(CBTxt::T('Only fields appearing in list columns and on profiles and which are have the searchable attribute ON will appear in search criterias of the list.'));
        ?>
</td>
		</tr>
		<tr>
			<td><?php 
        echo htmlspecialchars(CBTxt::T('Title'));
        ?>
:</td>
			<td align=left><input type="text" name="title" mosReq="1" mosLabel="<?php 
        echo htmlspecialchars(CBTxt::T('Title'));
        ?>
" class="inputbox" value="<?php 
        echo htmlspecialchars($row->title);
        ?>
" /></td>
			<td><?php 
        echo htmlspecialchars(CBTxt::T('Title appears in frontend on top of the list.'));
        ?>
</td>
		</tr>
		<tr>
			<td><?php 
        echo htmlspecialchars(CBTxt::T('Description'));
        ?>
:</td>
			<td align=left><?php 
        echo $_CB_framework->displayCmsEditor('description', $row->description, 600, 200, 50, 7);
        // <textarea name="description" cols="50" rows="7">< ?php echo htmlspecialchars($row->description); ? ></textarea>
        ?>
</td>
			<td><?php 
        echo htmlspecialchars(CBTxt::T('Description appears in frontend under the title of the list.'));
        ?>
</td>
		</tr>
		<tr>
			<td><?php 
        echo CBTxt::Th('View Access Level');
        ?>
:</td>
			<td><?php 
        echo $lists['viewaccesslevel'];
        ?>
</td>
			<td><?php 
        echo CBTxt::Th('Only users which are in groups assigned to this View Access Level will see this list.') . ($lists['useraccessgroup'] ? ' (' . CBTxt::Th('New method working in all Joomla and Mambo versions') . ')' : '');
        ?>
</td>
		</tr>
		<?php 
        if ($lists['useraccessgroup']) {
            ?>
		<tr>
			<td><?php 
            echo htmlspecialchars(CBTxt::T('User Group to allow access to')) . (checkJversion() >= 2 ? '<br /><em>(' . htmlspecialchars(CBTxt::Th("Old deprecated method of Joomla 1.5, do not use here")) . '. ' . htmlspecialchars(CBTxt::Th('Keep setting "-- Everybody --" and Use View Access Level above instead')) . ')</em>' : '');
            ?>
:</td>
			<td><?php 
            echo $lists['useraccessgroup'];
            ?>
</td>
			<td><?php 
            echo htmlspecialchars(CBTxt::Ph('Old Joomla [VERSION] method', array('[VERSION]' => '1.0 and 1.5 and Mambo'))) . ': ' . htmlspecialchars(CBTxt::Th('This method is kept for backwards compatibility but will be removed at next major Community Builder version.')) . '<br />' . htmlspecialchars(CBTxt::Th('Use View Access Level above instead and set this Group setting to - "Everybody" -.')) . ' ' . htmlspecialchars(CBTxt::T('All groups above that level will also have access to the list.'));
            ?>
</td>
		</tr>
		<?php 
        }
        ?>
		<tr>
			<td><?php 
        echo htmlspecialchars(CBTxt::T('User Groups to Include in List'));
        ?>
:</td>
			<td><?php 
        echo $lists['usergroups'];
        ?>
</td>
			<td><strong><font color="red"><?php 
        echo htmlspecialchars(CBTxt::T('Multiple choices'));
        ?>
:</font> <?php 
        echo htmlspecialchars(CBTxt::T('CTRL/CMD-click to add/remove single choices.'));
        ?>
</strong></td>
		</tr>
		<tr>
			<td><?php 
        echo htmlspecialchars(CBTxt::T('Published'));
        ?>
:</td>
			<td><?php 
        echo $lists['published'];
        ?>
</td>
			<td>&nbsp;</td>
		</tr>
		<tr>
			<td><?php 
        echo htmlspecialchars(CBTxt::T('Default'));
        ?>
:</td>
			<td><?php 
        echo $lists['default'];
        ?>
</td>
			<td><strong><font color="red"><?php 
        echo htmlspecialchars(CBTxt::T('WARNING'));
        ?>
:</font></strong> <?php 
        echo htmlspecialchars(CBTxt::T('The default list should be the one with the lowest user groups access rights !'));
        ?>
</td>
		</tr>
		<tr>
			<td><?php 
        echo htmlspecialchars(CBTxt::T('Sort By'));
        ?>
:</td>
			<td>
				<select name="sortfieldlist">
					<?php 
        for ($i = 0, $n = count($sortfields); $i < $n; $i++) {
            $sortfield =& $sortfields[$i];
            if (substr($sortfield->name, -1, 1) != ')') {
                $sortfieldName = '`' . $sortfield->name . '`';
            } else {
                $sortfieldName = $sortfield->name;
            }
            echo "<option value=\"" . $sortfieldName . "\">" . htmlspecialchars(getLangDefinition($sortfield->title)) . "</option>\n";
        }
        ?>
				</select><select name=direction><option value="ASC"><?php 
        echo htmlspecialchars(CBTxt::T('ASC'));
        ?>
</option><option value="DESC"><?php 
        echo htmlspecialchars(CBTxt::T('DESC'));
        ?>
</option></select><input type=button onclick="moveOption2(this.form.sortfieldlist, sort, this.form.direction.value);" value=" <?php 
        echo htmlspecialchars(CBTxt::T('Add'));
        ?>
 "><br />
				<select id=sort name=sort size="5" multiple  mosReq="1" mosLabel="<?php 
        echo htmlspecialchars(CBTxt::T('Sort By'));
        ?>
">
					<?php 
        for ($i = 0, $n = count($sortparts); $i < $n; $i++) {
            $sortpart = $sortparts[$i];
            if ($sortpart['field'] != '') {
                if (substr($sortpart['field'], -1, 1) != ')') {
                    $sortfiNam = '`' . $sortpart['field'] . '`';
                } else {
                    $sortfiNam = $sortpart['field'];
                }
                echo '<option value="' . $sortfiNam . ' ' . $sortpart['dir'] . '">' . htmlspecialchars(getLangDefinition($sortpart['title'])) . ' [' . $sortpart['dir'] . "]</option>\n";
            }
        }
        ?>
				</select><br />
				<input type=button onclick="moveOptions(sort, -1);" value=" <?php 
        echo htmlspecialchars(CBTxt::T('+'));
        ?>
 " />
				<input type=button onclick="moveOptions(sort, 1);" value=" <?php 
        echo htmlspecialchars(CBTxt::T('-'));
        ?>
 " />
				<br />
				<input type=button onclick="moveOption(this.form.sort,this.form.sortfieldlist);" value=" <?php 
        echo htmlspecialchars(CBTxt::T('Remove'));
        ?>
 ">
			</td>
			<td>&nbsp;</td>
		</tr>
		<tr>
			<td><?php 
        echo htmlspecialchars(CBTxt::T('Filter'));
        ?>
:</td>
			<td colspan="2">
<?php 
        $simChecked = "";
        $advChecked = "";
        $simStyle = "display:none;";
        $advStyle = "display:none;";
        //echo $row->filterfields;
        $filttype = substr($row->filterfields, 0, 1);
        $row->filterfields = substr($row->filterfields, 2, -1);
        //substr($row->filterfields,1,-1)
        // echo "row->filterfields=".$row->filterfields;
        if ($filttype == "a") {
            $advChecked = "CHECKED";
            $advStyle = "display:block;";
        } else {
            $simChecked = "checked=\"checked\"";
            $simStyle = "display:block;";
        }
        $filterlists = explode(" AND ", $row->filterfields);
        $filterparts = array();
        $i = 0;
        foreach ($filterlists as $filterlist) {
            $filterlistpart = array();
            $filterlistpart = explode(" ", $filterlist);
            $filterparts[$i]['field'] = str_replace("`", "", $filterlistpart[0]);
            $_CB_database->setQuery("SELECT title FROM #__comprofiler_fields WHERE name='" . $filterparts[$i]['field'] . "'", 0, 1);
            $filtertitle = $_CB_database->loadResult();
            $filterparts[$i]['value'] = $filterlist;
            $filterparts[$i]['title'] = str_replace(array("'", "`"), "", str_replace($filterparts[$i]['field'], getLangDefinition($filtertitle), $filterlist));
            $i++;
        }
        ?>
				<label for=ft1 ><input type="radio" <?php 
        echo $simChecked;
        ?>
 id="ft1" onclick="javascript:shDiv('simFilter',1);shDiv('advFilter',0);" name=filtertype value="0" checked="checked" /><?php 
        echo htmlspecialchars(CBTxt::T('Simple'));
        ?>
 </label><label for=ft2 ><input type="radio" <?php 
        echo $advChecked;
        ?>
 onclick="javascript:shDiv('simFilter',0);shDiv('advFilter',1);" id="ft2" name="filtertype" value="1" /><?php 
        echo htmlspecialchars(CBTxt::T('Advanced'));
        ?>
 </label>
				<br />
				<div id="simFilter" name="simFilter" style="<?php 
        echo $simStyle;
        ?>
" >
				<select name="filterfieldlist">
					<?php 
        foreach ($filterfields as $filterfield) {
            echo "<option value=\"`" . $filterfield->name . "`\">" . htmlspecialchars(getLangDefinition($filterfield->title)) . "\n";
        }
        ?>
				</select>
				<select name=comparison onchange="javascript:filterCondition(this.options[this.selectedIndex].getAttribute('needCond'));">
					<option value=">" needCond="1"><?php 
        echo htmlspecialchars(CBTxt::T('Greater Than'));
        ?>
</option>
					<option value=">=" needCond="1"><?php 
        echo htmlspecialchars(CBTxt::T('Greater Than or Equal To'));
        ?>
</option>
					<option value="&lt;" needCond="1"><?php 
        echo htmlspecialchars(CBTxt::T('Less Than'));
        ?>
</option>
					<option value="&lt;=" needCond="1"><?php 
        echo htmlspecialchars(CBTxt::T('Less Than or Equal To'));
        ?>
</option>
					<option value="=" needCond="1"><?php 
        echo htmlspecialchars(CBTxt::T('Equal To'));
        ?>
</option>
					<option value="!=" needCond="1"><?php 
        echo htmlspecialchars(CBTxt::T('Not Equal To'));
        ?>
</option>
					<option value="= ''" needCond="0"><?php 
        echo htmlspecialchars(CBTxt::T('Is Empty'));
        ?>
</option>
					<option value="!= ''" needCond="0"><?php 
        echo htmlspecialchars(CBTxt::T('Is Not Empty'));
        ?>
</option>
					<option value="IS NULL" needCond="0"><?php 
        echo htmlspecialchars(CBTxt::T('Is NULL'));
        ?>
</option>
					<option value="IS NOT NULL"  needCond="0"><?php 
        echo htmlspecialchars(CBTxt::T('Is Not NULL'));
        ?>
</option>
					<option value="LIKE"  needCond="1"><?php 
        echo htmlspecialchars(CBTxt::T('Like'));
        ?>
</option>
				</select>
				<input type=text name=condition value="" Req=1 />
				<input type=button onclick="moveOption3(this.form.filterfieldlist, filter, this.form.comparison.value, this.form.condition.value);" value=" <?php 
        echo htmlspecialchars(CBTxt::T('Add'));
        ?>
 ">
				<br />
				<select id=filter name=filter size="5" multiple  mosReq=0 mosLabel="<?php 
        echo htmlspecialchars(CBTxt::T('Filter By'));
        ?>
">
					<?php 
        foreach ($filterparts as $filterpart) {
            if ($filterpart['value'] != '') {
                echo "<option value=\"" . $filterpart['value'] . "\">" . stripslashes(utf8RawUrlDecode($filterpart['title'])) . "\n";
                //BB todo sortout htmlspecialchars...not compatible with utf8rawdecode
            }
        }
        ?>
				</select><br />
				<input type=button onclick="moveOptions(filter, -1);" value=" <?php 
        echo htmlspecialchars(CBTxt::T('+'));
        ?>
 " />
				<input type=button onclick="moveOptions(filter, 1);" value=" <?php 
        echo htmlspecialchars(CBTxt::T('-'));
        ?>
 " />
				<br />
				<input type=button onclick="moveOption4(this.form.filter,this.form.filterfieldlist);" value=" <?php 
        echo htmlspecialchars(CBTxt::T('Remove'));
        ?>
 ">
				</div>
				<div id="advFilter" name="advFilter" style="<?php 
        echo $advStyle;
        ?>
">
					<textarea name="advFilterText" cols="50" rows="7"><?php 
        echo stripslashes(utf8RawUrlDecode($row->filterfields));
        //BB todo sortout htmlspecialchars...not compatible with utf8rawdecode
        ?>
</textarea>
				</div>
			</td>
		</tr>
	</table>
	<table cellpadding="4" cellspacing="1" border="0" width="100%" class="adminform">
		<tr>
			<td width="100%" colspan="3" style="text-align:center;">
				<?php 
        echo CBTxt::T('<strong>Note:</strong> fields must be on profile to appear in this list and be visible on the users-list.');
        ?>
			</td>
		</tr>
		<tr>
			<td width="33%">
				<?php 
        echo htmlspecialchars(CBTxt::T('Enable Column 1'));
        ?>
: <input type=checkbox <?php 
        /* onclick="javascript:enableListColumn(1);" */
        ?>
 name="col1enabled" <?php 
        if ($row->col1enabled == 1) {
            echo ' checked="checked" ';
        }
        ?>
 value=1 ><br />
				<?php 
        echo htmlspecialchars(CBTxt::T('Column 1 Title'));
        ?>
:<br />
				<input type="text" name="col1title" mosReq=0 mosLabel="<?php 
        echo htmlspecialchars(CBTxt::T('Column 1 Title'));
        ?>
" class="inputbox" value="<?php 
        echo htmlspecialchars($row->col1title);
        ?>
" /><br />
				<?php 
        echo htmlspecialchars(CBTxt::T('Column 1 Captions'));
        ?>
:<input type=checkbox name=col1captions <?php 
        if ($row->col1captions == 1) {
            echo " CHECKED ";
        }
        ?>
 value=1 ><br />
				<select id=col1 size="5" multiple name=col1[] >
					<?php 
        echo $col1options;
        ?>
				</select><br />
				<input name=col1up type=button onclick="moveOptions(col1, -1);" value=" <?php 
        echo htmlspecialchars(CBTxt::T('+'));
        ?>
 " />
				<input name=col1down type=button onclick="moveOptions(col1, 1);" value=" <?php 
        echo htmlspecialchars(CBTxt::T('-'));
        ?>
 " />
				<br />
				<input name=col1remove type=button onclick="moveOption(col1,this.form.fieldlist);" value=" <?php 
        echo htmlspecialchars(CBTxt::T('Remove'));
        ?>
 ">
			</td>
			<td width="33%" rowspan=3 valign=center align=center><?php 
        echo htmlspecialchars(CBTxt::T('Field List'));
        ?>
:<br />
				<input name=addcol1 type=button onclick="moveOption(this.form.fieldlist, col1);" value=" <?php 
        echo htmlspecialchars(CBTxt::T('<- Add'));
        ?>
 ">
				<input type=button onclick="moveOption(this.form.fieldlist, col2);" value=" <?php 
        echo htmlspecialchars(CBTxt::T('Add ->'));
        ?>
 "><br />
				<select name="fieldlist" size="10" multiple>
					<?php 
        foreach ($fields as $field) {
            echo "<option value=\"" . $field->fieldid . "\">" . htmlspecialchars(getLangDefinition($field->title)) . "\n";
        }
        ?>
				</select><br />
				<input type=button onclick="moveOption(this.form.fieldlist, col3);" value=" <?php 
        echo htmlspecialchars(CBTxt::T('<- Add'));
        ?>
 ">
				<input type=button onclick="moveOption(this.form.fieldlist, col4);" value=" <?php 
        echo htmlspecialchars(CBTxt::T('Add ->'));
        ?>
 ">
			</td>
			<td width="33%">
				<?php 
        echo htmlspecialchars(CBTxt::T('Enable Column 2'));
        ?>
: <input type=checkbox name=col2enabled <?php 
        if ($row->col2enabled == 1) {
            echo " CHECKED ";
        }
        ?>
 value=1 ><br />
				<?php 
        echo htmlspecialchars(CBTxt::T('Column 2 Title'));
        ?>
:<br />
				<input type="text" name="col2title" mosReq=0 mosLabel="<?php 
        echo htmlspecialchars(CBTxt::T('Column 2 Title'));
        ?>
" class="inputbox" value="<?php 
        echo htmlspecialchars($row->col2title);
        ?>
" /><br />
				<?php 
        echo htmlspecialchars(CBTxt::T('Column 2 Captions'));
        ?>
:<input type=checkbox name=col2captions <?php 
        if ($row->col2captions == 1) {
            echo " CHECKED ";
        }
        ?>
 value=1 ><br />
				<select id=col2 size="5" multiple name=col2[] >
					<?php 
        echo $col2options;
        ?>
				</select><br />
				<input type=button onclick="moveOptions(col2, -1);" value=" <?php 
        echo htmlspecialchars(CBTxt::T('+'));
        ?>
 " />
				<input type=button onclick="moveOptions(col2, 1);" value=" <?php 
        echo htmlspecialchars(CBTxt::T('-'));
        ?>
 " />
				<br />
				<input type=button onclick="moveOption(col2,this.form.fieldlist);" value=" <?php 
        echo htmlspecialchars(CBTxt::T('Remove'));
        ?>
 ">
			</td>
		</tr>
		<tr>
		</tr>
		<tr>
			<td width="33%">
				<?php 
        echo htmlspecialchars(CBTxt::T('Enable Column 3'));
        ?>
: <input type=checkbox name=col3enabled <?php 
        if ($row->col3enabled == 1) {
            echo " CHECKED ";
        }
        ?>
 value=1 /><br />
				<?php 
        echo htmlspecialchars(CBTxt::T('Column 3 Title'));
        ?>
:<br />
				<input type="text" name="col3title" mosReq=0 mosLabel="<?php 
        echo htmlspecialchars(CBTxt::T('Column 3 Title'));
        ?>
" class="inputbox" value="<?php 
        echo htmlspecialchars($row->col3title);
        ?>
" /><br />
				<?php 
        echo htmlspecialchars(CBTxt::T('Column 3 Captions'));
        ?>
:<input type=checkbox name=col3captions <?php 
        if ($row->col3captions == 1) {
            echo " CHECKED ";
        }
        ?>
 value=1 ><br />
				<select id=col3 size="5" multiple name=col3[]>
					<?php 
        echo $col3options;
        ?>
				</select><br />
				<input type=button onclick="moveOptions(col3, -1);" value=" <?php 
        echo htmlspecialchars(CBTxt::T('+'));
        ?>
 " />
				<input type=button onclick="moveOptions(col3, 1);" value=" <?php 
        echo htmlspecialchars(CBTxt::T('-'));
        ?>
 " />
				<br />
				<input type=button onclick="moveOption(col3,this.form.fieldlist);" value=" <?php 
        echo htmlspecialchars(CBTxt::T('Remove'));
        ?>
 ">
			</td>
			<td width="33%">
				<?php 
        echo htmlspecialchars(CBTxt::T('Enable Column 4'));
        ?>
: <input type=checkbox name=col4enabled <?php 
        if ($row->col4enabled == 1) {
            echo " CHECKED ";
        }
        ?>
 value=1 ><br />
				<?php 
        echo htmlspecialchars(CBTxt::T('Column 4 Title'));
        ?>
:<br />
				<input type="text" name="col4title" mosReq=0 mosLabel="<?php 
        echo htmlspecialchars(CBTxt::T('Column 4 Title'));
        ?>
" class="inputbox" value="<?php 
        echo htmlspecialchars($row->col4title);
        ?>
" /><br />
				<?php 
        echo htmlspecialchars(CBTxt::T('Column 4 Captions'));
        ?>
:<input type=checkbox name=col4captions <?php 
        if ($row->col4captions == 1) {
            echo " CHECKED ";
        }
        ?>
 value=1 ><br />
				<select id=col4 size="5" multiple name=col4[]>
					<?php 
        echo $col4options;
        ?>
				</select><br />
				<input type=button onclick="moveOptions(col4, -1);" value=" <?php 
        echo htmlspecialchars(CBTxt::T('+'));
        ?>
 " />
				<input type=button onclick="moveOptions(col4, 1);" value=" <?php 
        echo htmlspecialchars(CBTxt::T('-'));
        ?>
 " />
				<br />
				<input type=button onclick="moveOption(col4,this.form.fieldlist);" value=" <?php 
        echo htmlspecialchars(CBTxt::T('Remove'));
        ?>
 ">
			</td>
		</tr>
	</table>
<?php 
        // params:
        if ($paramsEditorHtml) {
            foreach ($paramsEditorHtml as $paramsEditorHtmlBlock) {
                ?>
		<table class="adminform" cellspacing="0" cellpadding="0" width="100%">
			<tr>
				<th colspan="2">
					<?php 
                echo $paramsEditorHtmlBlock['title'];
                ?>
				</th>
			</tr>
			<tr>
				<td>
					<?php 
                echo $paramsEditorHtmlBlock['content'];
                ?>
				</td>
			</tr>
		</table>
<?php 
            }
        }
        ?>

  <table cellpadding="4" cellspacing="1" border="0" width="100%" class="adminform">
		<tr>
			<td colspan="3">&nbsp;</td>
		</tr>

  </table>
  <input type="hidden" name="sortfields" value="<?php 
        echo $row->sortfields;
        ?>
" />
  <input type="hidden" name="filterfields" value="<?php 
        echo $row->filterfields;
        ?>
" />
  <input type="hidden" name="usergroupids" value="<?php 
        echo $row->usergroupids;
        ?>
" />
  <input type="hidden" name="listid" value="<?php 
        echo $row->listid;
        ?>
" />
  <input type="hidden" name="ordering" value="<?php 
        echo $row->ordering;
        ?>
" />
  <input type="hidden" name="option" value="com_comprofiler" />
  <input type="hidden" name="task" value="" />
  <?php 
        if (!$lists['useraccessgroup']) {
            ?>
  <input type="hidden" name="useraccessgroupid" value="-2" />
  <?php 
        }
        echo cbGetSpoofInputTag('list');
        ?>
</form>

<?php 
    }
예제 #11
0
	/**
	 * render frontend categories approval
	 *
	 * @param object $rows
	 * @param object $pageNav
	 * @param moscomprofilerUser $user
	 * @param object $plugin
	 */
	static function showCategoryApproval( $rows, $pageNav, $user, $plugin ) {
		global $_CB_framework;

		$generalTitle				=	$plugin->params->get( 'general_title', $plugin->name );

		$_CB_framework->setPageTitle( CBTxt::P( '[category] Approval', array( '[category]' => cbgjClass::getOverride( 'category' ) ) ) );

		if ( $generalTitle != '' ) {
			$_CB_framework->appendPathWay( htmlspecialchars( CBTxt::T( $generalTitle ) ), cbgjClass::getPluginURL() );
		}

		$_CB_framework->appendPathWay( CBTxt::P( '[category] Approval', array( '[category]' => cbgjClass::getOverride( 'category' ) ) ), cbgjClass::getPluginURL( array( 'categories', 'approval' ) ) );

		$categoryApprovalSearch		=	$plugin->params->get( 'category_approval_search', 1 );
		$categoryApprovalPaging		=	$plugin->params->get( 'category_approval_paging', 1 );
		$categoryApprovalLimitbox	=	$plugin->params->get( 'category_approval_limitbox', 1 );
		$categoryApprovalDescLimit	=	(int) $plugin->params->get( 'category_approval_desc_limit', 150 );

		$return						=	'<div class="gjCategoryApproval">'
									.		'<form action="' . cbgjClass::getPluginURL( array( 'categories', 'approval' ) ) . '" method="post" name="gjForm" id="gjForm" class="gjForm">'
									.			( $categoryApprovalSearch && ( $pageNav->searching || $pageNav->total ) ? '<div class="gjTop gjTopRight">' . $pageNav->search . '</div>' : null );

		if ( $rows ) foreach ( $rows as $row ) {
			$authorized				=	cbgjClass::getAuthorization( $row, null, $user );
			$beforeMenu				=	cbgjClass::getIntegrations( 'gj_onBeforeOverviewCategoryMenu', array( $row, $user, $plugin ) );
			$afterMenu				=	cbgjClass::getIntegrations( 'gj_onAfterOverviewCategoryMenu', array( $row, $user, $plugin ) );

			$return					.=			'<div class="gjContent row-fluid">'
									.				'<div class="gjContentLogo span2">' . $row->getLogo( true, true, true ) . '</div>'
									.				'<div class="gjContentBody mini-layout span10">'
									.					'<div class="gjContentBodyHeader row-fluid">'
									.						'<div class="gjContentBodyTitle span9"><h5>' . $row->getName( 0, true ) . '<small> ' . cbFormatDate( $row->get( 'date' ), 1, false ) . ( $row->get( 'parent' ) ? ' - ' . $row->getParent()->getName( 0, true ) : null ) . '</small></h5></div>'
									.						'<div class="gjContentBodyMenu span3">';

			if ( cbgjClass::hasAccess( 'cat_can_publish', $authorized ) ) {
				$return				.=						'<input type="button" value="' . htmlspecialchars( CBTxt::T( 'Approve' ) ) . '" class="gjButton btn btn-mini btn-success" onclick="' . cbgjClass::getPluginURL( array( 'categories', 'publish', (int) $row->get( 'id' ) ), true, true, false, null, true ) . '" />';
			}

			if ( $beforeMenu || cbgjClass::hasAccess( 'mod_lvl1', $authorized ) || $afterMenu ) {
				$menuItems			=	$beforeMenu
									.	( cbgjClass::hasAccess( 'mod_lvl1', $authorized ) ? '<div><a href="' . cbgjClass::getPluginURL( array( 'categories', 'edit', (int) $row->get( 'id' ) ), null, true, false, null, true ) . '"><i class="icon-pencil"></i> ' . CBTxt::Th( 'Edit' ) . '</a></div>' : null )
									.	( cbgjClass::hasAccess( 'mod_lvl1', $authorized ) ? '<div><a href="javascript: void(0);" onclick="' . cbgjClass::getPluginURL( array( 'categories', 'delete', (int) $row->get( 'id' ) ), CBTxt::P( 'Are you sure you want to delete this [category] and all its associated [groups]?', array( '[category]' => cbgjClass::getOverride( 'category' ), '[groups]' => cbgjClass::getOverride( 'group', true ) ) ), true, false, null, true ) . '"><i class="icon-remove"></i> ' . CBTxt::Th( 'Delete' ) . '</a></div>' : null )
									.	$afterMenu;

				$return				.=							cbgjClass::getDropdown( $menuItems, CBTxt::Th( 'Menu' ) );
			}

			$return					.=						'</div>'
									.					'</div>'
									.					'<div class="gjContentBodyInfo">' . ( $row->getDescription( $categoryApprovalDescLimit ) ? '<div class="well well-small">' . $row->getDescription( $categoryApprovalDescLimit ) . '</div>' : null ) . '</div>'
									.					'<div class="gjContentDivider"></div>'
									.					'<div class="gjContentBodyFooter">'
									.						cbgjClass::getIntegrations( 'gj_onBeforeOverviewCategoryInfo', array( $row, $user, $plugin ), null, 'span' )
									.						( ( ( ( ! $row->get( 'nested' ) ) && cbgjClass::hasAccess( 'mod_lvl1', $authorized ) ) || $row->get( 'nested' ) ) && $row->nestedCount() ? cbgjClass::getOverride( 'category', $row->nestedCount() ) . ' | ' : null )
									.						( $row->groupCount() ? cbgjClass::getOverride( 'group', $row->groupCount() ) . ' | ' : null )
									.						implode( ', ', $row->getTypes() )
									.						cbgjClass::getIntegrations( 'gj_onAfterOverviewCategoryInfo', array( $row, $user, $plugin ), null, 'span' )
									.					'</div>'
									.				'</div>'
									.			'</div>';
		} else {
			$return					.=			'<div class="gjContent">';

			if ( $categoryApprovalSearch && $pageNav->searching ) {
				$return				.=				CBTxt::Ph( 'No [category] search results found.', array( '[category]' => cbgjClass::getOverride( 'category' ) ) );
			} else {
				$return				.=				CBTxt::Ph( 'There are no [categories] pending approval.', array( '[categories]' => cbgjClass::getOverride( 'category', true ) ) );
			}

			$return					.=			'</div>';
		}

		if ( $categoryApprovalPaging ) {
			$return					.=			'<div class="gjPaging pagination pagination-centered">'
									.				( $pageNav->total > $pageNav->limit ? $pageNav->pagelinks : null )
									.				( ! $categoryApprovalLimitbox ? $pageNav->getLimitBox( false ) : ( $pageNav->total ? '<div class="gjPagingLimitbox">' . $pageNav->limitbox . '</div>' : null ) )
									.			'</div>';
		}

		$return						.=		'</form>'
									.	'</div>';

		echo $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;
	}
예제 #13
0
	/**
	 * render frontend tab invites
	 *
	 * @param object $rows
	 * @param object $pageNav
	 * @param moscomprofilerUser $displayed
	 * @param moscomprofilerUser $user
	 * @param object $plugin
	 * @param boolean $tabbed
	 * @return mixed
	 */
	static function showInvited( $rows, $pageNav, $displayed, $user, $plugin, $tabbed ) {
		global $_CB_framework;

		$invitedTabSearch		=	$plugin->params->get( 'invited_tab_search', 1 );
		$invitedTabPaging		=	$plugin->params->get( 'invited_tab_paging', 1 );
		$invitedTabLimitbox		=	$plugin->params->get( 'invited_tab_limitbox', 1 );
		$invitedTabDescLimit	=	(int) $plugin->params->get( 'invited_tab_desc_limit', 150 );

		if ( ! $tabbed ) {
			$formUrl			=	cbgjClass::getPluginURL( array( 'panel', 'invited' ) );
		} else {
			$formUrl			=	$_CB_framework->userProfileUrl( $displayed->id, true, $plugin->tab->tabid );
		}

		$return					=	'<div class="gjTabInvited">'
								.		'<form action="' . $formUrl . '" method="post" name="gjTabForm_invited" id="gjTabForm_invited" class="gjForm">'
								.			( $invitedTabSearch && ( $pageNav->searching || $pageNav->total ) ? '<div class="gjTop gjTopRight">' . $pageNav->search . '</div>' : null );

		if ( $rows ) foreach ( $rows as $row ) {
			$category			=	$row->getCategory();
			$authorized			=	cbgjClass::getAuthorization( $category, $row, $user );

			if ( $row->get( 'published' ) == 1 ) {
				$state			=	'<div><a href="javascript: void(0);" onclick="' . cbgjClass::getPluginURL( array( 'groups', 'unpublish', (int) $category->get( 'id' ), (int) $row->get( 'id' ) ), CBTxt::P( 'Are you sure you want to unpublish this [group]?', array( '[group]' => cbgjClass::getOverride( 'group' ) ) ), true, false, null, true ) . '"><i class="icon-ban-circle"></i> ' . CBTxt::Th( 'Unpublish' ) . '</a></div>';
			} else {
				$state			=	'<div><a href="' . cbgjClass::getPluginURL( array( 'groups', 'publish', (int) $category->get( 'id' ), (int) $row->get( 'id' ) ), null, true, false, null, true ) . '"><i class="icon-ok"></i> ' . CBTxt::Th( 'Publish' ) . '</a></div>';
			}

			$beforeMenu			=	cbgjClass::getIntegrations( 'gj_onBeforeProfileGroupInvitedMenu', array( $row, $category, $displayed, $user, $plugin ) );
			$afterMenu			=	cbgjClass::getIntegrations( 'gj_onAfterProfileGroupInvitedMenu', array( $row, $category, $displayed, $user, $plugin ) );

			$return				.=			'<div class="gjContent row-fluid">'
								.				'<div class="gjContentLogo span2">' . $row->getLogo( true, true, true ) . '</div>'
								.				'<div class="gjContentBody mini-layout span10">'
								.					'<div class="gjContentBodyHeader row-fluid">'
								.						'<div class="gjContentBodyTitle span9"><h5>' . $row->getName( 0, true ) . '<small> ' . cbFormatDate( $row->get( 'date' ), 1, false ) . ' - ' . $category->getName( 0, true ) . ( $row->get( 'parent' ) ? ' - ' . $row->getParent()->getName( 0, true ) : null ) . '</small></h5></div>'
								.						'<div class="gjContentBodyMenu span3">';

			if ( cbgjClass::hasAccess( 'grp_join', $authorized ) ) {
				$return			.=							'<input type="button" value="' . htmlspecialchars( ( cbgjClass::hasAccess( 'grp_invited', $authorized ) ? CBTxt::T( 'Accept Invite' ) : CBTxt::T( 'Join' ) ) ) . '" class="gjButton btn btn-mini btn-success" onclick="' . cbgjClass::getPluginURL( array( 'groups', 'join', (int) $category->get( 'id' ), (int) $row->get( 'id' ) ), true, true, false, null, true ) . '" />';
			}

			if ( $beforeMenu || cbgjClass::hasAccess( array( 'grp_leave', 'mod_lvl2', 'mod_lvl3', 'grp_can_publish' ), $authorized ) || $afterMenu ) {
				$menuItems		=	$beforeMenu
								.	( cbgjClass::hasAccess( 'grp_leave', $authorized ) ? '<div><a href="javascript: void(0);" onclick="' . cbgjClass::getPluginURL( array( 'groups', 'leave', (int) $category->get( 'id' ), (int) $row->get( 'id' ) ), CBTxt::P( 'Are you sure you want to leave this [group]?', array( '[group]' => cbgjClass::getOverride( 'group' ) ) ), true, false, null, true ) . '"><i class="icon-minus"></i> ' . CBTxt::Th( 'Leave' ) . '</a></div>' : null )
								.	( cbgjClass::hasAccess( 'mod_lvl3', $authorized ) ? '<div><a href="' . cbgjClass::getPluginURL( array( 'groups', 'edit', (int) $category->get( 'id' ), (int) $row->get( 'id' ) ), null, true, false, null, true ) . '"><i class="icon-pencil"></i> ' . CBTxt::Th( 'Edit' ) . '</a></div>' : null )
								.	( cbgjClass::hasAccess( 'grp_can_publish', $authorized ) ? $state : null )
								.	( cbgjClass::hasAccess( 'mod_lvl2', $authorized ) ? '<div><a href="javascript: void(0);" onclick="' . cbgjClass::getPluginURL( array( 'groups', 'delete', (int) $category->get( 'id' ), (int) $row->get( 'id' ) ), CBTxt::P( 'Are you sure you want to delete this [group] and all its associated [users]?', array( '[group]' => cbgjClass::getOverride( 'group' ), '[users]' => cbgjClass::getOverride( 'user', true ) ) ), true, false, null, true ) . '"><i class="icon-remove"></i> ' . CBTxt::Th( 'Delete' ) . '</a></div>' : null )
								.	$afterMenu;

				$return			.=							cbgjClass::getDropdown( $menuItems, CBTxt::Th( 'Menu' ) );
			}

			$return				.=						'</div>'
								.					'</div>'
								.					'<div class="gjContentBodyInfo">' . ( $row->getDescription( $invitedTabDescLimit ) ? '<div class="well well-small">' . $row->getDescription( $invitedTabDescLimit ) . '</div>' : null ) . '</div>'
								.					'<div class="gjContentDivider"></div>'
								.					'<div class="gjContentBodyFooter">'
								.						cbgjClass::getIntegrations( 'gj_onBeforeProfileGroupInvitedInfo', array( $row, $category, $displayed, $user, $plugin ), null, 'span' )
								.						( ( ( ( ! $row->get( 'nested' ) ) && cbgjClass::hasAccess( 'mod_lvl2', $authorized ) ) || $row->get( 'nested' ) ) && $row->nestedCount() ? cbgjClass::getOverride( 'group', $row->nestedCount() ) . ' | ' : null )
								.						( $row->userCount() ? cbgjClass::getOverride( 'user', $row->userCount() ) . ' | ' : null )
								.						$row->getType()
								.						cbgjClass::getIntegrations( 'gj_onAfterProfileGroupInvitedInfo', array( $row, $category, $displayed, $user, $plugin ), null, 'span' )
								.					'</div>'
								.				'</div>'
								.			'</div>';
		} else {
			$return				.=			'<div class="gjContent">';

			if ( $invitedTabSearch && $pageNav->searching ) {
				$return			.=				CBTxt::Th( 'No invite search results found.' );
			} else {
				if ( $displayed->id == $user->id ) {
					$return		.=				CBTxt::Ph( 'You are not invited to any [groups].', array( '[groups]' => cbgjClass::getOverride( 'group', true ) ) );
				} else {
					$return		.=				CBTxt::Ph( 'This user is not invited to any [groups].', array( '[groups]' => cbgjClass::getOverride( 'group', true ) ) );
				}
			}

			$return				.=			'</div>';
		}

		if ( $invitedTabPaging ) {
			$return				.=			'<div class="gjPaging pagination pagination-centered">'
								.				( $pageNav->total > $pageNav->limit ? $pageNav->pagelinks : null )
								.				( ! $invitedTabLimitbox ? $pageNav->getLimitBox( false ) : ( $pageNav->total ? '<div class="gjPagingLimitbox">' . $pageNav->limitbox . '</div>' : null ) )
								.			'</div>';
		}

		$return					.=			cbGetSpoofInputTag( 'plugin' )
								.		'</form>'
								.	'</div>';

		return $return;
	}
예제 #14
0
	/**
	 * render frontend invites list
	 *
	 * @param array $rows
	 * @param cbgjCategory $category
	 * @param cbgjGroup $group
	 * @param moscomprofilerUser $user
	 * @param object $plugin
	 * @return mixed
	 */
	static function showInvitesList( $rows, $category, $group, $user, $plugin ) {
		$group->setPathway( CBTxt::T( 'Invites List' ), true );

		$inviteBy			=	explode( '|*|', $plugin->params->get( 'group_invites_by', '1|*|2|*|3|*|4' ) );

		$return				=	'<div class="gjInvitesList">'
							.		'<form action="' . cbgjClass::getPluginURL( array( 'invites', 'send', (int) $category->get( 'id' ), (int) $group->get( 'id' ) ) ) . '" method="post" enctype="multipart/form-data" name="gjForm" id="gjForm" class="gjForm">'
							.			'<legend class="gjEditTitle">' . cbgjClass::getOverride( 'user', true ) . '</legend>';

		if ( $rows ) {
			$return			.=			'<div class="gjContent">';

			foreach ( $rows as $row ) {
				$cbUser		=&	CBuser::getInstance( (int) $row->get( 'id' ) );

				if ( ! $cbUser ) {
					$cbUser	=&	CBuser::getInstance( null );
				}

				$recipient	=&	$cbUser->getUserData();

				if ( in_array( 1, $inviteBy ) ) {
					$invite	=	(int) $recipient->id;
				} elseif ( in_array( 4, $inviteBy ) ) {
					$invite	=	$recipient->email;
				} elseif ( in_array( 2, $inviteBy ) ) {
					$invite	=	$recipient->username;
				} elseif ( in_array( 3, $inviteBy ) ) {
					$invite	=	$recipient->name;
				}

				if ( ! $invite ) {
					$invite	=	(int) $row->get( 'id' );
				}

				$inviteUrl	=	"document.gjForm.invites_invite.value = '" . addslashes( $invite ) . "';"
							.	"document.gjForm.submit();";

				$return		.=				'<div class="gjContentBox mini-layout">'
							.					'<div class="gjContentBoxRow">' . $cbUser->getField( 'formatname', null, 'html', 'none', 'list', 0, true ) . '</div>'
							.					'<div class="gjContentBoxRow">' . $cbUser->getField( 'avatar', null, 'html', 'none', 'list', 0, true ) . '</div>'
							.					'<div class="gjContentBoxRow">' . $cbUser->getField( 'onlinestatus', null, 'html', 'none', 'profile', 0, true  ) . '</div>'
							.					'<div class="gjContentBoxRow">'
							.						'<input type="button" value="' . htmlspecialchars( CBTxt::Th( 'Invite' ) ) . '" class="gjButton btn btn-success" onclick="' . $inviteUrl . '" />'
							.					'</div>'
							.				'</div>';
			}

			$return			.=			'</div>';
		} else {
			$return			.=			'<div class="gjContent">' . CBTxt::Ph( 'There are no [users] available to invite.', array( '[users]' => cbgjClass::getOverride( 'user', true ) ) ) . '</div>';
		}

		$return				.=			'<div class="gjButtonWrapper form-actions">'
							.				'<input type="button" value="' . htmlspecialchars( CBTxt::T( 'Cancel' ) ) . '" class="gjButton gjButtonCancel btn" onclick="' . cbgjClass::getPluginURL( array( 'groups', 'show', (int) $category->get( 'id' ), (int) $group->get( 'id' ) ), CBTxt::T( 'Are you sure you want to cancel? All unsaved data will be lost!' ) ) . '" />'
							.			'</div>'
							.			'<input type="hidden" name="invites_invite" id="invites_invite" value="" />'
							.			'<input type="hidden" name="invites_list" id="invites_list" value="1" />'
							.			cbGetSpoofInputTag( 'plugin' )
							.		'</form>'
							.	'</div>';

		echo $return;
	}
예제 #15
0
	/**
	 * prepare backend tools render
	 *
	 * @param moscomprofilerUser $user
	 * @param object $plugin
	 */
	private function showTools( $user, $plugin ) {
		global $_CB_database, $_PLUGINS;

		$msgs								=	new stdClass();
		$msgs->errors						=	array();
		$msgs->warnings						=	array();
		$msgs->info							=	array();

		$_PLUGINS->trigger( 'gj_onBeforeTools', array( $msgs, $user, $plugin ) );

		if ( file_exists( $plugin->imgsAbs ) ) {
			if ( ! is_writable( $plugin->imgsAbs ) ) {
				$msgs->errors[]				=	CBTxt::P( ':: Images :: directory not writable - [img_path]', array( '[img_path]' => $plugin->imgsAbs ) );
			}
		}

		if ( file_exists( str_replace( '/' . $plugin->folder, '', $plugin->imgsAbs ) ) ) {
			if ( ! is_writable( str_replace( '/' . $plugin->folder, '', $plugin->imgsAbs ) ) ) {
				$msgs->errors[]				=	CBTxt::P( ':: Images :: directory not writable - [img_path]', array( '[img_path]' => str_replace( '/' . $plugin->folder, '', $plugin->imgsAbs ) ) );
			}
		}

		$categories							=	cbgjData::getCategories();

		$cat_types							=	array();
		$cat_published						=	array();
		$cat_name							=	array();
		$cat_user							=	array();
		$cat_notification					=	array();

		if ( $categories ) foreach ( $categories as $category ) {
			$category_url					=	'<a href="' . cbgjClass::getPluginURL( array( 'categories', 'edit', (int) $category->get( 'id' ) ) ) . '">' . $category->get( 'id' ) . '</a>';

			if ( ! $category->get( 'types' ) ) {
				$cat_types[]				=	$category_url;
			}

			if ( ! $category->get( 'published' ) ) {
				$cat_published[]			=	$category_url;
			}

			if ( $category->get( 'name' ) == '' ) {
				$cat_name[]					=	$category_url;
			}

			if ( ! $category->get( 'user_id' ) ) {
				$cat_user[]					=	$category_url;
			} else {
				$notification				=	cbgjData::getNotifications( null, array( array( 'type', '=', 'category' ), array( 'item', '=', (int) $category->get( 'id' ) ), array( 'user_id', '=', (int) $category->get( 'user_id' ) ) ), null, null, false );

				if ( ( ! $notification->get( 'id' ) ) && cbgjClass::hasAccess( 'cat_usr_notifications', cbgjClass::getAuthorization( $category, null, $category->getOwner() ) ) ) {
					$cat_notification[]		=	$category_url;
				}
			}
		}

		if ( ! empty( $cat_types ) ) {
			$fix_url						=	'<a href="' . cbgjClass::getPluginURL( array( 'fix', 'categories', 'types' ) ) . '">' . CBTxt::T( 'Fix All' ) . '</a>';
			$msgs->errors[]					=	CBTxt::P( ':: Category :: Missing types - [cat] - [fixall]', array( '[cat]' => implode( ', ', $cat_types ), '[fixall]' => $fix_url ) );
		}

		if ( ! empty( $cat_published ) ) {
			$fix_url						=	'<a href="' . cbgjClass::getPluginURL( array( 'fix', 'categories', 'published' ) ) . '">' . CBTxt::T( 'Fix All' ) . '</a>';
			$msgs->info[]					=	CBTxt::P( ':: Category :: Not published - [cat] - [fixall]', array( '[cat]' => implode( ', ', $cat_published ), '[fixall]' => $fix_url ) );
		}

		if ( ! empty( $cat_name ) ) {
			$msgs->errors[]					=	CBTxt::P( ':: Category :: Missing name - [cat]', array( '[cat]' => implode( ', ', $cat_name ) ) );
		}

		if ( ! empty( $cat_user ) ) {
			$fix_url						=	'<a href="' . cbgjClass::getPluginURL( array( 'fix', 'categories', 'user_id' ) ) . '">' . CBTxt::T( 'Fix All' ) . '</a>';
			$msgs->errors[]					=	CBTxt::P( ':: Category :: Missing owner - [cat] - [fixall]', array( '[cat]' => implode( ', ', $cat_user ), '[fixall]' => $fix_url ) );
		}

		if ( ! empty( $cat_notification ) ) {
			$fix_url					=	'<a href="' . cbgjClass::getPluginURL( array( 'fix', 'categories', 'notifications' ) ) . '">' . CBTxt::T( 'Fix All' ) . '</a>';
			$msgs->errors[]				=	CBTxt::Ph( ':: Category :: Missing owner notifications - [cat] - [fixall]', array( '[cat]' => implode( ', ', $cat_notification ), '[fixall]' => $fix_url ) );
		}

		$groups								=	cbgjData::getGroups();

		$grp_cat_id							=	array();
		$grp_published						=	array();
		$grp_type							=	array();
		$grp_cat							=	array();
		$grp_name							=	array();
		$grp_user							=	array();
		$grp_owner							=	array();
		$grp_notification					=	array();

		if ( $groups ) foreach ( $groups as $group ) {
			$group_url						=	'<a href="' . cbgjClass::getPluginURL( array( 'groups', 'edit', (int) $group->get( 'id' ) ) ) . '">' . $group->get( 'id' ) . '</a>';

			if ( ! $group->get( 'published' ) ) {
				$grp_published[]			=	$group_url;
			}

			if ( ! $group->get( 'type' ) ) {
				$grp_type[]					=	$group_url;
			}

			if ( ! $group->get( 'category' ) ) {
				$grp_cat[]					=	$group_url;
			} else {
				if ( ! $group->getCategory()->get( 'id' ) ) {
					$grp_cat_id[]			=	$group_url;
				}
			}

			if ( $group->get( 'name' ) == '' ) {
				$grp_name[]					=	$group_url;
			}

			if ( ! $group->get( 'user_id' ) ) {
				$grp_user[]					=	$group_url;
			} else {
				if ( ! $group->getUser()->get( 'id' ) ) {
					$grp_owner[]			=	$group_url;
				} else {
					$notification			=	cbgjData::getNotifications( null, array( array( 'type', '=', 'group' ), array( 'item', '=', (int) $group->get( 'id' ) ), array( 'user_id', '=', (int) $group->get( 'user_id' ) ) ), null, null, false );

					if ( ( ! $notification->get( 'id' ) ) && cbgjClass::hasAccess( 'grp_usr_notifications', cbgjClass::getAuthorization( $group->getCategory(), $group, $group->getOwner() ) ) ) {
						$grp_notification[]	=	$group_url;
					}
				}
			}
		}

		if ( ! empty( $grp_cat_id ) ) {
			$msgs->errors[]				=	CBTxt::Ph( ':: Group :: Category does not exist in GroupJive - [grp]', array( '[grp]' => implode( ', ', $grp_cat_id ) ) );
		}

		if ( ! empty( $grp_published ) ) {
			$fix_url					=	'<a href="' . cbgjClass::getPluginURL( array( 'fix', 'groups', 'published' ) ) . '">' . CBTxt::Th( 'Fix All' ) . '</a>';
			$msgs->info[]				=	CBTxt::Ph( ':: Group :: Not published - [grp] - [fixall]', array( '[grp]' => implode( ', ', $grp_published ), '[fixall]' => $fix_url ) );
		}

		if ( ! empty( $grp_type ) ) {
			$fix_url					=	'<a href="' . cbgjClass::getPluginURL( array( 'fix', 'groups', 'type' ) ) . '">' . CBTxt::Th( 'Fix All' ) . '</a>';
			$msgs->errors[]				=	CBTxt::Ph( ':: Group :: Missing type - [grp] - [fixall]', array( '[grp]' => implode( ', ', $grp_type ), '[fixall]' => $fix_url ) );
		}

		if ( ! empty( $grp_cat ) ) {
			$msgs->errors[]				=	CBTxt::Ph( ':: Group :: Missing category - [grp]', array( '[grp]' => implode( ', ', $grp_cat ) ) );
		}

		if ( ! empty( $grp_name ) ) {
			$msgs->errors[]				=	CBTxt::Ph( ':: Group :: Missing name - [grp]', array( '[grp]' => implode( ', ', $grp_name ) ) );
		}

		if ( ! empty( $grp_user ) ) {
			$fix_url					=	'<a href="' . cbgjClass::getPluginURL( array( 'fix', 'groups', 'gj_user' ) ) . '">' . CBTxt::Th( 'Fix All' ) . '</a>';
			$msgs->errors[]				=	CBTxt::Ph( ':: Group :: Missing owner - [grp] - [fixall]', array( '[grp]' => implode( ', ', $grp_user ), '[fixall]' => $fix_url ) );
		}

		if ( ! empty( $grp_owner ) ) {
			$fix_url					=	'<a href="' . cbgjClass::getPluginURL( array( 'fix', 'groups', 'owner' ) ) . '">' . CBTxt::Th( 'Fix All' ) . '</a>';
			$msgs->errors[]				=	CBTxt::Ph( ':: Group :: Missing owner user - [grp] - [fixall]', array( '[grp]' => implode( ', ', $grp_owner ), '[fixall]' => $fix_url ) );
		}

		if ( ! empty( $grp_notification ) ) {
			$fix_url					=	'<a href="' . cbgjClass::getPluginURL( array( 'fix', 'groups', 'notifications' ) ) . '">' . CBTxt::T( 'Fix All' ) . '</a>';
			$msgs->errors[]				=	CBTxt::Ph( ':: Group :: Missing owner notifications - [grp] - [fixall]', array( '[grp]' => implode( ', ', $grp_notification ), '[fixall]' => $fix_url ) );
		}

		$users							=	cbgjData::getUsers();

		$usr_grp						=	array();
		$usr_grp_id						=	array();
		$usr_user						=	array();
		$usr_notification				=	array();

		if ( $users ) foreach ( $users as $usr ) {
			$user_url					=	'<a href="' . cbgjClass::getPluginURL( array( 'users', 'edit', (int) $usr->get( 'id' ) ) ) . '">' . $usr->get( 'id' ) . '</a>';

			if ( ! $usr->get( 'group' ) ) {
				$usr_grp_id[]			=	$user_url;
			} else {
				if ( ! $usr->getGroup()->get( 'id' ) ) {
					$usr_grp[]			=	$user_url;
				}
			}

			if ( ! $usr->get( 'user_id' ) ) {
				$usr_user[]				=	$user_url;
			} else {
				$notification			=	cbgjData::getNotifications( null, array( array( 'type', '=', 'group' ), array( 'item', '=', (int) $usr->get( 'group' ) ), array( 'user_id', '=', (int) $usr->get( 'user_id' ) ) ), null, null, false );

				if ( ( ! $notification->get( 'id' ) ) && ( $usr->get( 'status' ) > 0 ) && cbgjClass::hasAccess( 'grp_usr_notifications', cbgjClass::getAuthorization( $usr->getCategory(), $usr->getGroup(), $usr->getOwner() ) ) ) {
					$usr_notification[]	=	$user_url;
				}
			}
		}

		if ( ! empty( $usr_grp ) ) {
			$msgs->errors[]				=	CBTxt::Ph( ':: User :: Group does not exist in GroupJive - [usr]', array( '[usr]' => implode( ', ', $usr_grp_id ) ) );
		}

		if ( ! empty( $usr_grp_id ) ) {
			$msgs->errors[]				=	CBTxt::Ph( ':: User :: Missing group - [usr]', array( '[usr]' => implode( ', ', $usr_grp_id ) ) );
		}

		if ( ! empty( $usr_user ) ) {
			$msgs->errors[]				=	CBTxt::Ph( ':: User :: Missing user - [usr]', array( '[usr]' => implode( ', ', $usr_user ) ) );
		}

		if ( ! empty( $usr_notification ) ) {
			$fix_url					=	'<a href="' . cbgjClass::getPluginURL( array( 'fix', 'users', 'notifications' ) ) . '">' . CBTxt::T( 'Fix All' ) . '</a>';
			$msgs->errors[]				=	CBTxt::Ph( ':: User :: Missing notifications - [usr] - [fixall]', array( '[usr]' => implode( ', ', $usr_notification ), '[fixall]' => $fix_url ) );
		}

		$invites						=	cbgjData::getInvites();

		$inv_grp						=	array();
		$inv_grp_id						=	array();
		$inv_usr_id						=	array();
		$inv_user						=	array();

		if ( $invites ) foreach ( $invites as $invite ) {
			$invite_url					=	'<a href="' . cbgjClass::getPluginURL( array( 'invites' ) ) . '">' . $invite->get( 'id' ) . '</a>';

			if ( ! $invite->get( 'group' ) ) {
				$inv_grp_id[]			=	$invite_url;
			} else {
				if ( ! $invite->getGroup()->get( 'id' ) ) {
					$inv_grp[]			=	$invite_url;
				}
			}

			if ( ! $invite->get( 'user_id' ) ) {
				$inv_user[]				=	$invite_url;
			} else {
				if ( ! $invite->getUser()->get( 'id' ) ) {
					$inv_usr_id			=	$invite_url;
				}
			}
		}

		if ( ! empty( $inv_grp ) ) {
			$msgs->errors[]				=	CBTxt::Ph( ':: Invite :: Group does not exist in GroupJive - [inv]', array( '[inv]' => implode( ', ', $inv_grp ) ) );
		}

		if ( ! empty( $inv_grp_id ) ) {
			$msgs->errors[]				=	CBTxt::Ph( ':: Invite :: Missing group - [inv]', array( '[inv]' => implode( ', ', $inv_grp_id ) ) );
		}

		if ( ! empty( $inv_usr_id ) ) {
			$msgs->warnings[]			=	CBTxt::Ph( ':: Invite :: User does not exist in Group - [inv]', array( '[inv]' => implode( ', ', $inv_usr_id ) ) );
		}

		if ( ! empty( $inv_user ) ) {
			$msgs->errors[]				=	CBTxt::Ph( ':: Invite :: Missing user - [inv]', array( '[inv]' => implode( ', ', $inv_user ) ) );
		}

		$gj_categories					=	$_CB_database->getTableStatus( '#__gj_grcategory' );
		$gj_groups						=	$_CB_database->getTableStatus( '#__gj_groups' );
		$gj_users						=	$_CB_database->getTableStatus( '#__gj_users' );

		if ( $gj_categories || $gj_groups || $gj_users ) {
			$migrate_url				=	cbgjClass::getPluginURL( array( 'tools', 'migrate' ), CBTxt::Th( 'Are you sure you want to migrate your old GroupJive data?' ) );
			$migrate					=	'<a href="javascript: void(0);" onclick="' . $migrate_url . '">' . CBTxt::Th( 'Migrate' ) . '</a>';

			$delmigrate_url				=	cbgjClass::getPluginURL( array( 'tools', 'delmigrate' ), CBTxt::Th( 'Are you sure you want to delete your old GroupJive data?' ) );
			$delmigrate					=	'<a href="javascript: void(0);" onclick="' . $delmigrate_url . '">' . CBTxt::Th( 'Delete' ) . '</a>';

			$msgs->info[]				=	CBTxt::Ph( ':: GroupJive :: Previous release database found - [mig_url] | [del_url]', array( '[mig_url]' => $migrate, '[del_url]' => $delmigrate ) );
		}

		$_PLUGINS->trigger( 'gj_onAfterTools', array( $msgs, $user, $plugin ) );

		if ( empty( $msgs->errors ) ) {
			$msgs->errors[]				=	CBTxt::Th( 'No errors were found.' );
		}

		if ( empty( $msgs->warnings ) ) {
			$msgs->warnings[]			=	CBTxt::Th( 'No warnings were found.' );
		}

		if ( empty( $msgs->info ) ) {
			$msgs->info[]				=	CBTxt::Th( 'No info was found.' );
		}

		HTML_cbgjAdmin::showTools( $msgs, $user, $plugin );
	}
예제 #16
0
	/**
	 * 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;
	}
 function _cbadmin_resendconfirmationemailsToUsers(&$rows, $pageNav, $search, $option, $lists, $pluginColumns, $inputTextExtras, $searchTabContent)
 {
     global $ueConfig;
     cbimport('cb.tabs');
     $n = 0;
     foreach ($rows as $row) {
         if ($row->confirmed == 0 && $row->cbactivation != '') {
             $cbNotification = new cbNotification();
             $cbNotification->sendFromSystem($row->id, getLangDefinition(stripslashes($ueConfig['reg_pend_appr_sub'])), getLangDefinition(stripslashes($ueConfig['reg_pend_appr_msg'])));
             ++$n;
         }
     }
     echo CBTxt::Ph("Sent confirmation emails to [NUM_USERS] users", array('[NUM_USERS]' => $n));
 }