Unofficial SMF API Documentation

./Sources/Profile-View.php

summary

function summary(int $memID): void

View a summary.

Type Parameter Description
int $memID The ID of the member

fetch_alerts

function fetch_alerts(int $memID, mixed $to_fetch = false, array $limit = 0, array $offset = 0, bool $with_avatar = false, bool $show_links = false): array

Fetch the alerts a member currently has.

Type Parameter Description
int $memID The ID of the member.
mixed $to_fetch Alerts to fetch: true/false for all/unread, or a list of one or more IDs.
array $limit Maximum number of alerts to fetch (0 for no limit).
array $offset Number of alerts to skip for pagination. Ignored if $to_fetch is a list of IDs.
bool $with_avatar Whether to load the avatar of the alert sender.
bool $show_links Whether to show links in the constituent parts of the alert meessage.
Integration hooks
integrate_fetch_alerts

showAlerts

function showAlerts(int $memID): void

Shows all alerts for a member

Type Parameter Description
int $memID The ID of the member

showPosts

function showPosts(int $memID): void

Show all posts by a member

Type Parameter Description
int $memID The ID of the member
Integration hooks
integrate_profile_showPosts

showAttachments

function showAttachments(int $memID): void

Show all the attachments belonging to a member.

Type Parameter Description
int $memID The ID of the member

list_getAttachments

function list_getAttachments(int $start, int $items_per_page, string $sort, array $boardsAllowed, int $memID): array

Get a list of attachments for a member. Callback for the list in showAttachments()

Type Parameter Description
int $start Which item to start with (for pagination purposes)
int $items_per_page How many items to show on each page
string $sort A string indicating how to sort the results
array $boardsAllowed An array containing the IDs of the boards they can see
int $memID The ID of the member

list_getNumAttachments

function list_getNumAttachments(array $boardsAllowed, int $memID): int

Gets the total number of attachments for a member

Type Parameter Description
array $boardsAllowed An array of the IDs of the boards they can see
int $memID The ID of the member

showUnwatched

function showUnwatched(int $memID): void

Show all the unwatched topics.

Type Parameter Description
int $memID The ID of the member

list_getUnwatched

function list_getUnwatched(int $start, int $items_per_page, string $sort, int $memID): array

Gets information about unwatched (disregarded) topics. Callback for the list in show_unwatched

Type Parameter Description
int $start The item to start with (for pagination purposes)
int $items_per_page How many items to show on each page
string $sort A string indicating how to sort the results
int $memID The ID of the member

list_getNumUnwatched

function list_getNumUnwatched(int $memID): int

Count the number of topics in the unwatched list

Type Parameter Description
int $memID The ID of the member

statPanel

function statPanel(int $memID): void

Gets the user stats for display

Type Parameter Description
int $memID The ID of the member
Integration hooks
integrate_profile_stats

tracking

function tracking(int $memID): void

Loads up the information for the “track user” section of the profile

Type Parameter Description
int $memID The ID of the member

trackActivity

function trackActivity(int $memID): void

Handles tracking a user’s activity

Type Parameter Description
int $memID The ID of the member

list_getUserErrorCount

function list_getUserErrorCount(string $where, array $where_vars = array()): int

Get the number of user errors

Type Parameter Description
string $where A query to limit which errors are counted
array $where_vars The parameters for $where

list_getUserErrors

function list_getUserErrors(int $start, int $items_per_page, string $sort, string $where, array $where_vars = array()): array

Gets all of the errors generated by a user’s actions. Callback for the list in track_activity

Type Parameter Description
int $start Which item to start with (for pagination purposes)
int $items_per_page How many items to show on each page
string $sort A string indicating how to sort the results
string $where A query indicating how to filter the results (eg ‘id_member={int:id_member}’)
array $where_vars An array of parameters for $where

list_getIPMessageCount

function list_getIPMessageCount(string $where, array $where_vars = array()): int

Gets the number of posts made from a particular IP

Type Parameter Description
string $where A query indicating which posts to count
array $where_vars The parameters for $where

list_getIPMessages

function list_getIPMessages(int $start, int $items_per_page, string $sort, string $where, array $where_vars = array()): array

Gets all the posts made from a particular IP

Type Parameter Description
int $start Which item to start with (for pagination purposes)
int $items_per_page How many items to show on each page
string $sort A string indicating how to sort the results
string $where A query to filter which posts are returned
array $where_vars An array of parameters for $where

TrackIP

function TrackIP(int $memID = 0): void

Handles tracking a particular IP address

Type Parameter Description
int $memID The ID of a member whose IP we want to track
Integration hooks
integrate_profile_trackip

TrackLogins

function TrackLogins(int $memID = 0): void

Tracks a user’s logins.

Type Parameter Description
int $memID The ID of the member

list_getLoginCount

function list_getLoginCount(string $where, array $where_vars = array()): int

Finds the total number of tracked logins for a particular user

Type Parameter Description
string $where A query to limit which logins are counted
array $where_vars An array of parameters for $where

list_getLogins

function list_getLogins(int $start, int $items_per_page, string $sort, string $where, array $where_vars = array()): array

Callback for the list in trackLogins.

Type Parameter Description
int $start Which item to start with (not used here)
int $items_per_page How many items to show on each page (not used here)
string $sort A string indicating
string $where A query to filter results (not used here)
array $where_vars An array of parameters for $where. Only ‘current_member’ (the ID of the member) is used here

trackEdits

function trackEdits(int $memID): void

Tracks a user’s profile edits

Type Parameter Description
int $memID The ID of the member

list_getProfileEditCount

function list_getProfileEditCount(int $memID): int

How many edits?

Type Parameter Description
int $memID The ID of the member

list_getProfileEdits

function list_getProfileEdits(int $start, int $items_per_page, string $sort, int $memID): array

Loads up information about a user’s profile edits. Callback for the list in trackEdits()

Type Parameter Description
int $start Which item to start with (for pagination purposes)
int $items_per_page How many items to show on each page
string $sort A string indicating how to sort the results
int $memID The ID of the member

trackGroupReq

function trackGroupReq(int $memID): void

Display the history of group requests made by the user whose profile we are viewing.

Type Parameter Description
int $memID The ID of the member

list_getGroupRequestsCount

function list_getGroupRequestsCount(int $memID): int

How many edits?

Type Parameter Description
int $memID The ID of the member

list_getGroupRequests

function list_getGroupRequests(int $start, int $items_per_page, string $sort, int $memID): array

Loads up information about a user’s group requests. Callback for the list in trackGroupReq()

Type Parameter Description
int $start Which item to start with (for pagination purposes)
int $items_per_page How many items to show on each page
string $sort A string indicating how to sort the results
int $memID The ID of the member

showPermissions

function showPermissions(int $memID): void

Shows which permissions a user has

Type Parameter Description
int $memID The ID of the member

viewWarning

function viewWarning(int $memID): void

View a member’s warnings

Type Parameter Description
int $memID The ID of the member

set_alert_icon

function set_alert_icon(array $alert): void

Sets the icon for a fetched alert.

Type Parameter Description
array `` The alert that we want to set an icon for.

Suggest an edit to this page on GitHub