Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

BaseForumThread Class Reference
[Base Objects]

Inheritance diagram for BaseForumThread:

MyObject BaseObject MyModule BaseModule List of all members.

Detailed Description

A stub class to hold subject, and stats on a thread.

This BaseObject holds nothing but the subject, author, and post counts of the thread. The real work is handed off to BaseComment and BaseThread.

Definition at line 9 of file base-forum-thread.inc.php.

Public Member Functions

 __construct ($data=null, $table= 'threads')
 setup our forum thread
 getName ($link=false)
 get our subject as our name
 drawHeaderRow ()
 draw the header row for our comments
 drawRow ()
 draw the row for our thread.
 canView ()
 who can view it? everyone.
 canEdit ()
 only admins can edit it.
 canDelete ()
 only admins can delete it too..
 editFormAddFields ($form)
 only able to edit subject
 delete ()
 delete ourselves and save the forum.
 deletePost ()
 on delete, send us to our forum.
 getRssItem ()
 get our thread as an rss item
 getPublicData ()
 get our thread info as public data for api.
 initViewPage ()
 prep our view page
 drawViewPage ()
 draw our view page...
 save ()
 save our thread
 getCreateFieldsArray ()
 add our custom fields in.
 getCreateIndexesArray ()
 add our custom fields in.

Public Attributes

 $LastPost = null
 the holder object for our last comment
 $ThreadCommentClass = 'ThreadComment'
 the string class name of the comments on the thread.
 $Forum = null
 the holder object for our BaseForum
 $ForumClass = 'Forum'
 the string class name of the BaseForum

Protected Member Functions

 lookupData ($deep=true)
 lookup and set our objects
 getDataToCache ($deep=true)
 this is the funciton that gets the data we need saved to cache.
 setDataFromCache ($data, $deep=true)
 this function sets the data in the object from the data we retrieved from the cache.


Member Function Documentation

BaseForumThread::__construct data = null,
table = 'threads'
 

setup our forum thread

Reimplemented from BaseObject.

Definition at line 34 of file base-forum-thread.inc.php.

BaseForumThread::canDelete  ) 
 

only admins can delete it too..

Reimplemented from BaseObject.

Definition at line 109 of file base-forum-thread.inc.php.

References canEdit().

BaseForumThread::canEdit  ) 
 

only admins can edit it.

Reimplemented from BaseObject.

Definition at line 99 of file base-forum-thread.inc.php.

Referenced by canDelete().

BaseForumThread::canView  ) 
 

who can view it? everyone.

Reimplemented from BaseObject.

Definition at line 91 of file base-forum-thread.inc.php.

BaseForumThread::delete  ) 
 

delete ourselves and save the forum.

Reimplemented from BaseObject.

Definition at line 130 of file base-forum-thread.inc.php.

BaseForumThread::deletePost  ) 
 

on delete, send us to our forum.

Definition at line 141 of file base-forum-thread.inc.php.

BaseForumThread::drawHeaderRow  ) 
 

draw the header row for our comments

Reimplemented from BaseObject.

Definition at line 56 of file base-forum-thread.inc.php.

BaseForumThread::drawRow  ) 
 

draw the row for our thread.

Reimplemented from BaseObject.

Definition at line 71 of file base-forum-thread.inc.php.

References Time::formatRelative(), and getName().

BaseForumThread::drawViewPage  ) 
 

draw our view page...

Definition at line 186 of file base-forum-thread.inc.php.

BaseForumThread::editFormAddFields form  ) 
 

only able to edit subject

Reimplemented from BaseObject.

Definition at line 117 of file base-forum-thread.inc.php.

BaseForumThread::getCreateFieldsArray  ) 
 

add our custom fields in.

Reimplemented from BaseObject.

Definition at line 273 of file base-forum-thread.inc.php.

BaseForumThread::getCreateIndexesArray  ) 
 

add our custom fields in.

Reimplemented from BaseObject.

Definition at line 287 of file base-forum-thread.inc.php.

BaseForumThread::getDataToCache deep = true  )  [protected]
 

this is the funciton that gets the data we need saved to cache.

by default it saves our data, and will save the comments or tags objects if needed. its recommended to extend this to add data that you'd like cached by the object

Returns:
an array of data to cache

Reimplemented from BaseObject.

Definition at line 248 of file base-forum-thread.inc.php.

BaseForumThread::getName link = false  ) 
 

get our subject as our name

Definition at line 48 of file base-forum-thread.inc.php.

Referenced by drawRow(), and initViewPage().

BaseForumThread::getPublicData  ) 
 

get our thread info as public data for api.

Reimplemented from BaseObject.

Definition at line 162 of file base-forum-thread.inc.php.

BaseForumThread::getRssItem  ) 
 

get our thread as an rss item

Reimplemented from BaseObject.

Definition at line 149 of file base-forum-thread.inc.php.

BaseForumThread::initViewPage  ) 
 

prep our view page

Definition at line 176 of file base-forum-thread.inc.php.

References BaseModule::addFeed(), and getName().

BaseForumThread::lookupData deep = true  )  [protected]
 

lookup and set our objects

Reimplemented from BaseObject.

Definition at line 237 of file base-forum-thread.inc.php.

BaseForumThread::save  ) 
 

save our thread

Reimplemented from BaseObject.

Definition at line 207 of file base-forum-thread.inc.php.

References dbFetchAssoc(), and dbQuery().

BaseForumThread::setDataFromCache data,
deep = true
[protected]
 

this function sets the data in the object from the data we retrieved from the cache.

it takes the data from the array and puts it in the object. you'll want to override this one if you added custome data in getDataToCache() and load it into the object.

Parameters:
$data the data we got from teh cache

Reimplemented from BaseObject.

Definition at line 258 of file base-forum-thread.inc.php.


Member Data Documentation

BaseForumThread::$Forum = null
 

the holder object for our BaseForum

Definition at line 24 of file base-forum-thread.inc.php.

BaseForumThread::$ForumClass = 'Forum'
 

the string class name of the BaseForum

Definition at line 29 of file base-forum-thread.inc.php.

BaseForumThread::$LastPost = null
 

the holder object for our last comment

Definition at line 14 of file base-forum-thread.inc.php.

BaseForumThread::$ThreadCommentClass = 'ThreadComment'
 

the string class name of the comments on the thread.

Definition at line 19 of file base-forum-thread.inc.php.


The documentation for this class was generated from the following file:
Generated on Fri Oct 27 12:26:41 2006 for BaseJumper by doxygen 1.3.9.1