Public Member Functions | |
discussForum ($sectionID, $forumID) | |
load () | |
save () | |
loadThreads () | |
isModerator () | |
userCanView () | |
userCanPost () | |
renderBlock () | |
renderNewThread () | |
render () | |
Public Attributes | |
$sectionID | |
long The ID of the section containing the forum | |
$forumID | |
long The forum's ID | |
$globalID | |
string The forum's global ID | |
$title | |
string The title of the forum | |
$description | |
string The description of the forum - a single line of text, without any type of formatting | |
$threads | |
array The threads contained in this forum - array of discussThread objects | |
$threadsCount | |
integer The amount of threads (for speed reasons - if we're not showing the threads' data, don't load them) | |
$moderators | |
array Contains the usernames of the forum's moderators | |
$postLevel | |
integer Comment level - Anonymous/Registered only/Moderators only (defaults to registered) | |
$viewLevel | |
integer Viewing level - Anonymous/Registered only/Moderators only (defaults to everybody) | |
$lastChanged | |
long Timestamp - when did the last change happen? | |
$lastChangedBy | |
string Username of the person who last changed the forum (added a thread or comment, edited a thread or comment) | |
$isChanged | |
bool Has the forum been changed? | |
$parentSection | |
discussSection If there is a parent section to the forum, it can be accessed through here | |
$thisForumURL | |
string The URL used to access this forum |
Definition at line 6 of file discussForum.php.
discussForum::discussForum | ( | $ | sectionID, | |
$ | forumID | |||
) |
discussForum Constructor
sectionID | Which section are we loading | |
forumID | (optional) Which forum are we loading - Omit this if you are creating a new forum |
Definition at line 34 of file discussForum.php.
References $discussContentDirectory, $forumID, $sectionID, description, globalIDtoURL(), load(), lockableClass::lock(), save(), title, lockableClass::unlock(), and viewLevel.
discussForum::load | ( | ) |
Load the forum options and such
Definition at line 62 of file discussForum.php.
References $discussContentDirectory, description, title, and viewLevel.
Referenced by discussForum(), loadThreads(), and renderNewThread().
discussForum::save | ( | ) |
Definition at line 80 of file discussForum.php.
References $discussContentDirectory, array_export(), description, title, and viewLevel.
Referenced by discussForum(), loadThreads(), and renderNewThread().
discussForum::loadThreads | ( | ) |
Load the threads contained within the forum
Definition at line 101 of file discussForum.php.
References $discussContentDirectory, $forumID, $sectionID, load(), lockableClass::lock(), save(), and lockableClass::unlock().
discussForum::isModerator | ( | ) |
Returns true if the current user is a moderator
Definition at line 147 of file discussForum.php.
References currentUser().
Referenced by renderNewThread(), userCanPost(), and userCanView().
discussForum::userCanView | ( | ) |
Definition at line 161 of file discussForum.php.
References currentUser(), isModerator(), and viewLevel.
Referenced by render(), and renderBlock().
discussForum::userCanPost | ( | ) |
Definition at line 183 of file discussForum.php.
References currentUser(), and isModerator().
Referenced by render().
discussForum::renderBlock | ( | ) |
Render small block for showing in the section overview
Definition at line 208 of file discussForum.php.
References currentUser(), formatTime(), globalIDtoURL(), i18n(), parse_page_data(), parse_profilelinks(), userCanView(), and viewLevel.
discussForum::renderNewThread | ( | ) |
Renders a dialog for adding a new thread to the current forum
Definition at line 254 of file discussForum.php.
References $discuss_defaultoptions, $discuss_options, currentUser(), discuss_saveOptions(), globalIDtoURL(), i18n(), isModerator(), load(), lockableClass::lock(), renderInformationBox(), discussThread::renderThreadEditor(), save(), and lockableClass::unlock().
Referenced by render().
discussForum::render | ( | ) |
Render the complete forum
Definition at line 346 of file discussForum.php.
References $i, $subscriptions, globalIDtoURL(), i18n(), renderInformationBox(), renderNewThread(), thisPageURL(), userCanPost(), and userCanView().
discussForum::$sectionID |
long The ID of the section containing the forum
Definition at line 8 of file discussForum.php.
Referenced by discussForum(), and loadThreads().
discussForum::$forumID |
long The forum's ID
Definition at line 9 of file discussForum.php.
Referenced by discussForum(), and loadThreads().
discussForum::$globalID |
discussForum::$title |
discussForum::$description |
string The description of the forum - a single line of text, without any type of formatting
Definition at line 13 of file discussForum.php.
discussForum::$threads |
array The threads contained in this forum - array of discussThread objects
Definition at line 15 of file discussForum.php.
discussForum::$threadsCount |
integer The amount of threads (for speed reasons - if we're not showing the threads' data, don't load them)
Definition at line 16 of file discussForum.php.
discussForum::$moderators |
array Contains the usernames of the forum's moderators
Definition at line 18 of file discussForum.php.
discussForum::$postLevel |
integer Comment level - Anonymous/Registered only/Moderators only (defaults to registered)
Definition at line 19 of file discussForum.php.
discussForum::$viewLevel |
integer Viewing level - Anonymous/Registered only/Moderators only (defaults to everybody)
Definition at line 20 of file discussForum.php.
discussForum::$lastChanged |
discussForum::$lastChangedBy |
string Username of the person who last changed the forum (added a thread or comment, edited a thread or comment)
Definition at line 23 of file discussForum.php.
discussForum::$isChanged |
discussForum::$parentSection |
discussSection If there is a parent section to the forum, it can be accessed through here
Definition at line 25 of file discussForum.php.
discussForum::$thisForumURL |