Cheetah
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
ChWsbPageView Class Reference
Inheritance diagram for ChWsbPageView:
CategoriesCalendarPage CategoriesSearchPage ChAdsPageHome ChAdsPageView ChAvaPageMain ChBaseAccountView ChBaseCategoriesModule ChBaseIndexPageView ChBaseJoinPageView ChBaseProfileView ChBaseTagsModule ChBlogsPageHome ChChatPlusPage ChEventsPageMy ChFilesPageAlbumsMy ChFilesPageAlbumView ChFilesPageView ChGroupsPageMy ChGSearchPageMain ChMbpPageJoin ChMbpPageMy ChPhotosPageAlbumsMy ChPhotosPageAlbumView ChPhotosPageView ChPmtCartPage ChPmtDetailsPage ChPmtHistoryPage ChPmtOrdersPage ChPollView ChSitesPageHon ChSitesPageProfile ChSoundsPageAlbumsMy ChSoundsPageAlbumView ChSoundsPageView ChStorePageMy ChVideosPageAlbumsMy ChVideosPageAlbumView ChVideosPageView ChWmapPageEdit ChWmapPageMain ChWsbBlogsPageView ChWsbBrowse ChWsbCommunicator ChWsbFilesPageAlbumsOwner ChWsbFilesPageHome ChWsbFriendsPageView ChWsbMailBox ChWsbOrcaForumsHome ChWsbOrcaForumsIndex ChWsbPageSearchMain ChWsbPEditProcessor ChWsbRate ChWsbSearchPageView ChWsbTextPageMain ChWsbTextPageView ChWsbTwigPageMain ChWsbTwigPageView TagsCalendarPage TagsHomePage TagsSearchPage

Public Member Functions

 __construct ( $sPageName)
 
 checkAjaxMode ()
 
 createCache ()
 
 load ()
 
 isLoaded ()
 
 getPageTitle ()
 
 getPageWidth ()
 
 getPageClass ()
 
 getViewerInfo ()
 
 forcePageWidth ($iWidth)
 
 gen ()
 
 genPageEmpty ()
 
 genOnlyBlock ( $iBlockID, $sDynamicType='tab')
 
 getCode ()
 
 genColumnsHeader ()
 
 genColumnsFooter ()
 
 genColumn ( $iColumn)
 
 getBlockCode_Topest ($iColumn)
 
 genColumnHeader ( $iColumn, $fColumnWidth)
 
 genColumnFooter ( $iColumn)
 
 genBlock ( $iBlockID, $aBlock, $bStatic=true, $sDynamicType='tab')
 
 _getBlockCaptionCode ($iBlockID, $aBlock, $aBlockCode, $bStatic=true, $sDynamicType='tab')
 
 _getBlockTopCode ($iBlockID, $aBlock, $aBlockCode, $bStatic=true, $sDynamicType='tab')
 
 _getBlockBottomCode ($iBlockID, $aBlock, $aBlockCode, $bStatic=true, $sDynamicType='tab')
 
 isBlockVisible ( $sVisible)
 
 getBlockBottomCode ( $iBlockID, $aLinks)
 
 getBlockCode_MemberStat ()
 
 getBlockCode_Custom ( $iBlockID, $sContent)
 
 getBlockCode_Echo ( $iBlockID, $sContent)
 
 getBlockCode_TrueText ( $iBlockID, $sContent)
 
 getBlockCode_Text ($iBlockID, $sContent)
 
 getBlockCode_XML ( $iBlockID, $sContent)
 
 getBlockCode_PHP ( $iBlockID, $sContent)
 
 getBlockCode_Code ( $iBlockID, $sContent)
 
 getBlockCode_RSS ( $iBlockID, $sContent)
 
 getBlockCode_LoginSection ($iBlockID, $sParams='')
 
 GenFormWrap ($sMainContent, $sPage, $sFunctionName, $iMaxThumbWidth, $iThumbsCnt)
 
 getBlocksCacheObject ()
 
 genBlocksCacheKey ($sId)
 

Static Public Member Functions

