UNA
BxBaseCmts Class Reference
Inheritance diagram for BxBaseCmts:
BxDolCmts BxDolFactory iBxDolReplaceable iBxDolContentInfoService BxTemplCmts BxAlbumsCmtsMedia BxBaseModProfileCmts BxCnvCmts BxDolCmtsNotes BxDolCmtsReviews BxDolStudioAgentsAsstChatsCmts BxDolStudioAgentsAutomatorsCmts BxForumCmts BxMarketCmts BxTimelineCmts

Public Member Functions

 __construct ( $sSystem, $iId, $iInit=true, $oTemplate=false)
 addCssJs ($aBp=[], $aDp=[])
 getJsObjectName ()
 getJsScript ($aBp=[], $aDp=[])
 getCommentsBlockAPI ($aParams, $aBp=[], $aDp=['in_designbox'=> false, 'show_empty'=> false])
 getCommentsBlock ($aBp=[], $aDp=[])
 getComments ($aBp=[], $aDp=[])
 getCommentsPinned ($aBp=[], $aDp=[])
 getCommentsByStructure ($aBp=array(), $aDp=array())
 getCommentBlock ($iCmtId=0, $aBp=array(), $aDp=array())
 getComment ($mixedCmt, $aBp=array(), $aDp=array())
 getCommentStructure ($iCmtId, $aBp=array(), $aDp=array())
 getCommentSearch ($iCmtId, &$sAddon)
 getCommentLiveSearch ($mixedCmt, $aParams=array())
 getFormBoxPost ($aBp=array(), $aDp=array())
 getFormBoxEdit ($aBp=array(), $aDp=array())
 getFormPost ($iCmtParentId=0, $aDp=array())
 getFormEdit ($iCmtId, $aDp=array())
 getControlsBox ()
 getLiveUpdate ($iCountOld=0, $iCountNew=0)
 getLiveUpdateButton ($iCommentId=0)
 getLiveUpdates ($iCountOld=0, $iCountNew=0)
 getElementBlock ($aParams=array())
 getElementInline ($aParams=array())
 getElement ($aParams=array())
 getElementAPI ($aParams=[])
 getCounter ($aParams=[])
 getCounterApi ($aParams=[])
