vBulletin v6.0.4

vB_Library_Follow extends vB_Library
in package

vB_Library_Cron

Table of Contents

Methods

__serialize()  : array<string|int, mixed>
__sleep()  : array<string|int, mixed>
__unserialize()  : void
__wakeup()  : void
clearCache()  : mixed
clearFollowCache()  : void
Clear various internal caches for the follows library
getContentInstance()  : mixed
getFollowers()  : array<string|int, mixed>
This lists all the current followers, based userid param or current users's userid
getFollowing()  : array<string|int, mixed>
This lists what a user is following- the parameters, not the content
getFollowingParameters()  : array<string|int, mixed>
This gets the following parameters- not the content
getPaginationInfo()  : mixed
getSubscribedDiscussion()  : mixed
This gets the subscriptions to content nodes
getUserList()  : mixed
This gets the followers.
instance()  : static
Returns singleton instance of self.
isFollowingUser()  : int
This indicates if user is following user's profile page.
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>

clearCache()

public static clearCache() : mixed

clearFollowCache()

Clear various internal caches for the follows library

public clearFollowCache(array<string|int, mixed> $userids[, bool $contentonly = false ]) : void
Parameters
$userids : array<string|int, mixed>

-- the users to clear the caches for.

$contentonly : bool = false

-- if the change only affects content some classes don't need clearing.

getContentInstance()

public static getContentInstance(mixed $contenttypeid) : mixed
Parameters
$contenttypeid : mixed

getFollowers()

This lists all the current followers, based userid param or current users's userid

public getFollowers(mixed $userid[, array<string|int, mixed> $options = [] ]) : array<string|int, mixed>
@param int	$userid -- will use current user if not set.
Parameters
$userid : mixed
$options : array<string|int, mixed> = []

of options to filters the user followers. Used for pagination at the moment.

Return values
array<string|int, mixed>

of user records

getFollowing()

This lists what a user is following- the parameters, not the content

public getFollowing(int $userid[, string $type = vB_Api_Follow::FOLLOWTYPE_ALL ][, array<string|int, mixed> $filters = [vB_Api_Follow::FOLLOWFILTERTYPE_SORT => vB_Api_Follow::FOLLOWFILTER_SORTALL] ][, string|array<string|int, mixed> $contenttypeclass = null ][, array<string|int, mixed> $options = [] ]) : array<string|int, mixed>
Parameters
$userid : int
$type : string = vB_Api_Follow::FOLLOWTYPE_ALL

= The type of following to get . Use class constants for this, available are: vB_Api_Follow::FOLLOWTYPE_ALL vB_Api_Follow::FOLLOWTYPE_USERS vB_Api_Follow::FOLLOWTYPE_CONTENT vB_Api_Follow::FOLLOWTYPE_CHANNEL

$filters : array<string|int, mixed> = [vB_Api_Follow::FOLLOWFILTERTYPE_SORT => vB_Api_Follow::FOLLOWFILTER_SORTALL]

-- Settings to filter the following. Could be sort or/and type. Key are vB_Api_Follow::FOLLOWFILTERTYPE_SORT. Valid values are: vB_Api_Follow::FOLLOWFILTERTYPE_SORT => vB_Api_Follow::FOLLOWFILTER_SORTMOST vB_Api_Follow::FOLLOWFILTER_SORTLEAST vB_Api_Follow::FOLLOWFILTER_SORTALL

$contenttypeclass : string|array<string|int, mixed> = null

Content types classes to filter the following. It can be a simple string or an array. The classes should contain 'vBForum_' prefix. If not provided then it defaults to all contenttypes except for Channels.

$options : array<string|int, mixed> = []

Array of options to the following. -- page int page to return (default 1) -- perpage int page size (default 100)

Return values
array<string|int, mixed>

with 2 elements- users and nodes.

getFollowingParameters()

This gets the following parameters- not the content

public getFollowingParameters(mixed $userid) : array<string|int, mixed>
Parameters
$userid : mixed
Return values
array<string|int, mixed>

of content, user, member. Each is an array of integers.

getPaginationInfo()

public getPaginationInfo(mixed $params) : mixed
Parameters
$params : mixed

getSubscribedDiscussion()

This gets the subscriptions to content nodes

public getSubscribedDiscussion(mixed $userid) : mixed
Parameters
$userid : mixed

getUserList()

This gets the followers.

public getUserList(mixed $userid[, mixed $direction = 'followed' ][, mixed $type = 'follow' ]) : mixed

For $type = 'follow', $direction = 'following' means "get all users that $userid is following" (userlist.userid => $userid) $direction = 'followed' means "get all users following $userid" (userlist.relationid => $Userid)

Parameters
$userid : mixed
$direction : mixed = 'followed'
$type : mixed = 'follow'

instance()

Returns singleton instance of self.

public static instance(mixed $class) : static
Parameters
$class : mixed
Return values
static
  • Reference to singleton instance of the requested library class

isFollowingUser()

This indicates if user is following user's profile page.

public isFollowingUser(mixed $profileUser) : int
Parameters
$profileUser : mixed
Return values
int

Used to indicate the following status between users. Values meaning: 0 - Not following 1 - Following 2 - Pending

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 = 0 ]) : mixed
Parameters
$text : mixed
$type : mixed
$nodeid : mixed
$userid : mixed = null
$insertNotifications : mixed = true
$currentuserid : mixed = 0
Tags
deprecated

use the functions from the notification library directly.


        
On this page

Search results