예제 #1
0
	/**
	 * Draws the layout part for $part
	 *
	 * @param  string  $part  Layout part to render
	 * @return string         HTML output
	 */
	public function draw( $part = null )
	{
		global $ueConfig;

		if ( $part == 'Profile' ) {
			$this->wLeft			=	( isset( $this->userViewTabs['cb_left'] ) ? 100 : 0 );
			$this->wMiddle			=	( isset( $this->userViewTabs['cb_middle'] ) ? 100 : 0 );
			$this->wRight			=	( isset( $this->userViewTabs['cb_right'] ) ? 100 : 0 );
			$this->nCols			=	intval( ( $this->wLeft + $this->wMiddle + $this->wRight ) / 100 );

			switch ( $this->nCols ) {
				case 2 :
					$this->wLeft	=	( $this->wLeft ? (int) $ueConfig['left2colsWidth'] : 0 );
					$this->wMiddle	=	( $this->wMiddle ? ( $this->wLeft ? ( 100 - (int) $ueConfig['left2colsWidth'] ) : (int) $ueConfig['left2colsWidth'] ) : 0 );
					$this->wRight	=	( $this->wRight ? ( 100 - (int) $ueConfig['left2colsWidth'] ) : 0 );
					break;
				case 3 :
					$this->wLeft	=	(int) $ueConfig['left3colsWidth'];
					$this->wMiddle	=	( 100 - (int) $ueConfig['left3colsWidth'] - (int) $ueConfig['right3colsWidth'] );
					$this->wRight	=	(int) $ueConfig['right3colsWidth'];
					break;
			}
		}

		return parent::draw( $part );
	}
예제 #2
0
	/**
	 * Draws the user profile
	 *
	 * @return string
	 */
	function draw( $part = '' ) {
		global $ueConfig;
		// $params					=	$this->params;
		
		if ( $part == '' ) {
			// Profile view:

			//positions: head left middle right tabmain underall
			$this->wLeft	=	isset( $this->userViewTabs['cb_left'] ) ? 100 : 0;
			$this->wMiddle	=	isset( $this->userViewTabs['cb_middle'] ) ? 100 : 0;
			$this->wRight	=	isset( $this->userViewTabs['cb_right'] ) ? 100 : 0;
			$this->nCols	=	intval( ( $this->wLeft + $this->wMiddle + $this->wRight ) / 100 );
			switch ( $this->nCols ) {
				case 0 :
				case 1 :
					break;
				case 2 :
					$this->wLeft	=	$this->wLeft ? intval( $ueConfig['left2colsWidth'] ) - 1 : 0;
					$this->wMiddle	=	$this->wMiddle ? ( $this->wLeft ? 100 - intval( $ueConfig['left2colsWidth'] ) - 1 : intval( $ueConfig['left2colsWidth'] ) - 1 ) : 0;
					$this->wRight	=	$this->wRight ? 100 - intval( $ueConfig['left2colsWidth'] ) - 1 : 0;
					break;
				case 3 :
					$this->wLeft	=	intval( $ueConfig['left3colsWidth'] ) - 1;
					$this->wMiddle	=	100 - intval( $ueConfig['left3colsWidth'] ) - intval( $ueConfig['right3colsWidth'] ) - 1;
					$this->wRight	=	intval( $ueConfig['right3colsWidth'] ) - 1;
					break;
			}
		}
		// else: Edit profile view: nothing to setup
		return parent::draw( $part );
	}