Unclassified NewsBoard Code Reference

IThread class

Represents a thread and offers methods to operate on it

Methods:

Add Add a new forum to the database
After adding, all saved values are instantly accessible in this object
AddVote Add current user's vote
Change Update a thread in the database
If $id = 0 the currently loaded thread will be changed and updated in the database,
else currently loaded thread won't be changed and data will be written to another thread in the database.
$User and $UserName are only updated if $User != -1.
$Options is only updated if it's != -1.
ChangeVoteOption Change a voting option
Count Count threads mathing the query
CountUsers Get number of users that have a ThreadWatch line for this thread
CountVotes Count votes for a poll
CreateVoteOption Create a new voting option (for this or another thread)
Find Find first thread. Loads thread into this object
FindArray Find all threads
FindNext Find next thread from previous search
FirstUnreadPost Find the first unread post in a/this thread
GetDate Get this object's timestamp
GetDesc Get this object's description (subtitle)
GetForum Get this object's forum id
GetID Get this object's thread id
GetLastNotify Get last notify time for current user
GetLastPostDate Get this object's last post timestamp
GetLastRead Get last read time for current user
GetOptions Get this object's options/flags
GetPollTimeout Get this object's poll timeout timestamp
GetQuestion Get this object's poll question
GetSubject Get this object's subject
GetUser Get this object's author user id
GetUserName Get this object's author user name
GetUsersVoted Get an array of users, that have already voted for a poll
GetViews Get this object's views (hits) count
GetVotes Get an array of vote options (possible answers) for a poll
HasAttach Get this object's attachment flag
HasPoll Get this object's poll flag
HasUserVoted Tell whether current user has already voted at a poll
IThread No description available.
IncViews Increase number of views of a thread
IsClosed Get this object's closed flag
IsImportant Get this object's important flag
IsMoved Get this object's moved flag
IsMovedExpired Is this a moved notice thread and has it expired?
IsPollEnded Has the poll already ended?
IsWatched Get watch mode for current user
Load Load a thread into this object. Uses the global thread records cache.
LoadFromRecord Load a thread from a given record into this object.
Can load results from array find functions.
Remove Remove a thread
NOTE: All posts in this thread must already be removed or
they won't be accessible anymore!
RemoveAllPosts Extended Remove
Delete all posts in (this) thread and implicitly subsequently removes thread entry
RemoveAllThreadWatchs Remove any ThreadWatch data for (this) thread
RemoveAllUserVotes Remove any PollVotes data for (current) user
RemoveAllUserWatchs Remove any ThreadWatch data for (current) user
RemoveAllVotes Remove any PollVotes data for (this) thread
RemoveVote Remove current user's vote
Reset No description available.
SetDesc Set description (subtitle) for this thread
SetLastNotify Set last-notify time for current user
SetLastPostDate Set last post timestamp for this thread
SetLastRead Set last-read time for current user
SetLastViewed Set last-viewed time for current user
SetOptions Set options/flags for this thread
SetQuestion Set the poll question
SetSubject Set subject for this thread
SetUser Set author user for this thread
SetWatched Set watch mode for current user

Private fields:

Date  –  default: 0
Desc  –  default: ''
Forum  –  default: 0
ID  –  default: 0
LastPostDate  –  default: 0
Options  –  default: 0
PollTimeout  –  default: 0
Question  –  default: ''
Subject  –  default: ''
User  –  default: 0
UserName  –  default: ''
Views  –  default: 0
db
finddb

Implementation file: unb_lib/thread.lib.php, line 19

© 2006 Yves Goergen. Unclassified NewsBoard Homepage. Reference based on UNB unb.devel.20060128, dated 2006-01-28.