add_chatroom
blocking_add
blocking_remove
chat_get_all_rooms
chat_get_room_content
chat_logs_script
chat_poller
chat_post_message
chat_room_prune
chatroom_ban_to
chatroom_unban_to
chatter_active
check_chatroom_access
delete_all_chatrooms
delete_chat_messages
delete_chatroom
delete_chatroom_messages
edit_chatroom
enter_chat_lobby
filter_invites_for_blocking
friend_add
friend_remove
get_chat_sound_tpl
get_chatroom_fields
get_chatroom_id
get_chatroom_name
get_chatters_in_room
get_chatters_in_room_tpl
get_effect_set
get_effect_settings
get_num_chatposts
get_num_chatrooms
get_num_chatters
handle_chatroom_pruning
is_chat_moderator
member_befriended
messages_script
parse_allow_list_input
read_in_chat_perm_fields
render_chat_box
shoutbox_script
show_im_contacts
CHAT_ACTIVITY_PRUNE
CHAT_ACTIVITY_PRUNE
CHAT_ACTIVITY_PRUNE
CHAT_BACKLOG_TIME
CHAT_EVENT_PRUNE
add_chatroom(\SHORT_TEXT $welcome, \SHORT_TEXT $room_name, \MEMBER $room_owner, \LONG_TEXT $allow2, \LONG_TEXT $allow2_groups, \LONG_TEXT $disallow2, \LONG_TEXT $disallow2_groups, \LANGUAGE_NAME $room_language, \BINARY $is_im = 0) : \AUTO_LINK
| package | chat |
|---|
\SHORT_TEXTThe welcome message
\SHORT_TEXTThe room name
\MEMBERThe room owner
\LONG_TEXTThe comma-separated list of users that may access it (blank: no restriction)
\LONG_TEXTThe comma-separated list of usergroups that may access it (blank: no restriction)
\LONG_TEXTThe comma-separated list of users that may NOT access it (blank: no restriction)
\LONG_TEXTThe comma-separated list of usergroups that may NOT access it (blank: no restriction)
\LANGUAGE_NAMEThe room language
\BINARYWhether it is an IM room
\AUTO_LINKThe chat room IDblocking_add(\MEMBER $blocker, \MEMBER $blocked, \?TIME $time = null)
| package | chat |
|---|
\MEMBERThe member blocking
\MEMBERThe member being blocked
\?TIMEThe logged time of the block (null: now)
blocking_remove(\MEMBER $blocker, \MEMBER $blocked)
| package | chat |
|---|
\MEMBERThe member unblocking
\MEMBERThe member being unblocked
chat_get_all_rooms() : array
chat_get_room_content(\AUTO_LINK $room_id, array $_rooms, \?integer $cutoff= null, boolean $dereference= false, boolean $downloading= false, \?integer $start= null, \?integer $finish= null, \?integer $uptoid= null, \?ID_TEXT $zone= null, \?AUTO_LINK $entering_room= null, boolean $return_my_messages= true, boolean $return_system_messages= true) : array
If you set the $dereference flag, all the messages will be dereferenced for you, and if you set the $downloading flag, the array is returned in a format appropriate for things like downloading the chat logs. $start and $finish are used to cutoff the number of messages returned, based on their posting date and time, and the $uptoid variable is used to make the function only return the messages newer than the ID specified.
| package | chat |
|---|
\AUTO_LINKThe room ID (-1 for IM)
arrayRooms database rows that we'll need
\?integerThe maximum number of messages to be returned (null: no maximum)
booleanWhether to dereference the returned messages
booleanWhether to return the messages in a downloadeable format (using the templates for log downloading)
\?integerThe datetime stamp to start gathering messages from (null: all)
\?integerThe datetime stamp to stop gathering messages at (null: current time)
\?integerThe lowest message ID to return (null: no special lowest number)
\?ID_TEXTThe zone the chat module is in (null: find it)
\?AUTO_LINKThe language ID for the "entering room" message (null: not entering the room)
booleanReturn the current user's messages?
booleanReturn system messages
arrayAn array of all the messages collected according to the search criteriachat_poller()
| package | chat |
|---|
chat_room_prune(\AUTO_LINK $room_id)
chatroom_ban_to(\MEMBER $member_id, \AUTO_LINK $id)
chatroom_unban_to(\MEMBER $member_id, \AUTO_LINK $id)
chatter_active(\MEMBER $member_id, \?AUTO_LINK $room_id = null) : boolean
| package | chat |
|---|
\MEMBERMember ID
\?AUTO_LINKRoom ID (null: lobby)
booleanWhether the member is activecheck_chatroom_access(mixed $room, boolean $ret= false, \?MEMBER $member_id= null, boolean $must_be_explicit= false) : boolean
| package | chat |
|---|
mixedThe row of the chat room to check for access OR it's ID (AUTO_LINK)
booleanWhether to return false if there is no access (as opposed to bombing out)
\?MEMBERThe member to check as (null: current member)
booleanWhether to also ensure for $member_id having explicit access
booleanWhether the current member has access to the chatroomdelete_chatroom(\AUTO_LINK $id)
edit_chatroom(\AUTO_LINK $id, \SHORT_TEXT $welcome, \SHORT_TEXT $room_name, \MEMBER $room_owner, \LONG_TEXT $allow2, \LONG_TEXT $allow2_groups, \LONG_TEXT $disallow2, \LONG_TEXT $disallow2_groups, \LANGUAGE_NAME $room_language)
| package | chat |
|---|
\AUTO_LINKThe chat room ID
\SHORT_TEXTThe welcome message
\SHORT_TEXTThe room name
\MEMBERThe room owner
\LONG_TEXTThe comma-separated list of users that may access it (blank: no restriction)
\LONG_TEXTThe comma-separated list of usergroups that may access it (blank: no restriction)
\LONG_TEXTThe comma-separated list of users that may NOT access it (blank: no restriction)
\LONG_TEXTThe comma-separated list of usergroups that may NOT access it (blank: no restriction)
\LANGUAGE_NAMEThe room language
filter_invites_for_blocking(string $people) : string
| package | chat |
|---|
stringComma-separated people list
stringFiltered comma-separated people listfriend_add(\MEMBER $likes, \MEMBER $liked, \?TIME $time = null)
| package | chat |
|---|
\MEMBERThe member befriending
\MEMBERThe member being befriended
\?TIMEThe logged time of the friendship (null: now)
friend_remove(\MEMBER $likes, \MEMBER $liked)
get_chat_sound_tpl() : \Tempcode
get_chatroom_fields(\?AUTO_LINK $id= null, boolean $is_made_by_me= false, \SHORT_TEXT $room_name= '', \LONG_TEXT $welcome= '', \SHORT_TEXT $username= '', \LONG_TEXT $allow2= '', \LONG_TEXT $allow2_groups= '', \LONG_TEXT $disallow2= '', \LONG_TEXT $disallow2_groups= '') : array
| package | chat |
|---|
\?AUTO_LINKThe chat room ID (null: new)
booleanWhether the room is being made as a private room by the current member
\SHORT_TEXTThe room name
\LONG_TEXTThe welcome message
\SHORT_TEXTThe owner username
\LONG_TEXTThe comma-separated list of users that may access it (blank: no restriction)
\LONG_TEXTThe comma-separated list of usergroups that may access it (blank: no restriction)
\LONG_TEXTThe comma-separated list of users that may NOT access it (blank: no restriction)
\LONG_TEXTThe comma-separated list of usergroups that may NOT access it (blank: no restriction)
arrayA pair: The input fields, Hidden fieldsget_chatroom_id(\SHORT_TEXT $room_name, boolean $must_not_be_im = false) : \?AUTO_LINK
| package | chat |
|---|
\SHORT_TEXTThe name of the chatroom
booleanMake sure the room is not an IM room. If it is an IM room, pretend it does not exist.
\?AUTO_LINKThe ID of the chatroom (null: no such chat room)get_chatroom_name(\AUTO_LINK $room_id, boolean $allow_null = false) : \?SHORT_TEXT
| package | chat |
|---|
\AUTO_LINKThe room ID
booleanAllow the chatroom to not be found (i.e. don't die if it can't be)
\?SHORT_TEXTThe room name (null: not found)get_chatters_in_room(\?AUTO_LINK $room_id) : array
| package | chat |
|---|
\?AUTO_LINKThe room ID (null: lobby)
arrayA map of members in the room. User ID=>Usernameget_chatters_in_room_tpl(array $users) : \Tempcode
| package | chat |
|---|
arrayA mapping (user=>username) of the chatters in the room
\TempcodeThe Tempcodeget_effect_set(boolean $only_overridable = false) : \map
| package | chat |
|---|
booleanMap to NULL if it is not overridable.
\mapAll available sound effects (mapping between base code, and actual code).get_effect_settings(boolean $full_urls= false, \?MEMBER $for_member= null, boolean $all_members= false) : array
| package | chat |
|---|
booleanWhether to use full URLs in the mappings.
\?MEMBERGet settings overridden for this specific member (null: global settings).
booleanGet global settings and settings overridden for all members (if this is true we'd expect $for_member to be NULL).
arrayThe template mappings.get_num_chatposts() : integer
get_num_chatrooms() : integer
get_num_chatters() : integer
handle_chatroom_pruning(array $row) : boolean
| package | chat |
|---|
arrayThe row of the chat room to possibly prune
booleanWhether the room was prunedis_chat_moderator(\MEMBER $member_id, \AUTO_LINK $room_id, \?MEMBER $room_owner) : boolean
| package | chat |
|---|
\MEMBERMember ID
\AUTO_LINKRoom ID
\?MEMBERRoom owner (null: none)
booleanWhether the member is a moderator of the chat roommember_befriended(\MEMBER $member_id) : boolean
| package | chat |
|---|
\MEMBERThe member being checked
booleanWhether the member is befriendedparse_allow_list_input(string $_allow) : string
| package | chat |
|---|
stringA comma-separated list of usernames
stringA comma-separated list of member IDsread_in_chat_perm_fields() : array
render_chat_box(array $row, \ID_TEXT $zone= '_SEARCH', boolean $give_context= true, \ID_TEXT $guid= '') : \Tempcode
| package | chat |
|---|
arrayThe database field row of it
\ID_TEXTThe zone to use
booleanWhether to include context (i.e. say WHAT this is, not just show the actual content)
\ID_TEXTOverridden GUID to send to templates (blank: none)
\TempcodeA box for it, linking to the full pageshoutbox_script(boolean $ret= false, \?AUTO_LINK $room_id= null, \?integer $num_messages= null) : \?object
| package | chat |
|---|
booleanWhether to get the output instead of outputting it directly
\?AUTO_LINKChat room ID (null: read from environment)
\?integerThe maximum number of messages to show (null: read from environment)
\?objectOutput (null: outputted it already)show_im_contacts(\?MEMBER $member_id= null, boolean $simpler= false, \?integer $max= null) : \Tempcode
| package | chat |
|---|
\?MEMBERThe member ID (null: current user).
booleanWhether to show a simpler, more compact, UI.
\?integerMaximum to show (null: default).
\TempcodeThe contact UI.