discussThread Class Reference

Inheritance diagram for discussThread:

Inheritance graph
[legend]
Collaboration diagram for discussThread:

Collaboration graph
[legend]

List of all members.

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


Detailed Description

The discussThread class GlobalID = discuss/sectionID/forumID/threadID

Definition at line 6 of file discussThread.php.


Member Function Documentation

discussThread::discussThread ( sectionID,
forumID,
threadID = 0,
parentForum = null 
)

discussThread Constructor

Parameters:
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
Returns:
void

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.

Here is the call graph for this function:

discussThread::load (  ) 

Loads the thread data from disc

Returns:
bool Wether we successfully loaded the thread data

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...

Returns:
bool Wether we successfully saved the thread (or if there were no changes to save)

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().

Here is the call graph for this function:

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)

Returns:
bool Wether we successfully deleted the thread

Definition at line 259 of file discussThread.php.

References $subscriptions.

discussThread::move ( whereto  ) 

Moves the thread to a different forum

Parameters:
whereto Which forum to we move to?
Returns:
bool Was it successfully moved?

Definition at line 275 of file discussThread.php.

References makeFilename(), and save().

Here is the call graph for this function:

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

discussThread::renderBlock (  ) 

Render small block for showing in the forum overview

Returns:
string The rendered block

Definition at line 451 of file discussThread.php.

References currentUser(), formatTime(), i18n(), and parse_profilelinks().

Here is the call graph for this function:

discussThread::render (  ) 

Render the complete thread

Returns:
string The rendered 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.

Here is the call graph for this function:


Member Data Documentation

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

string The contents of the initial post

Definition at line 14 of file discussThread.php.

discussThread::$replies

array Comment data

Definition at line 15 of file discussThread.php.

Referenced by render().

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

long Timestamp - When was the thread created?

Definition at line 19 of file discussThread.php.

discussThread::$lastChanged

long Timestamp - When was the thread last changed?

Definition at line 20 of file discussThread.php.

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

bool Is this a sticky thread?

Definition at line 22 of file discussThread.php.

discussThread::$owner

string The owner - view, reply and edit level are relative to this

Definition at line 24 of file discussThread.php.

discussThread::$viewLevel

integer Viewing level (defaults to everybody - 0)

Definition at line 25 of file discussThread.php.

discussThread::$replyLevel

integer Comment level (defaults to registered - 1)

Definition at line 26 of file discussThread.php.

discussThread::$editLevel

integer Editing level (defaults to admin - 4)

Definition at line 27 of file discussThread.php.

discussThread::$filename

string The thread's filename

Definition at line 29 of file discussThread.php.

discussThread::$thisThreadURL

string The thread's URL, if there's a parent forum

Definition at line 30 of file discussThread.php.

discussThread::$isChanged = false

bool Has the thread been changed?

Definition at line 31 of file discussThread.php.

discussThread::$changeIsReply = false

bool Is the thread's change (above) a reply?

Definition at line 32 of file discussThread.php.

discussThread::$newThread = false

bool Is this a new thread? Set by the parent forum

Definition at line 33 of file discussThread.php.

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().


The documentation for this class was generated from the following file:

Generated on Sun Oct 26 20:33:15 2008 for The Travelsized Content Management System by  doxygen 1.5.5