vB_Library_Reputation
extends vB_Library
in package
vB_Library_Reputation
Tags
Table of Contents
- __serialize() : array<string|int, mixed>
- __sleep() : array<string|int, mixed>
- __unserialize() : void
- __wakeup() : void
- cacheNodeVotes() : mixed
- Supplemental cache for node votes
- clearCache() : mixed
- fetchNodeVotes() : array<string|int, int>
- Check a list of nodes and see whether the user has voted them
- fetchReppower() : int|mixed|string
- Fetch Reputation Power of an user
- fetchReputationImageInfo() : array<string|int, mixed>
- Fetch reputation image info for displaying it in a node Ported from vB4's fetch_reputation_image() function
- getContentInstance() : mixed
- instance() : vB_PageCache
- Returns singleton instance of self.
- monitorWords() : mixed
- Checks if the text contains monitored words, and if so, sends notifications to admins and moderators if the setting is on.
Methods
__serialize()
public
__serialize() : array<string|int, mixed>
Return values
array<string|int, mixed> —__sleep()
public
__sleep() : array<string|int, mixed>
Return values
array<string|int, mixed> —__unserialize()
public
__unserialize(array<string|int, mixed> $serialized) : void
Parameters
- $serialized : array<string|int, mixed>
Return values
void —__wakeup()
public
__wakeup() : void
Return values
void —cacheNodeVotes()
Supplemental cache for node votes
public
cacheNodeVotes(array<string|int, mixed> $nodeIds, mixed $userid) : mixed
Parameters
- $nodeIds : array<string|int, mixed>
-
A list of Nodes to be checked
- $userid : mixed
Return values
mixed —clearCache()
public
static clearCache() : mixed
Return values
mixed —fetchNodeVotes()
Check a list of nodes and see whether the user has voted them
public
fetchNodeVotes(array<string|int, mixed> $nodeIds, int $userid) : array<string|int, int>
Parameters
- $nodeIds : array<string|int, mixed>
-
A list of Nodes to be checked
- $userid : int
-
User ID to be checked. If not there, currently logged-in user will be checked.
Return values
array<string|int, int> —Node IDs that the user has voted. Keyed by nodeid.
fetchReppower()
Fetch Reputation Power of an user
public
fetchReppower(mixed $userinfo) : int|mixed|string
Parameters
- $userinfo : mixed
Return values
int|mixed|string —Reputation Power
fetchReputationImageInfo()
Fetch reputation image info for displaying it in a node Ported from vB4's fetch_reputation_image() function
public
fetchReputationImageInfo(mixed $userinfo) : array<string|int, mixed>
Parameters
- $userinfo : mixed
Return values
array<string|int, mixed> —Contains 3 items:
- type - image type. Possible values: balance, neg, highneg, pos, highpos, off
- level - Reputation level's phrase name
- bars - Number of image bars to be displayed. Maximum 10.
getContentInstance()
public
static getContentInstance(mixed $contenttypeid) : mixed
Parameters
- $contenttypeid : mixed
Return values
mixed —instance()
Returns singleton instance of self.
public
static instance(mixed $class) : vB_PageCache
Parameters
- $class : mixed
Return values
vB_PageCache —- Reference to singleton instance of the cache handler
monitorWords()
Checks if the text contains monitored words, and if so, sends notifications to admins and moderators if the setting is on.
public
monitorWords(mixed $text, mixed $type, mixed $nodeid[, mixed $userid = null ][, mixed $insertNotifications = true ], mixed $currentuserid) : mixed
Parameters
- $text : mixed
- $type : mixed
- $nodeid : mixed
- $userid : mixed = null
- $insertNotifications : mixed = true
- $currentuserid : mixed