UNA
|
Public Member Functions | |
getStatCounterUp () | |
actionVoteUp () | |
isAllowedVote ($isPerformAction=false) | |
Public Member Functions inherited from BxDolObject | |
getConditions ($sMainTable, $sMainField) | |
getQueryObject () | |
checkAction ($sAction, $isPerformAction=false) | |
onObjectDelete ($iObjectId=0) | |
Static Public Member Functions | |
static | getObjectInstance ($sSys, $iId, $iInit=true, $oTemplate=false) |
Protected Member Functions | |
_isAllowedVoteByObject ($aObject) | |
_getImageDo ($sType) | |
Protected Member Functions inherited from BxDolObject | |
_getAuthorId () | |
_trigger () | |
_triggerValue ($iValue) | |
_replaceMarkers ($mixed) | |
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 |
Note. By default image based controls aren't used. Therefore it can be overwritten in custom template.
|
protected |
Internal functions
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
BxDolScore::isAllowedVote | ( | $isPerformAction = false | ) |
Permissions functions