Public Member Functions inherited from BxDolCmts
 init ($iId)
 setParam ($sName, $sValue)
 isParam ($sName)
 getParam ($sName)
 getId ()
 isEnabled ()
 getSystemId ()
 getSystemName ()
 getSystemInfo ()
 getStorageObjectName ()
 getTranscoderPreviewName ()
 getFormObject ()
 getTableNameImages ()
 getTableNameImages2Entries ()
 getLanguageKey ($sIndex)
 getMaxLevel ()
 getOrder ()
 getPerView ($iCmtParentId=0)
 getStatusAdmin ()
 getViewUrl ($iCmtId, $bAbsolute=true)
 getViewText ($mixedItem)
 getBaseUrl ()
 getListUrl ()
 getItemUrl ($iItemId)
 getListAnchor ($bWithHash=false)
 getItemAnchor ($iItemId, $bWithHash=false)
 getAttachments ($iCmtId)
 getConnectionObject ($sType)
 getVoteObject ($iEniqId)
 getReactionObject ($iEniqId)
 getScoreObject ($iEniqId)
 getReportObject ($iEniqId)
 getNotificationId ()
 getSocketName ()
 setTableNameFiles ($sTable)
 setTableNameFiles2Entries ($sTable)
 isHtml ()
 isRatable ()
 isAttachImageEnabled ()
 isAutoApprove ()
 setId ($iId)
 addMarkers ($a)
 getQueryObject ()
 getCommentsTableName ()
 getObjectAuthorId ($iObjectId=0)
 getObjectTitle ($iObjectId=0)
 getObjectPrivacyView ($iObjectId=0)
 getObjectContentFilter ()
 getCommentsCountAll ($iObjectId=0, $bForceCalculate=false)
 getCommentsCount ($iObjectId=0, $iCmtVParentId=-1, $sFilter='')
 getCommentsArray ($iVParentId, $sFilter, $aOrder, $iStart=0, $iCount=-1)
 getCommentsBy ($aParams=[])
 getCommentUniqId ($iCmtId, $iAuthorId=0)
 getCommentSimple ($iCmtId)
 getCommentRow ($iCmtId)
 getCommentParents ($mixedCmt, $iDepthMax=0)
 onObjectDelete ($iObjectId=0)
 deleteVotes ($mixedCmtId)
 deleteReactions ($mixedCmtId)
 deleteScores ($mixedCmtId)
 deleteReports ($mixedCmtId)
 deleteMetaInfo ($mixedCmtId)
 deleteUniqueIds ($mixedCmtId)
 isAdmin ($iCmtAuthorId)
 checkAction ($sAction, $isPerformAction=false)
 checkActionErrorMsg ($sAction)
 isViewAllowed ($isPerformAction=false)
 isVoteAllowed ($aCmt, $isPerformAction=false)
 isScoreAllowed ($aCmt, $isPerformAction=false)
 isReportAllowed ($aCmt, $isPerformAction=false)
 isPostAllowed ($isPerformAction=false)
 msgErrPostAllowed ()
 isReplyAllowed ($mixedCmt, $isPerformAction=false)
 msgErrReplyAllowed ()
 isQuoteAllowed ($mixedCmt, $isPerformAction=false)
 msgErrQuoteAllowed ()
 isPinAllowed ($aCmt, $isPerformAction=false)
 msgErrPinAllowed ()
 isUnpinAllowed ($aCmt, $isPerformAction=false)
 msgErrUnpinAllowed ()
 isEditAllowed ($aCmt, $isPerformAction=false)
 msgErrEditAllowed ()
 isEditAllowedAll ($isPerformAction=false)
 isRemoveAllowed ($aCmt, $isPerformAction=false)
 isRemoveAllowedAll ($isPerformAction=false)
 msgErrRemoveAllowed ()
 isMoreAllowed ($aCmt, $isPerformAction=false)
 isModerator ($isPerformAction=false)
 actionPin ()
 actionGetFormPost ()
 actionGetFormEdit ()
 actionGetCmt ()
 actionGetCmts ()
 actionSubmitPostForm ()
 actionSubmitEditForm ()
 actionRemove ()
 remove ($iCmtId)
 add ($aValues)
 actionResumeLiveUpdate ()
 actionPauseLiveUpdate ()
 actionGetSiblingFiles ()
 onPostAfter ($iCmtId, $aDp=[])
 onEditAfter ($iCmtId, $aDp=[])
 serviceGetAuthor ($iContentId)
 serviceGetDateAdded ($iContentId)
 serviceGetDateChanged ($iContentId)
 serviceGetLink ($iContentId)
 serviceGetTitle ($iContentId)
 serviceGetText ($iContentId)
 serviceGetThumb ($iContentId)
 serviceGetInfo ($iContentId, $bSearchableFieldsOnly=true)
 serviceGetInfoApi ($iContentId, $bExtendedUnits=false)
 serviceGetSearchResultUnit ($iContentId, $sUnitTemplate='')
 serviceGetAll ($aParams=array())
 serviceGetSearchableFieldsExtended ($aInputsAdd=array())
 registerTranscoders ()
 unregisterTranscoders ()
 serviceGetSearchResultExtended ($aParams, $iStart=0, $iPerPage=0, $bFilterMode=false)
 getAuthorInfo ($iAuthorId=0)
 getParams (&$aBp, &$aDp)
 prepareParams (&$aBp, &$aDp)
 _getStructure ($mixedItem, $aBp, &$iLevel, &$aStructure)
 _getStructureAPI ($mixedItem, $aBp, &$iLevel, &$aStructure)
 getDataAPI ($aData, $aParams=[])

Protected Member Functions

 _getCounterItems ($iCmtsLimit, $iCmtsStart=0)
 _getLabelDo ($aParams=[])
 _getCounterLabel ($iCount, $aParams=[])
 _getTmplElementBlock ()
 _getTmplElementInline ()
 _getTmplLabelDo ()
 _getTmplCounter ()
 _isShowContent ($aCmt)
 _getContentBefore ($aBp=array(), $aDp=array())
 _getContentAfter ($aBp=array(), $aDp=array())
 _getControlsBox ()
 _getActionsBox (&$aCmt, $aBp=[], $aDp=[])
 _getCountersBox (&$aCmt, $aBp=[], $aDp=[])
 _getFormBox ($sType, $aBp, $aDp)
 _getFormAdd ($aValues)
 _getFormPost ($iCmtParentId=0, $aDp=[])
 _getFormEdit ($iCmtId, $aDp=[])
 _getForm ($sAction, $iId, $aDp=[])
 _getContent ($aCmt, $aBp=[], $aDp=[])
 _getMoreLink ($sCmts, $aBp=array(), $aDp=array())
 _getEmpty ($aDp=array())
 _getAttachments ($aCmt)
 _getTmplVarsNotes ($aCmt)
 _getTmplVarsAuthor ($aCmt)
 _getTmplVarsText ($aCmt)
 _getDoComment ($aParams=[], $isAllowedComment=true)
