/**
	 * prepare frontend event edit render
	 *
	 * @param int       $id
	 * @param UserTable $user
	 */
	private function showEventEdit( $id, $user )
	{
		global $_CB_framework;

		$row					=	CBGroupJiveEvents::getEvent( (int) $id );
		$isModerator			=	CBGroupJive::isModerator( $user->get( 'id' ) );
		$groupId				=	$this->input( 'group', null, GetterInterface::INT );

		if ( $groupId === null ) {
			$group				=	$row->group();
		} else {
			$group				=	CBGroupJive::getGroup( $groupId );
		}

		$returnUrl				=	$_CB_framework->pluginClassUrl( $this->_gjPlugin->element, false, array( 'action' => 'groups', 'func' => 'show', 'id' => (int) $group->get( 'id' ) ) );

		if ( ! CBGroupJive::canAccessGroup( $group, $user ) ) {
			cbRedirect( $returnUrl, CBTxt::T( 'Group does not exist.' ), 'error' );
		} elseif ( ! $isModerator ) {
			if ( ( ! $row->get( 'id' ) ) && ( ! CBGroupJive::canCreateGroupContent( $user, $group, 'events' ) ) ) {
				cbRedirect( $returnUrl, CBTxt::T( 'You do not have sufficient permissions to schedule an event in this group.' ), 'error' );
			} elseif ( $row->get( 'id' ) && ( $user->get( 'id' ) != $row->get( 'user_id' ) ) && ( CBGroupJive::getGroupStatus( $user, $group ) < 2 ) ) {
				cbRedirect( $returnUrl, CBTxt::T( 'You do not have sufficient permissions to edit this event.' ), 'error' );
			}
		}

		CBGroupJive::getTemplate( 'event_edit', true, true, $this->element );

		$input					=	array();

		$publishedTooltip		=	cbTooltip( null, CBTxt::T( 'Select publish state of this event. Unpublished events will not be visible to the public.' ), null, null, null, null, null, 'data-hascbtooltip="true"' );

		$input['published']		=	moscomprofilerHTML::yesnoSelectList( 'published', 'class="form-control"' . $publishedTooltip, (int) $this->input( 'post/published', $row->get( 'published', 1 ), GetterInterface::INT ) );

		$titleTooltup			=	cbTooltip( null, CBTxt::T( 'Input the event title. This is the title that will distinguish this event from others. Suggested to input something to uniquely identify your event.' ), null, null, null, null, null, 'data-hascbtooltip="true"' );

		$input['title']			=	'<input type="text" id="title" name="title" value="' . htmlspecialchars( $this->input( 'post/title', $row->get( 'title' ), GetterInterface::STRING ) ) . '" class="form-control required" size="35"' . $titleTooltup . ' />';

		$event					=	$_CB_framework->displayCmsEditor( 'event', $this->input( 'post/event', $row->get( 'event' ), GetterInterface::HTML ), '100%', null, 40, 10, false );

		$input['event']			=	cbTooltip( null, CBTxt::T( 'Input a detailed description about this event.' ), null, null, null, $event, null, 'style="display:block;"' );

		$locationTooltup		=	cbTooltip( null, CBTxt::T( 'Input the location for this event (e.g. My House, The Park, Restaurant Name, etc..).' ), null, null, null, null, null, 'data-hascbtooltip="true"' );

		$input['location']		=	'<input type="text" id="location" name="location" value="' . htmlspecialchars( $this->input( 'post/location', $row->get( 'location' ), GetterInterface::STRING ) ) . '" class="form-control required" size="35"' . $locationTooltup . ' />';

		$addressTooltup			=	cbTooltip( null, CBTxt::T( 'Optionally input the address for this event or click the map button to attempt to find your current location.' ), null, null, null, null, null, 'data-hascbtooltip="true"' );

		$input['address']		=	'<input type="text" id="address" name="address" value="' . htmlspecialchars( $this->input( 'post/address', $row->get( 'address' ), GetterInterface::STRING ) ) . '" class="form-control" size="45"' . $addressTooltup . ' />';

		$calendars				=	new cbCalendars( 1 );
		$minYear				=	(int) Application::Date( ( $row->get( 'id' ) ? $row->get( 'start' ) : 'now' ), 'UTC' )->format( 'Y' );

		$startTooltup			=	cbTooltip( null, CBTxt::T( 'Select the date and time this event starts.' ), null, null, null, null, null, 'data-hascbtooltip="true"' );

		$input['start']			=	$calendars->cbAddCalendar( 'start', null, true, $this->input( 'post/start', $row->get( 'start' ), GetterInterface::STRING ), false, true, $minYear, ( $minYear + 30 ), $startTooltup );

		$endTooltup				=	cbTooltip( null, CBTxt::T( 'Optionally select the end date and time for this event.' ), null, null, null, null, null, 'data-hascbtooltip="true"' );

		$input['end']			=	$calendars->cbAddCalendar( 'end', null, false, $this->input( 'post/end', $row->get( 'end' ), GetterInterface::STRING ), false, true, $minYear, ( $minYear + 30 ), $endTooltup );

		$limitTooltip			=	cbTooltip( null, CBTxt::T( 'Optionally input a guest limit for this event.' ), null, null, null, null, null, 'data-hascbtooltip="true"' );

		$input['limit']			=	'<input type="text" id="limit" name="limit" value="' . (int) $this->input( 'post/limit', $row->get( 'limit' ), GetterInterface::INT ) . '" class="digits form-control" size="6"' . $limitTooltip . ' />';

		$ownerTooltip			=	cbTooltip( null, CBTxt::T( 'Input the event owner id. Event owner determines the creator of the event specified as User ID.' ), null, null, null, null, null, 'data-hascbtooltip="true"' );

		$input['user_id']		=	'<input type="text" id="user_id" name="user_id" value="' . (int) $this->input( 'post/user_id', $this->input( 'user', $row->get( 'user_id', $user->get( 'id' ) ), GetterInterface::INT ), GetterInterface::INT ) . '" class="digits required form-control" size="6"' . $ownerTooltip . ' />';

		HTML_groupjiveEventEdit::showEventEdit( $row, $input, $group, $user, $this );
	}
Example #2
0
	function editTab( $tid='0', $option='com_comprofiler', $task='editTab' ) {
		global $_CB_database, $_CB_framework, $_PLUGINS;

		$this->_importNeeded();

		$row = new moscomprofilerTabs( $_CB_database );
		// load the row from the db table
		$row->load( (int) $tid );
	
		if ( $tid && ! in_array( $row->useraccessgroupid, getChildGIDS( userGID( $_CB_framework->myId() ) ) ) ) {
			echo "<script type=\"text/javascript\"> alert('" . addslashes( CBTxt::T('Unauthorized Access') ) . "'); window.history.go(-1);</script>\n";
			exit;
		}
	 	$lists = array();
		if($row->sys=='2') $lists['enabled'] = "Yes";
		else $lists['enabled'] = moscomprofilerHTML::yesnoSelectList( 'enabled', 'class="inputbox" size="1"', ( $row->enabled !== null ? $row->enabled : 1 ) );
	
		/*
		-------------------------
		!          head         !
		!-----------------------!
		!      !        !       !
		! left ! middle ! right !
		!      !        !       !
		!-----------------------!
		!                       !
		!        tabmain        !
		!                       !
		!-----------------------!
		!        underall       !
		-------------------------
		!      !        !       !
		! L1C1 ! L1C2   ! L1C3  !   L1C1...C9
		!      !        !       !
		!-----------------------!
		!      !        !       !
		! L2C1 ! L2C4   ! L2C8  !   ...
		!      !        !       !
		!-----------------------!
		!                       !
		!        L4C7           !
		!                       !
		!-----------------------!
		!          !            !
		!   L8C3   !    L8C4    !   ...L9C9
		!          !            !
		!-----------------------!
	    ! + not_on_profile_1..9
		*/
		$position = array();
		$position[] = moscomprofilerHTML::makeOption( 'cb_head', _UE_POS_CB_HEAD );
		$position[] = moscomprofilerHTML::makeOption( 'cb_left', _UE_POS_CB_LEFT );
		$position[] = moscomprofilerHTML::makeOption( 'cb_middle', _UE_POS_CB_MIDDLE );
		$position[] = moscomprofilerHTML::makeOption( 'cb_right', _UE_POS_CB_RIGHT );
		$position[] = moscomprofilerHTML::makeOption( 'cb_tabmain', _UE_POS_CB_MAIN );
		$position[] = moscomprofilerHTML::makeOption( 'cb_underall', _UE_POS_CB_BOTTOM );
		for ( $i = 1 ; $i <= 9; $i++ ) {
			for ( $j = 1 ; $j <= 9; $j++ ) {
				$position[] = moscomprofilerHTML::makeOption( 'L'.$i.'C'.$j, CBTxt::T('Line') . ' ' . $i . ' ' . CBTxt::T('Column') . ' ' . $j );
			}
		}
		for ( $i = 1 ; $i <= 9; $i++ ) {
			$position[] = moscomprofilerHTML::makeOption( 'not_on_profile_'.$i, CBTxt::T('Not displayed on profile') . ' ' . $i );
		}
	
		if ( ! $row->position ) {
			$row->position		=	'cb_tabmain';
		}
		$lists['position'] = moscomprofilerHTML::selectList( $position, 'position', 'class="inputbox" size="1"', 'value', 'text', $row->position, 2 );
	
		$displaytype = array();
		$displaytype[] = moscomprofilerHTML::makeOption( 'tab', _UE_DISPLAY_TAB );
		$displaytype[] = moscomprofilerHTML::makeOption( 'div', _UE_DISPLAY_DIV );
		$displaytype[] = moscomprofilerHTML::makeOption( 'rounddiv', _UE_DISPLAY_ROUNDED_DIV );
		$displaytype[] = moscomprofilerHTML::makeOption( 'html', _UE_DISPLAY_HTML );
		$displaytype[] = moscomprofilerHTML::makeOption( 'overlib', _UE_DISPLAY_OVERLIB );
		$displaytype[] = moscomprofilerHTML::makeOption( 'overlibfix', _UE_DISPLAY_OVERLIBFIX );
		$displaytype[] = moscomprofilerHTML::makeOption( 'overlibsticky', _UE_DISPLAY_OVERLIBSTICKY );
		if ( ! $row->displaytype ) {
			$row->displaytype	=	'tab';
		}
		$lists['displaytype'] = moscomprofilerHTML::selectList( $displaytype, 'displaytype', 'class="inputbox" size="1"', 'value', 'text', $row->displaytype, 2 );
	
		if ($tid) {
			if ( $row->ordering > -10000 && $row->ordering < 10000 ) {
				// build the html select list for ordering
				$query = "SELECT ordering AS value, title AS text"
				. "\n FROM #__comprofiler_tabs"
				. "\n WHERE position='" . $_CB_database->getEscaped( $row->position ) . "'"
				. "\n AND enabled > 0"
				. "\n AND ordering > -10000"
				. "\n AND ordering < 10000"
				. "\n ORDER BY ordering"
				;
				$order = $this->_cbGetOrderingList( $query );
				$lists['ordering'] = moscomprofilerHTML::selectList( $order, 'ordering', 'class="inputbox" size="1"', 'value', 'text', intval( $row->ordering ), 2 );
			} else {
				$lists['ordering'] = '<input type="hidden" name="ordering" value="'. $row->ordering .'" />' . CBTxt::T('This plugin cannot be reordered') ;
			}
		} else {
			$row->ordering 				= 999;
			$row->ordering_register		= 10;
			$row->published 			= 1;
			$row->description 			= '';
			$row->useraccessgroupid		= -2;
			$lists['ordering']	= '<input type="hidden" name="ordering" value="'. $row->ordering
								.'" />'. CBTxt::T('New items default to the last place. Ordering can be changed after this item is saved.');
		}
	
		$gtree3=array();
	    $gtree3[] = moscomprofilerHTML::makeOption( -2 , '- ' . CBtxt::T('Everybody') . ' -' );
	    $gtree3[] = moscomprofilerHTML::makeOption( -1 , '- ' . CBtxt::T('All Registered Users') . ' -' );
		$gtree3 = array_merge( $gtree3, $_CB_framework->acl->get_group_children_tree( null, 'USERS', false ));
	
		$lists['useraccessgroup']=moscomprofilerHTML::selectList( $gtree3, 'useraccessgroupid', 'size="4"', 'value', 'text', $row->useraccessgroupid, 2, false );
	
		// params:
		$paramsEditorHtml			=	array();
		$options					=	array( 'option' => $option, 'task' => $task, 'cid' => $row->tabid );
	
		// additional non-specific other parameters:
		$_PLUGINS->loadPluginGroup( 'user' );
	
		$fieldsParamsPlugins		=	$_PLUGINS->getUserTabParamsPluginIds();
		foreach ($fieldsParamsPlugins as $pluginId => $fieldParamHandlerClassName ) {
			$fieldParamHandler		=	new $fieldParamHandlerClassName( $pluginId, $row );			// cbFieldParamsHandler();
			$addParamsHtml			=	$fieldParamHandler->drawParamsEditor( $options );
			if ( $addParamsHtml ) {
				$addParamsTitle		=	$fieldParamHandler->getFieldsParamsLabel();
				$paramsEditorHtml[]	=	array( 'title' => $addParamsTitle, 'content' => $addParamsHtml );
			}
		}
	
		$pluginView				=	_CBloadView( 'tab' );
		$pluginView->edittab( $row, $option, $lists, $tid, $paramsEditorHtml );
	}
	/**
	 * @param  null|int     $id
	 * @param  UserTable    $user
	 * @param  stdClass     $model
	 * @param  PluginTable  $plugin
	 * @param  null|string  $message
	 * @param  null|string  $messageType
	 */
	public function showBlogEdit( $id, $user, $model, $plugin, $message = null, $messageType = 'error' )
	{
		global $_CB_framework;

		$blogLimit						=	(int) $plugin->params->get( 'blog_limit', null );
		$blogMode						=	$plugin->params->get( 'blog_mode', 1 );
		$cbModerator					=	Application::User( (int) $user->get( 'id' ) )->isGlobalModerator();

		$row							=	new cbblogsBlogTable();

		$canAccess						=	false;

		if ( $row->load( (int) $id ) ) {
			if ( ! $row->get( 'id' ) ) {
				if ( $cbModerator ) {
					$canAccess			=	true;
				} elseif ( $user->get( 'id' ) && Application::MyUser()->canViewAccessLevel( $plugin->params->get( 'blog_create_access', 2 ) ) ) {
					if ( ( ! $blogLimit ) || ( $blogLimit && ( cbblogsModel::getBlogsTotal( null, $user, $user, $plugin ) < $blogLimit ) ) ) {
						$canAccess		=	true;
					}
				}
			} elseif ( $cbModerator || ( $row->get( 'user' ) == $user->get( 'id' ) ) ) {
				$canAccess				=	true;
			}
		}

		$profileUrl						=	$_CB_framework->userProfileUrl( $row->get( 'user', $user->get( 'id' ) ), false, 'cbblogsTab' );

		if ( $canAccess ) {
			cbblogsClass::getTemplate( 'blog_edit' );

			$input						=	array();

			$publishedTooltip			=	cbTooltip( $_CB_framework->getUi(), CBTxt::T( 'Select publish status of the blog. Unpublished blogs will not be visible to the public.' ), null, null, null, null, null, 'data-hascbtooltip="true"' );

			$input['published']			=	moscomprofilerHTML::yesnoSelectList( 'published', 'class="form-control"' . ( $publishedTooltip ? ' ' . $publishedTooltip : null ), (int) $this->input( 'post/published', $row->get( 'published', ( $cbModerator || ( ! $plugin->params->get( 'blog_approval', 0 ) ) ? 1 : 0 ) ), GetterInterface::INT ) );

			$categoryTooltip			=	cbTooltip( $_CB_framework->getUi(), CBTxt::T( 'Select blog category. Select the category that best describes your blog.' ), null, null, null, null, null, 'data-hascbtooltip="true"' );

			$listCategory				=	cbblogsModel::getCategoriesList();
			$input['category']			=	moscomprofilerHTML::selectList( $listCategory, 'category', 'class="form-control"' . ( $categoryTooltip ? ' ' . $categoryTooltip : null ), 'value', 'text', $this->input( 'post/category', $row->get( 'category' ), GetterInterface::STRING ), 1, false, false );

			$accessTooltip				=	cbTooltip( $_CB_framework->getUi(), CBTxt::T( 'Select access to blog; all groups above that level will also have access to the blog.' ), null, null, null, null, null, 'data-hascbtooltip="true"' );

			$listAccess					=	Application::CmsPermissions()->getAllViewAccessLevels( true, Application::MyUser() );
			$input['access']			=	moscomprofilerHTML::selectList( $listAccess, 'access', 'class="form-control"' . ( $accessTooltip ? ' ' . $accessTooltip : null ), 'value', 'text', (int) $this->input( 'post/access', $row->get( 'access', $plugin->params->get( 'blog_access_default', 1 ) ), GetterInterface::INT ), 1, false, false );

			$titleTooltip				=	cbTooltip( $_CB_framework->getUi(), CBTxt::T( 'Input blog title. This is the title that will distinguish this blog from others. Suggested to input something unique and intuitive.' ), null, null, null, null, null, 'data-hascbtooltip="true"' );

			$input['title']				=	'<input type="text" id="title" name="title" value="' . htmlspecialchars( $this->input( 'post/title', $row->get( 'title' ), GetterInterface::STRING ) ) . '" class="required form-control" size="30"' . ( $titleTooltip ? ' ' . $titleTooltip : null ) . ' />';

			if ( in_array( $blogMode, array( 1, 2 ) ) ) {
				$blogIntro				=	$_CB_framework->displayCmsEditor( 'blog_intro', $this->input( 'post/blog_intro', $row->get( 'blog_intro' ), GetterInterface::HTML ), 400, 200, 40, 7 );

				$input['blog_intro']	=	cbTooltip( $_CB_framework->getUi(), CBTxt::T( 'Input HTML supported blog intro contents. Suggested to use minimal but well formatting for easy readability.' ), null, null, null, $blogIntro, null, 'style="display:block;"' );
			}

			if ( in_array( $blogMode, array( 1, 3 ) ) ) {
				$blogFull				=	$_CB_framework->displayCmsEditor( 'blog_full', $this->input( 'post/blog_full', $row->get( 'blog_full' ), GetterInterface::HTML ), 400, 200, 40, 7 );

				$input['blog_full']		=	cbTooltip( $_CB_framework->getUi(), CBTxt::T( 'Input HTML supported blog contents. Suggested to use minimal but well formatting for easy readability.' ), null, null, null, $blogFull, null, 'style="display:block;"' );
			}

			$userTooltip				=	cbTooltip( $_CB_framework->getUi(), CBTxt::T( 'Input owner of blog as single integer user_id.' ), null, null, null, null, null, 'data-hascbtooltip="true"' );

			$input['user']				=	'******' . (int) ( $cbModerator ? $this->input( 'post/user', $row->get( 'user', $user->get( 'id' ) ), GetterInterface::INT ) : $user->get( 'id' ) ) . '" class="digits required form-control" size="4"' . ( $userTooltip ? ' ' . $userTooltip : null ) . ' />';

			if ( $message ) {
				$_CB_framework->enqueueMessage( $message, $messageType );
			}

			HTML_cbblogsBlogEdit::showBlogEdit( $row, $input, $user, $model, $plugin );
		} else {
			cbRedirect( $profileUrl, CBTxt::T( 'Not authorized.' ), 'error' );
		}
	}
