

Public Member Functions | |
| discussThread ($sectionID, $forumID, $threadID=0, $parentForum=null) | |
| load () | |
| save ($parentLocked=false) | |
| delete () | |
| move ($whereto) | |
| userCanEdit () | |
| userCanView () | |
| makeFilename () | |
| renderThreadEditor ($thread_data="", $parentForum="") | |
| renderBlock () | |
| render () | |
Public Attributes | |
| $sectionID | |
| long The ID of the section containing the forum containing the thread | |
| $forumID | |
| long The ID of the forum containing the thread | |
| $threadID | |
| string The thread's ID - counter in $discuss_options | |
| $globalID | |
| string The thread's globalID | |
| $title | |
| string The title of the thread | |
| $content | |
| string The contents of the initial post | |
| $replies | |
| array Comment data | |
| $lastReplyBy | |
| string Username of the last user that commented, or Anonymous | |
| $repliesCount | |
| integer For performance reasons, for use with renderBlock() so that we don't have to load the whole comments class each time | |
| $created | |
| long Timestamp - When was the thread created? | |
| $lastChanged | |
| long Timestamp - When was the thread last changed? | |
| $lastChangedBy | |
| string The username of the last user who edited the thread's top level post | |
| $isSticky | |
| bool Is this a sticky thread? | |
| $owner | |
| string The owner - view, reply and edit level are relative to this | |
| $viewLevel | |
| integer Viewing level (defaults to everybody - 0) | |
| $replyLevel | |
| integer Comment level (defaults to registered - 1) | |
| $editLevel | |
| integer Editing level (defaults to admin - 4) | |
| $filename | |
| string The thread's filename | |
| $thisThreadURL | |
| string The thread's URL, if there's a parent forum | |
| $isChanged = false | |
| bool Has the thread been changed? | |
| $changeIsReply = false | |
| bool Is the thread's change (above) a reply? | |
| $newThread = false | |
| bool Is this a new thread? Set by the parent forum | |
| $parentForum = 0 | |
| discussForum If the thread is called by a forum, this should be set ByRef by the calling forum | |
Definition at line 6 of file discussThread.php.
| discussThread::discussThread | ( | $ | sectionID, | |
| $ | forumID, | |||
| $ | threadID = 0, |
|||
| $ | parentForum = null | |||
| ) |
discussThread Constructor
| sectionID | The section which contains the forum which contains the thread | |
| forumID | The forum which contains the thread | |
| threadID | (optional) The thread's ID - Omit this if you are creating a new thread |
Definition at line 45 of file discussThread.php.
References $discussContentDirectory, $forumID, $globalID, $parentForum, $sectionID, $threadID, currentUser(), description, editLevel, globalIDtoURL(), i18n(), load(), lockableClass::lock(), makeFilename(), renderInformationBox(), save(), title, lockableClass::unlock(), userCanEdit(), and viewLevel.

| discussThread::load | ( | ) |
Loads the thread data from disc
Definition at line 142 of file discussThread.php.
References description, editLevel, title, and viewLevel.
Referenced by discussThread(), and render().
| discussThread::save | ( | $ | parentLocked = false |
) |
Saves the thread back to disc, when edited, or in any other way worked on...
Definition at line 175 of file discussThread.php.
References $message, $subscriptions, array_export(), description, editLevel, globalIDtoURL(), i18n(), renderInformationBox(), title, and viewLevel.
Referenced by discussThread(), move(), and render().

| discussThread::delete | ( | ) |
Deletes the thread from disc NB: Remember to delete it from the currently shown data as well, otherwise we'll show non-existant data (for example, reload a forum, or delete the thread item directly)
Definition at line 259 of file discussThread.php.
References $subscriptions.
| discussThread::move | ( | $ | whereto | ) |
Moves the thread to a different forum
| whereto | Which forum to we move to? |
Definition at line 275 of file discussThread.php.
References makeFilename(), and save().

| discussThread::userCanEdit | ( | ) |
Function used to determine wether the current user is allowed to edit this...
Definition at line 290 of file discussThread.php.
References currentUser(), and editLevel.
Referenced by discussThread(), and render().

| discussThread::userCanView | ( | ) |
Function used to determine wether the current user is allowed to edit this...
Definition at line 312 of file discussThread.php.
References currentUser(), and viewLevel.
Referenced by render().

| discussThread::makeFilename | ( | ) |
Internal convenience function for generating the thread's filename
Definition at line 334 of file discussThread.php.
References $discussContentDirectory.
Referenced by discussThread(), and move().
| discussThread::renderThreadEditor | ( | $ | thread_data = "", |
|
| $ | parentForum = "" | |||
| ) |
Convenience function which draws the post editing dialog
Definition at line 348 of file discussThread.php.
References $formatting_toolbar, $parentForum, $permissionlevels_array, $title, description, editLevel, i18n(), title, and viewLevel.
Referenced by render(), and discussForum::renderNewThread().

| discussThread::renderBlock | ( | ) |
Render small block for showing in the forum overview
Definition at line 451 of file discussThread.php.
References currentUser(), formatTime(), i18n(), and parse_profilelinks().

| discussThread::render | ( | ) |
Render the complete thread
Definition at line 484 of file discussThread.php.
References $discuss_options, $panel, $replies, $sectionID, $subscriptions, drawCommand(), editLevel, globalIDtoURL(), i18n(), load(), lockableClass::lock(), parse_page_data(), renderInformationBox(), renderThreadEditor(), save(), siteURL(), lockableClass::unlock(), userCanEdit(), userCanView(), and viewLevel.

| discussThread::$sectionID |
long The ID of the section containing the forum containing the thread
Definition at line 8 of file discussThread.php.
Referenced by discussThread(), and render().
| discussThread::$forumID |
long The ID of the forum containing the thread
Definition at line 9 of file discussThread.php.
Referenced by discussThread().
| discussThread::$threadID |
string The thread's ID - counter in $discuss_options
Definition at line 10 of file discussThread.php.
Referenced by discussThread().
| discussThread::$globalID |
string The thread's globalID
Definition at line 11 of file discussThread.php.
Referenced by discussThread().
| discussThread::$title |
string The title of the thread
Definition at line 13 of file discussThread.php.
Referenced by renderThreadEditor().
| discussThread::$content |
| discussThread::$replies |
| discussThread::$lastReplyBy |
string Username of the last user that commented, or Anonymous
Definition at line 16 of file discussThread.php.
| discussThread::$repliesCount |
integer For performance reasons, for use with renderBlock() so that we don't have to load the whole comments class each time
Definition at line 17 of file discussThread.php.
| discussThread::$created |
| discussThread::$lastChanged |
| discussThread::$lastChangedBy |
string The username of the last user who edited the thread's top level post
Definition at line 21 of file discussThread.php.
| discussThread::$isSticky |
| discussThread::$owner |
string The owner - view, reply and edit level are relative to this
Definition at line 24 of file discussThread.php.
| discussThread::$viewLevel |
| discussThread::$replyLevel |
| discussThread::$editLevel |
| discussThread::$filename |
| discussThread::$thisThreadURL |
| discussThread::$isChanged = false |
| discussThread::$changeIsReply = false |
| discussThread::$newThread = false |
| discussThread::$parentForum = 0 |
discussForum If the thread is called by a forum, this should be set ByRef by the calling forum
Definition at line 34 of file discussThread.php.
Referenced by discussThread(), and renderThreadEditor().
1.5.5