Protected Member Functions inherited from BxDolCmts
 _getAuthorId ()
 _getAuthorPassword ()
 _getAuthorIp ()
 _getAuthorInfo ($iAuthorId=0)
 _getAuthorObject ($iAuthorId=0)
 _getFormObject ($sAction=BX_CMT_ACTION_POST)
 _unsetFormObject ($sAction=BX_CMT_ACTION_POST)
 _getParams (&$aBp, &$aDp)
 _prepareAlertParams ($aCmt)
 _prepareAlertParamsReply ($aCmt, $aCmtPrnt)
 _prepareAuditParams ($iId, $aData)
 _prepareTextForOutput ($s, $iCmtId=0)
 _prepareStructureBp ($sDType, &$aBp)
 _prepareParams (&$aBp, &$aDp)
 _triggerComment ()
 _replaceMarkers ($mixed)
 _getUserChoice ()
 _setUserChoice ($sDp, $sBpType, $sBpFilter)
 _sendNotificationEmail ($iCmtId, $iCmtParentId)
 _isShowDoComment ($aParams, $isAllowedComment, $bCount)
 _isShowCounter ($aParams, $isAllowedComment, $bCount)
 _getImageDo ()
 _getIconDo ()
 _getTitleDo ()
 _getParents ($aCmt, $iDepthMax, &$iDepth, &$aParents)

Protected Attributes

 $_sTmplNameItem
 $_sTmplNameItemContent
 $_sJsObjClass
 $_sJsObjName
 $_sStylePrefix
 $_aHtmlIds
 $_aAclId2Name
Protected Attributes inherited from BxDolCmts
 $_sTableImages = 'sys_cmts_images'
 $_sTableImages2Entries = 'sys_cmts_images2entries'
 $_aElementDefaults
 $_aElementDefaultsApi
 $_aElementParamsApi
 $_bIsApi
 $_sType
 $_oQuery = null
 $_oTemplate = null
 $_bPostQuote
 $_bMinPostForm
 $_sFormObject
 $_sFormDisplayPost
 $_sFormDisplayEdit
 $_sConnObjFriends
 $_sConnObjSubscriptions
 $_sMenuObjManage
 $_sMenuObjActions
 $_sMenuObjCounters
 $_sMenuObjMeta
 $_sMetatagsObj
 $_sViewUrl = ''
 $_sBaseUrl = ''
 $_sListAnchor = ''
 $_sItemAnchor = ''
 $_aSystems = []
 $_sSystem = 'profile'
 $_aSystem = []
 $_iId = 0
 $_iAuthorId = 0
 $_aParams = []
 $_aT = []
 $_aMarkers = []
 $_sDisplayType = ''
 $_sDpSessionKey = ''
 $_iDpMaxLevel = 0
 $_sBrowseType = ''
 $_bBrowseFilter = false
 $_sBrowseFilter = ''
 $_sBpSessionKeyType = ''
 $_sBpSessionKeyFilter = ''
 $_aOrder = array()
 $_sSnippetLenthLiveSearch = 50
 $_iRememberTime = 2592000
 $_bLiveUpdates = true

Static Protected Attributes

static $_sTmplContentElementBlock
static $_sTmplContentElementInline
static $_sTmplContentDoCommentLabel
static $_sTmplContentCounter

Additional Inherited Members

Static Public Member Functions inherited from BxDolCmts
static getObjectInstance ($sSys, $iId, $iInit=true, $oTemplate=false)
static getObjectInstanceByUniqId ($iUniqId, $iInit=true, $oTemplate=false)
static & getSystems ()
static getGlobalInfo ($iUniqueId)
static getGlobalNumByParams ($aParams=[])
static onAuthorDelete ($iAuthorId)
static onModuleEnable ($sModuleName)
static onModuleDisable ($sModuleName)
static onModuleUninstall ($sModuleName, &$iFiles=null)
Static Public Attributes inherited from BxDolCmts
static $sTableSystems = 'sys_objects_cmts'
static $sTableIds = 'sys_cmts_ids'