Example #4
0
 /**
  * Returns a USERPARAMS field in specified format
  *
  * @param  FieldTable  $field
  * @param  UserTable   $user
  * @param  string      $output      'html', 'xml', 'json', 'php', 'csvheader', 'csv', 'rss', 'fieldslist', 'htmledit'
  * @param  string      $formatting  'table', 'td', 'span', 'div', 'none'
  * @param  string      $reason      'profile' for user profile view, 'edit' for profile edit, 'register' for registration, 'list' for user-lists
  * @param  int         $list_compare_types   IF reason == 'search' : 0 : simple 'is' search, 1 : advanced search with modes, 2 : simple 'any' search
  * @return mixed
  */
 public function getFieldRow(&$field, &$user, $output, $formatting, $reason, $list_compare_types)
 {
     global $_CB_framework, $ueConfig;
     $results = null;
     if (class_exists('JFactory')) {
         // Joomla 1.5 :
         $lang = JFactory::getLanguage();
         $lang->load('com_users');
     }
     $pseudoFields = array();
     //Implementing Joomla's new user parameters such as editor
     $ui = $_CB_framework->getUi();
     $userParams = $this->_getUserParams($ui, $user);
     if (is_array($userParams) && count($userParams) > 0 && ($ui == 2 || (isset($ueConfig['frontend_userparams']) ? $ueConfig['frontend_userparams'] == 1 : in_array($_CB_framework->getCfg('frontend_userparams'), array('1', null))))) {
         if ($ui == 1) {
             $excludeParams = explode('|*|', $field->params->get('hide_userparams'));
         } else {
             $excludeParams = array();
         }
         //Loop through each parameter and prepare rendering appropriately.
         foreach ($userParams as $k => $userParam) {
             if (checkJversion() >= 2) {
                 $nameId = isset($userParam[4]) ? $userParam[4] : null;
             } else {
                 $nameId = isset($userParam[5]) ? $userParam[5] : null;
             }
             if (!$excludeParams || !$nameId || $nameId && !in_array($nameId, $excludeParams)) {
                 $paramField = new FieldTable($field->getDbo());
                 $paramField->title = $userParam[0];
                 $paramField->_html = $userParam[1];
                 $paramField->description = isset($userParam[2]) && class_exists("JText") ? JText::_($userParam[2]) : null;
                 $paramField->name = isset($userParam[3]) && class_exists("JText") ? JText::_($userParam[3]) : null;
                 // very probably wrong!
                 $paramField->fieldid = 'userparam_' . $k;
                 $paramField->type = 'param';
                 // this is for cb_ftparam class to be correct.
                 if (!preg_match('/<(?:input|select|textarea)[^>]*class[^>]*>/i', $paramField->_html)) {
                     $paramField->_html = preg_replace('/<(input|select|textarea)/i', '<$1 class="form-control"', $paramField->_html);
                 }
                 $pseudoFields[] = $paramField;
             }
         }
     }
     if ($ui == 2) {
         $i_am_super_admin = Application::MyUser()->isSuperAdmin();
         $canBlockUser = Application::MyUser()->isAuthorizedToPerformActionOnAsset('core.edit.state', 'com_users');
         $canEmailEvents = $user->id == 0 && $canBlockUser || Application::User((int) $user->id)->isAuthorizedToPerformActionOnAsset('core.edit.state', 'com_users') || Application::User((int) $user->id)->canViewAccessLevel(Application::Config()->get('moderator_viewaccesslevel', 3, \CBLib\Registry\GetterInterface::INT));
         $lists = array();
         if ($canBlockUser) {
             // ensure user can't add group higher than themselves
             $gtree = $_CB_framework->acl->get_groups_below_me();
             if (!$i_am_super_admin && $user->id && Application::User((int) $user->id)->isAuthorizedToPerformActionOnAsset('core.manage', 'com_users') && (Application::User((int) $user->id)->isAuthorizedToPerformActionOnAsset('core.edit', 'com_users') || Application::User((int) $user->id)->isAuthorizedToPerformActionOnAsset('core.edit.state', 'com_users'))) {
                 $disabled = ' disabled="disabled"';
             } else {
                 $disabled = '';
             }
             if ($user->id) {
                 $strgids = array_map('strval', Application::User((int) $user->id)->getAuthorisedGroups(false));
             } else {
                 $strgids = (string) $_CB_framework->getCfg('new_usertype');
             }
             $lists['gid'] = moscomprofilerHTML::selectList($gtree, 'gid[]', 'class="form-control" size="11" multiple="multiple"' . $disabled, 'value', 'text', $strgids, 2, false, null, false);
             // build the html select list
             $lists['block'] = moscomprofilerHTML::yesnoSelectList('block', 'class="form-control"', (string) $user->block);
             $list_banned = array();
             $list_banned[] = moscomprofilerHTML::makeOption('1', CBTxt::T('Banned'));
             $list_banned[] = moscomprofilerHTML::makeOption('2', CBTxt::T('Pending'));
             $list_banned[] = moscomprofilerHTML::makeOption('0', CBTxt::T('Active'));
             $lists['banned'] = moscomprofilerHTML::selectList($list_banned, 'banned', 'class="form-control"', 'value', 'text', (string) $user->banned, 2, false, null, false);
             $list_approved = array();
             $list_approved[] = moscomprofilerHTML::makeOption('2', CBTxt::T('Rejected'));
             $list_approved[] = moscomprofilerHTML::makeOption('0', CBTxt::T('Pending'));
             $list_approved[] = moscomprofilerHTML::makeOption('1', CBTxt::T('Approved'));
             $lists['approved'] = moscomprofilerHTML::selectList($list_approved, 'approved', 'class="form-control"', 'value', 'text', (string) $user->approved, 2, false, null, false);
             $lists['confirmed'] = moscomprofilerHTML::yesnoSelectList('confirmed', 'class="form-control"', (string) $user->confirmed, CBTxt::T('Confirmed'), CBTxt::T('Pending'));
             // build the html select list
             $lists['sendEmail'] = moscomprofilerHTML::yesnoSelectList('sendEmail', 'class="form-control"', (string) $user->sendEmail);
             $paramField = new FieldTable($field->getDbo());
             $paramField->title = 'Group';
             // For translation parser:  CBTxt::T( 'Group' );
             $paramField->_html = $lists['gid'];
             $paramField->description = '';
             $paramField->name = 'gid';
             $pseudoFields[] = $paramField;
             $paramField = new FieldTable($field->getDbo());
             $paramField->title = 'Block User';
             // For translation parser:  CBTxt::T( 'Block User' );
             $paramField->_html = $lists['block'];
             $paramField->description = '';
             $paramField->name = 'block';
             $pseudoFields[] = $paramField;
             $paramField = new FieldTable($field->getDbo());
             $paramField->title = 'Approve User';
             // For translation parser:  CBTxt::T( 'Approve User' );
             $paramField->_html = $lists['approved'];
             $paramField->description = '';
             $paramField->name = 'approved';
             $pseudoFields[] = $paramField;
             $paramField = new FieldTable($field->getDbo());
             $paramField->title = 'Confirm User';
             // For translation parser:  CBTxt::T( 'Confirm User' );
             $paramField->_html = $lists['confirmed'];
             $paramField->description = '';
             $paramField->name = 'confirmed';
             $pseudoFields[] = $paramField;
             $paramField = new FieldTable($field->getDbo());
             $paramField->title = 'Ban User';
             // For translation parser:  CBTxt::T( 'Ban User' );
             $paramField->_html = $lists['banned'];
             $paramField->description = '';
             $paramField->name = 'banned';
             $pseudoFields[] = $paramField;
             $paramField = new FieldTable($field->getDbo());
             $paramField->title = 'Receive Moderator Emails';
             // For translation parser:  CBTxt::T( 'Receive Moderator Emails' );
             if ($canEmailEvents || $user->sendEmail) {
                 $paramField->_html = $lists['sendEmail'];
             } else {
                 $paramField->_html = CBTxt::T('No (User\'s group-level doesn\'t allow this)') . '<input type="hidden" name="sendEmail" value="0" />';
             }
             $paramField->description = '';
             $paramField->name = 'sendEmail';
             $pseudoFields[] = $paramField;
         }
         if ($user->id) {
             $paramField = new FieldTable($field->getDbo());
             $paramField->title = 'Register Date';
             // For translation parser:  CBTxt::T( 'Register Date' );
             $paramField->_html = cbFormatDate($user->registerDate);
             $paramField->description = '';
             $paramField->name = 'registerDate';
             $pseudoFields[] = $paramField;
             $paramField = new FieldTable($field->getDbo());
             $paramField->title = 'Last Visit Date';
             // For translation parser:  CBTxt::T( 'Last Visit Date' );
             $paramField->_html = cbFormatDate($user->lastvisitDate);
             $paramField->description = '';
             $paramField->name = 'lastvisitDate';
             $pseudoFields[] = $paramField;
             $paramField = new FieldTable($field->getDbo());
             $paramField->title = 'Last Reset Time';
             // For translation parser:  CBTxt::T( 'Last Reset Time' );
             $paramField->_html = cbFormatDate($user->lastResetTime);
             $paramField->description = '';
             $paramField->name = 'lastResetTime';
             $pseudoFields[] = $paramField;
             $paramField = new FieldTable($field->getDbo());
             $paramField->title = 'Password Reset Count';
             // For translation parser:  CBTxt::T( 'Password Reset Count' );
             $paramField->_html = (int) $user->resetCount;
             $paramField->description = '';
             $paramField->name = 'resetCount';
             $pseudoFields[] = $paramField;
         }
     }
     switch ($output) {
         case 'htmledit':
             foreach ($pseudoFields as $paramField) {
                 $paramField->required = $this->_isRequired($field, $user, $reason);
                 $paramField->profile = $field->profile;
                 $paramField->params = $field->params;
                 $results .= parent::getFieldRow($paramField, $user, $output, $formatting, $reason, $list_compare_types);
             }
             unset($pseudoFields);
             return $results;
             break;
         default:
             return null;
             break;
     }
 }
	/**
	 * prepare frontend video edit render
	 *
	 * @param int       $id
	 * @param UserTable $user
	 */
	private function showVideoEdit( $id, $user )
	{
		global $_CB_framework;

		$row							=	CBGroupJiveVideo::getVideo( (int) $id );
		$isModerator					=	CBGroupJive::isModerator( $user->get( 'id' ) );
		$groupId						=	$this->input( 'group', null, GetterInterface::INT );

		if ( $groupId === null ) {
			$group						=	$row->group();
		} else {
			$group						=	CBGroupJive::getGroup( $groupId );
		}

		$returnUrl						=	$_CB_framework->pluginClassUrl( $this->_gjPlugin->element, false, array( 'action' => 'groups', 'func' => 'show', 'id' => (int) $group->get( 'id' ) ) );

		if ( ! CBGroupJive::canAccessGroup( $group, $user ) ) {
			cbRedirect( $returnUrl, CBTxt::T( 'Group does not exist.' ), 'error' );
		} elseif ( ! $isModerator ) {
			if ( ( ! $row->get( 'id' ) ) && ( ! CBGroupJive::canCreateGroupContent( $user, $group, 'video' ) ) ) {
				cbRedirect( $returnUrl, CBTxt::T( 'You do not have sufficient permissions to publish a video in this group.' ), 'error' );
			} elseif ( $row->get( 'id' ) && ( $user->get( 'id' ) != $row->get( 'user_id' ) ) && ( CBGroupJive::getGroupStatus( $user, $group ) < 2 ) ) {
				cbRedirect( $returnUrl, CBTxt::T( 'You do not have sufficient permissions to edit this video.' ), 'error' );
			}
		}

		CBGroupJive::getTemplate( 'video_edit', true, true, $this->element );

		$input							=	array();

		$publishedTooltip				=	cbTooltip( null, CBTxt::T( 'Select publish state of this video. Unpublished videos will not be visible to the public.' ), null, null, null, null, null, 'data-hascbtooltip="true"' );

		$input['published']				=	moscomprofilerHTML::yesnoSelectList( 'published', 'class="form-control"' . $publishedTooltip, (int) $this->input( 'post/published', $row->get( 'published', 1 ), GetterInterface::INT ) );

		$titleTooltup					=	cbTooltip( null, CBTxt::T( 'Optionally input a video title to display instead of url.' ), null, null, null, null, null, 'data-hascbtooltip="true"' );

		$input['title']					=	'<input type="text" id="title" name="title" value="' . htmlspecialchars( $this->input( 'post/title', $row->get( 'title' ), GetterInterface::STRING ) ) . '" class="form-control" size="35"' . $titleTooltup . ' />';

		$urlTooltip						=	cbTooltip( null, CBTxt::T( 'Input the URL to the video to publish.' ), null, null, null, null, null, 'data-hascbtooltip="true"' );

		$input['url']					=	'<input type="text" id="url" name="url" value="' . htmlspecialchars( $this->input( 'post/url', $row->get( 'url' ), GetterInterface::STRING ) ) . '" class="form-control required" size="45"' . $urlTooltip . ' />';

		$input['url_limits']			=	CBTxt::T( 'GROUP_VIDEO_LIMITS_EXT', 'Your url must be of [ext] type.', array( '[ext]' => implode( ', ', array( 'youtube', 'mp4', 'ogv', 'ogg', 'webm', 'm4v' ) ) ) );

		$captionTooltip					=	cbTooltip( null, CBTxt::T( 'Optionally input a video caption.' ), null, null, null, null, null, 'data-hascbtooltip="true"' );

		$input['caption']				=	'<textarea id="caption" name="caption" class="form-control" cols="40" rows="5"' . $captionTooltip . '>' . htmlspecialchars( $this->input( 'post/caption', $row->get( 'caption' ), GetterInterface::STRING ) ) . '</textarea>';

		$ownerTooltip					=	cbTooltip( null, CBTxt::T( 'Input the video owner id. Video owner determines the creator of the video specified as User ID.' ), null, null, null, null, null, 'data-hascbtooltip="true"' );

		$input['user_id']				=	'<input type="text" id="user_id" name="user_id" value="' . (int) $this->input( 'post/user_id', $this->input( 'user', $row->get( 'user_id', $user->get( 'id' ) ), GetterInterface::INT ), GetterInterface::INT ) . '" class="digits required form-control" size="6"' . $ownerTooltip . ' />';

		HTML_groupjiveVideoEdit::showVideoEdit( $row, $input, $group, $user, $this );
	}
 function editField($fid = 0, $option = 'com_comprofiler', $task = 'editField')
 {
     global $_CB_database, $_CB_framework, $_PLUGINS;
     $this->_importNeeded();
     $canEditState = CBuser::getMyInstance()->authoriseAction('core.edit.state');
     $row = new moscomprofilerFields($_CB_database);
     $paramsEditorHtml = null;
     if ($fid == 0) {
         // default values for new types:
         $row->type = 'text';
         $row->tabid = 11;
         // contact info by default
         $row->profile = 1;
         $row->registration = 1;
         $row->displaytitle = 1;
         $row->published = 1;
         $row->required = 0;
         $row->readonly = 0;
         $paramsEditorHtml = array(array('title' => CBTxt::T('Parameters'), 'content' => "<strong>" . CBTxt::T('To see Parameters, first save new field') . "</strong>"));
     } else {
         // load the row from the db table
         $row->load((int) $fid);
         $fieldTab = new moscomprofilerTabs($_CB_database);
         // load the row from the db table
         $fieldTab->load((int) $row->tabid);
         // Check if user is a super user:
         if (!$_CB_framework->acl->amIaSuperAdmin()) {
             // Check if user belongs to useraccessgroupid:
             if (!in_array($fieldTab->useraccessgroupid, $_CB_framework->acl->get_groups_below_me(null, true))) {
                 echo "<script type=\"text/javascript\"> alert('" . addslashes(CBTxt::T('Unauthorized Access')) . "'); window.history.go(-1);</script>\n";
                 exit;
             }
             // Check if user belongs to viewaccesslevel:
             if (!in_array($fieldTab->viewaccesslevel, CBuser::getMyInstance()->getAuthorisedViewLevelsIds(false))) {
                 echo "<script type=\"text/javascript\"> alert('" . addslashes(CBTxt::T('Unauthorized Access')) . "'); window.history.go(-1);</script>\n";
                 exit;
             }
         }
     }
     $_PLUGINS->loadPluginGroup('user');
     if ($task == 'reloadField') {
         if (!$this->_prov_bind_CB_field($row, $fid)) {
             echo "<script type=\"text/javascript\"> alert('" . $row->getError() . "'); window.history.go(-1); </script>\n";
             exit;
         }
     }
     if ($fid == 0) {
         if ($row->tablecolumns != '' && !in_array($row->type, array('password', 'userparams'))) {
             $row->searchable = 1;
         } else {
             $row->searchable = 0;
         }
     }
     // params:
     $paramsEditorHtml = array();
     $options = array('option' => $option, 'task' => $task, 'cid' => $row->fieldid);
     // field-specific own parameters:
     $fieldHandler = new cbFieldHandler();
     $fieldOwnParamsEditHtml = $fieldHandler->drawParamsEditor($row, $options);
     if ($fieldOwnParamsEditHtml) {
         $paramsEditorHtml[] = array('title' => CBTxt::T('Field-specific Parameters'), 'content' => $fieldOwnParamsEditHtml);
     }
     // additional non-specific other parameters:
     $fieldsParamsPlugins = $_PLUGINS->getUserFieldParamsPluginIds();
     foreach ($fieldsParamsPlugins as $pluginId => $fieldParamHandlerClassName) {
         $fieldParamHandler = new $fieldParamHandlerClassName($pluginId, $row);
         // cbFieldParamsHandler();
         $addParamsHtml = $fieldParamHandler->drawParamsEditor($options);
         if ($addParamsHtml) {
             $addParamsTitle = $fieldParamHandler->getFieldsParamsLabel();
             $paramsEditorHtml[] = array('title' => $addParamsTitle, 'content' => $addParamsHtml);
         }
     }
     $where = array();
     $where[] = "`fields` = 1";
     if (!$_CB_framework->acl->amIaSuperAdmin()) {
         $where[] = "useraccessgroupid IN (" . implode(',', $_CB_framework->acl->get_groups_below_me(null, true)) . ")";
     }
     $_CB_database->setQuery("SELECT tabid, title FROM #__comprofiler_tabs WHERE " . implode(' AND ', $where) . " ORDER BY ordering");
     $tabs = $_CB_database->loadObjectList();
     $lists = array();
     $tablist = array();
     for ($i = 0, $n = count($tabs); $i < $n; $i++) {
         $tab =& $tabs[$i];
         $tablist[] = moscomprofilerHTML::makeOption($tab->tabid, getLangDefinition($tab->title));
     }
     $lists['tabs'] = moscomprofilerHTML::selectList($tablist, 'tabid', 'class="inputbox" size="1" mosReq=1 mosLabel="' . htmlspecialchars(CBTxt::T('Tab')) . '"' . ($canEditState ? '' : ' disabled="disabled"'), 'value', 'text', $row->tabid, 2);
     $types = array();
     if ($fid == 0) {
         $typeHandlers = array();
         $registeredTypes = $_PLUGINS->getUserFieldTypes();
         foreach ($registeredTypes as $typ) {
             $typeHandlers[$typ] = new cbFieldHandler();
             $tmpField = new moscomprofilerFields($_CB_database);
             $tmpField->type = $typ;
             $typLabel = $typeHandlers[$typ]->getFieldTypeLabel($tmpField);
             if ($typLabel) {
                 $types[] = moscomprofilerHTML::makeOption($typ, $typLabel);
             }
         }
     } else {
         $types[] = moscomprofilerHTML::makeOption($row->type, $fieldHandler->getFieldTypeLabel($row, false));
     }
     $webaddrtypes = array();
     $webaddrtypes[] = moscomprofilerHTML::makeOption('0', CBTxt::T('URL only'));
     $webaddrtypes[] = moscomprofilerHTML::makeOption('2', CBTxt::T('Hypertext and URL'));
     $profiles = array();
     $profiles[] = moscomprofilerHTML::makeOption('0', CBTxt::T('No'));
     $profiles[] = moscomprofilerHTML::makeOption('1', CBTxt::T('Yes: on 1 Line'));
     $profiles[] = moscomprofilerHTML::makeOption('2', CBTxt::T('Yes: on 2 Lines'));
     $fvalues = $_CB_database->setQuery("SELECT fieldtitle " . "\n FROM #__comprofiler_field_values" . "\n WHERE fieldid=" . (int) $fid . "\n ORDER BY ordering");
     $fvalues = $_CB_database->loadObjectList();
     $lists['webaddresstypes'] = moscomprofilerHTML::selectList($webaddrtypes, 'webaddresstypes', 'class="inputbox" size="1"', 'value', 'text', $row->rows, 2);
     $lists['type'] = moscomprofilerHTML::selectList($types, 'type', 'class="inputbox" size="1"', 'value', 'text', $row->type, 2);
     $lists['required'] = moscomprofilerHTML::yesnoSelectList('required', 'class="inputbox" size="1"' . ($canEditState ? '' : ' disabled="disabled"'), $row->required === null ? 0 : $row->required);
     $lists['published'] = moscomprofilerHTML::yesnoSelectList('published', 'class="inputbox" size="1"' . ($canEditState ? '' : ' disabled="disabled"'), $row->published);
     $lists['readonly'] = moscomprofilerHTML::yesnoSelectList('readonly', 'class="inputbox" size="1"' . ($canEditState ? '' : ' disabled="disabled"'), $row->readonly === null ? 0 : $row->readonly);
     $lists['profile'] = moscomprofilerHTML::selectList($profiles, 'profile', 'class="inputbox" size="1"' . ($canEditState ? '' : ' disabled="disabled"'), 'value', 'text', $row->profile, 2);
     $lists['displaytitle'] = moscomprofilerHTML::yesnoSelectList('displaytitle', 'class="inputbox" size="1"', $row->displaytitle);
     if ($row->tablecolumns != '' && !in_array($row->type, array('password', 'userparams'))) {
         $lists['searchable'] = moscomprofilerHTML::yesnoSelectList('searchable', 'class="inputbox" size="1"' . ($canEditState ? '' : ' disabled="disabled"'), $row->searchable);
     } else {
         $lists['searchable'] = _UE_NO . '<input type="hidden" name="searchable" value="0" />';
     }
     $lists['registration'] = moscomprofilerHTML::yesnoSelectList('registration', 'class="inputbox" size="1"' . ($canEditState ? '' : ' disabled="disabled"'), $row->registration);
     $pluginView = _CBloadView('field');
     $pluginView->editfield($row, $lists, $fvalues, $option, $paramsEditorHtml);
 }
	/**
	 * prepare frontend file edit render
	 *
	 * @param int       $id
	 * @param UserTable $user
	 */
	private function showFileEdit( $id, $user )
	{
		global $_CB_framework;

		$row							=	CBGroupJiveFile::getFile( (int) $id );
		$isModerator					=	CBGroupJive::isModerator( $user->get( 'id' ) );
		$groupId						=	$this->input( 'group', null, GetterInterface::INT );

		if ( $groupId === null ) {
			$group						=	$row->group();
		} else {
			$group						=	CBGroupJive::getGroup( $groupId );
		}

		$returnUrl						=	$_CB_framework->pluginClassUrl( $this->_gjPlugin->element, false, array( 'action' => 'groups', 'func' => 'show', 'id' => (int) $group->get( 'id' ) ) );

		if ( ! CBGroupJive::canAccessGroup( $group, $user ) ) {
			cbRedirect( $returnUrl, CBTxt::T( 'Group does not exist.' ), 'error' );
		} elseif ( ! $isModerator ) {
			if ( ( ! $row->get( 'id' ) ) && ( ! CBGroupJive::canCreateGroupContent( $user, $group, 'file' ) ) ) {
				cbRedirect( $returnUrl, CBTxt::T( 'You do not have sufficient permissions to upload a file in this group.' ), 'error' );
			} elseif ( $row->get( 'id' ) && ( $user->get( 'id' ) != $row->get( 'user_id' ) ) && ( CBGroupJive::getGroupStatus( $user, $group ) < 2 ) ) {
				cbRedirect( $returnUrl, CBTxt::T( 'You do not have sufficient permissions to edit this file.' ), 'error' );
			}
		}

		CBGroupJive::getTemplate( 'file_edit', true, true, $this->element );

		$minFileSize					=	$this->params->get( 'groups_file_min_size', 0 );
		$maxFileSize					=	$this->params->get( 'groups_file_max_size', 1024 );
		$extensions						=	explode( ',', $this->params->get( 'groups_file_extensions', 'zip,rar,doc,pdf,txt,xls' ) );

		$fileValidation					=	array();

		if ( $minFileSize || $maxFileSize ) {
			$fileValidation[]			=	cbValidator::getRuleHtmlAttributes( 'filesize', array( $minFileSize, $maxFileSize, 'KB' ) );
		}

		if ( $extensions ) {
			$fileValidation[]			=	cbValidator::getRuleHtmlAttributes( 'extension', implode( ',', $extensions ) );
		}

		$input							=	array();

		$publishedTooltip				=	cbTooltip( null, CBTxt::T( 'Select publish state of this file. Unpublished files will not be visible to the public.' ), null, null, null, null, null, 'data-hascbtooltip="true"' );

		$input['published']				=	moscomprofilerHTML::yesnoSelectList( 'published', 'class="form-control"' . $publishedTooltip, (int) $this->input( 'post/published', $row->get( 'published', 1 ), GetterInterface::INT ) );

		$titleTooltup					=	cbTooltip( null, CBTxt::T( 'Optionally input a file title to display instead of filename.' ), null, null, null, null, null, 'data-hascbtooltip="true"' );

		$input['title']					=	'<input type="text" id="title" name="title" value="' . htmlspecialchars( $this->input( 'post/title', $row->get( 'title' ), GetterInterface::STRING ) ) . '" class="form-control" size="35"' . $titleTooltup . ' />';

		$fileTooltip					=	cbTooltip( null, CBTxt::T( 'Select the file to upload.' ), null, null, null, null, null, 'data-hascbtooltip="true"' );

		$input['file']					=	'<input type="file" id="file" name="file" value="" class="form-control' . ( ! $row->get( 'id' ) ? ' required' : null ) . '"' . ( $fileTooltip ? ' ' . $fileTooltip : null ) . ( $fileValidation ? implode( ' ', $fileValidation ) : null ) . ' />';

		$input['file_limits']			=	array();

		if ( $extensions ) {
			$input['file_limits'][]		=	CBTxt::T( 'GROUP_FILE_LIMITS_EXT', 'Your file must be of [ext] type.', array( '[ext]' => implode( ', ', $extensions ) ) );
		}

		if ( $minFileSize ) {
			$input['file_limits'][]		=	CBTxt::T( 'GROUP_FILE_LIMITS_MIN', 'Your file should exceed [size].', array( '[size]' => CBGroupJive::getFormattedFileSize( $minFileSize * 1024 ) ) );
		}

		if ( $maxFileSize ) {
			$input['file_limits'][]		=	CBTxt::T( 'GROUP_FILE_LIMITS_MAX', 'Your file should not exceed [size].', array( '[size]' => CBGroupJive::getFormattedFileSize( $maxFileSize * 1024 ) ) );
		}

		$descriptionTooltip				=	cbTooltip( null, CBTxt::T( 'Optionally input a file description.' ), null, null, null, null, null, 'data-hascbtooltip="true"' );

		$input['description']			=	'<textarea id="description" name="description" class="form-control" cols="40" rows="5"' . ( $descriptionTooltip ? ' ' . $descriptionTooltip : null ) . '>' . htmlspecialchars( $this->input( 'post/description', $row->get( 'description' ), GetterInterface::STRING ) ) . '</textarea>';

		$ownerTooltip					=	cbTooltip( null, CBTxt::T( 'Input the file owner id. File owner determines the creator of the file specified as User ID.' ), null, null, null, null, null, 'data-hascbtooltip="true"' );

		$input['user_id']				=	'<input type="text" id="user_id" name="user_id" value="' . (int) $this->input( 'post/user_id', $this->input( 'user', $row->get( 'user_id', $user->get( 'id' ) ), GetterInterface::INT ), GetterInterface::INT ) . '" class="digits required form-control" size="6"' . $ownerTooltip . ' />';

		HTML_groupjiveFileEdit::showFileEdit( $row, $input, $group, $user, $this );
	}
	/**
	 * render frontend events group notifications edit params
	 *
	 * @param string            $return
	 * @param NotificationTable $row
	 * @param array             $input
	 * @param GroupTable        $group
	 * @param UserTable         $user
	 * @return string
	 */
	public function editNotifications( &$return, &$row, &$input, $group, $user )
	{
		CBGroupJive::getTemplate( 'notifications', true, true, $this->element );

		$listToggle					=	array();
		$listToggle[]				=	moscomprofilerHTML::makeOption( '0', CBTxt::T( "Don't Notify" ) );
		$listToggle[]				=	moscomprofilerHTML::makeOption( '1', CBTxt::T( 'Notify' ) );

		$input['event_new']			=	moscomprofilerHTML::yesnoSelectList( 'params[event_new]', 'class="form-control"', (int) $this->input( 'post/params.event_new', $row->params()->get( 'event_new', $this->params->get( 'notifications_default_event_new', 0 ) ), GetterInterface::INT ), CBTxt::T( 'Notify' ), CBTxt::T( "Don't Notify" ), false );
		$input['event_edit']		=	moscomprofilerHTML::yesnoSelectList( 'params[event_edit]', 'class="form-control"', (int) $this->input( 'post/params.event_edit', $row->params()->get( 'event_edit', $this->params->get( 'notifications_default_event_edit', 0 ) ), GetterInterface::INT ), CBTxt::T( 'Notify' ), CBTxt::T( "Don't Notify" ), false );
		$input['event_approve']		=	moscomprofilerHTML::yesnoSelectList( 'params[event_approve]', 'class="form-control"', (int) $this->input( 'post/params.event_approve', $row->params()->get( 'event_approve', $this->params->get( 'notifications_default_event_approve', 0 ) ), GetterInterface::INT ), CBTxt::T( 'Notify' ), CBTxt::T( "Don't Notify" ), false );
		$input['event_attend']		=	moscomprofilerHTML::yesnoSelectList( 'params[event_attend]', 'class="form-control"', (int) $this->input( 'post/params.event_attend', $row->params()->get( 'event_attend', $this->params->get( 'notifications_default_event_attend', 0 ) ), GetterInterface::INT ), CBTxt::T( 'Notify' ), CBTxt::T( "Don't Notify" ), false );
		$input['event_unattend']	=	moscomprofilerHTML::yesnoSelectList( 'params[event_unattend]', 'class="form-control"', (int) $this->input( 'post/params.event_unattend', $row->params()->get( 'event_unattend', $this->params->get( 'notifications_default_event_unattend', 0 ) ), GetterInterface::INT ), CBTxt::T( 'Notify' ), CBTxt::T( "Don't Notify" ), false );

		return HTML_groupjiveEventNotifications::showEventNotifications( $row, $input, $group, $user, $this );
	}
function editList( $fid='0', $option='com_comprofiler', $task = 'editList') {
	global $_CB_database, $_CB_framework, $ueConfig;

	$row					=	new moscomprofilerLists( $_CB_database );

	if ( $fid ) {
		// load the row from the db table
		$row->load( (int) $fid );
	} else {
		$row->col1enabled	=	'1';
	}

	$lists['published']		=	moscomprofilerHTML::yesnoSelectList( 'published', 'class="inputbox" size="1"', $row->published );
	$lists['default']		=	moscomprofilerHTML::yesnoSelectList( 'default', 'class="inputbox" size="1"', $row->default );
/*
	if ( checkJversion() <= 0 ) {
		$my_groups 	= $_CB_framework->acl->get_object_groups( 'users', $_CB_framework->myId(), 'ARO' );
	} else {
		$aro_id		= $_CB_framework->acl->get_object_id( 'users', $_CB_framework->myId(), 'ARO' );
		$my_groups 	= $_CB_framework->acl->get_object_groups( $aro_id, 'ARO' );
	}
*/
	$gtree2					=	array();
	$gtree2					=	array_merge( $gtree2, $_CB_framework->acl->get_group_children_tree( null, 'USERS', false ));

	$usergids				=	explode( ', ', $row->usergroupids );
	$ugids					=	array();
	foreach($usergids as $usergid) {
		$ugids[]			=	$usergid;
	}

	$lists['usergroups']	=	moscomprofilerHTML::selectList( $gtree2, 'usergroups', 'size="4" MULTIPLE onblur="loadUGIDs(this);" mosReq=1 mosLabel="' . htmlspecialchars( CBTxt::T('User Groups') ) . '"', 'value', 'text', $ugids, 1, false );

	$gtree3					=	array();
    $gtree3[]				=	moscomprofilerHTML::makeOption( -2 , '- ' . CBtxt::T('Everybody') . ' -' );
    $gtree3[]				=	moscomprofilerHTML::makeOption( -1 , '- ' . CBtxt::T('All Registered Users') . ' -' );
	$gtree3					=	array_merge( $gtree3, $_CB_framework->acl->get_group_children_tree( null, 'USERS', false ));

	$lists['useraccessgroup']	=	moscomprofilerHTML::selectList( $gtree3, 'useraccessgroupid', 'size="4"', 'value', 'text', $row->useraccessgroupid, 2, false, false );



	$_CB_database->setQuery( "SELECT f.fieldid, f.title"
		. "\n FROM #__comprofiler_fields AS f"
		. "\n INNER JOIN #__comprofiler_plugin AS p ON (f.pluginid = p.id)"
		. "\n WHERE ( ( f.published = 1"
		. "\n           AND f.profile > 0 ) OR ( f.name = 'username' ) " . ( in_array( $ueConfig['name_format'], array( 1, 2, 4 ) ) ? "OR ( f.name = 'name' ) " : '' ) . ")"
		. "\n  AND p.published = 1"
		. "\n ORDER BY f.ordering"
	);
	$field								=	$_CB_database->loadObjectList();
	$fields								=	array();
	for ( $i = 0, $n = count( $field ) ; $i < $n ; $i++ ) {
		$fieldvalue						=&	$field[$i];
		$fields[$fieldvalue->title]		=	$fieldvalue->fieldid;
	}
	//print_r(array_values($fields));

	// params:
	$paramsEditorHtml			=	array();
	$options					=	array( 'option' => $option, 'task' => $task, 'cid' => $row->listid );

	// list-specific own parameters:
	cbimport( 'cb.xml.simplexml' );
	$listXml					=	new CBSimpleXMLElement( file_get_contents( $_CB_framework->getCfg( 'absolute_path' ) . '/administrator/components/com_comprofiler/xmlcb/cb.lists.xml' ) );
	$null						=	null;
	$params						=	new cbParamsEditorController( $row->params, $listXml, $listXml, $null, null, 'cbxml', 'version', '1' );
	$params->setOptions( $options );
	$listParamsEditHtml			=	$params->draw( null, 'views', 'view', 'name', 'editlist' );
	$paramsEditorHtml[]			=	array( 'title' => CBTxt::T('List parameters'), 'content' => $listParamsEditHtml );
/*

	// params:
	$paramsEditorHtml			=	array();
	$options					=	array( 'option' => $option, 'task' => $task, 'cid' => $row->fieldid );

	// field-specific own parameters:
	$fieldHandler				=	new cbFieldHandler();
	$fieldOwnParamsEditHtml		=	$fieldHandler->drawParamsEditor( $row, $options );
	if ( $fieldOwnParamsEditHtml ) {
		$paramsEditorHtml[]		=	array( 'title' => CBTxt::T('Field-specific Parameters'), 'content' => $fieldOwnParamsEditHtml );
	}

	// additional non-specific other parameters:
	$fieldsParamsPlugins		=	$_PLUGINS->getUserFieldParamsPluginIds();
	foreach ($fieldsParamsPlugins as $pluginId => $fieldParamHandlerClassName ) {
		$fieldParamHandler		=	new $fieldParamHandlerClassName( $pluginId, $row );			// cbFieldParamsHandler();
		$addParamsHtml			=	$fieldParamHandler->drawParamsEditor( $options );
		if ( $addParamsHtml ) {
			$addParamsTitle		=	$fieldParamHandler->getFieldsParamsLabel();
			$paramsEditorHtml[]	=	array( 'title' => $addParamsTitle, 'content' => $addParamsHtml );
		}
	}
*/
	HTML_comprofiler::editList( $row, $lists,$fields, $option, $fid, $paramsEditorHtml );
}
	/**
	 * Displays folder create/edit page
	 *
	 * @param int         $id
	 * @param string      $type
	 * @param TabTable    $tab
	 * @param UserTable   $user
	 * @param UserTable   $viewer
	 * @param null|string $message
	 * @param null|string $messageType
	 */
	public function showFolderEdit( $id, $type, $tab, $user, $viewer, $message = null, $messageType = 'error' )
	{
		global $_CB_framework;

		$row						=	new cbgalleryFolderTable();

		$row->load( (int) $id );

		$cbModerator				=	Application::User( (int) $viewer->get( 'id' ) )->isGlobalModerator();
		$canAccess					=	false;

		if ( ! $row->get( 'id' ) ) {
			if ( ( $user->get( 'id' ) != $viewer->get( 'id' ) ) && ( ! $cbModerator ) ) {
				$user				=	$viewer;
			}

			$canAccess				=	cbgalleryClass::canUserCreate( $viewer, $type, true );
		} elseif ( ( $row->get( 'type' ) == $type ) && ( $cbModerator || ( $viewer->get( 'id' ) == $row->get( 'user_id' ) ) ) ) {
			$canAccess				=	true;
		}

		if ( $this->input( 'folder', false, GetterInterface::BOOLEAN ) ) {
			$returnUrl				=	$_CB_framework->pluginClassUrl( $this->element, false, array( 'action' => 'folders', 'func' => 'show', 'type' => $type, 'id' => (int) $row->get( 'id' ), 'user' => (int) $user->get( 'id' ), 'tab' => (int) $tab->get( 'tabid' ) ) );
		} else {
			$returnUrl				=	$_CB_framework->userProfileUrl( (int) $row->get( 'user_id', $user->get( 'id' ) ), false, $tab->get( 'tabid' ) );
		}

		if ( ! $canAccess ) {
			cbRedirect( $returnUrl, CBTxt::T( 'Not authorized.' ), 'error' );
		}

		switch( $type ) {
			case 'photos':
			case 'videos':
			case 'music':
				$typeTranslated		=	CBTxt::T( 'Album' );
				break;
			default:
				$typeTranslated		=	CBTxt::T( 'Folder' );
				break;
		}

		cbgalleryClass::getTemplate( 'folder_edit' );

		$input						=	array();

		$publishedTooltip			=	cbTooltip( null, CBTxt::T( 'FOLDER_PUBLISHED_DESCRIPTION', 'Select publish status of the [type]. If unpublished the [type] will not be visible to the public.', array( '[type]' => $typeTranslated ) ), null, null, null, null, null, 'data-hascbtooltip="true"' );

		$input['published']			=	moscomprofilerHTML::yesnoSelectList( 'published', 'class="form-control"' . ( $publishedTooltip ? ' ' . $publishedTooltip : null ), (int) $this->input( 'post/published', $row->get( 'published', 1 ), GetterInterface::INT ) );

		$titleTooltip				=	cbTooltip( null, CBTxt::T( 'FOLDER_TITLE_DESCRIPTION', 'Optionally input a title. If no title is provided the date will be displayed as the title.', array( '[type]' => $typeTranslated ) ), null, null, null, null, null, 'data-hascbtooltip="true"' );

		$input['title']				=	'<input type="title" id="title" name="title" value="' . htmlspecialchars( $this->input( 'post/title', $row->get( 'title' ), GetterInterface::STRING ) ) . '" class="form-control" size="25"' . ( $titleTooltip ? ' ' . $titleTooltip : null ) . ' />';

		$descriptionTooltip			=	cbTooltip( null, CBTxt::T( 'FOLDER_DESCRIPTION_DESCRIPTION', 'Optionally input a description.', array( '[type]' => $typeTranslated ) ), null, null, null, null, null, 'data-hascbtooltip="true"' );

		$input['description']		=	'<textarea id="description" name="description" class="form-control" cols="40" rows="5"' . ( $descriptionTooltip ? ' ' . $descriptionTooltip : null ) . '>' . htmlspecialchars( $this->input( 'post/description', $row->get( 'description' ), GetterInterface::STRING ) ) . '</textarea>';

		$ownerTooltip				=	cbTooltip( null, CBTxt::T( 'FOLDER_OWNER_DESCRIPTION', 'Input owner as single integer user_id.', array( '[type]' => $typeTranslated ) ), null, null, null, null, null, 'data-hascbtooltip="true"' );

		$input['user_id']			=	'<input type="text" id="user_id" name="user_id" value="' . (int) $this->input( 'post/user_id', $row->get( 'user_id', $user->get( 'id' ) ), GetterInterface::INT ) . '" class="digits required form-control" size="6"' . ( $ownerTooltip ? ' ' . $ownerTooltip : null ) . ' />';

		if ( $message ) {
			$_CB_framework->enqueueMessage( $message, $messageType );
		}

		HTML_cbgalleryFolderEdit::showFolderEdit( $row, $input, $type, $tab, $user, $viewer, $this );
	}
