UNA
|
Public Member Functions | |
getObjectAuthorId ($iObjectId=0) | |
isUndo () | |
getType () | |
getMinValue () | |
getMaxValue () | |
getStatCounter () | |
getStatRate () | |
getSocketName () | |
actionVote () | |
vote ($aVoteData=[], $aRequestParamsData=[]) | |
actionGetVotedBy () | |
isAllowedVote ($isPerformAction=false) | |
msgErrAllowedVote () | |
isAllowedVoteView ($isPerformAction=false) | |
msgErrAllowedVoteView () | |
isAllowedVoteViewVoters ($isPerformAction=false) | |
msgErrAllowedVoteViewVoters () | |
![]() | |
init ($iId) | |
getSystemId () | |
getSystemName () | |
getSystemInfo () | |
getId () | |
setId ($iId) | |
isEnabled () | |
isPerformed ($iObjectId, $iAuthorId, $iAuthorIp=0) | |
getVote ($iObjectId=0, $bForceGet=false) | |
getTrack ($iObjectId, $iAuthorId) | |
getConditions ($sMainTable, $sMainField) | |
getConditionsTrack ($sMainTable, $sMainField, $iAuthorId=0) | |
getSqlParts ($sMainTable, $sMainField) | |
getSqlPartsTrack ($sMainTable, $sMainField, $iAuthorId=0) | |
getSqlPartsTrackAuthor ($sMainTable, $sMainField, $iObjectId=0) | |
addMarkers ($aMarkers) | |
getElementAPI ($aParams=[]) | |
getCounterAPI ($aParams=[]) | |
getQueryObject () | |
checkAction ($sAction, $isPerformAction=false) | |
checkActionErrorMsg ($sAction) | |
onObjectDelete ($iObjectId=0) | |
Static Public Member Functions | |
static | getObjectInstance ($sSys, $iId, $iInit=true, $oTemplate=false) |
static & | getSystems () |
static | onAuthorDelete ($iAuthorId) |
![]() | |
static | pruning () |
Protected Member Functions | |
__construct ($sSystem, $iId, $iInit=true, $oTemplate=false) | |
_isDuplicate ($iObjectId, $iAuthorId, $iAuthorIp, $bVoted) | |
_isCount ($aVote=array()) | |
_isAllowedVoteByObject ($aObject) | |
_getVoteData () | |
_putVoteData ($iObjectId, $iAuthorId, $iAuthorIp, $aData, $bPerformUndo) | |
_returnVoteData ($iObjectId, $iAuthorId, $iAuthorIp, $aData, $bVoted, $aParams=[]) | |
_returnVoteDataForSocket ($aData, $aMask=[]) | |
_prepareRequestParamsData ($aParams, $aParamsAdd=array()) | |
_getVote ($iObjectId=0, $bForceGet=false) | |
_isVote ($iObjectId=0, $bForceGet=false) | |
_getTrack ($iObjectId, $iAuthorId) | |
_getIconDo ($bVoted) | |
_getImageDo ($bVoted) | |
_getEmojiDo ($bVoted) | |
_getTitleDo ($bVoted) | |
_getTitleDoBy ($aParams=[]) | |
_useIconAs ($aParams=[]) | |
![]() | |
_getAuthorId () | |
_getAuthorPassword () | |
_getAuthorIp () | |
_getAuthorInfo ($iAuthorId=0) | |
_getAuthorObject ($iAuthorId=0) | |
_trigger () | |
_triggerValue ($iValue) | |
_replaceMarkers ($mixed) | |
_prepareParamsData ($aParams) | |
_getRequestParamsData ($aKeys=array()) | |
_getTmplContentElementBlock () | |
_getTmplContentElementInline () | |
_getTmplContentDoAction () | |
_getTmplContentDoActionLabel () | |
_getTmplContentCounter () | |
_getTmplContentCounterLabel () | |
Protected Attributes | |
$_sType | |
$_aVote | |
$_aElementDefaults | |
$_aElementDefaultsApi | |
$_aElementParamsApi | |
![]() | |
$_oTemplate = null | |
$_oQuery = null | |
$_bApi = false | |
$_iId = 0 | |
$_sSystem = '' | |
$_aSystem = array() | |
$_aMarkers = array () | |
$_sTmplContentElementBlock = '' | |
$_sTmplContentElementInline = '' | |
$_sTmplContentDoAction | |
$_sTmplContentDoActionLabel = '' | |
$_sTmplContentCounter = '' | |
$_sTmplContentCounterLabel = '' | |
Vote for any content
Related classes:
AJAX vote for any content. Stars and Plus based representations are supported.
To add vote section to your feature you need to add a record to 'sys_objects_vote' table:
You can refer to BoonEx modules for sample record in this table.
To get Star based vote you need to have different values for MinValue and MaxValue (for example 1 and 5) and IsUndo should be equal to 0. To get Plus(Like) based vote you need to have equal values for MinValue and MaxValue (for example 1) and IsUndo should be equal to 1. After filling the other paramenters in the table you can show vote in any place, using the following code:
Alerts type/unit - every module has own type/unit, it equals to ObjectName. The following alerts are rised:
|
protected |
Reimplemented from BxDolObject.
|
protected |
Reimplemented in BxPollsVoteSubentries.
|
protected |
Reimplemented in BxBaseModTextVotePollAnswers.
|
protected |
Internal functions
Reimplemented in BxDolVoteLikes, BxDolVoteReactions, and BxDolVoteStars.
|
protected |
Reimplemented in BxDolVoteReactions.
|
protected |
Reimplemented from BxDolObject.
BxDolVote::actionVote | ( | ) |
Actions functions
|
static |
get votes object instanse
$sSys | vote object name |
$iId | associated content id, where vote is available |
$iInit | perform initialization |
|
static |
Reimplemented from BxDolObject.
BxDolVote::isAllowedVote | ( | $isPerformAction = false | ) |
Permissions functions
Reimplemented in BxBaseModTextVotePollAnswers, BxMarketVoteReactions, BxMarketVoteStars, and BxPollsVoteSubentries.
BxDolVote::isUndo | ( | ) |
Interface functions for outer usage
BxDolVote::vote | ( | $aVoteData = [], | |
$aRequestParamsData = [] ) |
vote
undo
object_system
- [string] system name, ex: bx_postsobject_id
- [int] reported object idobject_author_id
- [int] author's profile_id for reported object_id
vote
do
object_system
- [string] system name, ex: bx_postsobject_id
- [int] reported object idobject_author_id
- [int] author's profile_id for reported object_id