static getBlockCaptionItemCode ( $iBlockID, $aLinks)
 
static getBlockCaptionMenu ( $iBlockID, $aLinks)
 

Public Attributes

 $sPageName
 
 $aPage
 
 $sCode = ''
 
 $sWhoViews = 'non'
 
 $iMemberID = 0
 
 $bAjaxMode = false
 
 $aColumnsWidth = array ()
 
 $sTableName = 'sys_page_compose'
 
 $sCacheFile
 
 $oCacher = null
 

Detailed Description

This class used for generation content of columned pages with blocks.

Example of using. To create your own columned php page using this class you should follow these instructions:

  1. Create in the root of your site file with chosen name. For example we will use example.php with following content:

<?php

require_once( 'inc/header.inc.php' ); require_once( CH_DIRECTORY_PATH_INC . 'design.inc.php' ); ch_import('ChWsbPageView');

class ChExamplePageView extends ChWsbPageView { function ChExamplePageView() { parent::ChWsbPageView('example'); // Attention! Here should be name which you will insert into sys_page_compose_pages in next step. }

// Here is functions that generate blocks on page. They are contain only contents of blocks. // You do not have to worry about it's title, design, etc. PageView class will make it itself.

// This function creates first block function getBlockCode_BlockOne() { return 'Hello world!'; }

// This function creates another block with dynamic menu tabs function getBlockCode_BlockTwo() { return array( 'I am Block Two. I have top menu!', array( _t('_View') => array( 'href' => $_SERVER['PHP_SELF'] . '?view=true', 'dynamic' => true, 'active' => !$this->isEditable, ), _t('_Edit') => array( 'href' => $_SERVER['PHP_SELF'] . '?edit=true', 'dynamicPopup' => true, 'active' => $this->isEditable, ) ) ); } }

$_page['name_index'] = 0; // choose your own index of template or leave if in doubt $_page['header'] = 'Example page'; $_ni = $_page['name_index'];

$oEPV = new ChExamplePageView(); $_page_cont[$_ni]['page_main_code'] = $oEPV->getCode();

PageCode();

?>