Example #11
0
	/**
	 * Returns a USERPARAMS field in specified format
	 *
	 * @param  moscomprofilerFields  $field
	 * @param  moscomprofilerUser    $user
	 * @param  string                $output      'html', 'xml', 'json', 'php', 'csvheader', 'csv', 'rss', 'fieldslist', 'htmledit'
	 * @param  string                $formatting  'table', 'td', 'span', 'div', 'none'
	 * @param  string                $reason      'profile' for user profile view, 'edit' for profile edit, 'register' for registration, 'list' for user-lists
	 * @param  int                   $list_compare_types   IF reason == 'search' : 0 : simple 'is' search, 1 : advanced search with modes, 2 : simple 'any' search
	 * @return mixed                
	 */
	function getFieldRow( &$field, &$user, $output, $formatting, $reason, $list_compare_types ) {
		global $_CB_framework, $_CB_database, $ueConfig;

		$results							=	null;

		if ( class_exists( 'JFactory' ) ) {						// Joomla 1.5 :
				$lang						=&	JFactory::getLanguage();
				$lang->load( 'com_users' );
		}

		$pseudoFields						=	array();

		//Implementing Joomla's new user parameters such as editor
		$ui									=	$_CB_framework->getUi();

		$userParams							=	$this->_getUserParams( $ui, $user );		

		if ( is_array( $userParams ) && ( count( $userParams ) > 0 )
			&& ( ( $ui == 2 ) || ( ( isset( $ueConfig['frontend_userparams'] ) ) ? ( $ueConfig['frontend_userparams'] == 1 ) : in_array( $_CB_framework->getCfg( "frontend_userparams" ), array( '1', null) ) ) ) )
		{
			//Loop through each parameter and prepare rendering appropriately.
			foreach ( $userParams AS $k => $userParam ) {
				$paramField					=	new moscomprofilerFields( $_CB_database );
				$paramField->title			=	$userParam[0];
				$paramField->_html			=	$userParam[1];
				$paramField->description	=	( isset( $userParam[2] ) && class_exists("JText") ? JText::_( $userParam[2] ) : null );
				$paramField->name			=	( isset( $userParam[3] ) && class_exists("JText") ? JText::_( $userParam[3] ) : null );		// very probably wrong!
				$paramField->fieldid		=	'userparam_' . $k;
				$paramField->displaytitle	=	substr( $userParam[0], 0, 6 ) == '<label' ? -1 : 1;		// don't redisplay <label for> markup
				$paramField->type			=	'param';		// this is for cb_ftparam class to be correct.
				$pseudoFields[]				=	$paramField;
			}
		}

		if( $_CB_framework->getUi() == 2 ) {
			$myGid							=	userGID( $_CB_framework->myId() );
			$cms_mod						=	$_CB_framework->acl->mapGroupNamesToValues( 'Administrator' );
			$cms_admin						=	$_CB_framework->acl->mapGroupNamesToValues( 'Superadministrator' );
			if ( checkJversion() == 2 ) {
				$cms_admin_title			=	'Super Users';
			} else {
				$cms_admin_title			=	'Super Administrator';
			}
			$canBlockUser					=	$_CB_framework->check_acl( 'canBlockUsers', $_CB_framework->myUserType() );
			$canEmailEvents					=	   ( ( $user->id == 0 ) && ( in_array( $myGid, array( $cms_mod, $cms_admin ) ) ) )
												|| $_CB_framework->check_acl( 'canReceiveAdminEmails', $_CB_framework->acl->get_group_name( $user->gid, 'ARO' ) )
												|| in_array( $user->gid, getParentGIDS( $ueConfig['imageApproverGid'] ) );	// allow also CB isModerator
			$lists							=	array();
			$user_group						=	strtolower( $_CB_framework->acl->get_group_name( $user->gid, 'ARO' ) );
			if (( $user_group == strtolower( $cms_admin_title ) && $myGid != $cms_admin) || ( $user->id == $_CB_framework->myId() && $myGid == $cms_admin)) {
				$lists['gid']				=	"<input type=\"hidden\" name=\"gid\" value=\"$user->gid\" /><strong>$cms_admin_title</strong>";
			} else if ( $myGid == $cms_mod && $user->gid == $cms_mod ) {
				$lists['gid']				=	"<input type=\"hidden\" name=\"gid\" value=\"$user->gid\" /><strong>Administrator</strong>";
			} else {
				// ensure user can't add group higher than themselves
				if ( checkJversion() <= 0 ) {
					$my_groups 				=	$_CB_framework->acl->get_object_groups( 'users', $_CB_framework->myId(), 'ARO' );
				} else {
					$aro_id					=	$_CB_framework->acl->get_object_id( 'users', $_CB_framework->myId(), 'ARO' );
					$my_groups 				=	$_CB_framework->acl->get_object_groups( $aro_id, 'ARO' );
				}

				if ( is_array( $my_groups ) && ( count( $my_groups ) > 0 ) ) {
					$ex_groups				=	$_CB_framework->acl->get_group_children( $my_groups[0], 'ARO', 'RECURSE' );
					if ( $ex_groups === null ) {
						$ex_groups			=	array();		// mambo fix
					}
				} else {
					$ex_groups				=	array();
				}
	
				$gtree						=	$_CB_framework->acl->get_group_children_tree( null, 'USERS', false );
	
				// remove users 'above' me
				$i							=	0;
				while ( $i < count( $gtree ) ) {
					if ( in_array( $gtree[$i]->value, $ex_groups ) ) {
						array_splice( $gtree, $i, 1 );
					} else {
						$i++;
					}
				}

				if ( checkJversion() == 2 ) {
					$lists['gid']			=	moscomprofilerHTML::selectList( $gtree, 'gid[]', 'class="inputbox" size="11" multiple="multiple"', 'value', 'text', $user->gids, 2, false );
				} else {
					$lists['gid']			=	moscomprofilerHTML::selectList( $gtree, 'gid', 'class="inputbox" size="11"', 'value', 'text', $user->gid, 2, false );
				}
			}
	
			// build the html select list
			$lists['block']					=	moscomprofilerHTML::yesnoSelectList( 'block', 'class="inputbox" size="1"', $user->block );

			$list_approved					=	array();
			$list_approved[]				=	moscomprofilerHTML::makeOption( '0', CBTxt::T( 'Unapproved' ) );
			$list_approved[]				=	moscomprofilerHTML::makeOption( '1', CBTxt::T( 'Approved' ) );
			$list_approved[]				=	moscomprofilerHTML::makeOption( '2', CBTxt::T( 'Disapproved' ) );
			$lists['approved']				=	moscomprofilerHTML::selectList( $list_approved, 'approved', 'class="inputbox" size="1"', 'value', 'text', $user->approved, 2, false );

			$lists['confirmed']				=	moscomprofilerHTML::yesnoSelectList( 'confirmed', 'class="inputbox" size="1"', $user->confirmed );
			// build the html select list
			$lists['sendEmail']				=	moscomprofilerHTML::yesnoSelectList( 'sendEmail', 'class="inputbox" size="1"', $user->sendEmail );

			$paramField						=	new moscomprofilerFields( $_CB_database );
			$paramField->title				=	CBTxt::T( 'Group' );
			$paramField->_html				=	$lists['gid'];
			$paramField->description		=	'';
			$paramField->name				=	'gid';
			$pseudoFields[]					=	$paramField;

			if ( $canBlockUser ) {

				$paramField					=	new moscomprofilerFields( $_CB_database );
				$paramField->title			=	CBTxt::T( 'Block User' );
				$paramField->_html			=	$lists['block'];
				$paramField->description	=	'';
				$paramField->name			=	'block';
				$pseudoFields[]				=	$paramField;

				$paramField					=	new moscomprofilerFields( $_CB_database );
				$paramField->title			=	CBTxt::T( 'Approve User' );
				$paramField->_html			=	$lists['approved'];
				$paramField->description	=	'';
				$paramField->name			=	'approved';
				$pseudoFields[]				=	$paramField;

				$paramField					=	new moscomprofilerFields( $_CB_database );
				$paramField->title			=	CBTxt::T( 'Confirm User' );
				$paramField->_html			=	$lists['confirmed'];
				$paramField->description	=	'';
				$paramField->name			=	'confirmed';
				$pseudoFields[]				=	$paramField;

			}

			$paramField						=	new moscomprofilerFields( $_CB_database );
			$paramField->title				=	CBTxt::T( 'Receive Moderator Emails' );
			if ($canEmailEvents || $user->sendEmail) {
				$paramField->_html			=	$lists['sendEmail'];
			} else {
				$paramField->_html			=	CBTxt::T('No (User\'s group-level doesn\'t allow this)')
											.	'<input type="hidden" name="sendEmail" value="0" />';
			}
			$paramField->description		=	'';
			$paramField->name				=	'sendEmail';
			$pseudoFields[]					=	$paramField;

			if( $user->id) {
				$paramField					=	new moscomprofilerFields( $_CB_database );
				$paramField->title			=	CBTxt::T( 'Register Date' );
				$paramField->_html			=	cbFormatDate( $user->registerDate );
				$paramField->description	=	'';
				$paramField->name			=	'registerDate';
				$pseudoFields[]				=	$paramField;

				$paramField					=	new moscomprofilerFields( $_CB_database );
				$paramField->title			=	CBTxt::T( 'Last Visit Date' );
				$paramField->_html			=	cbFormatDate( $user->lastvisitDate );
				$paramField->description	=	'';
				$paramField->name			=	'lastvisitDate';
				$pseudoFields[]				=	$paramField;
			}
		}

		switch ( $output ) {
			case 'htmledit':
				foreach ( $pseudoFields as $paramField ) {
					$paramField->required	=	$this->_isRequired( $field, $user, $reason );
					$paramField->profile	=	$field->profile;
					$results				.=	parent::getFieldRow( $paramField, $user, $output, $formatting, $reason, $list_compare_types );
				}
				unset( $pseudoFields );
				return $results;
				break;

			default:
				return null;
				break;
		}
	}
 function editTab($tid = '0', $option = 'com_comprofiler', $task = 'editTab')
 {
     global $_CB_database, $_CB_framework, $_PLUGINS;
     $this->_importNeeded();
     $canEditState = CBuser::getMyInstance()->authoriseAction('core.edit.state');
     $row = new moscomprofilerTabs($_CB_database);
     if ($tid) {
         // load the row from the db table
         $row->load((int) $tid);
         // Check if user is a super user:
         if (!$_CB_framework->acl->amIaSuperAdmin()) {
             // Check if user belongs to useraccessgroupid:
             if (!in_array($row->useraccessgroupid, $_CB_framework->acl->get_groups_below_me(null, true))) {
                 echo "<script type=\"text/javascript\"> alert('" . addslashes(CBTxt::T('Unauthorized Access')) . "'); window.history.go(-1);</script>\n";
                 exit;
             }
             // Check if user belongs to viewaccesslevel:
             if (!in_array($row->viewaccesslevel, CBuser::getMyInstance()->getAuthorisedViewLevelsIds(false))) {
                 echo "<script type=\"text/javascript\"> alert('" . addslashes(CBTxt::T('Unauthorized Access')) . "'); window.history.go(-1);</script>\n";
                 exit;
             }
         }
     }
     $lists = array();
     if ($row->sys == '2') {
         $lists['enabled'] = "Yes";
     } else {
         $lists['enabled'] = moscomprofilerHTML::yesnoSelectList('enabled', 'class="inputbox" size="1"' . ($canEditState ? '' : ' disabled="disabled"'), $row->enabled !== null ? $row->enabled : 1);
     }
     /*
     -------------------------
     !          head         !
     !-----------------------!
     !      !        !       !
     ! left ! middle ! right !
     !      !        !       !
     !-----------------------!
     !                       !
     !        tabmain        !
     !                       !
     !-----------------------!
     !        underall       !
     -------------------------
     !      !        !       !
     ! L1C1 ! L1C2   ! L1C3  !   L1C1...C9
     !      !        !       !
     !-----------------------!
     !      !        !       !
     ! L2C1 ! L2C4   ! L2C8  !   ...
     !      !        !       !
     !-----------------------!
     !                       !
     !        L4C7           !
     !                       !
     !-----------------------!
     !          !            !
     !   L8C3   !    L8C4    !   ...L9C9
     !          !            !
     !-----------------------!
     	    ! + not_on_profile_1..9
     */
     $position = array();
     $position[] = moscomprofilerHTML::makeOption('cb_head', _UE_POS_CB_HEAD);
     $position[] = moscomprofilerHTML::makeOption('cb_left', _UE_POS_CB_LEFT);
     $position[] = moscomprofilerHTML::makeOption('cb_middle', _UE_POS_CB_MIDDLE);
     $position[] = moscomprofilerHTML::makeOption('cb_right', _UE_POS_CB_RIGHT);
     $position[] = moscomprofilerHTML::makeOption('cb_tabmain', _UE_POS_CB_MAIN);
     $position[] = moscomprofilerHTML::makeOption('cb_underall', _UE_POS_CB_BOTTOM);
     for ($i = 1; $i <= 9; $i++) {
         for ($j = 1; $j <= 9; $j++) {
             $position[] = moscomprofilerHTML::makeOption('L' . $i . 'C' . $j, CBTxt::T('Line') . ' ' . $i . ' ' . CBTxt::T('Column') . ' ' . $j);
         }
     }
     for ($i = 1; $i <= 9; $i++) {
         $position[] = moscomprofilerHTML::makeOption('not_on_profile_' . $i, CBTxt::T('Not displayed on profile') . ' ' . $i);
     }
     if (!$row->position) {
         $row->position = 'cb_tabmain';
     }
     $lists['position'] = moscomprofilerHTML::selectList($position, 'position', 'class="inputbox" size="1"', 'value', 'text', $row->position, 2);
     $displaytype = array();
     $displaytype[] = moscomprofilerHTML::makeOption('tab', _UE_DISPLAY_TAB);
     $displaytype[] = moscomprofilerHTML::makeOption('div', _UE_DISPLAY_DIV);
     $displaytype[] = moscomprofilerHTML::makeOption('rounddiv', _UE_DISPLAY_ROUNDED_DIV);
     $displaytype[] = moscomprofilerHTML::makeOption('html', _UE_DISPLAY_HTML);
     $displaytype[] = moscomprofilerHTML::makeOption('overlib', _UE_DISPLAY_OVERLIB);
     $displaytype[] = moscomprofilerHTML::makeOption('overlibfix', _UE_DISPLAY_OVERLIBFIX);
     $displaytype[] = moscomprofilerHTML::makeOption('overlibsticky', _UE_DISPLAY_OVERLIBSTICKY);
     if (!$row->displaytype) {
         $row->displaytype = 'tab';
     }
     $lists['displaytype'] = moscomprofilerHTML::selectList($displaytype, 'displaytype', 'class="inputbox" size="1"', 'value', 'text', $row->displaytype, 2);
     if ($tid) {
         if ($row->ordering > -10000 && $row->ordering < 10000) {
             // build the html select list for ordering
             $query = "SELECT ordering AS value, title AS text" . "\n FROM #__comprofiler_tabs" . "\n WHERE position='" . $_CB_database->getEscaped($row->position) . "'" . "\n AND enabled > 0" . "\n AND ordering > -10000" . "\n AND ordering < 10000" . "\n ORDER BY ordering";
             $order = $this->_cbGetOrderingList($query);
             $lists['ordering'] = moscomprofilerHTML::selectList($order, 'ordering', 'class="inputbox" size="1"' . ($canEditState ? '' : ' disabled="disabled"'), 'value', 'text', intval($row->ordering), 2);
         } else {
             $lists['ordering'] = '<input type="hidden" name="ordering" value="' . $row->ordering . '" />' . CBTxt::T('This plugin cannot be reordered');
         }
     } else {
         $row->ordering = 999;
         $row->ordering_register = 10;
         $row->published = 1;
         $row->description = '';
         $row->useraccessgroupid = -2;
         $row->viewaccesslevel = 1;
         $lists['ordering'] = '<input type="hidden" name="ordering" value="' . $row->ordering . '" />' . CBTxt::T('New items default to the last place. Ordering can be changed after this item is saved.');
     }
     $lists['ordering_register'] = '<input type="text" name="ordering_register" class="inputbox"' . ($canEditState ? '' : ' disabled="disabled"') . ' size="40" value="' . $row->ordering_register . '" />';
     // build the html select list for the view level access (filtered by View Access Levels visible by the admin if not super user:
     $accessTree = $_CB_framework->acl->get_access_children_tree(true, false, !$_CB_framework->acl->amIaSuperAdmin());
     $lists['viewaccesslevel'] = moscomprofilerHTML::selectList($accessTree, 'viewaccesslevel', 'class="inputbox"' . ($canEditState ? '' : ' disabled="disabled"'), 'value', 'text', intval($row->viewaccesslevel), 2);
     // We want to use View Access Levels in Joomla 1.6, and hide old method if unused:
     if (isStillUsingGroupsForViewAccess($row->_tbl)) {
         $gtree3 = array();
         $gtree3[] = moscomprofilerHTML::makeOption(-2, '- ' . CBtxt::T('Everybody') . ' -');
         $gtree3[] = moscomprofilerHTML::makeOption(-1, '- ' . CBtxt::T('All Registered Users') . ' -');
         if (!$_CB_framework->acl->amIaSuperAdmin() && in_array((int) $row->useraccessgroupid, $_CB_framework->acl->get_groups_below_me(null, true))) {
             // This should always be the case:
             // ensure user can't add group higher than themselves:
             $gtree3 = array_merge($gtree3, $_CB_framework->acl->get_groups_below_me());
             // vs $_CB_framework->acl->get_groups_below_me( null, true )  in tab lists
         } else {
             // Just in case we missed one, and as super-admin we should see everything:
             $gtree3 = array_merge($gtree3, $_CB_framework->acl->get_group_children_tree(null, 'USERS', false));
         }
         $lists['useraccessgroup'] = moscomprofilerHTML::selectList($gtree3, 'useraccessgroupid', 'size="4"' . ($canEditState ? '' : ' disabled="disabled"'), 'value', 'text', $row->useraccessgroupid, 2, false);
     } else {
         $lists['useraccessgroup'] = null;
     }
     // params:
     $paramsEditorHtml = array();
     $options = array('option' => $option, 'task' => $task, 'cid' => $row->tabid);
     // additional non-specific other parameters:
     $_PLUGINS->loadPluginGroup('user');
     $fieldsParamsPlugins = $_PLUGINS->getUserTabParamsPluginIds();
     foreach ($fieldsParamsPlugins as $pluginId => $fieldParamHandlerClassName) {
         $fieldParamHandler = new $fieldParamHandlerClassName($pluginId, $row);
         // cbFieldParamsHandler();
         $addParamsHtml = $fieldParamHandler->drawParamsEditor($options);
         if ($addParamsHtml) {
             $addParamsTitle = $fieldParamHandler->getFieldsParamsLabel();
             $paramsEditorHtml[] = array('title' => $addParamsTitle, 'content' => $addParamsHtml);
         }
     }
     $pluginView = _CBloadView('tab');
     $pluginView->edittab($row, $option, $lists, $tid, $paramsEditorHtml);
 }
	/**
	 * prepare backend config render
	 *
	 * @param moscomprofilerUser $user
	 * @param object $plugin
	 * @param mixed $message
	 */
	private function showConfig( $user, $plugin, $message = null ) {
		global $_CB_framework;

		$logos											=	array();
		$templates										=	array();

		if ( is_dir( $plugin->absPath . '/images' ) ) {
			foreach ( scandir( $plugin->absPath . '/images' ) as $logo ) {
				if ( ! preg_match( '!^tn.+$!', $logo ) && preg_match( '!^[\w-]+[.](jpg|jpeg|png|gif|bmp)$!', $logo ) ) {
					$logos[]							=	moscomprofilerHTML::makeOption( $logo, $logo );
				}
			}
		}

		if ( is_dir( $plugin->absPath . '/templates' ) ) {
			foreach ( scandir( $plugin->absPath . '/templates' ) as $template ) {
				if ( preg_match( '!^\w+$!', $template ) ) {
					$templates[]						=	moscomprofilerHTML::makeOption( $template, $template );
				}
			}
		}

		$input											=	array();

		// General:
		$listNotifyBy									=	array();
		$listNotifyBy[]									=	moscomprofilerHTML::makeOption( '1', CBTxt::T( 'PMS or Email' ) );
		$listNotifyBy[]									=	moscomprofilerHTML::makeOption( '2', CBTxt::T( 'PMS & Email' ) );
		$listNotifyBy[]									=	moscomprofilerHTML::makeOption( '3', CBTxt::T( 'PMS Only' ) );
		$listNotifyBy[]									=	moscomprofilerHTML::makeOption( '4', CBTxt::T( 'Email Only' ) );
		$listTooltips									=	array();
		$listTooltips[]									=	moscomprofilerHTML::makeOption( '1', CBTxt::T( 'Icon' ) );
		$listTooltips[]									=	moscomprofilerHTML::makeOption( '2', CBTxt::T( 'Text' ) );
		$listTooltips[]									=	moscomprofilerHTML::makeOption( '3', CBTxt::T( 'Disabled' ) );
		$listAccess										=	array();
		$listAccess[]									=	moscomprofilerHTML::makeOption( '-2', CBTxt::T( '- Everybody' ) );
		$listAccess[]									=	moscomprofilerHTML::makeOption( '-1', CBTxt::T( '- All Registered Users' ) );
		$listAccess										=	array_merge( $listAccess, $_CB_framework->acl->get_group_children_tree( null, 'USERS', false ) );
		$listCreateAccess								=	array();
		$listCreateAccess[]								=	moscomprofilerHTML::makeOption( '-1', CBTxt::T( '- All Registered Users' ) );
		$listCreateAccess								=	array_merge( $listCreateAccess, $_CB_framework->acl->get_group_children_tree( null, 'USERS', false ) );
		$listTypes										=	array();
		$listTypes[]									=	moscomprofilerHTML::makeOption( '1', CBTxt::T( 'Open' ) );
		$listTypes[]									=	moscomprofilerHTML::makeOption( '2', CBTxt::T( 'Approval' ) );
		$listTypes[]									=	moscomprofilerHTML::makeOption( '3', CBTxt::T( 'Invite' ) );
		$listEditor										=	array();
		$listEditor[]									=	moscomprofilerHTML::makeOption( '1', CBTxt::T( 'Plain Text' ) );
		$listEditor[]									=	moscomprofilerHTML::makeOption( '2', CBTxt::T( 'HTML Text' ) );
		$listEditor[]									=	moscomprofilerHTML::makeOption( '3', CBTxt::T( 'WYSIWYG' ) );
		$listCatOrderby									=	array();
		$listCatOrderby[]								=	moscomprofilerHTML::makeOption( '1', CBTxt::T( 'Ordering ASC' ) );
		$listCatOrderby[]								=	moscomprofilerHTML::makeOption( '2', CBTxt::T( 'Ordering DESC' ) );
		$listCatOrderby[]								=	moscomprofilerHTML::makeOption( '3', CBTxt::T( 'Date ASC' ) );
		$listCatOrderby[]								=	moscomprofilerHTML::makeOption( '4', CBTxt::T( 'Date DESC' ) );
		$listCatOrderby[]								=	moscomprofilerHTML::makeOption( '5', CBTxt::T( 'Name ASC' ) );
		$listCatOrderby[]								=	moscomprofilerHTML::makeOption( '6', CBTxt::T( 'Name DESC' ) );
		$listCatOrderby[]								=	moscomprofilerHTML::makeOption( '7', CBTxt::T( 'Group Count ASC' ) );
		$listCatOrderby[]								=	moscomprofilerHTML::makeOption( '8', CBTxt::T( 'Group Count DESC' ) );
		$listCatOrderby[]								=	moscomprofilerHTML::makeOption( '9', CBTxt::T( 'Nested Count ASC' ) );
		$listCatOrderby[]								=	moscomprofilerHTML::makeOption( '10', CBTxt::T( 'Nested Count DESC' ) );
		$listGrpOrderby									=	array();
		$listGrpOrderby[]								=	moscomprofilerHTML::makeOption( '1', CBTxt::T( 'Ordering ASC' ) );
		$listGrpOrderby[]								=	moscomprofilerHTML::makeOption( '2', CBTxt::T( 'Ordering DESC' ) );
		$listGrpOrderby[]								=	moscomprofilerHTML::makeOption( '3', CBTxt::T( 'Date ASC' ) );
		$listGrpOrderby[]								=	moscomprofilerHTML::makeOption( '4', CBTxt::T( 'Date DESC' ) );
		$listGrpOrderby[]								=	moscomprofilerHTML::makeOption( '5', CBTxt::T( 'Name ASC' ) );
		$listGrpOrderby[]								=	moscomprofilerHTML::makeOption( '6', CBTxt::T( 'Name DESC' ) );
		$listGrpOrderby[]								=	moscomprofilerHTML::makeOption( '7', CBTxt::T( 'User Count ASC' ) );
		$listGrpOrderby[]								=	moscomprofilerHTML::makeOption( '8', CBTxt::T( 'User Count DESC' ) );
		$listGrpOrderby[]								=	moscomprofilerHTML::makeOption( '9', CBTxt::T( 'Nested Count ASC' ) );
		$listGrpOrderby[]								=	moscomprofilerHTML::makeOption( '10', CBTxt::T( 'Nested Count DESC' ) );

		$input['general_title']							=	'<input type="text" id="general_title" name="general_title" value="' . htmlspecialchars( $plugin->params->get( 'general_title', $plugin->name ) ) . '" class="inputbox" size="25" />';
		$input['general_template']						=	moscomprofilerHTML::selectList( $templates, 'general_template', null, 'value', 'text', $plugin->params->get( 'general_template', 'default' ), 1, false, false );
		$input['general_class']							=	'<input type="text" id="general_class" name="general_class" value="' . htmlspecialchars( $plugin->params->get( 'general_class', null ) ) . '" class="inputbox" size="10" />';
		$input['general_itemid']						=	'<input type="text" id="general_itemid" name="general_itemid" value="' . htmlspecialchars( $plugin->params->get( 'general_itemid', null ) ) . '" class="inputbox" size="5" />';
		$input['general_dynamicid']						=	moscomprofilerHTML::yesnoSelectList( 'general_dynamicid', null, $plugin->params->get( 'general_dynamicid', 0 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['general_notifications']					=	moscomprofilerHTML::yesnoSelectList( 'general_notifications', null, $plugin->params->get( 'general_notifications', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['general_notifyby']						=	moscomprofilerHTML::selectList( $listNotifyBy, 'general_notifyby', null, 'value', 'text', $plugin->params->get( 'general_notifyby', 1 ), 1, false, false );
		$input['general_tooltips']						=	moscomprofilerHTML::selectList( $listTooltips, 'general_tooltips', null, 'value', 'text', $plugin->params->get( 'general_tooltips', 1 ), 1, false, false );
		$input['general_panes']							=	moscomprofilerHTML::yesnoSelectList( 'general_panes', null, $plugin->params->get( 'general_panes', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['general_validate']						=	moscomprofilerHTML::yesnoSelectList( 'general_validate', null, $plugin->params->get( 'general_validate', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['general_dirperms']						=	'<input type="text" id="general_dirperms" name="general_dirperms" value="' . (int) $plugin->params->get( 'general_dirperms', '755' ) . '" class="inputbox" size="10" />';
		$input['general_fileperms']						=	'<input type="text" id="general_fileperms" name="general_fileperms" value="' . (int) $plugin->params->get( 'general_fileperms', '644' ) . '" class="inputbox" size="10" />';
		$input['general_wordfilter']					=	'<textarea id="general_wordfilter" name="general_wordfilter" class="inputbox" cols="40" rows="5">' . htmlspecialchars( $plugin->params->get( 'general_wordfilter', null ) ) . '</textarea>';

		// Logos:
		$input['logo_size']								=	'<input type="text" id="logo_size" name="logo_size" value="' . htmlspecialchars( $plugin->params->get( 'logo_size', 2000 ) ) . '" class="inputbox" size="5" />';
		$input['logo_width']							=	'<input type="text" id="logo_width" name="logo_width" value="' . htmlspecialchars( $plugin->params->get( 'logo_width', 200 ) ) . '" class="inputbox" size="5" />';
		$input['logo_height']							=	'<input type="text" id="logo_height" name="logo_height" value="' . htmlspecialchars( $plugin->params->get( 'logo_height', 500 ) ) . '" class="inputbox" size="5" />';
		$input['logo_thumbwidth']						=	'<input type="text" id="logo_thumbwidth" name="logo_thumbwidth" value="' . htmlspecialchars( $plugin->params->get( 'logo_thumbwidth', 60 ) ) . '" class="inputbox" size="5" />';
		$input['logo_thumbheight']						=	'<input type="text" id="logo_thumbheight" name="logo_thumbheight" value="' . htmlspecialchars( $plugin->params->get( 'logo_thumbheight', 86 ) ) . '" class="inputbox" size="5" />';

		// Overrides:
		$input['override_category_s']					=	'<input type="text" id="override_category_s" name="override_category_s" value="' . htmlspecialchars( $plugin->params->get( 'override_category_s', 'Category' ) ) . '" class="inputbox" size="25" />';
		$input['override_category_p']					=	'<input type="text" id="override_category_p" name="override_category_p" value="' . htmlspecialchars( $plugin->params->get( 'override_category_p', 'Categories' ) ) . '" class="inputbox" size="25" />';
		$input['override_group_s']						=	'<input type="text" id="override_group_s" name="override_group_s" value="' . htmlspecialchars( $plugin->params->get( 'override_group_s', 'Group' ) ) . '" class="inputbox" size="25" />';
		$input['override_group_p']						=	'<input type="text" id="override_group_p" name="override_group_p" value="' . htmlspecialchars( $plugin->params->get( 'override_group_p', 'Groups' ) ) . '" class="inputbox" size="25" />';
		$input['override_user_s']						=	'<input type="text" id="override_user_s" name="override_user_s" value="' . htmlspecialchars( $plugin->params->get( 'override_user_s', 'User' ) ) . '" class="inputbox" size="25" />';
		$input['override_user_p']						=	'<input type="text" id="override_user_p" name="override_user_p" value="' . htmlspecialchars( $plugin->params->get( 'override_user_p', 'Users' ) ) . '" class="inputbox" size="25" />';
		$input['override_mod_s']						=	'<input type="text" id="override_mod_s" name="override_mod_s" value="' . htmlspecialchars( $plugin->params->get( 'override_mod_s', 'Moderator' ) ) . '" class="inputbox" size="25" />';
		$input['override_mod_p']						=	'<input type="text" id="override_mod_p" name="override_mod_p" value="' . htmlspecialchars( $plugin->params->get( 'override_mod_p', 'Moderators' ) ) . '" class="inputbox" size="25" />';
		$input['override_admin_s']						=	'<input type="text" id="override_admin_s" name="override_admin_s" value="' . htmlspecialchars( $plugin->params->get( 'override_admin_s', 'Admin' ) ) . '" class="inputbox" size="25" />';
		$input['override_admin_p']						=	'<input type="text" id="override_admin_p" name="override_admin_p" value="' . htmlspecialchars( $plugin->params->get( 'override_admin_p', 'Admins' ) ) . '" class="inputbox" size="25" />';
		$input['override_overview_s']					=	'<input type="text" id="override_overview_s" name="override_overview_s" value="' . htmlspecialchars( $plugin->params->get( 'override_overview_s', 'Overview' ) ) . '" class="inputbox" size="25" />';
		$input['override_owner_s']						=	'<input type="text" id="override_owner_s" name="override_owner_s" value="' . htmlspecialchars( $plugin->params->get( 'override_owner_s', 'Owner' ) ) . '" class="inputbox" size="25" />';
		$input['override_panel_s']						=	'<input type="text" id="override_panel_s" name="override_panel_s" value="' . htmlspecialchars( $plugin->params->get( 'override_panel_s', 'Panel' ) ) . '" class="inputbox" size="25" />';

		// Notifications:
		$input['notifications_from_name']				=	'<input type="text" id="notifications_from_name" name="notifications_from_name" value="' . htmlspecialchars( $plugin->params->get( 'notifications_from_name' ) ) . '" class="inputbox" size="30" />';
		$input['notifications_from_address']			=	'<input type="text" id="notifications_from_address" name="notifications_from_address" value="' . htmlspecialchars( $plugin->params->get( 'notifications_from_address' ) ) . '" class="inputbox" size="50" />';
		$input['notifications_desc']					=	$_CB_framework->displayCmsEditor( 'notifications_desc', $plugin->params->get( 'notifications_desc', null ), 400, 200, 40, 5 );
		$input['notifications_desc_content']			=	moscomprofilerHTML::yesnoSelectList( 'notifications_desc_content', null, $plugin->params->get( 'notifications_desc_content', 0 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['notifications_desc_gen']				=	$_CB_framework->displayCmsEditor( 'notifications_desc_gen', $plugin->params->get( 'notifications_desc_gen', null ), 400, 200, 40, 5 );
		$input['notifications_desc_gen_content']		=	moscomprofilerHTML::yesnoSelectList( 'notifications_desc_gen', null, $plugin->params->get( 'notifications_desc_gen', 0 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['notifications_general_categorynew']		=	moscomprofilerHTML::yesnoSelectList( 'notifications_general_categorynew', null, $plugin->params->get( 'notifications_general_categorynew', 0 ), CBTxt::T( 'Notify' ), CBTxt::T( 'Don\'t Notify' ) );
		$input['notifications_general_categoryapprove']	=	moscomprofilerHTML::yesnoSelectList( 'notifications_general_categoryapprove', null, $plugin->params->get( 'notifications_general_categoryapprove', 0 ), CBTxt::T( 'Notify' ), CBTxt::T( 'Don\'t Notify' ) );
		$input['notifications_general_categoryupdate']	=	moscomprofilerHTML::yesnoSelectList( 'notifications_general_categoryupdate', null, $plugin->params->get( 'notifications_general_categoryupdate', 0 ), CBTxt::T( 'Notify' ), CBTxt::T( 'Don\'t Notify' ) );
		$input['notifications_general_categorydelete']	=	moscomprofilerHTML::yesnoSelectList( 'notifications_general_categorydelete', null, $plugin->params->get( 'notifications_general_categorydelete', 0 ), CBTxt::T( 'Notify' ), CBTxt::T( 'Don\'t Notify' ) );
		$input['notifications_desc_cat']				=	$_CB_framework->displayCmsEditor( 'notifications_desc_cat', $plugin->params->get( 'notifications_desc_cat', null ), 400, 200, 40, 5 );
		$input['notifications_desc_cat_content']		=	moscomprofilerHTML::yesnoSelectList( 'notifications_desc_cat_content', null, $plugin->params->get( 'notifications_desc_cat_content', 0 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['notifications_category_nestednew']		=	moscomprofilerHTML::yesnoSelectList( 'notifications_category_nestednew', null, $plugin->params->get( 'notifications_category_nestednew', 0 ), CBTxt::T( 'Notify' ), CBTxt::T( 'Don\'t Notify' ) );
		$input['notifications_category_nestedapprove']	=	moscomprofilerHTML::yesnoSelectList( 'notifications_category_nestedapprove', null, $plugin->params->get( 'notifications_category_nestedapprove', 0 ), CBTxt::T( 'Notify' ), CBTxt::T( 'Don\'t Notify' ) );
		$input['notifications_category_nestedupdate']	=	moscomprofilerHTML::yesnoSelectList( 'notifications_category_nestedupdate', null, $plugin->params->get( 'notifications_category_nestedupdate', 0 ), CBTxt::T( 'Notify' ), CBTxt::T( 'Don\'t Notify' ) );
		$input['notifications_category_nesteddelete']	=	moscomprofilerHTML::yesnoSelectList( 'notifications_category_nesteddelete', null, $plugin->params->get( 'notifications_category_nesteddelete', 0 ), CBTxt::T( 'Notify' ), CBTxt::T( 'Don\'t Notify' ) );
		$input['notifications_category_groupnew']		=	moscomprofilerHTML::yesnoSelectList( 'notifications_category_groupnew', null, $plugin->params->get( 'notifications_category_groupnew', 0 ), CBTxt::T( 'Notify' ), CBTxt::T( 'Don\'t Notify' ) );
		$input['notifications_category_groupapprove']	=	moscomprofilerHTML::yesnoSelectList( 'notifications_category_groupapprove', null, $plugin->params->get( 'notifications_category_groupapprove', 0 ), CBTxt::T( 'Notify' ), CBTxt::T( 'Don\'t Notify' ) );
		$input['notifications_category_groupupdate']	=	moscomprofilerHTML::yesnoSelectList( 'notifications_category_groupupdate', null, $plugin->params->get( 'notifications_category_groupupdate', 0 ), CBTxt::T( 'Notify' ), CBTxt::T( 'Don\'t Notify' ) );
		$input['notifications_category_groupdelete']	=	moscomprofilerHTML::yesnoSelectList( 'notifications_category_groupdelete', null, $plugin->params->get( 'notifications_category_groupdelete', 0 ), CBTxt::T( 'Notify' ), CBTxt::T( 'Don\'t Notify' ) );
		$input['notifications_desc_grp']				=	$_CB_framework->displayCmsEditor( 'notifications_desc_grp', $plugin->params->get( 'notifications_desc_grp', null ), 400, 200, 40, 5 );
		$input['notifications_desc_grp_content']		=	moscomprofilerHTML::yesnoSelectList( 'notifications_desc_grp_content', null, $plugin->params->get( 'notifications_desc_grp_content', 0 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['notifications_group_nestednew']			=	moscomprofilerHTML::yesnoSelectList( 'notifications_group_nestednew', null, $plugin->params->get( 'notifications_group_nestednew', 0 ), CBTxt::T( 'Notify' ), CBTxt::T( 'Don\'t Notify' ) );
		$input['notifications_group_nestedapprove']		=	moscomprofilerHTML::yesnoSelectList( 'notifications_group_nestedapprove', null, $plugin->params->get( 'notifications_group_nestedapprove', 0 ), CBTxt::T( 'Notify' ), CBTxt::T( 'Don\'t Notify' ) );
		$input['notifications_group_nestedupdate']		=	moscomprofilerHTML::yesnoSelectList( 'notifications_group_nestedupdate', null, $plugin->params->get( 'notifications_group_nestedupdate', 0 ), CBTxt::T( 'Notify' ), CBTxt::T( 'Don\'t Notify' ) );
		$input['notifications_group_nesteddelete']		=	moscomprofilerHTML::yesnoSelectList( 'notifications_group_nesteddelete', null, $plugin->params->get( 'notifications_group_nesteddelete', 0 ), CBTxt::T( 'Notify' ), CBTxt::T( 'Don\'t Notify' ) );
		$input['notifications_group_userjoin']			=	moscomprofilerHTML::yesnoSelectList( 'notifications_group_userjoin', null, $plugin->params->get( 'notifications_group_userjoin', 0 ), CBTxt::T( 'Notify' ), CBTxt::T( 'Don\'t Notify' ) );
		$input['notifications_group_userleave']			=	moscomprofilerHTML::yesnoSelectList( 'notifications_group_userleave', null, $plugin->params->get( 'notifications_group_userleave', 0 ), CBTxt::T( 'Notify' ), CBTxt::T( 'Don\'t Notify' ) );
		$input['notifications_group_userinvite']		=	moscomprofilerHTML::yesnoSelectList( 'notifications_group_userinvite', null, $plugin->params->get( 'notifications_group_userinvite', 0 ), CBTxt::T( 'Notify' ), CBTxt::T( 'Don\'t Notify' ) );
		$input['notifications_group_userapprove']		=	moscomprofilerHTML::yesnoSelectList( 'notifications_group_userapprove', null, $plugin->params->get( 'notifications_group_userapprove', 0 ), CBTxt::T( 'Notify' ), CBTxt::T( 'Don\'t Notify' ) );
		$input['notifications_group_inviteaccept']		=	moscomprofilerHTML::yesnoSelectList( 'notifications_group_inviteaccept', null, $plugin->params->get( 'notifications_group_inviteaccept', 0 ), CBTxt::T( 'Notify' ), CBTxt::T( 'Don\'t Notify' ) );

		// Overview:
		$listOvrEditor									=	array();
		$listOvrEditor[]								=	moscomprofilerHTML::makeOption( '1', CBTxt::T( 'Plain Text' ) );
		$listOvrEditor[]								=	moscomprofilerHTML::makeOption( '2', CBTxt::T( 'HTML Text' ) );
		$listOvrEditor[]								=	moscomprofilerHTML::makeOption( '3', CBTxt::T( 'WYSIWYG' ) );

		$input['overview_logo']							=	moscomprofilerHTML::selectList( $logos, 'overview_logo', null, 'value', 'text', $plugin->params->get( 'overview_logo', 'default_overview.png' ), 1, false, false );
		$input['overview_desc']							=	$_CB_framework->displayCmsEditor( 'overview_desc', $plugin->params->get( 'overview_desc', null ), 400, 200, 40, 5 );
		$input['overview_desc_content']					=	moscomprofilerHTML::yesnoSelectList( 'overview_desc_content', null, $plugin->params->get( 'overview_desc_content', 0 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['overview_new_category']					=	moscomprofilerHTML::yesnoSelectList( 'overview_new_category', null, $plugin->params->get( 'overview_new_category', 0 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['overview_new_group']					=	moscomprofilerHTML::yesnoSelectList( 'overview_new_group', null, $plugin->params->get( 'overview_new_group', 0 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['overview_panel']						=	moscomprofilerHTML::yesnoSelectList( 'overview_panel', null, $plugin->params->get( 'overview_panel', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['overview_cat_desc_limit']				=	'<input type="text" id="overview_cat_desc_limit" name="overview_cat_desc_limit" value="' . htmlspecialchars( $plugin->params->get( 'overview_cat_desc_limit', 150 ) ) . '" class="inputbox" size="5" />';
		$input['overview_orderby']						=	moscomprofilerHTML::selectList( $listCatOrderby, 'overview_orderby', null, 'value', 'text', $plugin->params->get( 'overview_orderby', 1 ), 1, false, false );
		$input['overview_paging']						=	moscomprofilerHTML::yesnoSelectList( 'overview_paging', null, $plugin->params->get( 'overview_paging', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['overview_limitbox']						=	moscomprofilerHTML::yesnoSelectList( 'overview_limitbox', null, $plugin->params->get( 'overview_limitbox', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['overview_limit']						=	'<input type="text" id="overview_limit" name="overview_limit" value="' . (int) $plugin->params->get( 'overview_limit', 15 ) . '" class="inputbox" size="5" />';
		$input['overview_search']						=	moscomprofilerHTML::yesnoSelectList( 'overview_search', null, $plugin->params->get( 'overview_search', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['overview_message_editor']				=	moscomprofilerHTML::selectList( $listEditor, 'overview_message_editor', null, 'value', 'text', $plugin->params->get( 'overview_message_editor', 1 ), 1, false, false );

		// Panels:
		$input['panel_logo']							=	moscomprofilerHTML::selectList( $logos, 'panel_logo', null, 'value', 'text', $plugin->params->get( 'panel_logo', 'default_panel.png' ), 1, false, false );
		$input['panel_desc']							=	$_CB_framework->displayCmsEditor( 'panel_desc', $plugin->params->get( 'panel_desc', null ), 400, 200, 40, 5 );
		$input['panel_desc_content']					=	moscomprofilerHTML::yesnoSelectList( 'panel_desc_content', null, $plugin->params->get( 'panel_desc_content', 0 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['panel_new_category']					=	moscomprofilerHTML::yesnoSelectList( 'panel_new_category', null, $plugin->params->get( 'panel_new_category', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['panel_new_group']						=	moscomprofilerHTML::yesnoSelectList( 'panel_new_group', null, $plugin->params->get( 'panel_new_group', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['panel_category_display']				=	moscomprofilerHTML::yesnoSelectList( 'panel_category_display', null, $plugin->params->get( 'panel_category_display', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['panel_group_display']					=	moscomprofilerHTML::yesnoSelectList( 'panel_group_display', null, $plugin->params->get( 'panel_group_display', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['panel_joined_display']					=	moscomprofilerHTML::yesnoSelectList( 'panel_joined_display', null, $plugin->params->get( 'panel_joined_display', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['panel_invites_display']					=	moscomprofilerHTML::yesnoSelectList( 'panel_invites_display', null, $plugin->params->get( 'panel_invites_display', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['panel_invited_display']					=	moscomprofilerHTML::yesnoSelectList( 'panel_invited_display', null, $plugin->params->get( 'panel_invited_display', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );

		// Categories:
		$input['category_logo']							=	moscomprofilerHTML::selectList( $logos, 'category_logo', null, 'value', 'text', $plugin->params->get( 'category_logo', 'default_category.png' ), 1, false, false );
		$input['category_create']						=	moscomprofilerHTML::yesnoSelectList( 'category_create', null, $plugin->params->get( 'category_create', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['category_create_access']				=	moscomprofilerHTML::selectList( $listCreateAccess, 'category_create_access', null, 'value', 'text', $plugin->params->get( 'category_create_access', -1 ), 1, false, false );
		$input['category_nested']						=	moscomprofilerHTML::yesnoSelectList( 'category_nested', null, $plugin->params->get( 'category_nested', 0 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['category_nested_access']				=	moscomprofilerHTML::selectList( $listCreateAccess, 'category_nested_access', null, 'value', 'text', $plugin->params->get( 'category_nested_access', -1 ), 1, false, false );
		$input['category_approve']						=	moscomprofilerHTML::yesnoSelectList( 'category_approve', null, $plugin->params->get( 'category_approve', 0 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['category_limit']						=	'<input type="text" id="category_limit" name="category_limit" value="' . htmlspecialchars( $plugin->params->get( 'category_limit', 0 ) ) . '" class="inputbox" size="5" />';
		$input['category_message']						=	moscomprofilerHTML::yesnoSelectList( 'category_message', null, $plugin->params->get( 'category_message', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['category_editor']						=	moscomprofilerHTML::selectList( $listEditor, 'category_editor', null, 'value', 'text', $plugin->params->get( 'category_editor', 1 ), 1, false, false );
		$input['category_desc_content']					=	moscomprofilerHTML::yesnoSelectList( 'category_desc_content', null, $plugin->params->get( 'category_desc_content', 0 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['category_desc_inputlimit']				=	'<input type="text" id="category_desc_inputlimit" name="category_desc_inputlimit" value="' . htmlspecialchars( $plugin->params->get( 'category_desc_inputlimit', 0 ) ) . '" class="inputbox" size="5" />';
		$input['category_captcha']						=	moscomprofilerHTML::yesnoSelectList( 'category_captcha', null, $plugin->params->get( 'category_captcha', 0 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['category_new_category']					=	moscomprofilerHTML::yesnoSelectList( 'category_new_category', null, $plugin->params->get( 'category_new_category', 0 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['category_new_group']					=	moscomprofilerHTML::yesnoSelectList( 'category_new_group', null, $plugin->params->get( 'category_new_group', 0 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['category_hide_empty']					=	moscomprofilerHTML::yesnoSelectList( 'category_hide_empty', null, $plugin->params->get( 'category_hide_empty', 0 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['category_message_editor']				=	moscomprofilerHTML::selectList( $listEditor, 'category_message_editor', null, 'value', 'text', $plugin->params->get( 'category_message_editor', 1 ), 1, false, false );
		$input['category_message_captcha']				=	moscomprofilerHTML::yesnoSelectList( 'category_message_captcha', null, $plugin->params->get( 'category_message_captcha', 0 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['category_groups_desc_limit']			=	'<input type="text" id="category_groups_desc_limit" name="category_groups_desc_limit" value="' . htmlspecialchars( $plugin->params->get( 'category_groups_desc_limit', 150 ) ) . '" class="inputbox" size="5" />';
		$input['category_groups_orderby']				=	moscomprofilerHTML::selectList( $listGrpOrderby, 'category_groups_orderby', null, 'value', 'text', $plugin->params->get( 'category_groups_orderby', 1 ), 1, false, false );
		$input['category_groups_paging']				=	moscomprofilerHTML::yesnoSelectList( 'category_groups_paging', null, $plugin->params->get( 'category_groups_paging', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['category_groups_limitbox']				=	moscomprofilerHTML::yesnoSelectList( 'category_groups_limitbox', null, $plugin->params->get( 'category_groups_limitbox', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['category_groups_limit']					=	'<input type="text" id="category_groups_limit" name="category_groups_limit" value="' . (int) $plugin->params->get( 'category_groups_limit', 15 ) . '" class="inputbox" size="5" />';
		$input['category_groups_search']				=	moscomprofilerHTML::yesnoSelectList( 'category_groups_search', null, $plugin->params->get( 'category_groups_search', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['category_nested_desc_limit']			=	'<input type="text" id="category_nested_desc_limit" name="category_nested_desc_limit" value="' . htmlspecialchars( $plugin->params->get( 'category_nested_desc_limit', 150 ) ) . '" class="inputbox" size="5" />';
		$input['category_nested_orderby']				=	moscomprofilerHTML::selectList( $listCatOrderby, 'category_nested_orderby', null, 'value', 'text', $plugin->params->get( 'category_nested_orderby', 1 ), 1, false, false );
		$input['category_nested_paging']				=	moscomprofilerHTML::yesnoSelectList( 'category_nested_paging', null, $plugin->params->get( 'category_nested_paging', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['category_nested_limitbox']				=	moscomprofilerHTML::yesnoSelectList( 'category_nested_limitbox', null, $plugin->params->get( 'category_nested_limitbox', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['category_nested_limit']					=	'<input type="text" id="category_nested_limit" name="category_nested_limit" value="' . (int) $plugin->params->get( 'category_nested_limit', 15 ) . '" class="inputbox" size="5" />';
		$input['category_nested_search']				=	moscomprofilerHTML::yesnoSelectList( 'category_nested_search', null, $plugin->params->get( 'category_nested_search', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['category_all_desc_limit']				=	'<input type="text" id="category_all_desc_limit" name="category_all_desc_limit" value="' . htmlspecialchars( $plugin->params->get( 'category_all_desc_limit', 150 ) ) . '" class="inputbox" size="5" />';
		$input['category_all_orderby']					=	moscomprofilerHTML::selectList( $listCatOrderby, 'category_all_orderby', null, 'value', 'text', $plugin->params->get( 'category_all_orderby', 1 ), 1, false, false );
		$input['category_all_paging']					=	moscomprofilerHTML::yesnoSelectList( 'category_all_paging', null, $plugin->params->get( 'category_all_paging', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['category_all_limitbox']					=	moscomprofilerHTML::yesnoSelectList( 'category_all_limitbox', null, $plugin->params->get( 'category_all_limitbox', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['category_all_limit']					=	'<input type="text" id="category_all_limit" name="category_all_limit" value="' . (int) $plugin->params->get( 'category_all_limit', 15 ) . '" class="inputbox" size="5" />';
		$input['category_all_search']					=	moscomprofilerHTML::yesnoSelectList( 'category_all_search', null, $plugin->params->get( 'category_all_search', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['category_approval_desc_limit']			=	'<input type="text" id="category_approval_desc_limit" name="category_approval_desc_limit" value="' . htmlspecialchars( $plugin->params->get( 'category_approval_desc_limit', 150 ) ) . '" class="inputbox" size="5" />';
		$input['category_approval_orderby']				=	moscomprofilerHTML::selectList( $listCatOrderby, 'category_approval_orderby', null, 'value', 'text', $plugin->params->get( 'category_approval_orderby', 1 ), 1, false, false );
		$input['category_approval_paging']				=	moscomprofilerHTML::yesnoSelectList( 'category_approval_paging', null, $plugin->params->get( 'category_approval_paging', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['category_approval_limitbox']			=	moscomprofilerHTML::yesnoSelectList( 'category_approval_limitbox', null, $plugin->params->get( 'category_approval_limitbox', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['category_approval_limit']				=	'<input type="text" id="category_approval_limit" name="category_approval_limit" value="' . (int) $plugin->params->get( 'category_approval_limit', 15 ) . '" class="inputbox" size="5" />';
		$input['category_approval_search']				=	moscomprofilerHTML::yesnoSelectList( 'category_approval_search', null, $plugin->params->get( 'category_approval_search', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );

		// Category Defaults:
		$input['category_types_default']				=	moscomprofilerHTML::selectList( $listTypes, 'category_types_default[]', 'size="4" multiple="multiple"', 'value', 'text', explode( '|*|', $plugin->params->get( 'category_types_default', '1|*|2|*|3' ) ), 0, false, true );
		$input['category_types_config']					=	moscomprofilerHTML::yesnoSelectList( 'category_types_config', null, $plugin->params->get( 'category_types_config', 1 ), CBTxt::T( 'Show' ), CBTxt::T( 'Hide' ) );
		$input['category_access_default']				=	moscomprofilerHTML::selectList( $listAccess, 'category_access_default', null, 'value', 'text', $plugin->params->get( 'category_access_default', -2 ), 1, false, false );
		$input['category_access_config']				=	moscomprofilerHTML::yesnoSelectList( 'category_access_config', null, $plugin->params->get( 'category_access_config', 1 ), CBTxt::T( 'Show' ), CBTxt::T( 'Hide' ) );
		$input['category_create_default']				=	moscomprofilerHTML::yesnoSelectList( 'category_create_default', null, $plugin->params->get( 'category_create_default', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['category_create_config']				=	moscomprofilerHTML::yesnoSelectList( 'category_create_config', null, $plugin->params->get( 'category_create_config', 1 ), CBTxt::T( 'Show' ), CBTxt::T( 'Hide' ) );
		$input['category_createaccess_default']			=	moscomprofilerHTML::selectList( $listCreateAccess, 'category_createaccess_default', null, 'value', 'text', $plugin->params->get( 'category_createaccess_default', -1 ), 1, false, false );
		$input['category_createaccess_config']			=	moscomprofilerHTML::yesnoSelectList( 'category_createaccess_config', null, $plugin->params->get( 'category_createaccess_config', 1 ), CBTxt::T( 'Show' ), CBTxt::T( 'Hide' ) );
		$input['category_nested_default']				=	moscomprofilerHTML::yesnoSelectList( 'category_nested_default', null, $plugin->params->get( 'category_nested_default', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['category_nested_config']				=	moscomprofilerHTML::yesnoSelectList( 'category_nested_config', null, $plugin->params->get( 'category_nested_config', 1 ), CBTxt::T( 'Show' ), CBTxt::T( 'Hide' ) );
		$input['category_nestedaccess_default']			=	moscomprofilerHTML::selectList( $listCreateAccess, 'category_nestedaccess_default', null, 'value', 'text', $plugin->params->get( 'category_nestedaccess_default', -1 ), 1, false, false );
		$input['category_nestedaccess_config']			=	moscomprofilerHTML::yesnoSelectList( 'category_nestedaccess_config', null, $plugin->params->get( 'category_nestedaccess_config', 1 ), CBTxt::T( 'Show' ), CBTxt::T( 'Hide' ) );

		// Groups:
		$listGrpToggle									=	array();
		$listGrpToggle[]								=	moscomprofilerHTML::makeOption( '1', CBTxt::T( 'Disabled' ) );
		$listGrpToggle[]								=	moscomprofilerHTML::makeOption( '2', CBTxt::T( 'Expanded' ) );
		$listGrpToggle[]								=	moscomprofilerHTML::makeOption( '3', CBTxt::T( 'Collapsed' ) );
		$listInviteBy									=	array();
		$listInviteBy[]									=	moscomprofilerHTML::makeOption( '1', CBTxt::T( 'User ID' ) );
		$listInviteBy[]									=	moscomprofilerHTML::makeOption( '2', CBTxt::T( 'Username' ) );
		$listInviteBy[]									=	moscomprofilerHTML::makeOption( '3', CBTxt::T( 'Name' ) );
		$listInviteBy[]									=	moscomprofilerHTML::makeOption( '4', CBTxt::T( 'Email' ) );
		$listGrpAccess									=	array();
		$listGrpAccess[]								=	moscomprofilerHTML::makeOption( '0', CBTxt::T( 'Group' ) . '&nbsp;' . CBTxt::T( 'Users' ) );
		$listGrpAccess[]								=	moscomprofilerHTML::makeOption( '1', '.&nbsp;-&nbsp;' . CBTxt::T( 'Group' ) . '&nbsp;' . CBTxt::T( 'Moderators' ) );
		$listGrpAccess[]								=	moscomprofilerHTML::makeOption( '2', '.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;' . CBTxt::T( 'Group' ) . '&nbsp;' . CBTxt::T( 'Admins' ) );
		$listGrpAccess[]								=	moscomprofilerHTML::makeOption( '3', '.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;' . CBTxt::T( 'Group' ) . '&nbsp;' . CBTxt::T( 'Owner' ) );

		$input['group_logo']							=	moscomprofilerHTML::selectList( $logos, 'group_logo', null, 'value', 'text', $plugin->params->get( 'group_logo', 'default.png' ), 1, false, false );
		$input['group_create']							=	moscomprofilerHTML::yesnoSelectList( 'group_create', null, $plugin->params->get( 'group_create', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['group_create_access']					=	moscomprofilerHTML::selectList( $listCreateAccess, 'group_create_access', null, 'value', 'text', $plugin->params->get( 'group_create_access', -1 ), 1, false, false );
		$input['group_nested']							=	moscomprofilerHTML::yesnoSelectList( 'group_nested', null, $plugin->params->get( 'group_nested', 0 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['group_nested_access']					=	moscomprofilerHTML::selectList( $listCreateAccess, 'group_nested_access', null, 'value', 'text', $plugin->params->get( 'group_nested_access', -1 ), 1, false, false );
		$input['group_approve']							=	moscomprofilerHTML::yesnoSelectList( 'group_approve', null, $plugin->params->get( 'group_approve', 0 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['group_leave']							=	moscomprofilerHTML::yesnoSelectList( 'group_leave', null, $plugin->params->get( 'group_leave', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['group_limit']							=	'<input type="text" id="group_limit" name="group_limit" value="' . htmlspecialchars( $plugin->params->get( 'group_limit', 0 ) ) . '" class="inputbox" size="5" />';
		$input['group_message']							=	moscomprofilerHTML::yesnoSelectList( 'group_message', null, $plugin->params->get( 'group_message', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['group_editor']							=	moscomprofilerHTML::selectList( $listEditor, 'group_editor', null, 'value', 'text', $plugin->params->get( 'group_editor', 1 ), 1, false, false );
		$input['group_desc_content']					=	moscomprofilerHTML::yesnoSelectList( 'group_desc_content', null, $plugin->params->get( 'group_desc_content', 0 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['group_desc_inputlimit']					=	'<input type="text" id="group_desc_inputlimit" name="group_desc_inputlimit" value="' . htmlspecialchars( $plugin->params->get( 'group_desc_inputlimit', 0 ) ) . '" class="inputbox" size="5" />';
		$input['group_toggle']							=	moscomprofilerHTML::selectList( $listGrpToggle, 'group_toggle', null, 'value', 'text', $plugin->params->get( 'group_toggle', 3 ), 1, false, false );
		$input['group_captcha']							=	moscomprofilerHTML::yesnoSelectList( 'group_captcha', null, $plugin->params->get( 'group_captcha', 0 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['group_new_group']						=	moscomprofilerHTML::yesnoSelectList( 'group_new_group', null, $plugin->params->get( 'group_new_group', 0 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['group_message_editor']					=	moscomprofilerHTML::selectList( $listEditor, 'group_message_editor', null, 'value', 'text', $plugin->params->get( 'group_message_editor', 1 ), 1, false, false );
		$input['group_message_captcha']					=	moscomprofilerHTML::yesnoSelectList( 'group_message_captcha', null, $plugin->params->get( 'group_message_captcha', 0 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['group_message_perm']					=	moscomprofilerHTML::selectList( $listGrpAccess, 'group_message_perm', 'class="inputbox"', 'value', 'text', $plugin->params->get( 'group_message_perm', 3 ), 1, false, false );
		$input['group_nested_desc_limit']				=	'<input type="text" id="group_nested_desc_limit" name="group_nested_desc_limit" value="' . htmlspecialchars( $plugin->params->get( 'group_nested_desc_limit', 150 ) ) . '" class="inputbox" size="5" />';
		$input['group_nested_orderby']					=	moscomprofilerHTML::selectList( $listGrpOrderby, 'group_nested_orderby', null, 'value', 'text', $plugin->params->get( 'group_nested_orderby', 1 ), 1, false, false );
		$input['group_nested_paging']					=	moscomprofilerHTML::yesnoSelectList( 'group_nested_paging', null, $plugin->params->get( 'group_nested_paging', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['group_nested_limitbox']					=	moscomprofilerHTML::yesnoSelectList( 'group_nested_limitbox', null, $plugin->params->get( 'group_nested_limitbox', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['group_nested_limit']					=	'<input type="text" id="group_nested_limit" name="group_nested_limit" value="' . (int) $plugin->params->get( 'group_nested_limit', 15 ) . '" class="inputbox" size="5" />';
		$input['group_nested_search']					=	moscomprofilerHTML::yesnoSelectList( 'group_nested_search', null, $plugin->params->get( 'group_nested_search', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['group_all_desc_limit']					=	'<input type="text" id="group_all_desc_limit" name="group_all_desc_limit" value="' . htmlspecialchars( $plugin->params->get( 'group_all_desc_limit', 150 ) ) . '" class="inputbox" size="5" />';
		$input['group_all_orderby']						=	moscomprofilerHTML::selectList( $listGrpOrderby, 'group_all_orderby', null, 'value', 'text', $plugin->params->get( 'group_all_orderby', 1 ), 1, false, false );
		$input['group_all_paging']						=	moscomprofilerHTML::yesnoSelectList( 'group_all_paging', null, $plugin->params->get( 'group_all_paging', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['group_all_limitbox']					=	moscomprofilerHTML::yesnoSelectList( 'group_all_limitbox', null, $plugin->params->get( 'group_all_limitbox', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['group_all_limit']						=	'<input type="text" id="group_all_limit" name="group_all_limit" value="' . (int) $plugin->params->get( 'group_all_limit', 15 ) . '" class="inputbox" size="5" />';
		$input['group_all_search']						=	moscomprofilerHTML::yesnoSelectList( 'group_all_search', null, $plugin->params->get( 'group_all_search', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['group_approval_desc_limit']				=	'<input type="text" id="group_approval_desc_limit" name="group_approval_desc_limit" value="' . htmlspecialchars( $plugin->params->get( 'group_approval_desc_limit', 150 ) ) . '" class="inputbox" size="5" />';
		$input['group_approval_orderby']				=	moscomprofilerHTML::selectList( $listGrpOrderby, 'group_approval_orderby', null, 'value', 'text', $plugin->params->get( 'group_approval_orderby', 1 ), 1, false, false );
		$input['group_approval_paging']					=	moscomprofilerHTML::yesnoSelectList( 'group_approval_paging', null, $plugin->params->get( 'group_approval_paging', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['group_approval_limitbox']				=	moscomprofilerHTML::yesnoSelectList( 'group_approval_limitbox', null, $plugin->params->get( 'group_approval_limitbox', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['group_approval_limit']					=	'<input type="text" id="group_approval_limit" name="group_approval_limit" value="' . (int) $plugin->params->get( 'group_approval_limit', 15 ) . '" class="inputbox" size="5" />';
		$input['group_approval_search']					=	moscomprofilerHTML::yesnoSelectList( 'group_approval_search', null, $plugin->params->get( 'group_approval_search', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['group_users_paging']					=	moscomprofilerHTML::yesnoSelectList( 'group_users_paging', null, $plugin->params->get( 'group_users_paging', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['group_users_limitbox']					=	moscomprofilerHTML::yesnoSelectList( 'group_users_limitbox', null, $plugin->params->get( 'group_users_limitbox', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['group_users_limit']						=	'<input type="text" id="group_users_limit" name="group_users_limit" value="' . (int) $plugin->params->get( 'group_users_limit', 15 ) . '" class="inputbox" size="5" />';
		$input['group_users_search']					=	moscomprofilerHTML::yesnoSelectList( 'group_users_search', null, $plugin->params->get( 'group_users_search', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['group_users_approval_paging']			=	moscomprofilerHTML::yesnoSelectList( 'group_users_approval_paging', null, $plugin->params->get( 'group_users_approval_paging', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['group_users_approval_limitbox']			=	moscomprofilerHTML::yesnoSelectList( 'group_users_approval_limitbox', null, $plugin->params->get( 'group_users_approval_limitbox', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['group_users_approval_limit']			=	'<input type="text" id="group_users_approval_limit" name="group_users_approval_limit" value="' . (int) $plugin->params->get( 'group_users_approval_limit', 15 ) . '" class="inputbox" size="5" />';
		$input['group_users_approval_search']			=	moscomprofilerHTML::yesnoSelectList( 'group_users_approval_search', null, $plugin->params->get( 'group_users_approval_search', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );

		// Group Defaults:
		$input['group_type_default']					=	moscomprofilerHTML::selectList( $listTypes, 'group_type_default', null, 'value', 'text', $plugin->params->get( 'group_type_default', 1 ), 1, false, false );
		$input['group_type_config']						=	moscomprofilerHTML::yesnoSelectList( 'group_type_config', null, $plugin->params->get( 'group_type_config', 1 ), CBTxt::T( 'Show' ), CBTxt::T( 'Hide' ) );
		$input['group_access_default']					=	moscomprofilerHTML::selectList( $listAccess, 'group_access_default', null, 'value', 'text', $plugin->params->get( 'group_access_default', -2 ), 1, false, false );
		$input['group_access_config']					=	moscomprofilerHTML::yesnoSelectList( 'group_access_config', null, $plugin->params->get( 'group_access_config', 1 ), CBTxt::T( 'Show' ), CBTxt::T( 'Hide' ) );
		$input['group_invite_default']					=	moscomprofilerHTML::selectList( $listGrpAccess, 'group_invite_default', null, 'value', 'text', $plugin->params->get( 'group_invite_default', 0 ), 1, false, false );
		$input['group_invite_config']					=	moscomprofilerHTML::yesnoSelectList( 'group_invite_config', null, $plugin->params->get( 'group_invite_config', 1 ), CBTxt::T( 'Show' ), CBTxt::T( 'Hide' ) );
		$input['group_users_default']					=	moscomprofilerHTML::yesnoSelectList( 'group_users_default', null, $plugin->params->get( 'group_users_default', 1 ), CBTxt::T( 'Yes' ), CBTxt::T( 'No' ) );
		$input['group_users_config']					=	moscomprofilerHTML::yesnoSelectList( 'group_users_config', null, $plugin->params->get( 'group_users_config', 1 ), CBTxt::T( 'Show' ), CBTxt::T( 'Hide' ) );
		$input['group_nested_default']					=	moscomprofilerHTML::yesnoSelectList( 'group_nested_default', null, $plugin->params->get( 'group_nested_default', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['group_nested_config']					=	moscomprofilerHTML::yesnoSelectList( 'group_nested_config', null, $plugin->params->get( 'group_nested_config', 1 ), CBTxt::T( 'Show' ), CBTxt::T( 'Hide' ) );
		$input['group_nestedaccess_default']			=	moscomprofilerHTML::selectList( $listGrpAccess, 'group_nestedaccess_default', null, 'value', 'text', $plugin->params->get( 'group_nestedaccess_default', -1 ), 1, false, false );
		$input['group_nestedaccess_config']				=	moscomprofilerHTML::yesnoSelectList( 'group_nestedaccess_config', null, $plugin->params->get( 'group_nestedaccess_config', 1 ), CBTxt::T( 'Show' ), CBTxt::T( 'Hide' ) );

		// Invites:
		$input['group_invites_display']					=	moscomprofilerHTML::yesnoSelectList( 'group_invites_display', null, $plugin->params->get( 'group_invites_display', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['group_invites_by']						=	moscomprofilerHTML::selectList( $listInviteBy, 'group_invites_by[]', 'size="4" multiple="multiple"', 'value', 'text', explode( '|*|', $plugin->params->get( 'group_invites_by', '1|*|2|*|3|*|4' ) ), 1, false, false );
		$input['group_invites_captcha']					=	moscomprofilerHTML::yesnoSelectList( 'group_invites_captcha', null, $plugin->params->get( 'group_invites_captcha', 0 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['group_invites_list']					=	moscomprofilerHTML::yesnoSelectList( 'group_invites_list', null, $plugin->params->get( 'group_invites_list', 0 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['group_invites_accept']					=	moscomprofilerHTML::yesnoSelectList( 'group_invites_accept', null, $plugin->params->get( 'group_invites_accept', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['group_invites_paging']					=	moscomprofilerHTML::yesnoSelectList( 'group_invites_paging', null, $plugin->params->get( 'group_invites_paging', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['group_invites_limitbox']				=	moscomprofilerHTML::yesnoSelectList( 'group_invites_limitbox', null, $plugin->params->get( 'group_invites_limitbox', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['group_invites_limit']					=	'<input type="text" id="group_invites_limit" name="group_invites_limit" value="' . (int) $plugin->params->get( 'group_invites_limit', 15 ) . '" class="inputbox" size="5" />';
		$input['group_invites_search']					=	moscomprofilerHTML::yesnoSelectList( 'group_invites_search', null, $plugin->params->get( 'group_invites_search', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );

		// Tabs:
		$input['tab_new_category']						=	moscomprofilerHTML::yesnoSelectList( 'tab_new_category', null, $plugin->params->get( 'tab_new_category', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['tab_new_group']							=	moscomprofilerHTML::yesnoSelectList( 'tab_new_group', null, $plugin->params->get( 'tab_new_group', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );

		$input['category_tab_display']					=	moscomprofilerHTML::yesnoSelectList( 'category_tab_display', null, $plugin->params->get( 'category_tab_display', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['category_tab_desc_limit']				=	'<input type="text" id="category_tab_desc_limit" name="category_tab_desc_limit" value="' . htmlspecialchars( $plugin->params->get( 'category_tab_desc_limit', 150 ) ) . '" class="inputbox" size="5" />';
		$input['category_tab_orderby']					=	moscomprofilerHTML::selectList( $listCatOrderby, 'category_tab_orderby', null, 'value', 'text', $plugin->params->get( 'category_tab_orderby', 1 ), 1, false, false );
		$input['category_tab_paging']					=	moscomprofilerHTML::yesnoSelectList( 'category_tab_paging', null, $plugin->params->get( 'category_tab_paging', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['category_tab_limitbox']					=	moscomprofilerHTML::yesnoSelectList( 'category_tab_limitbox', null, $plugin->params->get( 'category_tab_limitbox', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['category_tab_limit']					=	'<input type="text" id="category_tab_limit" name="category_tab_limit" value="' . (int) $plugin->params->get( 'category_tab_limit', 15 ) . '" class="inputbox" size="5" />';
		$input['category_tab_search']					=	moscomprofilerHTML::yesnoSelectList( 'category_tab_search', null, $plugin->params->get( 'category_tab_search', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );

		$input['group_tab_display']						=	moscomprofilerHTML::yesnoSelectList( 'group_tab_display', null, $plugin->params->get( 'group_tab_display', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['group_tab_desc_limit']					=	'<input type="text" id="group_tab_desc_limit" name="group_tab_desc_limit" value="' . htmlspecialchars( $plugin->params->get( 'group_tab_desc_limit', 150 ) ) . '" class="inputbox" size="5" />';
		$input['group_tab_orderby']						=	moscomprofilerHTML::selectList( $listGrpOrderby, 'group_tab_orderby', null, 'value', 'text', $plugin->params->get( 'group_tab_orderby', 1 ), 1, false, false );
		$input['group_tab_paging']						=	moscomprofilerHTML::yesnoSelectList( 'group_tab_paging', null, $plugin->params->get( 'group_tab_paging', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['group_tab_limitbox']					=	moscomprofilerHTML::yesnoSelectList( 'group_tab_limitbox', null, $plugin->params->get( 'group_tab_limitbox', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['group_tab_limit']						=	'<input type="text" id="group_tab_limit" name="group_tab_limit" value="' . (int) $plugin->params->get( 'group_tab_limit', 15 ) . '" class="inputbox" size="5" />';
		$input['group_tab_search']						=	moscomprofilerHTML::yesnoSelectList( 'group_tab_search', null, $plugin->params->get( 'group_tab_search', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['group_tab_joined']						=	moscomprofilerHTML::yesnoSelectList( 'group_tab_joined', null, $plugin->params->get( 'group_tab_joined', 0 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );

		$input['joined_tab_display']					=	moscomprofilerHTML::yesnoSelectList( 'joined_tab_display', null, $plugin->params->get( 'joined_tab_display', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['joined_tab_desc_limit']					=	'<input type="text" id="joined_tab_desc_limit" name="joined_tab_desc_limit" value="' . htmlspecialchars( $plugin->params->get( 'joined_tab_desc_limit', 150 ) ) . '" class="inputbox" size="5" />';
		$input['joined_tab_orderby']					=	moscomprofilerHTML::selectList( $listGrpOrderby, 'joined_tab_orderby', null, 'value', 'text', $plugin->params->get( 'joined_tab_orderby', 1 ), 1, false, false );
		$input['joined_tab_paging']						=	moscomprofilerHTML::yesnoSelectList( 'joined_tab_paging', null, $plugin->params->get( 'joined_tab_paging', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['joined_tab_limitbox']					=	moscomprofilerHTML::yesnoSelectList( 'joined_tab_limitbox', null, $plugin->params->get( 'joined_tab_limitbox', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['joined_tab_limit']						=	'<input type="text" id="joined_tab_limit" name="joined_tab_limit" value="' . (int) $plugin->params->get( 'joined_tab_limit', 15 ) . '" class="inputbox" size="5" />';
		$input['joined_tab_search']						=	moscomprofilerHTML::yesnoSelectList( 'joined_tab_search', null, $plugin->params->get( 'joined_tab_search', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['joined_tab_owned']						=	moscomprofilerHTML::yesnoSelectList( 'joined_tab_owned', null, $plugin->params->get( 'joined_tab_owned', 0 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );

		$input['invites_tab_display']					=	moscomprofilerHTML::yesnoSelectList( 'invites_tab_display', null, $plugin->params->get( 'invites_tab_display', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['invites_tab_paging']					=	moscomprofilerHTML::yesnoSelectList( 'invites_tab_paging', null, $plugin->params->get( 'invites_tab_paging', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['invites_tab_limitbox']					=	moscomprofilerHTML::yesnoSelectList( 'invites_tab_limitbox', null, $plugin->params->get( 'invites_tab_limitbox', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['invites_tab_limit']						=	'<input type="text" id="invites_tab_limit" name="invites_tab_limit" value="' . (int) $plugin->params->get( 'invites_tab_limit', 15 ) . '" class="inputbox" size="5" />';
		$input['invites_tab_search']					=	moscomprofilerHTML::yesnoSelectList( 'invites_tab_search', null, $plugin->params->get( 'invites_tab_search', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );

		$input['invited_tab_display']					=	moscomprofilerHTML::yesnoSelectList( 'invited_tab_display', null, $plugin->params->get( 'invited_tab_display', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['invited_tab_desc_limit']				=	'<input type="text" id="invited_tab_desc_limit" name="invited_tab_desc_limit" value="' . htmlspecialchars( $plugin->params->get( 'invited_tab_desc_limit', 150 ) ) . '" class="inputbox" size="5" />';
		$input['invited_tab_orderby']					=	moscomprofilerHTML::selectList( $listGrpOrderby, 'invited_tab_orderby', null, 'value', 'text', $plugin->params->get( 'invited_tab_orderby', 1 ), 1, false, false );
		$input['invited_tab_paging']					=	moscomprofilerHTML::yesnoSelectList( 'invited_tab_paging', null, $plugin->params->get( 'invited_tab_paging', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['invited_tab_limitbox']					=	moscomprofilerHTML::yesnoSelectList( 'invited_tab_limitbox', null, $plugin->params->get( 'invited_tab_limitbox', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['invited_tab_limit']						=	'<input type="text" id="invited_tab_limit" name="invited_tab_limit" value="' . (int) $plugin->params->get( 'invited_tab_limit', 15 ) . '" class="inputbox" size="5" />';
		$input['invited_tab_search']					=	moscomprofilerHTML::yesnoSelectList( 'invited_tab_search', null, $plugin->params->get( 'invited_tab_search', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );

		cbgjClass::displayMessage( $message );

		HTML_cbgjAdmin::showConfig( $input, $user, $plugin );
	}
	/**
	 * prepare frontend wall edit render
	 *
	 * @param int       $id
	 * @param UserTable $user
	 */
	private function showWallEdit( $id, $user )
	{
		global $_CB_framework;

		$row					=	CBGroupJiveWall::getPost( (int) $id );
		$isModerator			=	CBGroupJive::isModerator( $user->get( 'id' ) );
		$groupId				=	$this->input( 'group', null, GetterInterface::INT );

		if ( $groupId === null ) {
			$group				=	$row->group();
		} else {
			$group				=	CBGroupJive::getGroup( $groupId );
		}

		$returnUrl				=	$_CB_framework->pluginClassUrl( $this->_gjPlugin->element, false, array( 'action' => 'groups', 'func' => 'show', 'id' => (int) $group->get( 'id' ) ) );

		if ( ! CBGroupJive::canAccessGroup( $group, $user ) ) {
			cbRedirect( $returnUrl, CBTxt::T( 'Group does not exist.' ), 'error' );
		} elseif ( ! $isModerator ) {
			if ( ( ! $row->get( 'id' ) ) && ( ! CBGroupJive::canCreateGroupContent( $user, $group, 'wall' ) ) ) {
				cbRedirect( $returnUrl, CBTxt::T( 'You do not have sufficient permissions to post in this group.' ), 'error' );
			} elseif ( $row->get( 'id' ) && ( $user->get( 'id' ) != $row->get( 'user_id' ) ) && ( CBGroupJive::getGroupStatus( $user, $group ) < 2 ) ) {
				cbRedirect( $returnUrl, CBTxt::T( 'You do not have sufficient permissions to edit this post.' ), 'error' );
			}
		}

		CBGroupJive::getTemplate( 'wall_edit', true, true, $this->element );

		$input					=	array();

		$publishedTooltip		=	cbTooltip( null, CBTxt::T( 'Select publish state of this post. Unpublished posts will not be visible to the public.' ), null, null, null, null, null, 'data-hascbtooltip="true"' );

		$input['published']		=	moscomprofilerHTML::yesnoSelectList( 'published', 'class="form-control"' . $publishedTooltip, (int) $this->input( 'post/published', $row->get( 'published', 1 ), GetterInterface::INT ) );

		$postTooltip			=	cbTooltip( null, CBTxt::T( 'Input the post to share.' ), null, null, null, null, null, 'data-hascbtooltip="true"' );

		$input['post']			=	'<textarea id="post" name="post" class="form-control required" cols="55" rows="8"' . $postTooltip . '>' . htmlspecialchars( $this->input( 'post/post', $row->get( 'post' ), GetterInterface::HTML ) ) . '</textarea>';

		$ownerTooltip			=	cbTooltip( null, CBTxt::T( 'Input the post owner id. Post owner determines the creator of the post specified as User ID.' ), null, null, null, null, null, 'data-hascbtooltip="true"' );

		$input['user_id']		=	'<input type="text" id="user_id" name="user_id" value="' . (int) $this->input( 'post/user_id', $this->input( 'user', $row->get( 'user_id', $user->get( 'id' ) ), GetterInterface::INT ), GetterInterface::INT ) . '" class="digits required form-control" size="6"' . $ownerTooltip . ' />';

		HTML_groupjiveWallEdit::showWallEdit( $row, $input, $group, $user, $this );
	}
 /**
  * Returns a USERPARAMS field in specified format
  *
  * @param  moscomprofilerFields  $field
  * @param  moscomprofilerUser    $user
  * @param  string                $output      'html', 'xml', 'json', 'php', 'csvheader', 'csv', 'rss', 'fieldslist', 'htmledit'
  * @param  string                $formatting  'table', 'td', 'span', 'div', 'none'
  * @param  string                $reason      'profile' for user profile view, 'edit' for profile edit, 'register' for registration, 'list' for user-lists
  * @param  int                   $list_compare_types   IF reason == 'search' : 0 : simple 'is' search, 1 : advanced search with modes, 2 : simple 'any' search
  * @return mixed                
  */
 function getFieldRow(&$field, &$user, $output, $formatting, $reason, $list_compare_types)
 {
     global $_CB_framework, $_CB_database, $ueConfig;
     $results = null;
     if (class_exists('JFactory')) {
         // Joomla 1.5 :
         $lang = JFactory::getLanguage();
         $lang->load('com_users');
     }
     $pseudoFields = array();
     //Implementing Joomla's new user parameters such as editor
     $ui = $_CB_framework->getUi();
     $userParams = $this->_getUserParams($ui, $user);
     if (is_array($userParams) && count($userParams) > 0 && ($ui == 2 || (isset($ueConfig['frontend_userparams']) ? $ueConfig['frontend_userparams'] == 1 : in_array($_CB_framework->getCfg("frontend_userparams"), array('1', null))))) {
         //Loop through each parameter and prepare rendering appropriately.
         foreach ($userParams as $k => $userParam) {
             $paramField = new moscomprofilerFields($_CB_database);
             $paramField->title = $userParam[0];
             $paramField->_html = $userParam[1];
             $paramField->description = isset($userParam[2]) && class_exists("JText") ? JText::_($userParam[2]) : null;
             $paramField->name = isset($userParam[3]) && class_exists("JText") ? JText::_($userParam[3]) : null;
             // very probably wrong!
             $paramField->fieldid = 'userparam_' . $k;
             $paramField->displaytitle = substr($userParam[0], 0, 6) == '<label' ? -1 : 1;
             // don't redisplay <label for> markup
             if ($paramField->displaytitle == -1) {
                 if (substr($paramField->title, -9, 1) != ':' && substr($paramField->title, -8) == '</label>') {
                     $paramField->title = substr($paramField->title, 0, -8) . ':</label>';
                 }
             }
             $paramField->type = 'param';
             // this is for cb_ftparam class to be correct.
             $pseudoFields[] = $paramField;
         }
     }
     if ($_CB_framework->getUi() == 2) {
         if (checkJversion() < 2) {
             $myGids = CBuser::getMyInstance()->getUserData()->gids;
             $cms_mod = $_CB_framework->acl->mapGroupNamesToValues('Administrator');
             $cms_admin = $_CB_framework->acl->mapGroupNamesToValues('Superadministrator');
         }
         $i_am_super_admin = $_CB_framework->acl->amIaSuperAdmin();
         //1.6+ only: $user_is_super_admin			=	$_CB_framework->acl->checkActionForGroups( $this->gids, 'core.admin', null );
         if (checkJversion() == 2) {
             $cms_admin_title = 'Super Users';
         } else {
             $cms_admin_title = 'Super Administrator';
         }
         $canBlockUser = CBuser::getMyInstance()->authoriseAction('core.edit.state', 'com_users');
         $canEmailEvents = $user->id == 0 && (checkJversion() >= 2 ? $canBlockUser : count(array_intersect($myGids, array($cms_mod, $cms_admin)))) || CBuser::getInstance($user->id)->authoriseAction('core.edit.state', 'com_users') || array_intersect($user->gids, getParentGIDS($ueConfig['imageApproverGid']));
         // allow also CB isModerator
         $lists = array();
         if ($canBlockUser) {
             // ensure user can't add group higher than themselves
             $gtree = $_CB_framework->acl->get_groups_below_me();
             if (checkJversion() == 2) {
                 if (!$i_am_super_admin && $user->id && CBuser::getInstance($user->id)->authoriseAction('core.manage', 'com_users') && (CBuser::getInstance($user->id)->authoriseAction('core.edit', 'com_users') || CBuser::getInstance($user->id)->authoriseAction('core.edit.state', 'com_users'))) {
                     $disabled = ' disabled="disabled"';
                 } else {
                     $disabled = '';
                 }
                 $strgids = array_map('strval', $user->gids);
                 $lists['gid'] = moscomprofilerHTML::selectList($gtree, 'gid[]', 'class="inputbox" size="11" multiple="multiple"' . $disabled, 'value', 'text', $strgids, 2, false);
             } else {
                 if (!$i_am_super_admin && (in_array($cms_admin, $user->gids) && in_array($cms_admin, $myGids) || $user->id == $_CB_framework->myId() && in_array($cms_admin, $myGids))) {
                     $lists['gid'] = "<input type=\"hidden\" name=\"gid\" value=\"{$user->gid}\" /><strong>{$cms_admin_title}</strong>";
                 } else {
                     if (!$i_am_super_admin && (in_array($cms_mod, $myGids) && !in_array($cms_admin, $myGids) && in_array($cms_mod, $user->gids))) {
                         $lists['gid'] = "<input type=\"hidden\" name=\"gid\" value=\"{$user->gid}\" /><strong>Administrator</strong>";
                     } else {
                         $lists['gid'] = moscomprofilerHTML::selectList($gtree, 'gid', 'class="inputbox" size="11"', 'value', 'text', $user->gid, 2, false);
                     }
                 }
             }
             // build the html select list
             $lists['block'] = moscomprofilerHTML::yesnoSelectList('block', 'class="inputbox" size="1"', $user->block);
             $list_approved = array();
             $list_approved[] = moscomprofilerHTML::makeOption('0', CBTxt::T('Unapproved'));
             $list_approved[] = moscomprofilerHTML::makeOption('1', CBTxt::T('Approved'));
             $list_approved[] = moscomprofilerHTML::makeOption('2', CBTxt::T('Disapproved'));
             $lists['approved'] = moscomprofilerHTML::selectList($list_approved, 'approved', 'class="inputbox" size="1"', 'value', 'text', $user->approved, 2, false);
             $lists['confirmed'] = moscomprofilerHTML::yesnoSelectList('confirmed', 'class="inputbox" size="1"', $user->confirmed);
             // build the html select list
             $lists['sendEmail'] = moscomprofilerHTML::yesnoSelectList('sendEmail', 'class="inputbox" size="1"', $user->sendEmail);
             $paramField = new moscomprofilerFields($_CB_database);
             $paramField->title = CBTxt::T('Group');
             $paramField->_html = $lists['gid'];
             $paramField->description = '';
             $paramField->name = 'gid';
             $pseudoFields[] = $paramField;
             $paramField = new moscomprofilerFields($_CB_database);
             $paramField->title = CBTxt::T('Block User');
             $paramField->_html = $lists['block'];
             $paramField->description = '';
             $paramField->name = 'block';
             $pseudoFields[] = $paramField;
             $paramField = new moscomprofilerFields($_CB_database);
             $paramField->title = CBTxt::T('Approve User');
             $paramField->_html = $lists['approved'];
             $paramField->description = '';
             $paramField->name = 'approved';
             $pseudoFields[] = $paramField;
             $paramField = new moscomprofilerFields($_CB_database);
             $paramField->title = CBTxt::T('Confirm User');
             $paramField->_html = $lists['confirmed'];
             $paramField->description = '';
             $paramField->name = 'confirmed';
             $pseudoFields[] = $paramField;
             $paramField = new moscomprofilerFields($_CB_database);
             $paramField->title = CBTxt::T('Receive Moderator Emails');
             if ($canEmailEvents || $user->sendEmail) {
                 $paramField->_html = $lists['sendEmail'];
             } else {
                 $paramField->_html = CBTxt::T('No (User\'s group-level doesn\'t allow this)') . '<input type="hidden" name="sendEmail" value="0" />';
             }
             $paramField->description = '';
             $paramField->name = 'sendEmail';
             $pseudoFields[] = $paramField;
         }
         if ($user->id) {
             $paramField = new moscomprofilerFields($_CB_database);
             $paramField->title = CBTxt::T('Register Date');
             $paramField->_html = cbFormatDate($user->registerDate);
             $paramField->description = '';
             $paramField->name = 'registerDate';
             $pseudoFields[] = $paramField;
             $paramField = new moscomprofilerFields($_CB_database);
             $paramField->title = CBTxt::T('Last Visit Date');
             $paramField->_html = cbFormatDate($user->lastvisitDate);
             $paramField->description = '';
             $paramField->name = 'lastvisitDate';
             $pseudoFields[] = $paramField;
         }
     }
     switch ($output) {
         case 'htmledit':
             foreach ($pseudoFields as $paramField) {
                 $paramField->required = $this->_isRequired($field, $user, $reason);
                 $paramField->profile = $field->profile;
                 $results .= parent::getFieldRow($paramField, $user, $output, $formatting, $reason, $list_compare_types);
             }
             unset($pseudoFields);
             return $results;
             break;
         default:
             return null;
             break;
     }
 }
	public function getAutoEdit( $id, $user, $plugin, $message = null ) {
		global $_CB_framework;

		cbgjClass::getTemplate( 'cbgroupjiveauto_edit' );

		$row						=	cbgjAutoData::getAutos( null, array( 'id', '=', (int) $id ), null, null, false );
		$params						=	$row->getParams();

		$js							=	"function conditionalCalculate() {"
									.		"$( '#conditional table' ).each( function() {"
									.			"if ( $( this ).find( 'tbody tr' ).length > 1 ) {"
									.				"$( this ).find( '.moveConditional,.removeConditional' ).removeClass( 'gjautoHide' );"
									.				"$( this ).find( 'tbody' ).sortable( 'enable' );"
									.			"} else {"
									.				"$( this ).find( '.moveConditional,.removeConditional' ).addClass( 'gjautoHide' );"
									.				"$( this ).find( 'tbody' ).sortable( 'disable' );"
									.			"}"
									.			"$( this ).find( 'tbody tr' ).each( function( index ) {"
									.				"$( this ).find( '.conditionalField input' ).attr( 'id', 'fields__field' + index ).attr( 'name', 'fields[field' + index + ']' );"
									.				"$( this ).find( '.conditionalOperator select' ).attr( 'id', 'operators__operator' + index ).attr( 'name', 'operators[operator' + index + ']' );"
									.				"$( this ).find( '.conditionalValue input' ).attr( 'id', 'values__value' + index ).attr( 'name', 'values[value' + index + ']' );"
									.			"});"
									.		"});"
									.	"};"
									.	"$( '.addConditional' ).live( 'click', function() {"
									.		"var conditional = $( this ).parents( 'tr' ).first().clone();"
									.		"conditional.find( '.conditionalField input,.conditionalOperator select,.conditionalValue input' ).val( '' ).removeClass( 'gjautoHide' );"
									.		"conditional.appendTo( '#conditional table tbody' );"
									.		"conditionalCalculate();"
									.	"});"
									.	"$( '.removeConditional' ).live( 'click', function() {"
									.		"if ( $( '#conditional table tbody tr' ).length > 1 ) {"
									.			"$( this ).parents( 'tr' ).first().remove();"
									.		"}"
									.		"conditionalCalculate();"
									.	"});"
									.	"$( '.conditionalOperator select' ).live( 'change', function() {"
									.		"if ( ( $( this ).val() == 6 ) || ( $( this ).val() == 7 ) ) {"
									.			"$( this ).closest( 'tr' ).find( '.conditionalValue input' ).addClass( 'gjautoHide' );"
									.		"} else {"
									.			"$( this ).closest( 'tr' ).find( '.conditionalValue input' ).removeClass( 'gjautoHide' );"
									.		"}"
									.	"});"
									.	"$( '#conditional table tbody' ).sortable( { items: 'tr', containment: 'parent', animated: true, stop: conditionalCalculate, tolerance: 'pointer', handle: '.moveConditional', opacity: 0.5 } );"
									.	"conditionalCalculate();"
									.	"function validate() {"
									.		"if ( $( '#trigger' ).val() ) {"
									.			"$( '#object,#access__' ).closest( 'tr' ).removeClass( 'gjautoHide' );"
									.			"if ( $( '#object' ).val() == 1 ) {"
									.				"$( '#variable' ).removeClass( 'gjautoHide' );"
									.				"$( '#variable_user' ).addClass( 'gjautoHide' );"
									.			"} else if ( $( '#object' ).val() == 3 ) {"
									.				"$( '#variable' ).addClass( 'gjautoHide' );"
									.				"$( '#variable_user' ).removeClass( 'gjautoHide' );"
									.			"} else {"
									.				"$( '#variable,#variable_user' ).addClass( 'gjautoHide' );"
									.			"}"
									.			"if ( $( '#access__' ).val() ) {"
									.				"$( '#access__' ).closest( 'tr' ).nextAll( 'tr' ).removeClass( 'gjautoHide' );"
									.				"$( '#params__auto' ).closest( 'tr' ).nextAll( 'tr' ).addClass( 'gjautoHide' );"
									.				"if ( $( '#params__auto' ).val() == 1 ) {"
									.					"$( '#list_groups' ).removeClass( 'gjautoHide' );"
									.					"$( '#params__status' ).closest( 'tr' ).removeClass( 'gjautoHide' );"
									.				"} else if ( $( '#params__auto' ).val() == 2 ) {"
									.					"$( '#list_category' ).removeClass( 'gjautoHide' );"
									.					"if ( $( '#params__category' ).val() ) {"
									.						"$( '#list_category' ).closest( 'tr' ).nextAll( 'tr' ).removeClass( 'gjautoHide' );"
									.						"if ( $( '#params__category' ).val() != -1 ) {"
									.							"$( '#params__types__,#params__cat_parent,#params__cat_name,#params__cat_description,#params__cat_owner,#params__cat_unique' ).closest( 'tr' ).addClass( 'gjautoHide' );"
									.						"}"
									.						"if ( $( '#params__grp_unique' ).val() == 1 ) {"
									.							"$( '#params__grp_autojoin' ).closest( 'tr' ).addClass( 'gjautoHide' );"
									.						"}"
									.					"} else {"
									.						"$( '#list_category' ).closest( 'tr' ).nextAll( 'tr' ).addClass( 'gjautoHide' );"
									.					"}"
									.				"} else if ( $( '#params__auto' ).val() == 3 ) {"
									.					"$( '#list_category' ).closest( 'tr' ).nextAll( 'tr' ).removeClass( 'gjautoHide' );"
									.					"$( '#params__grp_parent,#params__grp_name,#params__grp_description,#params__grp_owner,#params__grp_unique,#params__grp_autojoin,#params__type' ).closest( 'tr' ).addClass( 'gjautoHide' );"
									.				"} else if ( $( '#params__auto' ).val() == 4 ) {"
									.					"$( '#list_groups' ).removeClass( 'gjautoHide' );"
									.				"}"
									.			"} else {"
									.				"$( '#access__' ).closest( 'tr' ).nextAll( 'tr' ).addClass( 'gjautoHide' );"
									.			"}"
									.		"} else {"
									.			"$( '#trigger' ).closest( 'tr' ).nextAll( 'tr' ).addClass( 'gjautoHide' );"
									.		"}"
									.	"};"
									.	"$( '#triggers' ).change( function() {"
									.		"if ( $( '#trigger' ).val() ) {"
									.			"value = $( '#trigger' ).val() + ',' + $( this ).val();"
									.		"} else {"
									.			"value = $( this ).val();"
									.		"}"
									.		"if ( value ) {"
									.			"$( '#trigger' ).attr( 'value', value ).focus();"
									.			"$( this ).attr( 'value', '' );"
									.		"}"
									.	"});"
									.	"$( '#adminForm :input' ).bind( 'change keyup focus', function() {"
									.		"validate();"
									.	"});"
									.	"validate();";

		$_CB_framework->outputCbJQuery( $js, 'ui-all' );

		$input						=	array();

		$input['published']			=	moscomprofilerHTML::yesnoSelectList( 'published', null, (int) cbgjClass::getCleanParam( true, 'published', $row->get( 'published', 0 ) ) );
		$input['title']				=	'<input type="text" id="title" name="title" value="' . htmlspecialchars( cbgjClass::getCleanParam( true, 'title', $row->get( 'title' ) ) ) . '" class="inputbox" size="40" />';
		$input['description']		=	'<textarea id="description" name="description" class="inputbox" cols="40" rows="3">' . htmlspecialchars( cbgjClass::getCleanParam( true, 'description', $row->get( 'description' ) ) ) . '</textarea>';

		$listTriggers				=	array();
		$listTriggers[]				=	moscomprofilerHTML::makeOption( '', CBTxt::T( '- Add Trigger -' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOptGroup( CBTxt::T( 'Frontend' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onBeforeLoginFormDisplay', CBTxt::T( 'Before Login Form Display' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onBeforeFirstLogin', CBTxt::T( 'Before User First Login' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onBeforeLogin', CBTxt::T( 'Before User Login' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onLoginAuthentication', CBTxt::T( 'Login Authentication' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onDuringLogin', CBTxt::T( 'During Login' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onDoLoginNow', CBTxt::T( 'Do Login Now' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onAfterLogin', CBTxt::T( 'After User Login' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onBeforeLogout', CBTxt::T( 'Before User Logout' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onDoLogoutNow', CBTxt::T( 'Do Logout Now' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onAfterLogout', CBTxt::T( 'After User Logout' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onBeforeUserAvatarUpdate', CBTxt::T( 'Before Avatar Update' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onAfterUserAvatarUpdate', CBTxt::T( 'After Avatar Update' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onAfterUserProfileEditDisplay', CBTxt::T( 'After Profile Edit Display' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onBeforeUserUpdate', CBTxt::T( 'Before Profile Update' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onAfterUserUpdate', CBTxt::T( 'After Profile Update' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onBeforeUserProfileRequest', CBTxt::T( 'Before Profile Request' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onBeforeUserProfileDisplay', CBTxt::T( 'Before Profile Display' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onAfterUserProfileDisplay', CBTxt::T( 'After Profile Display' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onBeforeRegisterFormDisplay', CBTxt::T( 'Before Registration Form Display' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onBeforeRegisterForm', CBTxt::T( 'Before Registration Form' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onStartSaveUserRegistration', CBTxt::T( 'Start Save Registration' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onBeforeUserRegistration', CBTxt::T( 'Before Registration' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onAfterUserRegistration', CBTxt::T( 'After Registration' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onAfterUserRegistrationMailsSent', CBTxt::T( 'After Registration Mail Sent' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onBeforeAddConnection', CBTxt::T( 'Before Add Connection' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onAfterAddConnection', CBTxt::T( 'After Add Connection' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onBeforeRemoveConnection', CBTxt::T( 'Before Remove Connection' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onAfterRemoveConnection', CBTxt::T( 'After Remove Connection' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onBeforeDenyConnection', CBTxt::T( 'Before Deny Connection' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onAfterDenyConnection', CBTxt::T( 'After Deny Connection' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onBeforeAcceptConnection', CBTxt::T( 'Before Accept Connection' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onAfterAcceptConnection', CBTxt::T( 'After Accept Connection' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onLostPassForm', CBTxt::T( 'Lost Password Form' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onStartNewPassword', CBTxt::T( 'Start New Password' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onBeforeNewPassword', CBTxt::T( 'Before New Password' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onNewPassword', CBTxt::T( 'New Password' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onBeforeUsernameReminder', CBTxt::T( 'Before Username Reminder' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onAfterUsernameReminder', CBTxt::T( 'After Username Reminder' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onBeforeEmailUserForm', CBTxt::T( 'Before Email Form' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onAfterEmailUserForm', CBTxt::T( 'After Email Form' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onBeforeEmailUser', CBTxt::T( 'Before Email User' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onBeforeDisplayUsersList', CBTxt::T( 'Before Userlist Display' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOptGroup( CBTxt::T( 'Backend' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onBeforeUpdateUser', CBTxt::T( 'Before Profile Update' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onAfterUpdateUser', CBTxt::T( 'After Profile Update' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onBeforeNewUser', CBTxt::T( 'Before Registration' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onAfterNewUser', CBTxt::T( 'After Registration' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onBeforeDeleteUser', CBTxt::T( 'Before Delete User' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onAfterDeleteUser', CBTxt::T( 'After Delete User' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onBeforeUserBlocking', CBTxt::T( 'Before Blocking User' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onBeforeSyncUser', CBTxt::T( 'Before Sync User' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onAfterSyncUser', CBTxt::T( 'After Sync User' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onBeforeUserActive', CBTxt::T( 'Before User Active' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onAfterCheckCbDb', CBTxt::T( 'After Check CB Database' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onAfterCheckCbFieldsDb', CBTxt::T( 'After Check Fields Database' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onBeforeFixDb', CBTxt::T( 'Before Fix Database' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onAfterFixDb', CBTxt::T( 'After Fix Database' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onBeforeFixFieldsDb', CBTxt::T( 'Before Fix Fields Database' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onBeforeBackendUsersListBuildQuery', CBTxt::T( 'Before Userlist Build Query' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onAfterBackendUsersList', CBTxt::T( 'Before Userlist' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onBeforeBackendUsersEmailForm', CBTxt::T( 'Before Userlist Email Form' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onBeforeBackendUsersEmailStart', CBTxt::T( 'Before Userlist Email Start' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onBeforeBackendUserEmail', CBTxt::T( 'Before Userlist Email' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOptGroup( CBTxt::T( 'Frontend & Backend' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onBeforeUserProfileEditDisplay', CBTxt::T( 'Before Profile Edit Display' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onBeforeUserConfirm', CBTxt::T( 'Before User Confirm' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onAfterUserConfirm', CBTxt::T( 'After User Confirm' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onBeforeUserApproval', CBTxt::T( 'Before User Approval' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onAfterUserApproval', CBTxt::T( 'After User Approval' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onPrepareMenus', CBTxt::T( 'Prepare Menu' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onAfterFieldsFetch', CBTxt::T( 'After Fields Fetch' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onAfterTabsFetch', CBTxt::T( 'After Tabs Fetch' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onAfterPrepareViewTabs', CBTxt::T( 'After Prepare Tabs View' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onBeforeEditATab', CBTxt::T( 'Before Tab Edit' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onAfterEditATab', CBTxt::T( 'After Tab Edit' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onStartUsersList', CBTxt::T( 'Start Userlist' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onAfterUsersListFieldsSql', CBTxt::T( 'After Userlist Fields SQL' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onBeforeUsersListBuildQuery', CBTxt::T( 'Before Userlist Build Query' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onBeforeUsersListQuery', CBTxt::T( 'Before Userlist Query' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onInputFieldHtmlRender', CBTxt::T( 'Field HTML Render' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onFieldIcons', CBTxt::T( 'Field Icons' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onLogChange', CBTxt::T( 'Log Change' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onAfterAuthorizeAction', CBTxt::T( 'After Authorize Action' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onAfterAuthorizeView', CBTxt::T( 'After Authorize View' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOptGroup( CBTxt::T( 'CB GroupJive' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onPluginBE', CBTxt::T( 'Integration Backend' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeTools', CBTxt::T( 'Before Tools' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterTools', CBTxt::T( 'After Tools' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeNotification', CBTxt::T( 'Before Notification' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterNotification', CBTxt::T( 'After Notification' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeTemplate', CBTxt::T( 'Before Template' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterTemplate', CBTxt::T( 'After Template' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeUpdateCategory', CBTxt::T( 'Before Update Category' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeCreateCategory', CBTxt::T( 'Before Create Category' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterUpdateCategory', CBTxt::T( 'After Update Category' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterCreateCategory', CBTxt::T( 'After Create Category' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeDeleteCategory', CBTxt::T( 'Before Delete Category' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterDeleteCategory', CBTxt::T( 'After Delete Category' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeUpdateCategoryOrder', CBTxt::T( 'Before Update Category Order' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterUpdateCategoryOrder', CBTxt::T( 'After Update Category Order' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeUpdateCategoryState', CBTxt::T( 'Before Update Category State' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterUpdateCategoryState', CBTxt::T( 'After Update Category State' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeUpdateCategoryParams', CBTxt::T( 'Before Update Category Params' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterUpdateCategoryParams', CBTxt::T( 'After Update Category Params' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeSetCategoryParams', CBTxt::T( 'Before Set Category Params' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterSetCategoryParams', CBTxt::T( 'After Set Category Params' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeUpdateGroup', CBTxt::T( 'Before Update Group' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeCreateGroup', CBTxt::T( 'Before Create Group' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterUpdateGroup', CBTxt::T( 'After Update Group' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterCreateGroup', CBTxt::T( 'After Create Group' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeDeleteGroup', CBTxt::T( 'Before Delete Group' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterDeleteGroup', CBTxt::T( 'After Delete Group' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeUpdateGroupOrder', CBTxt::T( 'Before Update Group Order' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterUpdateGroupOrder', CBTxt::T( 'After Update Group Order' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeUpdateGroupState', CBTxt::T( 'Before Update Group State' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterUpdateGroupState', CBTxt::T( 'After Update Group State' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeUpdateGroupParams', CBTxt::T( 'Before Update Group Params' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterUpdateGroupParams', CBTxt::T( 'After Update Group Params' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeSetGroupParams', CBTxt::T( 'Before Set Group Params' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterSetGroupParams', CBTxt::T( 'After Set Group Params' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeUpdateUser', CBTxt::T( 'Before Update User' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeCreateUser', CBTxt::T( 'Before Create User' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterUpdateUser', CBTxt::T( 'After Update User' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterCreateUser', CBTxt::T( 'After Create User' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeDeleteUser', CBTxt::T( 'Before Delete User' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterDeleteUser', CBTxt::T( 'After Delete User' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeUpdateUserStatus', CBTxt::T( 'Before Update User Status' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterUpdateUserStatus', CBTxt::T( 'After Update User Status' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeUpdateUserParams', CBTxt::T( 'Before Update User Params' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterUpdateUserParams', CBTxt::T( 'After Update User Params' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeSetUserParams', CBTxt::T( 'Before Set User Params' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterSetUserParams', CBTxt::T( 'After Set User Params' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeUpdateInvite', CBTxt::T( 'Before Update Invite' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeCreateInvite', CBTxt::T( 'Before Create Invite' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterUpdateInvite', CBTxt::T( 'After Update Invite' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterCreateInvite', CBTxt::T( 'After Create Invite' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeDeleteInvite', CBTxt::T( 'Before Delete Invite' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterDeleteInvite', CBTxt::T( 'After Delete Invite' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeUpdateNotification', CBTxt::T( 'Before Update Notification' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeCreateNotification', CBTxt::T( 'Before Create Notification' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterUpdateNotification', CBTxt::T( 'After Update Notification' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterCreateNotification', CBTxt::T( 'After Create Notification' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeDeleteNotification', CBTxt::T( 'Before Delete Notification' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterDeleteNotification', CBTxt::T( 'After Delete Notification' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeUpdateNotificationParams', CBTxt::T( 'Before Update Notification Params' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterUpdateNotificationParams', CBTxt::T( 'After Update Notification Params' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeSetNotificationParams', CBTxt::T( 'Before Set Notification Params' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterSetNotificationParams', CBTxt::T( 'After Set Notification Params' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onPluginFE', CBTxt::T( 'Integration Frontend' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeMessageOverview', CBTxt::T( 'Before Message Overview' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterMessageOverview', CBTxt::T( 'After Message Overview' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeMessageCategory', CBTxt::T( 'Before Message Category' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterMessageCategory', CBTxt::T( 'After Message Category' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeJoinGroup', CBTxt::T( 'Before Join Group' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterJoinGroup', CBTxt::T( 'After Join Group' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeLeaveGroup', CBTxt::T( 'Before Leave Group' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterLeaveGroup', CBTxt::T( 'After Leave Group' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeMessageGroup', CBTxt::T( 'Before Message Group' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterMessageGroup', CBTxt::T( 'After Message Group' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onPluginBEToolbar', CBTxt::T( 'Integration Backend Toolbar' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onBeforeUpdateAuto', CBTxt::T( 'Before Update Auto' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onBeforeCreateAuto', CBTxt::T( 'Before Create Auto' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onAfterUpdateAuto', CBTxt::T( 'After Update Auto' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onAfterCreateAuto', CBTxt::T( 'After Create Auto' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onBeforeDeleteAuto', CBTxt::T( 'Before Delete Auto' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onAfterDeleteAuto', CBTxt::T( 'After Delete Auto' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onBeforeUpdateAutoOrder', CBTxt::T( 'Before Update Auto Order' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onAfterUpdateAutoOrder', CBTxt::T( 'After Update Auto Order' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onBeforeUpdateAutoParams', CBTxt::T( 'Before Update Auto Params' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onAfterUpdateAutoParams', CBTxt::T( 'After Update Auto Params' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onBeforeUpdateAutoState', CBTxt::T( 'Before Update Auto State' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onAfterUpdateAutoState', CBTxt::T( 'After Update Auto State' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onBeforeSetAutoFields', CBTxt::T( 'Before Set Auto Fields' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onAfterSetAutoFields', CBTxt::T( 'After Set Auto Fields' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onBeforeSetAutoOperators', CBTxt::T( 'Before Set Auto Operators' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onAfterSetAutoOperators', CBTxt::T( 'After Set Auto Operators' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onBeforeSetAutoValues', CBTxt::T( 'Before Set Auto Values' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onAfterSetAutoValues', CBTxt::T( 'After Set Auto Values' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onBeforeSetAutoParams', CBTxt::T( 'Before Set Auto Params' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onAfterSetAutoParams', CBTxt::T( 'After Set Auto Params' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onBeforeUpdateEvent', CBTxt::T( 'Before Update Event' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onBeforeCreateEvent', CBTxt::T( 'Before Create Event' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onAfterUpdateEvent', CBTxt::T( 'After Update Event' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onAfterCreateEvent', CBTxt::T( 'After Create Event' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onBeforeDeleteEvent', CBTxt::T( 'Before Delete Event' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onAfterDeleteEvent', CBTxt::T( 'After Delete Event' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onBeforeUpdateEventState', CBTxt::T( 'Before Update Event State' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onAfterUpdateEventState', CBTxt::T( 'After Update Event State' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onBeforeUpdateEventAttendance', CBTxt::T( 'Before Update Event Attendance' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onAfterUpdateEventAttendance', CBTxt::T( 'After Update Event Attendance' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onBeforeUpdateFile', CBTxt::T( 'Before Update File' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onBeforeCreateFile', CBTxt::T( 'Before Create File' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onAfterUpdateFile', CBTxt::T( 'After Update File' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onAfterCreateFile', CBTxt::T( 'After Create File' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onBeforeDeleteFile', CBTxt::T( 'Before Delete File' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onAfterDeleteFile', CBTxt::T( 'After Delete File' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onBeforeUpdateFileState', CBTxt::T( 'Before Update File State' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onAfterUpdateFileState', CBTxt::T( 'After Update File State' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onBeforeUpdatePhoto', CBTxt::T( 'Before Update Photo' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onBeforeCreatePhoto', CBTxt::T( 'Before Create Photo' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onAfterUpdatePhoto', CBTxt::T( 'After Update Photo' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onAfterCreatePhoto', CBTxt::T( 'After Create Photo' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onBeforeDeletePhoto', CBTxt::T( 'Before Delete Photo' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onAfterDeletePhoto', CBTxt::T( 'After Delete Photo' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onBeforeUpdatePhotoState', CBTxt::T( 'Before Update Photo State' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onAfterUpdatePhotoState', CBTxt::T( 'After Update Photo State' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onBeforeUpdateVideo', CBTxt::T( 'Before Update Video' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onBeforeCreateVideo', CBTxt::T( 'Before Create Video' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onAfterUpdateVideo', CBTxt::T( 'After Update Video' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onAfterCreateVideo', CBTxt::T( 'After Create Video' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onBeforeDeleteVideo', CBTxt::T( 'Before Delete Video' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onAfterDeleteVideo', CBTxt::T( 'After Delete Video' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onBeforeUpdateVideoState', CBTxt::T( 'Before Update Video State' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onAfterUpdateVideoState', CBTxt::T( 'After Update Video State' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onBeforeUpdateWall', CBTxt::T( 'Before Update Wall' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onBeforeCreateWall', CBTxt::T( 'Before Create Wall' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onAfterUpdateWall', CBTxt::T( 'After Update Wall' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onAfterCreateWall', CBTxt::T( 'After Create Wall' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onBeforeDeleteWall', CBTxt::T( 'Before Delete Wall' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onAfterDeleteWall', CBTxt::T( 'After Delete Wall' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onBeforeUpdateWallState', CBTxt::T( 'Before Update Wall State' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gjint_onAfterUpdateWallState', CBTxt::T( 'After Update Wall State' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onMenuBE', CBTxt::T( 'Backend Menu' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onCategoryEdit', CBTxt::T( 'Category Edit' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onGroupEdit', CBTxt::T( 'Group Edit' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onConfigIntegrations', CBTxt::T( 'Config Integrations' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onMenusIntegrationsGeneral', CBTxt::T( 'Menus Integrations General' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onMenusIntegrationsCategories', CBTxt::T( 'Menus Integrations Categories' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onMenusIntegrationsGroups', CBTxt::T( 'Menus Integrations Groups' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onMenusIntegrationsSave', CBTxt::T( 'Menus Integrations Save' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAuthorization', CBTxt::T( 'Authorization' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onCaptchaRender', CBTxt::T( 'Captcha Render' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onCaptchaValidate', CBTxt::T( 'Captcha Validate' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onToolbarBE', CBTxt::T( 'Backend Toolbar' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeOverviewCategoryMenu', CBTxt::T( 'Before Overview Category Menu' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterOverviewCategoryMenu', CBTxt::T( 'After Overview Category Menu' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeOverviewCategoryInfo', CBTxt::T( 'Before Overview Category Info' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterOverviewCategoryInfo', CBTxt::T( 'After Overview Category Info' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeCategoryGroupMenu', CBTxt::T( 'Before Category Group Menu' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterCategoryGroupMenu', CBTxt::T( 'After Category Group Menu' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeCategoryGroupInfo', CBTxt::T( 'Before Category Group Info' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterCategoryGroupInfo', CBTxt::T( 'After Category Group Info' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeCategoryTab', CBTxt::T( 'Before Category Tab' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterCategoryTab', CBTxt::T( 'After Category Tab' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeCategoryInfo', CBTxt::T( 'Before Category Info' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterCategoryInfo', CBTxt::T( 'After Category Info' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeCategoryMenu', CBTxt::T( 'Before Category Menu' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterCategoryMenu', CBTxt::T( 'After Category Menu' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeGroupInviteInfo', CBTxt::T( 'Before Group Invite Info' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeGroupInviteMenu', CBTxt::T( 'Before Group Invite Menu' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterGroupInviteMenu', CBTxt::T( 'After Group Invite Menu' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterGroupInviteInfo', CBTxt::T( 'After Group Invite Info' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeGroupTab', CBTxt::T( 'Before Group Tab' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterGroupTab', CBTxt::T( 'After Group Tab' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeGroupInfo', CBTxt::T( 'Before Group Info' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterGroupInfo', CBTxt::T( 'After Group Info' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeGroupMenu', CBTxt::T( 'Before Group Menu' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterGroupMenu', CBTxt::T( 'After Group Menu' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeGroupUserMenu', CBTxt::T( 'Before Group User Menu' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterGroupUserMenu', CBTxt::T( 'After Group User Menu' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeGroupUserInfo', CBTxt::T( 'Before Group User Info' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterGroupUserInfo', CBTxt::T( 'After Group User Info' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onGeneralNotifications', CBTxt::T( 'General Notifications' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onCategoryNotifications', CBTxt::T( 'Category Notifications' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onGroupNotifications', CBTxt::T( 'Group Notifications' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeOverviewInfo', CBTxt::T( 'Before Overview Info' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterOverviewInfo', CBTxt::T( 'After Overview Info' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeOverviewMenu', CBTxt::T( 'Before Overview Menu' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterOverviewMenu', CBTxt::T( 'After Overview Menu' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforePanelInfo', CBTxt::T( 'Before Panel Info' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterPanelInfo', CBTxt::T( 'After Panel Info' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforePanelMenu', CBTxt::T( 'Before Panel Menu' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterPanelMenu', CBTxt::T( 'After Panel Menu' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeProfileTab', CBTxt::T( 'Before Profile Tab' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterProfileTab', CBTxt::T( 'After Profile Tab' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeProfileOverviewCategoryMenu', CBTxt::T( 'Before Profile Overview Category Menu' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterProfileOverviewCategoryMenu', CBTxt::T( 'After Profile Overview Category Menu' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeProfileOverviewCategoryInfo', CBTxt::T( 'Before Profile Overview Category Info' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterProfileOverviewCategoryInfo', CBTxt::T( 'After Profile Overview Category Info' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeProfileCategoryGroupMenu', CBTxt::T( 'Before Profile Category Group Menu' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterProfileCategoryGroupMenu', CBTxt::T( 'After Profile Category Group Menu' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeProfileCategoryGroupInfo', CBTxt::T( 'Before Profile Category Group Info' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterProfileCategoryGroupInfo', CBTxt::T( 'After Profile Category Group Info' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeProfileGroupInvitedMenu', CBTxt::T( 'Before Profile Group Invited Menu' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterProfileGroupInvitedMenu', CBTxt::T( 'After Profile Group Invited Menu' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeProfileGroupInvitedInfo', CBTxt::T( 'Before Profile Group Invited Info' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterProfileGroupInvitedInfo', CBTxt::T( 'After Profile Group Invited Info' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeProfileGroupInviteInfo', CBTxt::T( 'Before Profile Group Invite Info' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onBeforeProfileGroupInviteMenu', CBTxt::T( 'Before Profile Group Invite Menu' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterProfileGroupInviteMenu', CBTxt::T( 'After Profile Group Invite Menu' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'gj_onAfterProfileGroupInviteInfo', CBTxt::T( 'After Profile Group Invite Info' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOptGroup( CBTxt::T( 'CB Paid Subscriptions' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onCPayAfterPlanRenewalSelected', CBTxt::T( 'After Plan Renewal Selected' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onCPayEditBasketIntegration', CBTxt::T( 'Edit Basket Integration' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onCbSubsAfterPaymentBasket', CBTxt::T( 'After Payment Basket' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onCPayBeforeDrawSomething', CBTxt::T( 'Before Draw Something' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onCPayAfterDrawSomething', CBTxt::T( 'After Draw Something' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onCPayBeforeDrawPlan', CBTxt::T( 'Before Draw Plan' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onCPayAfterDrawPlan', CBTxt::T( 'After Draw Plan' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onCPayAfterPlanSelected', CBTxt::T( 'After Plan Selected' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onCPayAfterPaymentStatusChange', CBTxt::T( 'After Payment Status Change' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onCPayAfterPaymentStatusUpdateEvent', CBTxt::T( 'After Payment Status Update Event' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onCPayBeforeBackendPlanDisplay', CBTxt::T( 'Before Backend Plan Display' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onCPayBeforeDisplayProductPeriodPrice', CBTxt::T( 'Before Display Product Period Price' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onCPayAfterDisplayProductPeriodPrice', CBTxt::T( 'After Display Product Period Price' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onCPayBeforeComputeTotalizersPaymentBasketUpdated', CBTxt::T( 'Before Compute Totalizers Payment Basket Updated' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onCPayBeforeStorePaymentBasketUpdated', CBTxt::T( 'Before Store Payment Basket Updated' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onCPayAfterPaymentBasketUpdated', CBTxt::T( 'After Payment Basket Updated' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onCPayPaymentItemEvent', CBTxt::T( 'Payment Item Event' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onCPayBeforeGetProductPrice', CBTxt::T( 'Before Get Product Price' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onCPayAfterGetProductPrice', CBTxt::T( 'After Get Product Price' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onCPayBeforeDisplaySubscriptionPeriodPrice', CBTxt::T( 'Before Display Subscription Period Price' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onCPayAfterDisplaySubscriptionPeriodPrice', CBTxt::T( 'After Display Subscription Period Price' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onCPayUserStateChange', CBTxt::T( 'User State Change' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onCPayBeforeMailerEmailMessageSent', CBTxt::T( 'Before Mailer Email Message Sent' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onCPayBeforeMailerPrivateMessageSent', CBTxt::T( 'Before Mailer Private Message Sent' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onCPayAfterMailerMessageSent', CBTxt::T( 'After Mailer Message Sent' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'onCPayBeforeDrawSubscription', CBTxt::T( 'Before Draw Subscription' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOptGroup( CBTxt::T( 'CB Activity' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'activity_onBeforeMessageDisplay', CBTxt::T( 'Before Message Display' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'activity_onAfterMessageDisplay', CBTxt::T( 'After Message Display' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'activity_onBeforeItemDisplay', CBTxt::T( 'Before Item Display' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'activity_onAfterItemDisplay', CBTxt::T( 'After Item Display' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'activity_onBeforeUpdateActivity', CBTxt::T( 'Before Update Activity' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'activity_onBeforeCreateActivity', CBTxt::T( 'Before Create Activity' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'activity_onAfterUpdateActivity', CBTxt::T( 'After Update Activity' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'activity_onAfterCreateActivity', CBTxt::T( 'After Create Activity' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'activity_onBeforeDeleteActivity', CBTxt::T( 'Before Delete Activity' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'activity_onAfterDeleteActivity', CBTxt::T( 'After Delete Activity' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'activity_onBeforeAccess', CBTxt::T( 'Before Access' ) );
		$listTriggers[]				=	moscomprofilerHTML::makeOption( 'activity_onAfterAccess', CBTxt::T( 'After Access' ) );
		$input['triggers']			=	moscomprofilerHTML::selectList( $listTriggers, 'triggers', null, 'value', 'text', null, 1, false, false );

		$input['trigger']			=	'<input type="text" id="trigger" name="trigger" value="' . htmlspecialchars( str_replace( ' ', '', cbgjClass::getCleanParam( true, 'trigger', $row->get( 'trigger' ) ) ) ) . '" class="inputbox" size="40" />';

		$listObject					=	array();
		$listObject[]				=	moscomprofilerHTML::makeOption( '0', CBTxt::T( 'Automatic' ) );
		$listObject[]				=	moscomprofilerHTML::makeOption( '1', CBTxt::T( 'Manually' ) );
		$listObject[]				=	moscomprofilerHTML::makeOption( '2', CBTxt::T( 'User' ) );
		$listObject[]				=	moscomprofilerHTML::makeOption( '3', CBTxt::T( 'Specific' ) );
		$input['object']			=	moscomprofilerHTML::selectList( $listObject, 'object', null, 'value', 'text', (int) cbgjClass::getCleanParam( true, 'object', $row->get( 'object', 0 ) ), 1, false, false );

		$listVariable				=	array();
		$listVariable[]				=	moscomprofilerHTML::makeOption( '1', CBTxt::T( 'Variable 1' ) );
		$listVariable[]				=	moscomprofilerHTML::makeOption( '2', CBTxt::T( 'Variable 2' ) );
		$listVariable[]				=	moscomprofilerHTML::makeOption( '3', CBTxt::T( 'Variable 3' ) );
		$listVariable[]				=	moscomprofilerHTML::makeOption( '4', CBTxt::T( 'Variable 4' ) );
		$listVariable[]				=	moscomprofilerHTML::makeOption( '5', CBTxt::T( 'Variable 5' ) );
		$listVariable[]				=	moscomprofilerHTML::makeOption( '6', CBTxt::T( 'Variable 6' ) );
		$listVariable[]				=	moscomprofilerHTML::makeOption( '7', CBTxt::T( 'Variable 7' ) );
		$listVariable[]				=	moscomprofilerHTML::makeOption( '8', CBTxt::T( 'Variable 8' ) );
		$listVariable[]				=	moscomprofilerHTML::makeOption( '9', CBTxt::T( 'Variable 9' ) );
		$listVariable[]				=	moscomprofilerHTML::makeOption( '10', CBTxt::T( 'Variable 10' ) );
		$input['variable']			=	moscomprofilerHTML::selectList( $listVariable, 'variable', null, 'value', 'text', (int) cbgjClass::getCleanParam( true, 'variable', $row->get( 'variable', 0 ) ), 1, false, false );

		$input['variable_user']		=	'******' . htmlspecialchars( cbgjClass::getCleanParam( true, 'variable', $row->get( 'variable' ) ) ) . '" class="inputbox" size="5" />';

		$listAccess					=	array();
		$listAccess[]				=	moscomprofilerHTML::makeOptGroup( CBTxt::T( 'Custom ACL' ) );
		$listAccess[]				=	moscomprofilerHTML::makeOption( '-1', CBTxt::T( 'Everybody' ) );
		$listAccess[]				=	moscomprofilerHTML::makeOption( '-2', CBTxt::T( 'All Non-Registered Users' ) );
		$listAccess[]				=	moscomprofilerHTML::makeOption( '-3', CBTxt::T( 'All Registered Users' ) );
		$listAccess[]				=	moscomprofilerHTML::makeOption( '-4', CBTxt::T( 'All Non-Moderators' ) );
		$listAccess[]				=	moscomprofilerHTML::makeOption( '-5', CBTxt::T( 'All Moderators' ) );
		$listAccess[]				=	moscomprofilerHTML::makeOptGroup( CBTxt::T( 'CMS ACL' ) );
		$listAccess					=	array_merge( $listAccess, $_CB_framework->acl->get_group_children_tree( null, 'USERS', false ) );
		$input['access']			=	moscomprofilerHTML::selectList( $listAccess, 'access[]', 'size="6" multiple="multiple"', 'value', 'text', explode( '|*|', cbgjClass::getCleanParam( true, 'access', $row->get( 'access' ) ) ), 1, false, false );

		$listOperator				=	array();
		$listOperator[]				=	moscomprofilerHTML::makeOption( '', CBTxt::T( '- Select Operator -' ) );
		$listOperator[]				=	moscomprofilerHTML::makeOption( '0', CBTxt::T( 'Equal To' ) );
		$listOperator[]				=	moscomprofilerHTML::makeOption( '1', CBTxt::T( 'Not Equal To' ) );
		$listOperator[]				=	moscomprofilerHTML::makeOption( '2', CBTxt::T( 'Greater Than' ) );
		$listOperator[]				=	moscomprofilerHTML::makeOption( '3', CBTxt::T( 'Less Than' ) );
		$listOperator[]				=	moscomprofilerHTML::makeOption( '4', CBTxt::T( 'Greater Than or Equal To' ) );
		$listOperator[]				=	moscomprofilerHTML::makeOption( '5', CBTxt::T( 'Less Than or Equal To' ) );
		$listOperator[]				=	moscomprofilerHTML::makeOption( '6', CBTxt::T( 'Empty' ) );
		$listOperator[]				=	moscomprofilerHTML::makeOption( '7', CBTxt::T( 'Not Empty' ) );
		$listOperator[]				=	moscomprofilerHTML::makeOption( '8', CBTxt::T( 'Does Contain' ) );
		$listOperator[]				=	moscomprofilerHTML::makeOption( '9', CBTxt::T( 'Does Not Contain' ) );
		$listOperator[]				=	moscomprofilerHTML::makeOption( '10', CBTxt::T( 'Is REGEX' ) );
		$listOperator[]				=	moscomprofilerHTML::makeOption( '11', CBTxt::T( 'Is Not REGEX' ) );

		$conditionals				=	count( explode( "\n", $row->get( 'field' ) ) );

		for ( $i = 0, $n = ( $conditionals ? $conditionals : 1 ); $i < $n; $i++ ) {
			$operator				=	cbgjClass::getCleanParam( true, "operator$i", null, null, $row->get( 'operator' ) );

			$input["field$i"]		=	'<input type="text" id="fields__field' . $i . '" name="fields[field' . $i . ']" value="' . htmlspecialchars( cbgjClass::getHTMLCleanParam( true, "field$i", null, null, $row->get( 'field' ) ) ) . '" class="inputbox" size="25" />';
			$input["operator$i"]	=	moscomprofilerHTML::selectList( $listOperator, "operators[operator$i]", null, 'value', 'text', $operator, 1, false, false );
			$input["value$i"]		=	'<input type="text" id="values__' . $i . '" name="values[value' . $i . ']" value="' . htmlspecialchars( cbgjClass::getHTMLCleanParam( true, "value$i", null, null, $row->get( 'value' ) ) ) . '" class="inputbox' . ( in_array( $operator, array( 6, 7 ) ) ? ' gjautoHide' : null ) . '" size="25" />';
		}

		$input['conditionals']		=	( $conditionals ? $conditionals : 1 );

		$listAuto					=	array();
		$listAuto[]					=	moscomprofilerHTML::makeOption( '', CBTxt::T( '- Select Auto -' ) );
		$listAuto[]					=	moscomprofilerHTML::makeOption( '1', CBTxt::T( 'Join Groups' ) );
		$listAuto[]					=	moscomprofilerHTML::makeOption( '4', CBTxt::T( 'Leave Groups' ) );
		$listAuto[]					=	moscomprofilerHTML::makeOption( '2', CBTxt::T( 'New Group' ) );
		$listAuto[]					=	moscomprofilerHTML::makeOption( '3', CBTxt::T( 'New Category' ) );
		$input['auto']				=	moscomprofilerHTML::selectList( $listAuto, 'params[auto]', null, 'value', 'text', $params->get( 'auto' ), 1, false, false );

		$listGroups					=	array();

		$categories					=	cbgjData::getCategories();

		if ( $categories ) foreach ( $categories as $cat ) {
			$groups					=	cbgjData::listArray( cbgjData::getGroups( null, array( 'category', '=', $cat->get( 'id' ) ) ) );

			if ( $groups ) {
				$listGroups[]		=	moscomprofilerHTML::makeOptGroup( $cat->get( 'name' ) );

				foreach ( $groups as $grp ) {
					$listGroups[]	=	moscomprofilerHTML::makeOption( $grp->value, $grp->text );
				}
			}
		}

		if ( $listGroups ) {
			$input['groups']		=	moscomprofilerHTML::selectList( $listGroups, 'params[groups][]', 'size="6" multiple="multiple"', 'value', 'text', explode( '|*|', $params->get( 'groups', '1|*|2|*|3' ) ), 1, false, false );

			array_unshift( $listGroups, moscomprofilerHTML::makeOption( '0', CBTxt::T( 'No Parent' ) ) );

			$input['grp_parent']	=	moscomprofilerHTML::selectList( $listGroups, 'params[grp_parent]', null, 'value', 'text', $params->get( 'grp_parent', 0 ), 1, false, false );
		} else {
			$input['groups']		=	CBTxt::T( 'No groups exist!' );
			$input['grp_parent']	=	CBTxt::T( 'No groups exist!' );
		}

		$listStatus					=	array();
		$listStatus[]				=	moscomprofilerHTML::makeOption( '-1', CBTxt::T( 'Banned' ) );
		$listStatus[]				=	moscomprofilerHTML::makeOption( '0', CBTxt::T( 'Inactive' ) );
		$listStatus[]				=	moscomprofilerHTML::makeOption( '1', CBTxt::T( 'Active' ) );
		$listStatus[]				=	moscomprofilerHTML::makeOption( '2', CBTxt::T( 'Moderator' ) );
		$listStatus[]				=	moscomprofilerHTML::makeOption( '3', CBTxt::T( 'Admin' ) );
		$listStatus[]				=	moscomprofilerHTML::makeOption( '4', CBTxt::T( 'Owner' ) );
		$input['status']			=	moscomprofilerHTML::selectList( $listStatus, 'params[status]', null, 'value', 'text', $params->get( 'status', 1 ), 1, false, false );

		if ( $categories ) {
			$categories				=	cbgjData::listArray( $categories );
			$categoriesParents		=	$categories;

			array_unshift( $categories, moscomprofilerHTML::makeOption( '-1', CBTxt::T( 'New Category' ) ) );
			array_unshift( $categories, moscomprofilerHTML::makeOption( '', CBTxt::T( '- Select Category -' ) ) );

			$input['category']		=	moscomprofilerHTML::selectList( $categories, 'params[category]', null, 'value', 'text', $params->get( 'category' ), 1, false, false );

			array_unshift( $categoriesParents, moscomprofilerHTML::makeOption( '0', CBTxt::T( 'No Parent' ) ) );

			$input['cat_parent']	=	moscomprofilerHTML::selectList( $categoriesParents, 'params[cat_parent]', null, 'value', 'text', $params->get( 'cat_parent', 0 ), 1, false, false );
		} else {
			$input['category']		=	CBTxt::T( 'No categories exist!' );
			$input['cat_parent']	=	CBTxt::T( 'No categories exist!' );
		}

		$input['cat_name']			=	'<input type="text" id="params__cat_name" name="params[cat_name]" value="' . htmlspecialchars( $params->get( 'cat_name' ) ) . '" class="inputbox" size="40" />';
		$input['cat_description']	=	'<textarea id="params__cat_description" name="params[cat_description]" class="inputbox" cols="40" rows="5">' . htmlspecialchars( $params->get( 'cat_description' ) ) . '</textarea>';
		$input['cat_owner']			=	'<input type="text" id="params__cat_owner" name="params[cat_owner]" value="' . htmlspecialchars( $params->get( 'cat_owner' ) ) . '" class="inputbox" size="10" />';
		$input['cat_unique']		=	moscomprofilerHTML::yesnoSelectList( 'params[cat_unique]', null, $params->get( 'cat_unique', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );

		$listTypes					=	array();
		$listTypes[]				=	moscomprofilerHTML::makeOption( '1', CBTxt::T( 'Open' ) );
		$listTypes[]				=	moscomprofilerHTML::makeOption( '2', CBTxt::T( 'Approval' ) );
		$listTypes[]				=	moscomprofilerHTML::makeOption( '3', CBTxt::T( 'Invite' ) );
		$input['types']				=	moscomprofilerHTML::selectList( $listTypes, 'params[types][]', 'size="4" multiple="multiple"', 'value', 'text', explode( '|*|', $params->get( 'types', '1|*|2|*|3' ) ), 1, false, false );

		$input['grp_name']			=	'<input type="text" id="params__grp_name" name="params[grp_name]" value="' . htmlspecialchars( $params->get( 'grp_name' ) ) . '" class="inputbox" size="40" />';
		$input['grp_description']	=	'<textarea id="params__grp_description" name="params[grp_description]" class="inputbox" cols="40" rows="5">' . htmlspecialchars( $params->get( 'grp_description' ) ) . '</textarea>';
		$input['grp_owner']			=	'<input type="text" id="params__grp_owner" name="params[grp_owner]" value="' . htmlspecialchars( $params->get( 'grp_owner' ) ) . '" class="inputbox" size="10" />';
		$input['grp_unique']		=	moscomprofilerHTML::yesnoSelectList( 'params[grp_unique]', null, $params->get( 'grp_unique', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['grp_autojoin']		=	moscomprofilerHTML::yesnoSelectList( 'params[grp_autojoin]', null, $params->get( 'grp_autojoin', 1 ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['type']				=	moscomprofilerHTML::selectList( $listTypes, 'params[type]', null, 'value', 'text', $params->get( 'type', 1 ), 1, false, false );
		$input['exclude']			=	'<input type="text" id="exclude" name="exclude" value="' . htmlspecialchars( $params->get( 'exclude' ) ) . '" class="inputbox" size="20" />';

		cbgjClass::displayMessage( $message );

		if ( class_exists( 'HTML_cbgroupjiveautoEdit' ) ) {
			HTML_cbgroupjiveautoEdit::showAutoEdit( $row, $input, $user, $plugin );
		} else {
			$this->showAutoEdit( $row, $input, $user, $plugin );
		}
	}
function editList($fid = '0', $option = 'com_comprofiler', $task = 'editList')
{
    global $_CB_database, $_CB_framework, $ueConfig;
    $canEditState = CBuser::getMyInstance()->authoriseAction('core.edit.state');
    $row = new moscomprofilerLists($_CB_database);
    if ($fid) {
        // load the row from the db table
        $row->load((int) $fid);
        // Check if user is a super user:
        if (!$_CB_framework->acl->amIaSuperAdmin()) {
            // Check if user belongs to useraccessgroupid:
            if (!in_array($row->useraccessgroupid, $_CB_framework->acl->get_groups_below_me(null, true))) {
                echo "<script type=\"text/javascript\"> alert('" . addslashes(CBTxt::T('Unauthorized Access')) . "'); window.history.go(-1);</script>\n";
                exit;
            }
            // Check if user belongs to viewaccesslevel:
            if (!in_array($row->viewaccesslevel, CBuser::getMyInstance()->getAuthorisedViewLevelsIds(false))) {
                echo "<script type=\"text/javascript\"> alert('" . addslashes(CBTxt::T('Unauthorized Access')) . "'); window.history.go(-1);</script>\n";
                exit;
            }
        }
    } else {
        $row->published = 1;
        $row->default = 0;
        $row->col1enabled = '1';
        $row->viewaccesslevel = 1;
        $row->useraccessgroupid = -2;
        $row->ordering = 999;
    }
    $lists['published'] = moscomprofilerHTML::yesnoSelectList('published', 'class="inputbox" size="1"' . ($canEditState ? '' : ' disabled="disabled"'), $row->published);
    $lists['default'] = moscomprofilerHTML::yesnoSelectList('default', 'class="inputbox" size="1"' . ($canEditState ? '' : ' disabled="disabled"'), $row->default);
    $gtree2 = array();
    if (!$_CB_framework->acl->amIaSuperAdmin() && in_array((int) $row->useraccessgroupid, $_CB_framework->acl->get_groups_below_me(null, true))) {
        // This should always be the case:
        // ensure user can't add group higher than themselves:
        $gtree2 = array_merge($gtree2, $_CB_framework->acl->get_groups_below_me());
        // vs $_CB_framework->acl->get_groups_below_me( null, true )  in tab lists
    } else {
        // Just in case we missed one, and as super-admin we should see everything:
        $gtree2 = array_merge($gtree2, $_CB_framework->acl->get_group_children_tree(null, 'USERS', false));
    }
    if (!$fid) {
        $row->usergroupids = implode(', ', $_CB_framework->acl->get_groups_below_me(null, true));
    }
    $usergids = explode(', ', $row->usergroupids);
    $ugids = array();
    foreach ($usergids as $usergid) {
        $ugids[] = $usergid;
    }
    // build the html select list for the view level access (filtered by View Access Levels visible by the admin if not super user:
    $accessTree = $_CB_framework->acl->get_access_children_tree(true, false, !$_CB_framework->acl->amIaSuperAdmin());
    $lists['viewaccesslevel'] = moscomprofilerHTML::selectList($accessTree, 'viewaccesslevel', 'class="inputbox"' . ($canEditState ? '' : ' disabled="disabled"'), 'value', 'text', intval($row->viewaccesslevel), 2);
    $lists['usergroups'] = moscomprofilerHTML::selectList($gtree2, 'usergroups', 'size="4" MULTIPLE onblur="loadUGIDs(this);" mosReq=1 mosLabel="' . htmlspecialchars(CBTxt::T('User Groups to Include in List')) . '"' . ($canEditState ? '' : ' disabled="disabled"'), 'value', 'text', $ugids, 1, false);
    // We want to use View Access Levels in Joomla 1.6, and hide old method if unused:
    if (isStillUsingGroupsForViewAccess($row->_tbl)) {
        $gtree3 = array();
        $gtree3[] = moscomprofilerHTML::makeOption(-2, '- ' . CBtxt::T('Everybody') . ' -');
        $gtree3[] = moscomprofilerHTML::makeOption(-1, '- ' . CBtxt::T('All Registered Users') . ' -');
        if (!$_CB_framework->acl->amIaSuperAdmin() && in_array((int) $row->useraccessgroupid, $_CB_framework->acl->get_groups_below_me(null, true))) {
            // This should always be the case:
            // ensure user can't add group higher than themselves:
            $gtree3 = array_merge($gtree3, $_CB_framework->acl->get_groups_below_me());
            // vs $_CB_framework->acl->get_groups_below_me( null, true )  in tab lists
        } else {
            // Just in case we missed one, and as super-admin we should see everything:
            $gtree3 = array_merge($gtree3, $_CB_framework->acl->get_group_children_tree(null, 'USERS', false));
        }
        $lists['useraccessgroup'] = moscomprofilerHTML::selectList($gtree3, 'useraccessgroupid', 'size="4" mosReq=1 mosLabel="' . htmlspecialchars(CBTxt::T('User Group to allow access to')) . '"' . ($canEditState ? '' : ' disabled="disabled"'), 'value', 'text', $row->useraccessgroupid, 2, false, false);
    } else {
        $lists['useraccessgroup'] = null;
    }
    $_CB_database->setQuery("SELECT f.fieldid, f.title" . "\n FROM #__comprofiler_fields AS f" . "\n INNER JOIN #__comprofiler_plugin AS p ON (f.pluginid = p.id)" . "\n WHERE ( ( f.published = 1" . "\n           AND f.profile > 0 ) OR ( f.name = 'username' ) " . (in_array($ueConfig['name_format'], array(1, 2, 4)) ? "OR ( f.name = 'name' ) " : '') . ")" . "\n  AND p.published = 1" . "\n ORDER BY f.ordering");
    $field = $_CB_database->loadObjectList();
    $fields = array();
    for ($i = 0, $n = count($field); $i < $n; $i++) {
        $fieldvalue =& $field[$i];
        $fields[$fieldvalue->fieldid] = $fieldvalue->title;
    }
    //print_r(array_values($fields));
    // params:
    $paramsEditorHtml = array();
    $options = array('option' => $option, 'task' => $task, 'cid' => $row->listid);
    // list-specific own parameters:
    cbimport('cb.xml.simplexml');
    $listXml = new CBSimpleXMLElement(file_get_contents($_CB_framework->getCfg('absolute_path') . '/administrator/components/com_comprofiler/xmlcb/cb.lists.xml'));
    $null = null;
    $params = new cbParamsEditorController($row->params, $listXml, $listXml, $null, null, 'cbxml', 'version', '1');
    $params->setOptions($options);
    $listParamsEditHtml = $params->draw(null, 'views', 'view', 'name', 'editlist');
    $paramsEditorHtml[] = array('title' => CBTxt::T('List parameters'), 'content' => $listParamsEditHtml);
    /*
    
    	// params:
    	$paramsEditorHtml			=	array();
    	$options					=	array( 'option' => $option, 'task' => $task, 'cid' => $row->fieldid );
    
    	// field-specific own parameters:
    	$fieldHandler				=	new cbFieldHandler();
    	$fieldOwnParamsEditHtml		=	$fieldHandler->drawParamsEditor( $row, $options );
    	if ( $fieldOwnParamsEditHtml ) {
    		$paramsEditorHtml[]		=	array( 'title' => CBTxt::T('Field-specific Parameters'), 'content' => $fieldOwnParamsEditHtml );
    	}
    
    	// additional non-specific other parameters:
    	$fieldsParamsPlugins		=	$_PLUGINS->getUserFieldParamsPluginIds();
    	foreach ($fieldsParamsPlugins as $pluginId => $fieldParamHandlerClassName ) {
    		$fieldParamHandler		=	new $fieldParamHandlerClassName( $pluginId, $row );			// cbFieldParamsHandler();
    		$addParamsHtml			=	$fieldParamHandler->drawParamsEditor( $options );
    		if ( $addParamsHtml ) {
    			$addParamsTitle		=	$fieldParamHandler->getFieldsParamsLabel();
    			$paramsEditorHtml[]	=	array( 'title' => $addParamsTitle, 'content' => $addParamsHtml );
    		}
    	}
    */
    HTML_comprofiler::editList($row, $lists, $fields, $option, $fid, $paramsEditorHtml);
}
	/**
	 * prepare frontend group edit render
	 *
	 * @param int       $id
	 * @param UserTable $user
	 */
	private function showGroupEdit( $id, $user )
	{
		global $_CB_framework;

		$row								=	CBGroupJive::getGroup( $id );
		$isModerator						=	CBGroupJive::isModerator( $user->get( 'id' ) );
		$categoryId							=	$this->input( 'category', null, GetterInterface::INT );

		if ( $categoryId === null ) {
			$category						=	$row->category();
		} else {
			$category						=	CBGroupJive::getCategory( $categoryId );
		}

		if ( $row->get( 'id' ) ) {
			$returnUrl						=	$_CB_framework->pluginClassUrl( $this->element, false, array( 'action' => 'groups', 'func' => 'show', 'id' => (int) $row->get( 'id' ) ) );
		} else {
			$returnUrl						=	$_CB_framework->pluginClassUrl( $this->element, false, array( 'action' => 'categories', 'func' => 'show', 'id' => (int) $category->get( 'id' ) ) );
		}

		if ( ! $isModerator ) {
			if ( ( $categoryId !== null ) && ( ! $category->get( 'id' ) ) && ( ! $this->params->get( 'groups_uncategorized', 1 ) ) ) {
				CBGroupJive::returnRedirect( $returnUrl, CBTxt::T( 'Category does not exist.' ), 'error' );
			} elseif ( $category->get( 'id' ) && ( ( ! $category->get( 'published' ) ) || ( ! CBGroupJive::canAccess( (int) $category->get( 'access' ), (int) $user->get( 'id' ) ) ) ) ) {
				CBGroupJive::returnRedirect( $returnUrl, CBTxt::T( 'You do not have access to this category.' ), 'error' );
			} elseif ( $row->get( 'id' ) ) {
				if ( $user->get( 'id' ) != $row->get( 'user_id' ) ) {
					CBGroupJive::returnRedirect( $returnUrl, CBTxt::T( 'You do not have sufficient permissions to edit this group.' ), 'error' );
				}
			} elseif ( ! CBGroupJive::canCreateGroup( $user, ( $categoryId === null ? null : $category ) ) ) {
				if ( $category->get( 'id' ) ) {
					CBGroupJive::returnRedirect( $returnUrl, CBTxt::T( 'You do not have sufficient permissions to create a group in this category.' ), 'error' );
				} else {
					CBGroupJive::returnRedirect( $returnUrl, CBTxt::T( 'You do not have sufficient permissions to create a group.' ), 'error' );
				}
			}
		}

		CBGroupJive::getTemplate( 'group_edit' );

		$input								=	array();

		$publishedTooltip					=	cbTooltip( null, CBTxt::T( 'Select publish state of this group. Unpublished groups will not be visible to the public.' ), null, null, null, null, null, 'data-hascbtooltip="true"' );

		$input['published']					=	moscomprofilerHTML::yesnoSelectList( 'published', 'class="form-control"' . $publishedTooltip, (int) $this->input( 'post/published', $row->get( 'published', 1 ), GetterInterface::INT ) );

		$categories							=	CBGroupJive::getCategoryOptions();

		if ( $row->get( 'id' ) && $category->get( 'id' ) ) {
			$available						=	array();

			foreach ( $categories as $option ) {
				$available[]				=	(int) $option->value;
			}

			if ( ! in_array( (int) $category->get( 'id' ), $available ) ) {
				array_unshift( $categories, moscomprofilerHTML::makeOption( (int) $category->get( 'id' ), CBTxt::T( $category->get( 'name' ) ) ) );
			}
		}

		if ( $categories ) {
			if ( $this->params->get( 'groups_uncategorized', 1 ) || $isModerator ) {
				array_unshift( $categories, moscomprofilerHTML::makeOption( 0, CBTxt::T( 'Uncategorized' ) ) );
			}

			$categoryTooltip				=	cbTooltip( null, CBTxt::T( 'Select the group category. This is the category a group will belong to and decide its navigation path.' ), null, null, null, null, null, 'data-hascbtooltip="true"' );

			$input['category']				=	moscomprofilerHTML::selectList( $categories, 'category', 'class="form-control"' . $categoryTooltip, 'value', 'text', (int) $category->get( 'id' ), 1, false, false );
		} else {
			$input['category']				=	null;

			if ( ! $this->params->get( 'groups_uncategorized', 1 ) ) {
				CBGroupJive::returnRedirect( $returnUrl, CBTxt::T( 'You do not have sufficient permissions to create a group in any categories.' ), 'error' );
			}
		}

		$types								=	explode( '|*|', $category->get( 'types' ) );
		$listType							=	array();

		if ( in_array( 1, $types ) || $isModerator || ( ! $category->get( 'id' ) ) || ( ! $types ) ) {
			$listType[]						=	moscomprofilerHTML::makeOption( '1', CBTxt::T( 'Open' ) );
		}

		if ( in_array( 2, $types ) || $isModerator || ( ! $category->get( 'id' ) ) || ( ! $types ) ) {
			$listType[]						=	moscomprofilerHTML::makeOption( '2', CBTxt::T( 'Approval' ) );
		}

		if ( in_array( 3, $types ) || $isModerator || ( ! $category->get( 'id' ) ) || ( ! $types ) ) {
			$listType[]						=	moscomprofilerHTML::makeOption( '3', CBTxt::T( 'Invite' ) );
		}

		$typeTooltip						=	cbTooltip( null, CBTxt::T( 'Select the group type. Type determines the way your group is joined (e.g. Invite requires new users to be invited to join your group).' ), null, null, null, null, null, 'data-hascbtooltip="true"' );

		$input['type']						=	moscomprofilerHTML::selectList( $listType, 'type', 'class="form-control"' . $typeTooltip, 'value', 'text', (int) $this->input( 'post/type', $row->get( 'type', 1 ), GetterInterface::INT ), 1, false, false );

		$nameTooltup						=	cbTooltip( null, CBTxt::T( 'Input the group name. This is the name that will distinguish this group from others. Suggested to input something unique and intuitive.' ), null, null, null, null, null, 'data-hascbtooltip="true"' );

		$input['name']						=	'<input type="text" id="name" name="name" value="' . htmlspecialchars( $this->input( 'post/name', $row->get( 'name' ), GetterInterface::STRING ) ) . '" class="form-control" size="25"' . $nameTooltup . ' />';

		$descriptionTooltip					=	cbTooltip( null, CBTxt::T( 'Optionally input the group description. The group description should be short and to the point; describing what your group is all about.' ), null, null, null, null, null, 'data-hascbtooltip="true"' );

		$input['description']				=	'<textarea id="description" name="description" class="form-control" cols="40" rows="5"' . $descriptionTooltip . '>' . htmlspecialchars( $this->input( 'post/description', $row->get( 'description' ), GetterInterface::STRING ) ) . '</textarea>';

		$listMethods						=	array();
		$listMethods[]						=	moscomprofilerHTML::makeOption( 0, CBTxt::T( 'No Change' ) );
		$listMethods[]						=	moscomprofilerHTML::makeOption( 1, CBTxt::T( 'Upload' ) );
		$listMethods[]						=	moscomprofilerHTML::makeOption( 2, CBTxt::T( 'Delete' ) );

		$input['canvas_method']				=	moscomprofilerHTML::selectList( $listMethods, 'canvas_method', 'class="form-control"', 'value', 'text', $this->input( 'post/canvas_method', 0, GetterInterface::INT ), 1, false, false );

		$canvasMinFileSize					=	(int) $this->params->get( 'canvas_min_size', 0 );
		$canvasMaxFileSize					=	(int) $this->params->get( 'canvas_max_size', 1024 );

		$canvasValidation					=	array();

		if ( $canvasMinFileSize || $canvasMaxFileSize ) {
			$canvasValidation[]				=	cbValidator::getRuleHtmlAttributes( 'filesize', array( $canvasMinFileSize, $canvasMaxFileSize, 'KB' ) );
		}

		$canvasValidation[]					=	cbValidator::getRuleHtmlAttributes( 'extension', 'jpg,jpeg,gif,png' );

		$canvasTooltip						=	cbTooltip( null, CBTxt::T( 'Optionally select the group canvas. A canvas should represent the topic of your group; please be respectful and tasteful when selecting a canvas.' ), null, null, null, null, null, 'data-hascbtooltip="true"' );

		$input['canvas']					=	'<input type="file" id="canvas" name="canvas" value="" class="form-control"' . $canvasTooltip . implode( ' ', $canvasValidation ) . ' />';

		$input['canvas_limits']				=	array( CBTxt::T( 'CANVAS_UPLOAD_LIMITS_EXT', 'Your file must be of [ext] type.', array( '[ext]' => 'jpg, jpeg, gif, png' ) ) );

		if ( $canvasMinFileSize ) {
			$input['canvas_limits'][]		=	CBTxt::T( 'CANVAS_UPLOAD_LIMITS_MIN', 'Your file should exceed [size].', array( '[size]' => CBGroupJive::getFormattedFileSize( $canvasMinFileSize * 1024 ) ) );
		}

		if ( $canvasMaxFileSize ) {
			$input['canvas_limits'][]		=	CBTxt::T( 'CANVAS_UPLOAD_LIMITS_MAX', 'Your file should not exceed [size].', array( '[size]' => CBGroupJive::getFormattedFileSize( $canvasMaxFileSize * 1024 ) ) );
		}

		$input['logo_method']				=	moscomprofilerHTML::selectList( $listMethods, 'logo_method', 'class="form-control"', 'value', 'text', $this->input( 'post/logo_method', 0, GetterInterface::INT ), 1, false, false );

		$logoMinFileSize					=	(int) $this->params->get( 'logo_min_size', 0 );
		$logoMaxFileSize					=	(int) $this->params->get( 'logo_max_size', 1024 );

		$logoValidation						=	array();

		if ( $logoMinFileSize || $logoMaxFileSize ) {
			$logoValidation[]				=	cbValidator::getRuleHtmlAttributes( 'filesize', array( $logoMinFileSize, $logoMaxFileSize, 'KB' ) );
		}

		$logoValidation[]					=	cbValidator::getRuleHtmlAttributes( 'extension', 'jpg,jpeg,gif,png' );

		$logoTooltip						=	cbTooltip( null, CBTxt::T( 'Optionally select the group logo. A logo should represent the topic of your group; please be respectful and tasteful when selecting a logo.' ), null, null, null, null, null, 'data-hascbtooltip="true"' );

		$input['logo']						=	'<input type="file" id="logo" name="logo" value="" class="form-control"' . $logoTooltip . implode( ' ', $logoValidation ) . ' />';

		$input['logo_limits']				=	array( CBTxt::T( 'LOGO_UPLOAD_LIMITS_EXT', 'Your file must be of [ext] type.', array( '[ext]' => 'jpg, jpeg, gif, png' ) ) );

		if ( $logoMinFileSize ) {
			$input['logo_limits'][]			=	CBTxt::T( 'LOGO_UPLOAD_LIMITS_MIN', 'Your file should exceed [size].', array( '[size]' => CBGroupJive::getFormattedFileSize( $logoMinFileSize * 1024 ) ) );
		}

		if ( $logoMaxFileSize ) {
			$input['logo_limits'][]			=	CBTxt::T( 'LOGO_UPLOAD_LIMITS_MAX', 'Your file should not exceed [size].', array( '[size]' => CBGroupJive::getFormattedFileSize( $logoMaxFileSize * 1024 ) ) );
		}

		$invitesTooltip						=	cbTooltip( null, CBTxt::T( 'Optionally enable or disable usage of invites. Invites allow group users to invite other users to join the group. Group owner and group administrators are exempt from this configuration and can always invite users. Note existing invites will still be accessible.' ), null, null, null, null, null, 'data-hascbtooltip="true"' );

		$input['invites']					=	moscomprofilerHTML::yesnoSelectList( 'params[invites]', 'class="form-control"' . $invitesTooltip, (int) $this->input( 'post/params.invites', $row->params()->get( 'invites', 1 ), GetterInterface::INT ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ), false );

		$ownerTooltip						=	cbTooltip( null, CBTxt::T( 'Input the group owner id. Group owner determines the creator of the group specified as User ID.' ), null, null, null, null, null, 'data-hascbtooltip="true"' );

		$input['user_id']					=	'<input type="text" id="user_id" name="user_id" value="' . (int) $this->input( 'post/user_id', $this->input( 'user', $row->get( 'user_id', $user->get( 'id' ) ), GetterInterface::INT ), GetterInterface::INT ) . '" class="digits required form-control" size="6"' . $ownerTooltip . ' />';

		HTML_groupjiveGroupEdit::showGroupEdit( $row, $input, $category, $user, $this );
	}
	/**
	 * Displays block user page
	 *
	 * @param int         $id
	 * @param string      $type
	 * @param UserTable   $user
	 * @param null|string $message
	 * @param null|string $messageType
	 */
	public function showBlock( $id, $type, $user, $message = null, $messageType = 'error' )
	{
		global $_CB_framework;

		$profileUrl				=	$_CB_framework->userProfileUrl( (int) $user->get( 'id' ), false, $this->_tab );

		if ( ! $user->get( 'id' ) ) {
			cbRedirect( $profileUrl, CBTxt::T( 'Not authorized.' ), 'error' );
		}

		$ipAddress				=	cbantispamClass::getUserIP( $user );
		$value					=	null;

		switch ( $type ) {
			case 'user':
				$value			=	(int) $user->get( 'id' );
				break;
			case 'ip':
				$value			=	$ipAddress;
				break;
			case 'email':
				$value			=	$user->get( 'email' );
				break;
			case 'domain':
				$emailParts		=	explode( '@', $user->get( 'email' ) );

				if ( count( $emailParts ) > 1 ) {
					$value		=	array_pop( $emailParts );
				}
				break;
		}

		$row					=	new cbantispamBlockTable();

		if ( $id ) {
			$row->load( (int) $id );
		}

		$js						=	"$( '#durations' ).on( 'change', function() {"
								.		"var value = $( this ).val();"
								.		"if ( value ) {"
								.			"$( '#duration' ).attr( 'value', value ).focus();"
								.			"$( this ).attr( 'value', '' );"
								.		"}"
								.	"});"
								.	"$( '#type' ).on( 'change', function() {"
								.		"if ( $( this ).val() == 'user' ) {"
								.			"$( '#banUsr,#blockUsr' ).show();"
								.			"$( '#ban_user' ).trigger( 'change' );"
								.		"} else {"
								.			"$( '#banUsr,#blockUsr,#banUsrReason' ).hide();"
								.		"}"
								.	"});"
								.	"$( '#ban_user' ).on( 'change', function() {"
								.		"if ( $( this ).val() == 1 ) {"
								.			"$( '#banUsrReason' ).show();"
								.		"} else {"
								.			"$( '#banUsrReason' ).hide();"
								.		"}"
								.	"});"
								.	"$( '#type' ).change();";

		$_CB_framework->outputCbJQuery( $js );

		cbantispamClass::getTemplate( 'block' );

		$input					=	array();

		$listType				=	array();
		$listType[]				=	moscomprofilerHTML::makeOption( 'user', CBTxt::T( 'User' ) );
		$listType[]				=	moscomprofilerHTML::makeOption( 'ip', CBTxt::T( 'IP Address' ) );
		$listType[]				=	moscomprofilerHTML::makeOption( 'email', CBTxt::T( 'Email Address' ) );
		$listType[]				=	moscomprofilerHTML::makeOption( 'domain', CBTxt::T( 'Email Domain' ) );

		$type					=	$this->input( 'post/type', $row->get( 'type', $type ), GetterInterface::STRING );
		$typeTooltip			=	cbTooltip( null, CBTxt::T( 'Select the block type. Type determines what value should be supplied.' ), null, null, null, null, null, 'data-hascbtooltip="true"' );

		$input['type']			=	moscomprofilerHTML::selectList( $listType, 'type', 'class="form-control required"' . ( $typeTooltip ? ' ' . $typeTooltip : null ), 'value', 'text', $type, 1, true, false, false );

		$valueTooltip			=	cbTooltip( null, CBTxt::T( 'Input block value in relation to the type. User type use the users user_id (e.g. 42). IP Address type use a full valid IP Address (e.g. 192.168.0.1). Email type use a fill valid email address (e.g. invalid@cb.invalid). Email Domain type use a full email address domain after @ (e.g. example.com).' ), null, null, null, null, null, 'data-hascbtooltip="true"' );

		$input['value']			=	'<input type="text" id="value" name="value" value="' . htmlspecialchars( $this->input( 'post/value', $row->get( 'value', $value ), GetterInterface::STRING ) ) . '" class="form-control required" size="25"' . ( $valueTooltip ? ' ' . $valueTooltip : null ) . ' />';

		$calendar				=	new cbCalendars( 1 );
		$dateTooltip			=	cbTooltip( null, CBTxt::T( 'Select the date and time the block should go in affect. Note date and time always functions in UTC.' ), null, null, null, null, null, 'data-hascbtooltip="true"' );

		$input['date']			=	$calendar->cbAddCalendar( 'date', null, true, $this->input( 'post/date', $row->get( 'date' ), GetterInterface::STRING ), false, true, null, null, $dateTooltip );

		$durationTooltip		=	cbTooltip( null, CBTxt::T( 'Input the strtotime relative date (e.g. +1 Day). This duration will be added to the datetime specified above. Leave blank for a forever duration.' ), null, null, null, null, null, 'data-hascbtooltip="true"' );

		$input['duration']		=	'<input type="text" id="duration" name="duration" value="' . htmlspecialchars( $this->input( 'post/duration', $row->get( 'duration' ), GetterInterface::STRING ) ) . '" class="form-control" size="25"' . ( $durationTooltip ? ' ' . $durationTooltip : null ) . ' />';

		$listDurations			=	array();
		$listDurations[]		=	moscomprofilerHTML::makeOption( '', CBTxt::T( '- Select Duration -' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( 'MIDNIGHT', CBTxt::T( 'Midnight' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( 'NOON', CBTxt::T( 'Noon' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( 'TOMORROW', CBTxt::T( 'Tomorrow' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( 'NEXT WEEK', CBTxt::T( 'Next Week' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( 'NEXT MONTH', CBTxt::T( 'Next Month' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( 'NEXT YEAR', CBTxt::T( 'Next Year' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( 'LAST DAY OF THIS MONTH', CBTxt::T( 'Last Day of This Month' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( 'FIRST DAY OF NEXT MONTH', CBTxt::T( 'First Day of Next Month' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( 'LAST DAY OF NEXT MONTH', CBTxt::T( 'Last Day of Next Month' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( 'LAST DAY OF THIS YEAR', CBTxt::T( 'Last Day of This Year' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( 'FIRST DAY OF NEXT YEAR', CBTxt::T( 'First Day of Next Year' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( 'LAST DAY OF NEXT YEAR', CBTxt::T( 'Last Day of Next Year' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( 'FIRST DAY OF JANUARY', CBTxt::T( 'First Day of January' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( 'LAST DAY OF JANUARY', CBTxt::T( 'Last Day of January' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( 'FIRST DAY OF FEBRUARY', CBTxt::T( 'First Day of February' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( 'LAST DAY OF FEBRUARY', CBTxt::T( 'Last Day of February' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( 'FIRST DAY OF MARCH', CBTxt::T( 'First Day of March' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( 'LAST DAY OF MARCH', CBTxt::T( 'Last Day of March' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( 'FIRST DAY OF APRIL', CBTxt::T( 'First Day of Apil' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( 'LAST DAY OF APRIL', CBTxt::T( 'Last Day of Apil' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( 'FIRST DAY OF MAY', CBTxt::T( 'First Day of May' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( 'LAST DAY OF MAY', CBTxt::T( 'Last Day of May' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( 'FIRST DAY OF JUNE', CBTxt::T( 'First Day of June' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( 'LAST DAY OF JUNE', CBTxt::T( 'Last Day of June' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( 'FIRST DAY OF JULY', CBTxt::T( 'First Day of July' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( 'LAST DAY OF JULY', CBTxt::T( 'Last Day of July' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( 'FIRST DAY OF AUGUST', CBTxt::T( 'First Day of August' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( 'LAST DAY OF AUGUST', CBTxt::T( 'Last Day of August' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( 'FIRST DAY OF SEPTEMBER', CBTxt::T( 'First Day of September' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( 'LAST DAY OF SEPTEMBER', CBTxt::T( 'Last Day of September' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( 'FIRST DAY OF OCTOBER', CBTxt::T( 'First Day of October' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( 'LAST DAY OF OCTOBER', CBTxt::T( 'Last Day of October' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( 'FIRST DAY OF NOVEMBER', CBTxt::T( 'First Day of November' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( 'LAST DAY OF NOVEMBER', CBTxt::T( 'Last Day of November' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( 'FIRST DAY OF DECEMBER', CBTxt::T( 'First Day of December' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( 'LAST DAY OF DECEMBER', CBTxt::T( 'Last Day of December' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( '+30 MINUTES', CBTxt::T( '30 Minutes' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( '+1 HOUR', CBTxt::T( '1 Hour' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( '+3 HOURS', CBTxt::T( '3 Hours' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( '+6 HOURS', CBTxt::T( '6 Hours' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( '+12 HOURS', CBTxt::T( '12 Hours' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( '+1 DAY', CBTxt::T( '1 Day' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( '+3 DAYS', CBTxt::T( '3 Days' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( '+6 DAYS', CBTxt::T( '6 Days' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( '+12 DAYS', CBTxt::T( '12 Days' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( '+1 WEEK', CBTxt::T( '1 Week' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( '+2 WEEKS', CBTxt::T( '2 Weeks' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( '+3 WEEKS', CBTxt::T( '3 Weeks' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( '+1 MONTH', CBTxt::T( '1 Month' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( '+3 MONTHS', CBTxt::T( '3 Months' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( '+6 MONTHS', CBTxt::T( '6 Months' ) );
		$listDurations[]		=	moscomprofilerHTML::makeOption( '+1 YEAR', CBTxt::T( '1 Year' ) );
		$input['durations']		=	moscomprofilerHTML::selectList( $listDurations, 'durations', 'class="form-control"', 'value', 'text', null, 0, true, false, false );

		$reasonTooltip			=	cbTooltip( null, CBTxt::T( 'Optionally input block reason. If left blank will default to spam.' ), null, null, null, null, null, 'data-hascbtooltip="true"' );

		$input['reason']		=	'<textarea id="reason" name="reason" class="form-control" cols="40" rows="5"' . ( $reasonTooltip ? ' ' . $reasonTooltip : null ) . '>' . htmlspecialchars( $this->input( 'post/reason', $row->get( 'reason' ), GetterInterface::STRING ) ) . '</textarea>';

		$banUserTooltip			=	cbTooltip( null, CBTxt::T( 'Optionally ban the users profile using Community Builder moderator ban feature. Note normal ban notification will be sent with the ban.' ), null, null, null, null, null, 'data-hascbtooltip="true"' );

		$input['ban_user']		=	moscomprofilerHTML::yesnoSelectList( 'ban_user', 'class="form-control"' . ( $banUserTooltip ? ' ' . $banUserTooltip : null ), $this->input( 'post/ban_user', 0, GetterInterface::INT ) );

		$banReasonTooltip		=	cbTooltip( null, CBTxt::T( 'Optionally input reason for profile ban.' ), null, null, null, null, null, 'data-hascbtooltip="true"' );

		$input['ban_reason']	=	'<textarea id="ban_reason" name="ban_reason" class="form-control" cols="40" rows="5"' . ( $banReasonTooltip ? ' ' . $banReasonTooltip : null ) . '>' . htmlspecialchars( $this->input( 'post/ban_reason', null, GetterInterface::STRING ) ) . '</textarea>';

		$blockUserTooltip		=	cbTooltip( null, CBTxt::T( 'Optionally block the users profile using Joomla block state.' ), null, null, null, null, null, 'data-hascbtooltip="true"' );

		$input['block_user']	=	moscomprofilerHTML::yesnoSelectList( 'block_user', 'class="form-control"' . ( $blockUserTooltip ? ' ' . $blockUserTooltip : null ), $this->input( 'post/block_user', 0, GetterInterface::INT ) );

		if ( $message ) {
			$_CB_framework->enqueueMessage( $message, $messageType );
		}

		HTML_cbantispamBlock::showBlock( $row, $input, $type, $this->_tab, $user, $this );
	}