Detailed Description

See also
BxDolCmts

Constructor & Destructor Documentation

◆ __construct()

BxBaseCmts::__construct ( $sSystem,
$iId,
$iInit = true,
$oTemplate = false )

Constructor $sSystem - comments system name $iId - obect id to be commented

Reimplemented from BxDolCmts.

Reimplemented in BxBaseCmtsNotes, BxBaseCmtsReviews, BxCnvCmts, BxDolCmtsNotes, BxDolCmtsReviews, BxDolStudioAgentsAsstChatsCmts, BxDolStudioAgentsAutomatorsCmts, BxTemplCmts, BxTemplCmtsNotes, and BxTemplCmtsReviews.

Member Function Documentation

◆ addCssJs()

BxBaseCmts::addCssJs ( $aBp = [],
$aDp = [] )

Add comments CSS/JS

Reimplemented in BxCnvCmts.

◆ getComment()

BxBaseCmts::getComment ( $mixedCmt,
$aBp = array(),
$aDp = array() )

get one just posted comment

Parameters
int$iCmtId- comment id
Returns
string

Hooks:

'system', 'view_comment' - hook on get comment

  • $unit_name - equals system
  • $action - equals view_comment
  • $object_id - comment_id
  • $sender_id - not used
  • $extra_params - array of additional params with the following array keys:
    • comment - [array] comment's data
    • system - [string] comment's system name
    • tmpl_name - [string] template file path
    • tmpl_vars - [string] params for template file parsing
    • override_result - [string] by ref, if account confirmed = true, otherwise false, can be overridden in hook processing
      HOOKS
      'system', 'view_comment' - hook on get comment

Reimplemented in BxBaseCmtsReviews, BxDolStudioAgentsAsstChatsCmts, and BxDolStudioAgentsAutomatorsCmts.

◆ getCommentBlock()

BxBaseCmts::getCommentBlock ( $iCmtId = 0,
$aBp = array(),
$aDp = array() )

get comment view block with initializations

Reimplemented in BxCnvCmts, and BxForumCmts.

◆ getCommentLiveSearch()

BxBaseCmts::getCommentLiveSearch ( $mixedCmt,
$aParams = array() )

get one comment for "Live Search"

Parameters
int$iCmtId- comment id
Returns
string

◆ getComments()

BxBaseCmts::getComments ( $aBp = [],
$aDp = [] )

get comments list for specified parent comment

Parameters
array$aBp- browse params array
array$aDp- display params array

◆ getCommentsBlock()

BxBaseCmts::getCommentsBlock ( $aBp = [],
$aDp = [] )

get full comments block with initializations

Hooks:

'system', 'view_comments' - hook to override comments block

  • $unit_name - equals system
  • $action - equals view_comments
  • $object_id - not used
  • $sender_id - not used
  • $extra_params - array of additional params with the following array keys:

    • object - [object] an instance of comments,
      See also
      BxDolCmts
    • system - [string] comments object name
    • id - [int] commented content id
    • params_browse - [array] browse params array as key&value pairs
    • params_display - [array] display params array as key&value pairs
    • post_form_top - [string] by ref, post form code for top section, can be overridden in hook processing
    • content_before - [string] by ref, a code to be displayed before comments list, can be overridden in hook processing
    • comments - [string] by ref, a comments list code, can be overridden in hook processing
    • comments_pinned - [string] by ref, a pinned comments list code, can be overridden in hook processing
    • content_after - [string] by ref, a code to be displayed after comments list, can be overridden in hook processing
    • post_form_bottom - [string] by ref, post form code for bottom section, can be overridden in hook processing
    • js_content - [string] by ref, comments JavaScript code, can be overridden in hook processing
    • block_title - [string] by ref, block title, can be overridden in hook processing
    • block_menu - [string] by ref, block submenu, can be overridden in hook processing
    HOOKS
    'system', 'view_comments' - hook to override comments block

Reimplemented in BxCnvCmts, BxDolStudioAgentsAsstChatsCmts, BxDolStudioAgentsAutomatorsCmts, and BxForumCmts.

◆ getJsScript()

BxBaseCmts::getJsScript ( $aBp = [],
$aDp = [] )

Get initialization section of comments box

Returns
string

The documentation for this class was generated from the following file:
  • template/scripts/BxBaseCmts.php