Cheetah
Public Member Functions | Public Attributes | List of all members
ChBaseFunctions Class Reference
Inheritance diagram for ChBaseFunctions:
ChTemplFunctions

Public Member Functions

 __construct ()
 
 getProfileMatch ( $memberID, $profileID)
 
 getProfileZodiac ( $profileDate)
 
 getProfileViewActions ( $iProfileId, $bDynamic=false)
 
 TemplPageAddComponent ($sKey)
 
 genActionLink (&$aObjectParamaters, $aRow, $sCssClass=null, $sTemplateIndexActionLink='action')
 
 markerReplace (&$aMemberSettings, $sTransformText, $sExecuteCode=null, $bTranslate=false)
 
 msgBox ($sText, $iTimer=0, $sOnTimer="")
 
 advMsgBox ($sText, $aOptions=array())
 
 isAllowedShare (&$aDataEntry)
 
 loadingBoxInline ($sName='')
 
 loadingBox ($sName='', $sClass='')
 
 popupBox ($sName, $sTitle, $sContent, $aActions=array())
 
 transBox ($content, $isPlaceInCenter=false)
 
 genSexIcon ($sSex)
 
 getSexPic ($sSex, $sType='medium')
 
 getMemberAvatar ($iId, $sType='medium', $bRetina=false)
 
 getMemberThumbnail ($iId, $sFloat='none', $bGenProfLink=false, $sForceSex='visitor', $isAutoCouple=true, $sType='medium', $aOnline=array(), $sTmplSfx='')
 
 getMemberIcon ($iId, $sFloat='none', $bGenProfLink=false, $sTmplSfx='')
 
 _getImageShared ($aImageInfo, $sType='thumb')
 
 getTemplateIcon ($sName)
 
 getTemplateImage ($sName)
 
 genObjectsActions (&$aKeys, $sActionsType, $bSubMenuMode=false, $sTemplateIndex='actions', $sTemplateIndexActionLink='action')
 
 centerContent ($s, $sBlockStyle, $isClearBoth=true)
 
 genSiteLogo ()
 
 getLogoUrl ($bRetina=false)
 
 genSiteSplash ()
 
 genSiteSearch ($sText='')
 
 genSiteServiceMenu ()
 
 genSiteBottomMenu ()
 
 genNotifyMessage ($sMessage, $sDirection='left', $isButton=false, $sScript='')
 
 getSiteStatBody ($aVal, $sMode='')
 
 genGalleryImages ($aImages, $oTemplate=false)
 
 sysImage ($sImg, $sClassAdd='', $sAlt='', $sAttr='', $sImageType=false, $iSize=16)
 
 getUserTitle ($iId)
 
 getUserInfo ($iId)
 
 getLanguageSwitcher ($sCurrent)
 
 getTemplateSwitcher ($sCurrent)
 

Public Attributes

 $aSpecialKeys
 

Detailed Description

Definition at line 13 of file ChBaseFunctions.php.

Constructor & Destructor Documentation

◆ __construct()

ChBaseFunctions::__construct ( )

Reimplemented in ChTemplFunctions, ChTemplFunctions, and ChTemplFunctions.

Definition at line 17 of file ChBaseFunctions.php.

Member Function Documentation

◆ _getImageShared()

ChBaseFunctions::_getImageShared (   $aImageInfo,
  $sType = 'thumb' 
)

Get image of the specified type by image id

Parameters
$aImageInfoimage info array with the following info $aImageInfo['Avatar'] - photo id, NOTE: it not relatyed to profiles avataras module at all
$sImgTypeimage type

Definition at line 639 of file ChBaseFunctions.php.

◆ advMsgBox()

ChBaseFunctions::advMsgBox (   $sText,
  $aOptions = array() 
)

Function will generate an advanced Message Box. ;

Parameters
:$sText(string) Text to display in the message box. (Required) ;
:$aOptions(array) Array of additional options to pass to function. (Optional) ;

All params in the $aOptions array are optional. Below is the option arrays defaults.

