UNA
|
Public Member Functions | |
isPerformed ($iObjectId, $iAuthorId, $iAuthorIp=0) | |
getObjectAuthorId ($iObjectId=0) | |
isUndo () | |
getStatCounterUp () | |
getStatCounterDown () | |
getStatScore () | |
getSocketName () | |
actionVoteUp () | |
actionVoteDown () | |
actionGetVotedBy () | |
vote ($aVoteData=[], $aRequestParamsData=[]) | |
isAllowedVote ($isPerformAction=false) | |
msgErrAllowedVote () | |
isAllowedVoteView ($isPerformAction=false) | |
msgErrAllowedVoteView () | |
isAllowedVoteViewVoters ($isPerformAction=false) | |
msgErrAllowedVoteViewVoters () | |
Public Member Functions inherited from BxDolObject | |
init ($iId) | |
getSystemId () | |
getSystemName () | |
getSystemInfo () | |
getId () | |
setId ($iId) | |
isEnabled () | |
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 Public Member Functions inherited from BxDolObject | |
static | pruning () |
Protected Member Functions | |
__construct ($sSystem, $iId, $iInit=true, $oTemplate=false) | |
_isAllowedVoteByObject ($aObject) | |
_putVoteData ($iObjectId, $iAuthorId, $iAuthorIp, $aData, $bPerformUndo) | |
_returnVoteDataForSocket ($aData, $aMask=[]) | |
_getVote ($iObjectId=0, $bForceGet=false) | |
_isVote ($iObjectId=0, $bForceGet=false) | |
_isCount ($aScore=[]) | |
_getTrack ($iObjectId, $iAuthorId) | |
_getImageDo ($sType) | |
_getIconDo ($sType='') | |
_getTitleDo ($sType) | |
_getTitleDoBy () | |
_encodeElementParams ($aParams) | |
_decodeElementParams ($sParams, $bMergeWithDefaults=true) | |
Protected Member Functions inherited from BxDolObject | |
_getAuthorId () | |
_getAuthorPassword () | |
_getAuthorIp () | |
_getAuthorInfo ($iAuthorId=0) | |
_getAuthorObject ($iAuthorId=0) | |
_trigger () | |
_triggerValue ($iValue) | |
_replaceMarkers ($mixed) | |
_prepareParamsData ($aParams) | |
_getRequestParamsData ($aKeys=array()) | |
_prepareRequestParamsData ($aParams, $aParamsAdd=array()) | |
_getTmplContentElementBlock () | |
_getTmplContentElementInline () | |
_getTmplContentDoAction () | |
_getTmplContentDoActionLabel () | |
_getTmplContentCounter () | |
_getTmplContentCounterLabel () | |
Protected Attributes | |
$_aScore | |
$_aElementDefaults | |
$_aElementDefaultsApi | |
$_aElementParamsApi | |
Protected Attributes inherited from BxDolObject | |
$_oTemplate = null | |
$_oQuery = null | |
$_bApi = false | |
$_iId = 0 | |
$_sSystem = '' | |
$_aSystem = array() | |
$_aMarkers = array () | |
$_sTmplContentElementBlock = '' | |
$_sTmplContentElementInline = '' | |
$_sTmplContentDoAction | |
$_sTmplContentDoActionLabel = '' | |
$_sTmplContentCounter = '' | |
$_sTmplContentCounterLabel = '' | |
Score 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 |
Note. By default image based controls aren't used. Therefore it can be overwritten in custom template.
|
protected |
Internal functions
Reimplemented in BxDolCmtsScore.
BxDolScore::actionVoteUp | ( | ) |
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.
BxDolScore::isAllowedVote | ( | $isPerformAction = false | ) |
Permissions functions
Reimplemented in BxMarketScore.
BxDolScore::isPerformed | ( | $iObjectId, | |
$iAuthorId, | |||
$iAuthorIp = 0 ) |
Reimplemented from BxDolObject.
BxDolScore::isUndo | ( | ) |
Interface functions for outer usage
BxDolScore::vote | ( | $aVoteData = [], | |
$aRequestParamsData = [] ) |
doVoteUp
score_id
- [int] vote idscore_author_id
- [int] profile id who votedobject_author_id
- [int] author id of the object which got a vote
It's equivalent to '{object_name}', 'doVoteUp' - hook after score vote
It's equivalent to '{object_name}', 'doVoteUp' - hook after score vote
It's equivalent to '{object_name}', 'doVoteUp' - hook after score vote
score
doUp
object_system
- [string] vote object nameobject_id
- [int] object id which got a voteobject_author_id
- [int] author id of the object which got a vote
It's equivalent to 'score', 'doUp' - hook after score vote
It's equivalent to 'score', 'doUp' - hook after score vote
It's equivalent to 'score', 'doUp' - hook after score vote