UNA
|
Public Member Functions | |
init ($iId) | |
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) | |
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=[]) | |
Static Public Member Functions | |
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 | |
static | $sTableSystems = 'sys_objects_cmts' |
static | $sTableIds = 'sys_cmts_ids' |
Protected Member Functions | |
__construct ($sSystem, $iId, $iInit=true, $oTemplate=false) | |
_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 () | |
Protected Attributes | |
$_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 | |
$_aT = array () | |
$_aMarkers = array () | |
$_sDisplayType = '' | |
$_sDpSessionKey = '' | |
$_iDpMaxLevel = 0 | |
$_sBrowseType = '' | |
$_bBrowseFilter = false | |
$_sBrowseFilter = '' | |
$_sBpSessionKeyType = '' | |
$_sBpSessionKeyFilter = '' | |
$_aOrder = array() | |
$_sSnippetLenthLiveSearch = 50 | |
$_iRememberTime = 2592000 | |
$_bLiveUpdates = true | |
Comments for any content
Related classes:
AJAX comments for any content. Self moderated - users rate all comments, and if comment is below viewing treshold it is hidden by default.
To add comments section to your module you need to add a record to 'sys_objects_cmts' table:
You can refer to BoonEx modules for sample record in this table.
After filling in the table you can show comments section in any place, using the following code:
Please note that you never need to use BxDolCmts class directly, use BxTemplCmts instead. Also if you override comments class with your own then make it child of BxTemplCmts class.
Alerts type/unit - every module has own type/unit, it equals to ObjectName.
The following alerts are rised
|
protected |
Constructor $sSystem - comments system name $iId - obect id to be commented
Reimplemented in BxBaseCmts, BxBaseCmtsNotes, BxBaseCmtsReviews, BxCnvCmts, BxDolCmtsNotes, BxDolCmtsReviews, BxDolStudioAgentsAutomatorsCmts, BxTemplCmts, BxTemplCmtsNotes, and BxTemplCmtsReviews.
|
protected |
Internal functions
|
protected |
Note. By default image based controls aren't used. Therefore it can be overwritten in custom template.
|
protected |
Replace provided markers in a string
$mixed | string or array to replace markers in |
BxDolCmts::actionPin | ( | ) |
Actions functions
BxDolCmts::addMarkers | ( | $a | ) |
Add replace markers.
$a | array of markers as key => value |
Implements iBxDolReplaceable.
BxDolCmts::getCommentRow | ( | $iCmtId | ) |
Get comment's full info.
BxDolCmts::getCommentSimple | ( | $iCmtId | ) |
Get comment's short info.
BxDolCmts::getCommentUniqId | ( | $iCmtId, | |
$iAuthorId = 0 ) |
Get comment's unique id.
BxDolCmts::getDataAPI | ( | $aData, | |
$aParams = [] ) |
system
decode_comment_data_api
module
- [string] module namedata
- [array] comment info array as key&value pairsparams
- [array] params array as key&value pairsdata_api
- [array] by ref, comment data prepared for sending in API response, can be overridden in hook processing
It's equivalent to 'system', 'decode_comment_data_api' - hook to override comment data prepared for sending in API response
BxDolCmts::getNotificationId | ( | ) |
Is used as:
|
static |
get comments object instanse
$sSys | comments object name |
$iId | associated content id, where comments are postred in |
$iInit | perform initialization |
|
static |
get comments object instanse
$iUniqId | unique comment id |
BxDolCmts::getQueryObject | ( | ) |
Database functions
BxDolCmts::isAdmin | ( | $iCmtAuthorId | ) |
Permissions functions
BxDolCmts::isEnabled | ( | ) |
Reimplemented in BxCnvCmts.
BxDolCmts::isPostAllowed | ( | $isPerformAction = false | ) |
Reimplemented in BxBaseModProfileCmts.
BxDolCmts::isReplyAllowed | ( | $mixedCmt, | |
$isPerformAction = false ) |
Determines whether a 'reply' action allowed or not.
integer | or array $mixedCmt - ID or an array which describes the comment to be replied | |
boolean | $isPerformAction |
Reimplemented in BxDolCmtsReviews.
BxDolCmts::onEditAfter | ( | $iCmtId, | |
$aDp = [] ) |
commentUpdated
source
- [string] unique comment source stringobject_system
- [string] comment object nameobject_id
- [int] commented object idobject_author_id
- [int] commented object author profile idcomment_id
- [int] comment id unique in the comment object scopecomment_uniq_id
- [int] system wide unique comment idcomment_author_id
- [int] comment author profile idcomment_text
- [string] comment textprivacy_view
- [int] or [string] privacy for view comment action, cf
- [int] comment's audience filter value
It's equivalent to '{object_name}', 'commentUpdated' - hook after a comment was updated (edited) except 'comment id' is provided in $object_id
BxDolCmts::onPostAfter | ( | $iCmtId, | |
$aDp = [] ) |
commentPost
source
- [string] unique comment source stringobject_system
- [string] comment object nameobject_id
- [int] commented object idobject_author_id
- [int] commented object author profile idcomment_id
- [int] comment id unique in the comment object scopecomment_uniq_id
- [int] system wide unique comment idcomment_author_id
- [int] comment author profile idcomment_text
- [string] comment textprivacy_view
- [int] or [string] privacy for view comment action, cf
- [int] comment's audience filter value
It's equivalent to
replyPost
source
- [string] unique comment source stringobject_system
- [string] comment object nameobject_id
- [int] commented object idobject_author_id
- [int] commented object author profile idobject_author_id
- [int] commented object author profile idparent_id
- [int] parent comment id unique in the comment object scopeparent_uniq_id
- [int] system wide unique parent comment idparent_author_id
- [int] parent comment author profile idcomment_id
- [int] comment id unique in the comment object scopecomment_uniq_id
- [int] system wide unique comment idcomment_author_id
- [int] comment author profile idcomment_text
- [string] comment textprivacy_view
- [int] or [string] privacy for view comment action, It's equivalent to '{object_name}', 'replyPost' - hook after a reply was added except 'comment id' is provided in $object_id
BxDolCmts::registerTranscoders | ( | ) |
Overwrite this method and register transcoder(s) if comments object uses custom transcoder(s), which differs from default one 'sys_cmts_images_preview'
Reimplemented in BxForumCmts.
BxDolCmts::remove | ( | $iCmtId | ) |
commentRemoved
source
- [string] unique comment source stringobject_system
- [string] comment object nameobject_id
- [int] commented object idobject_author_id
- [int] commented object author profile idcomment_id
- [int] comment id unique in the comment object scopecomment_uniq_id
- [int] system wide unique comment idcomment_author_id
- [int] comment author profile idcomment_text
- [string] comment textprivacy_view
- [int] or [string] privacy for view comment action, cf
- [int] comment's audience filter value
It's equivalent to '{object_name}', 'commentRemoved' - hook after a comment was removed except 'comment id' is provided in $object_id
replyRemoved
source
- [string] unique comment source stringobject_system
- [string] comment object nameobject_id
- [int] commented object idobject_author_id
- [int] commented object author profile idobject_author_id
- [int] commented object author profile idparent_id
- [int] parent comment id unique in the comment object scopeparent_uniq_id
- [int] system wide unique parent comment idparent_author_id
- [int] parent comment author profile idcomment_id
- [int] comment id unique in the comment object scopecomment_uniq_id
- [int] system wide unique comment idcomment_author_id
- [int] comment author profile idcomment_text
- [string] comment textprivacy_view
- [int] or [string] privacy for view comment action, It's equivalent to '{object_name}', 'replyRemoved' - hook after a reply was removed except 'comment id' is provided in $object_id
BxDolCmts::serviceGetAll | ( | $aParams = array() | ) |
Implements iBxDolContentInfoService.
BxDolCmts::serviceGetAuthor | ( | $iContentId | ) |
Implements iBxDolContentInfoService.
BxDolCmts::serviceGetDateAdded | ( | $iContentId | ) |
Implements iBxDolContentInfoService.
BxDolCmts::serviceGetDateChanged | ( | $iContentId | ) |
Implements iBxDolContentInfoService.
BxDolCmts::serviceGetInfo | ( | $iContentId, | |
$bSearchableFieldsOnly = true ) |
Implements iBxDolContentInfoService.
BxDolCmts::serviceGetLink | ( | $iContentId | ) |
Implements iBxDolContentInfoService.
BxDolCmts::serviceGetSearchableFieldsExtended | ( | $aInputsAdd = array() | ) |
Implements iBxDolContentInfoService.
BxDolCmts::serviceGetSearchResultExtended | ( | $aParams, | |
$iStart = 0, | |||
$iPerPage = 0, | |||
$bFilterMode = false ) |
Implements iBxDolContentInfoService.
BxDolCmts::serviceGetSearchResultUnit | ( | $iContentId, | |
$sUnitTemplate = '' ) |
Implements iBxDolContentInfoService.
BxDolCmts::serviceGetText | ( | $iContentId | ) |
Implements iBxDolContentInfoService.
BxDolCmts::serviceGetThumb | ( | $iContentId | ) |
Implements iBxDolContentInfoService.
BxDolCmts::serviceGetTitle | ( | $iContentId | ) |
Implements iBxDolContentInfoService.
BxDolCmts::setId | ( | $iId | ) |
set id to operate with votes
BxDolCmts::setTableNameFiles | ( | $sTable | ) |
BxDolCmts::setTableNameFiles2Entries | ( | $sTable | ) |
BxDolCmts::unregisterTranscoders | ( | ) |
Overwrite this method and unregister transcoder(s) if comments object uses custom transcoder(s), which differs from default one 'sys_cmts_images_preview'
Reimplemented in BxForumCmts.
|
protected |
System tables which are used by default and can be overwritten in comment systems.
|
static |
System tables which are UNITED for all comment systems and cannot be overwritten.