$aOptions = array( 'timer' => 0, // Time in seconds before box is closed automatically. 'onTimer' => '', // Javascript function to be called when close timer expires. 'showclosebtn' => false, // Show a close button at the bottom of the message box. 'removefog' => false, // Remove background fog when clicking the close button. 'class' => 'msgbox_content ch-def-font-large', // Class to use for the message box. 'buttonclass' => 'ch-btn', // Class to use for the message box close button. 'showtitle' => false, // Show a title on the message box. 'showtitleclose' => false, // Show a close X in the message box title area. 'titletext' => '', // The text to display for the title. 'titleclass' => 'MsgBoxTitle', // Class to use for the title. 'showicon' => false, // So a icon to the left of the message. 'icon' => 'info-circle', // The icon to display. 'iconclass' => 'sys-icon icon-large', // The class to use for the icon. );

Definition at line 312 of file ChBaseFunctions.php.

◆ centerContent()

ChBaseFunctions::centerContent (   $s,
  $sBlockStyle,
  $isClearBoth = true 
)

alternative to GenFormWrap easy to use but javascript based $s - content to be centered $sBlockStyle - block's style, jquery selector

see also ch_center_content javascript function, if you need to call this function from javascript

Definition at line 774 of file ChBaseFunctions.php.

◆ genActionLink()

ChBaseFunctions::genActionLink ( $aObjectParamaters,
  $aRow,
  $sCssClass = null,
  $sTemplateIndexActionLink = 'action' 
)

Function will generate object's action link ;

Parameters
:$aObjectParamaters(array) contain special markers ;
:$aRow(array) links's info ;
:$sCssClass(string) additional css style ;
Returns
: Html presentation data ;

Definition at line 151 of file ChBaseFunctions.php.

◆ genGalleryImages()

ChBaseFunctions::genGalleryImages (   $aImages,
  $oTemplate = false 
)

Definition at line 952 of file ChBaseFunctions.php.

◆ genNotifyMessage()

ChBaseFunctions::genNotifyMessage (   $sMessage,
  $sDirection = 'left',
  $isButton = false,
  $sScript = '' 
)

Definition at line 898 of file ChBaseFunctions.php.

◆ genObjectsActions()

ChBaseFunctions::genObjectsActions ( $aKeys,
  $sActionsType,
  $bSubMenuMode = false,
  $sTemplateIndex = 'actions',
  $sTemplateIndexActionLink = 'action' 
)

@description : function will generate object's action lists;

Parameters
:$aKeys(array) - array with all nedded keys;
:$sActionsType(string) - type of actions;
:$iDivider(integer) - number of column;
Returns
: HTML presentation data;

Definition at line 663 of file ChBaseFunctions.php.

◆ genSexIcon()

ChBaseFunctions::genSexIcon (   $sSex)

@description : function will generate the sex icon ;

Parameters
:$sSex(string) - sex name ;
Returns
: (text) - path to image ;

Definition at line 465 of file ChBaseFunctions.php.

◆ genSiteBottomMenu()

ChBaseFunctions::genSiteBottomMenu ( )

Function will generate site's bottom menu;

Returns
: Html presentation data;

Definition at line 891 of file ChBaseFunctions.php.

◆ genSiteLogo()

ChBaseFunctions::genSiteLogo ( )

Generates site's main logo.

Returns
: HTML presentation data;

Definition at line 807 of file ChBaseFunctions.php.

◆ genSiteSearch()

ChBaseFunctions::genSiteSearch (   $sText = '')

Function will generate site's search;

Returns
: Html presentation data;

Reimplemented in ChTemplFunctions.

Definition at line 864 of file ChBaseFunctions.php.

◆ genSiteServiceMenu()

ChBaseFunctions::genSiteServiceMenu ( )

Function will generate site's service menu;

Returns
: Html presentation data;

Reimplemented in ChTemplFunctions.

Definition at line 879 of file ChBaseFunctions.php.

◆ genSiteSplash()

ChBaseFunctions::genSiteSplash ( )

Generates site's splash.

Returns
: HTML presentation data;

Definition at line 841 of file ChBaseFunctions.php.

◆ getLanguageSwitcher()

ChBaseFunctions::getLanguageSwitcher (   $sCurrent)

Definition at line 1042 of file ChBaseFunctions.php.

◆ getLogoUrl()

ChBaseFunctions::getLogoUrl (   $bRetina = false)

Definition at line 825 of file ChBaseFunctions.php.

◆ getMemberAvatar()

ChBaseFunctions::getMemberAvatar (   $iId,
  $sType = 'medium',
  $bRetina = false 
)

Definition at line 490 of file ChBaseFunctions.php.

◆ getMemberIcon()

ChBaseFunctions::getMemberIcon (   $iId,
  $sFloat = 'none',
  $bGenProfLink = false,
  $sTmplSfx = '' 
)

Definition at line 628 of file ChBaseFunctions.php.

◆ getMemberThumbnail()

ChBaseFunctions::getMemberThumbnail (   $iId,
  $sFloat = 'none',
  $bGenProfLink = false,
  $sForceSex = 'visitor',
  $isAutoCouple = true,
  $sType = 'medium',
  $aOnline = array(),
  $sTmplSfx = '' 
)

Definition at line 501 of file ChBaseFunctions.php.

◆ getProfileMatch()

ChBaseFunctions::getProfileMatch (   $memberID,
  $profileID 
)

Definition at line 22 of file ChBaseFunctions.php.

◆ getProfileViewActions()

ChBaseFunctions::getProfileViewActions (   $iProfileId,
  $bDynamic = false 
)

Definition at line 33 of file ChBaseFunctions.php.

◆ getProfileZodiac()

ChBaseFunctions::getProfileZodiac (   $profileDate)

Definition at line 28 of file ChBaseFunctions.php.

◆ getSexPic()

ChBaseFunctions::getSexPic (   $sSex,
  $sType = 'medium' 
)

Definition at line 479 of file ChBaseFunctions.php.

◆ getSiteStatBody()

ChBaseFunctions::getSiteStatBody (   $aVal,
  $sMode = '' 
)

Definition at line 917 of file ChBaseFunctions.php.

◆ getTemplateIcon()

ChBaseFunctions::getTemplateIcon (   $sName)

Definition at line 644 of file ChBaseFunctions.php.

◆ getTemplateImage()

ChBaseFunctions::getTemplateImage (   $sName)

Definition at line 650 of file ChBaseFunctions.php.

◆ getTemplateSwitcher()

ChBaseFunctions::getTemplateSwitcher (   $sCurrent)

Definition at line 1081 of file ChBaseFunctions.php.

◆ getUserInfo()

ChBaseFunctions::getUserInfo (   $iId)

Definition at line 1031 of file ChBaseFunctions.php.

◆ getUserTitle()

ChBaseFunctions::getUserTitle (   $iId)

Definition at line 1020 of file ChBaseFunctions.php.

◆ isAllowedShare()

ChBaseFunctions::isAllowedShare ( $aDataEntry)

Definition at line 380 of file ChBaseFunctions.php.

◆ loadingBox()

ChBaseFunctions::loadingBox (   $sName = '',
  $sClass = '' 
)

Definition at line 392 of file ChBaseFunctions.php.

◆ loadingBoxInline()

ChBaseFunctions::loadingBoxInline (   $sName = '')

Definition at line 387 of file ChBaseFunctions.php.

◆ markerReplace()

ChBaseFunctions::markerReplace ( $aMemberSettings,
  $sTransformText,
  $sExecuteCode = null,
  $bTranslate = false 
)

Function will parse and replace all special markers ;

Parameters
$aMemberSettings(array) : all available member's information
$sTransformText(text) : string that will to parse
$bTranslate(boolean) : if isset this param - script will try to translate it used dolphin language file
Returns
(string) : parsed string

Definition at line 220 of file ChBaseFunctions.php.

◆ msgBox()

ChBaseFunctions::msgBox (   $sText,
  $iTimer = 0,
  $sOnTimer = "" 
)

Definition at line 270 of file ChBaseFunctions.php.

◆ popupBox()

ChBaseFunctions::popupBox (   $sName,
  $sTitle,
  $sContent,
  $aActions = array() 
)

Get standard popup box.

Parameters
string$sTitle- translated title
string$sContent- content of the box
array$aActions- an array of actions. See an example below.
Returns
string HTML of Standard Popup Box
See also
Example of actions $aActions = array( 'a1' => array('href' => 'javascript:void(0)', 'onclick' => 'javascript: changeType(this)', 'class' => 'wall-ptype-ctl', 'icon' => 'post_text.png', 'title' => _t('_title_a1'), 'active' => 1), 'a2' => array('href' => 'javascript:void(0)', 'onclick' => 'javascript: changeType(this)', 'class' => 'wall-ptype-ctl', 'icon' => 'post_text.png', 'title' => _t('_title_a2')) );

Definition at line 420 of file ChBaseFunctions.php.

◆ sysImage()

ChBaseFunctions::sysImage (   $sImg,
  $sClassAdd = '',
  $sAlt = '',
  $sAttr = '',
  $sImageType = false,
  $iSize = 16 
)

Generate code for system icon, depending on $sImg name it returns vector or pixel icon. Vector icon is determined by missing dot sign in the name.

Parameters
$sImg- system icon filename, full path to custom icon, or vector icon name
$sClassAdd- add these classes to the icon
$sAlt- alt text for pixel icon or title text for vector icon
$sAttr- custom attributes string
$sImageType- pixel image type to automatically get full path to the icon: icon, image or empty string
Returns
ready to use HTML code with icon, it is <img ... /> - in case of pixel icon; <i class="sys-icon ..." ...> - in cace of vector icon

Definition at line 995 of file ChBaseFunctions.php.

◆ TemplPageAddComponent()

ChBaseFunctions::TemplPageAddComponent (   $sKey)

Definition at line 133 of file ChBaseFunctions.php.

◆ transBox()

ChBaseFunctions::transBox (   $content,
  $isPlaceInCenter = false 
)

Definition at line 452 of file ChBaseFunctions.php.

Member Data Documentation

◆ $aSpecialKeys

ChBaseFunctions::$aSpecialKeys

Definition at line 15 of file ChBaseFunctions.php.


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