  1. Insert into your sys_page_compose_pages table one line. Name - Unique identification name of the page. Used for association page with its blocks. We recommend use only latin symbols and digits. (In our example use "example") Title - Title of your page, it is shown in the Page Builder. ("Example page") Order - Just the order in list of pages in the Page Builder.
  2. Insert into sys_page_compose lines for each block. ID - ID of the block. System field. Leave it by default (0). Will be passed to the function as first argument. Page - ID name of page which you inserted to sys_page_compose_pages ("example"). PageWidth - System field. Leave it by default ("960px"). Customized later. Desc - Few words about this block. Description. Caption - Title of this block. ("Block One", "Block Two") Column - System field. Leave it by default (0). Customized later. Order - System field. Leave it by default (0). Customized later. Func - Name of function in your class (without prefix) which will be called to generate the block. ("BlockOne", "BlockTwo") Content - Optional argument. Rarely used. Passed as the second argument to the function. DesignBox - Number of Design Box (container). Leave it by default if in doubt (1). ColWidth - System field. Leave it by default (0). Customized later. Visible - System field. Leave it by default (0). Customized later. MinWidth - Minimum recommended width of the block.
  3. Now go to the Page Builder, select your page in the list of pages and customize it (width, columns and blocks order). Then customize every block (caption, visibility, etc.).
  4. Open http://yoursite.com/example.php in your browser and you will see your new customized columned page.

Definition at line 98 of file ChWsbPageView.php.

Constructor & Destructor Documentation

◆ __construct()

ChWsbPageView::__construct (   $sPageName)

Member Function Documentation

◆ _getBlockBottomCode()

ChWsbPageView::_getBlockBottomCode (   $iBlockID,
  $aBlock,
  $aBlockCode,
  $bStatic = true,
  $sDynamicType = 'tab' 
)

Definition at line 483 of file ChWsbPageView.php.

◆ _getBlockCaptionCode()

ChWsbPageView::_getBlockCaptionCode (   $iBlockID,
  $aBlock,
  $aBlockCode,
  $bStatic = true,
  $sDynamicType = 'tab' 
)

Reimplemented in ChBaseProfileView.

Definition at line 452 of file ChWsbPageView.php.

◆ _getBlockTopCode()

ChWsbPageView::_getBlockTopCode (   $iBlockID,
  $aBlock,
  $aBlockCode,
  $bStatic = true,
  $sDynamicType = 'tab' 
)

Definition at line 470 of file ChWsbPageView.php.

◆ checkAjaxMode()

ChWsbPageView::checkAjaxMode ( )

Definition at line 133 of file ChWsbPageView.php.

◆ createCache()

ChWsbPageView::createCache ( )

Definition at line 139 of file ChWsbPageView.php.

◆ forcePageWidth()

ChWsbPageView::forcePageWidth (   $iWidth)

Definition at line 205 of file ChWsbPageView.php.

◆ gen()

ChWsbPageView::gen ( )

Definition at line 210 of file ChWsbPageView.php.

◆ genBlock()

ChWsbPageView::genBlock (   $iBlockID,
  $aBlock,
  $bStatic = true,
  $sDynamicType = 'tab' 
)

Reimplemented in ChBaseProfileView.

Definition at line 379 of file ChWsbPageView.php.

◆ genBlocksCacheKey()

ChWsbPageView::genBlocksCacheKey (   $sId)

Definition at line 836 of file ChWsbPageView.php.

◆ genColumn()

ChWsbPageView::genColumn (   $iColumn)

Definition at line 303 of file ChWsbPageView.php.

◆ genColumnFooter()

ChWsbPageView::genColumnFooter (   $iColumn)

Definition at line 371 of file ChWsbPageView.php.

◆ genColumnHeader()

ChWsbPageView::genColumnHeader (   $iColumn,
  $fColumnWidth 
)

Definition at line 333 of file ChWsbPageView.php.

◆ genColumnsFooter()

ChWsbPageView::genColumnsFooter ( )

Definition at line 298 of file ChWsbPageView.php.

◆ genColumnsHeader()

ChWsbPageView::genColumnsHeader ( )

Reimplemented in ChPollView.

Definition at line 292 of file ChWsbPageView.php.

◆ GenFormWrap()

ChWsbPageView::GenFormWrap (   $sMainContent,
  $sPage,
  $sFunctionName,
  $iMaxThumbWidth,
  $iThumbsCnt 
)

Definition at line 810 of file ChWsbPageView.php.

◆ genOnlyBlock()

ChWsbPageView::genOnlyBlock (   $iBlockID,
  $sDynamicType = 'tab' 
)

Definition at line 241 of file ChWsbPageView.php.

◆ genPageEmpty()

ChWsbPageView::genPageEmpty ( )

Definition at line 232 of file ChWsbPageView.php.

◆ getBlockBottomCode()

ChWsbPageView::getBlockBottomCode (   $iBlockID,
  $aLinks 
)

Definition at line 656 of file ChWsbPageView.php.

◆ getBlockCaptionItemCode()

static ChWsbPageView::getBlockCaptionItemCode (   $iBlockID,
  $aLinks 
)
static

Definition at line 502 of file ChWsbPageView.php.

◆ getBlockCaptionMenu()

static ChWsbPageView::getBlockCaptionMenu (   $iBlockID,
  $aLinks 
)
static

Definition at line 586 of file ChWsbPageView.php.

◆ getBlockCode_Code()

ChWsbPageView::getBlockCode_Code (   $iBlockID,
  $sContent 
)

Definition at line 748 of file ChWsbPageView.php.

◆ getBlockCode_Custom()

ChWsbPageView::getBlockCode_Custom (   $iBlockID,
  $sContent 
)

Definition at line 703 of file ChWsbPageView.php.

◆ getBlockCode_Echo()

ChWsbPageView::getBlockCode_Echo (   $iBlockID,
  $sContent 
)

Definition at line 711 of file ChWsbPageView.php.

◆ getBlockCode_LoginSection()

ChWsbPageView::getBlockCode_LoginSection (   $iBlockID,
  $sParams = '' 
)

Definition at line 771 of file ChWsbPageView.php.

◆ getBlockCode_MemberStat()

ChWsbPageView::getBlockCode_MemberStat ( )

members statistic block

Definition at line 698 of file ChWsbPageView.php.

◆ getBlockCode_PHP()

ChWsbPageView::getBlockCode_PHP (   $iBlockID,
  $sContent 
)

Definition at line 740 of file ChWsbPageView.php.

◆ getBlockCode_RSS()

ChWsbPageView::getBlockCode_RSS (   $iBlockID,
  $sContent 
)

Definition at line 753 of file ChWsbPageView.php.

◆ getBlockCode_Text()

ChWsbPageView::getBlockCode_Text (   $iBlockID,
  $sContent 
)

Definition at line 725 of file ChWsbPageView.php.

◆ getBlockCode_Topest()

ChWsbPageView::getBlockCode_Topest (   $iColumn)

Definition at line 328 of file ChWsbPageView.php.

◆ getBlockCode_TrueText()

ChWsbPageView::getBlockCode_TrueText (   $iBlockID,
  $sContent 
)

Definition at line 716 of file ChWsbPageView.php.

◆ getBlockCode_XML()

ChWsbPageView::getBlockCode_XML (   $iBlockID,
  $sContent 
)

Definition at line 730 of file ChWsbPageView.php.

◆ getBlocksCacheObject()

ChWsbPageView::getBlocksCacheObject ( )

Definition at line 829 of file ChWsbPageView.php.

◆ getCode()

ChWsbPageView::getCode ( )

Reimplemented in ChWallPage, ChGroupsPageView, and ChEventsPageView.

Definition at line 261 of file ChWsbPageView.php.

◆ getPageClass()

ChWsbPageView::getPageClass ( )

Definition at line 192 of file ChWsbPageView.php.

◆ getPageTitle()

ChWsbPageView::getPageTitle ( )

Definition at line 182 of file ChWsbPageView.php.

◆ getPageWidth()

ChWsbPageView::getPageWidth ( )

Definition at line 187 of file ChWsbPageView.php.

◆ getViewerInfo()

ChWsbPageView::getViewerInfo ( )

Definition at line 197 of file ChWsbPageView.php.

◆ isBlockVisible()

ChWsbPageView::isBlockVisible (   $sVisible)

Definition at line 494 of file ChWsbPageView.php.

◆ isLoaded()

ChWsbPageView::isLoaded ( )

Definition at line 177 of file ChWsbPageView.php.

◆ load()

ChWsbPageView::load ( )

Definition at line 146 of file ChWsbPageView.php.

Member Data Documentation

◆ $aColumnsWidth

ChWsbPageView::$aColumnsWidth = array ()

Definition at line 107 of file ChWsbPageView.php.

◆ $aPage

ChWsbPageView::$aPage

Definition at line 101 of file ChWsbPageView.php.

◆ $bAjaxMode

ChWsbPageView::$bAjaxMode = false

Definition at line 105 of file ChWsbPageView.php.

◆ $iMemberID

ChWsbPageView::$iMemberID = 0

Definition at line 104 of file ChWsbPageView.php.

◆ $oCacher

ChWsbPageView::$oCacher = null

Definition at line 112 of file ChWsbPageView.php.

◆ $sCacheFile

ChWsbPageView::$sCacheFile

Definition at line 110 of file ChWsbPageView.php.

◆ $sCode

ChWsbPageView::$sCode = ''

Definition at line 102 of file ChWsbPageView.php.

◆ $sPageName

ChWsbPageView::$sPageName

Definition at line 100 of file ChWsbPageView.php.

◆ $sTableName

ChWsbPageView::$sTableName = 'sys_page_compose'

Definition at line 109 of file ChWsbPageView.php.

◆ $sWhoViews

ChWsbPageView::$sWhoViews = 'non'

Definition at line 103 of file ChWsbPageView.php.


The documentation for this class was generated from the following file: