|
UNA
|
Public Member Functions | |
| isPerformed ($iObjectId, $iAuthorId, $iAuthorIp=0) | |
| getStatCounterUp () | |
| getStatCounterDown () | |
| getStatScore () | |
| getSocketName () | |
| actionVoteUp () | |
| actionVoteDown () | |
| actionGetVotedBy () | |
| vote ($aVoteData=[], $aRequestParamsData=[]) | |
| Public Member Functions inherited from BxDolObjectVote | |
| getObjectAuthorId ($iObjectId=0) | |
| isUndo () | |
| 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 Public Member Functions inherited from BxDolObjectVote | |
| 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=[]) | |
| _isVote ($iObjectId=0, $bForceGet=false) | |
| _isCount ($aScore=[]) | |
| _getImageDo ($sType) | |
| _getIconDo ($sType='') | |
| _getTitleDo ($sType) | |
| _getTitleDoBy () | |
| _encodeElementParams ($aParams) | |
| _decodeElementParams ($sParams, $bMergeWithDefaults=true) | |
| Protected Member Functions inherited from BxDolObjectVote | |
| _getVote ($iObjectId=0, $bForceGet=false) | |
| _getTrack ($iObjectId, $iAuthorId) | |
| 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 () | |
Static Protected Attributes | |
| static | $_sCounterStyleSimple = 'simple' |
| static | $_sCounterStyleDivided = 'divided' |
Additional Inherited Members | |
| Protected Attributes inherited from BxDolObjectVote | |
| $_aVote | |
| $_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 BxDolObjectVote.
|
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 |
| BxDolScore::getStatCounterUp | ( | ) |
Interface functions for outer usage
|
static |
Reimplemented from BxDolObject.
| BxDolScore::isPerformed | ( | $iObjectId, | |
| $iAuthorId, | |||
| $iAuthorIp = 0 ) |
Reimplemented from BxDolObject.
| BxDolScore::vote | ( | $aVoteData = [], | |
| $aRequestParamsData = [] ) |
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
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