BitArticle Class Reference

Inheritance diagram for BitArticle:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 BitArticle ($pArticleId=NULL, $pContentId=NULL)
 expunge ()
 expungeImage ($pArticleId=NULL, $pImagePath=NULL)
 getArticleImageStorageName ($pArticleId=NULL)
 getArticleImageStoragePath ($pArticleId=NULL, $pBasePathOnly=FALSE)
 getArticleImageStorageUrl ($pArticleId=NULL, $pBasePathOnly=FALSE, $pForceRefresh=FALSE)
 getDisplayUrl ($pArticleId=NULL)
 getExpiredList (&$pParamHash)
 getFutureList (&$pParamHash)
 getImageUrl ($pParamHash, &$pIsTopicImage, $pLoadAttachment=FALSE)
 getList (&$pParamHash)
 getRenderFile ()
 getStatusList ()
 isValid ()
 load ($pVersion=0)
 preparePreview ($pParamHash)
 setStatus ($pStatusId, $pArticleId=NULL, $pContentId=NULL)
 store (&$pParamHash)
 verify (&$pParamHash)

Public Attributes

 $mArticleId
 $mTopicId
 $mTypeId

Detailed Description

Definition at line 33 of file BitArticle.php.


Member Function Documentation

BitArticle::BitArticle ( pArticleId = NULL,
pContentId = NULL 
)

Initiate the articles class

Parameters:
$pArticleId article id of the article we want to view
$pContentId content id of the article we want to view private

Definition at line 48 of file BitArticle.php.

References LibertyAttachable::LibertyAttachable(), mContentId, and LibertyContent::registerContentType().

Here is the call graph for this function:

BitArticle::expunge (  ) 

Removes currently loaded article

Returns:
bool TRUE on success, FALSE on failure public

Reimplemented from LibertyContent.

Definition at line 444 of file BitArticle.php.

References $query, $result, $ret, LibertyContent::expunge(), expungeImage(), FALSE, isValid(), mContentId, and mDb.

Here is the call graph for this function:

BitArticle::expungeImage ( pArticleId = NULL,
pImagePath = NULL 
)

Remove a custom article image - will result in the usage of the default image if a topic with image is selected

Parameters:
$pArticleId ID of the article that needs the image removed
$pImagePath path to the image that needs removing - generally used during preview - will override article id
Returns:
bool TRUE on success, FALSE if store could not occur. If FALSE, $this->mErrors will have reason why public

Definition at line 830 of file BitArticle.php.

References $image, getArticleImageStoragePath(), image, isValid(), and tra().

Referenced by expunge().

Here is the call graph for this function:

BitArticle::getArticleImageStorageName ( pArticleId = NULL  ) 

Get the name of the article image file

Parameters:
array $pArticleId article id public
Returns:
TRUE on success, FALSE on failure

Definition at line 750 of file BitArticle.php.

References isValid(), and BitBase::verifyId().

Referenced by getArticleImageStorageUrl().

Here is the call graph for this function:

BitArticle::getArticleImageStoragePath ( pArticleId = NULL,
pBasePathOnly = FALSE 
)

Work out the path to the image for this article

Parameters:
$pArticleId id of the article we need the image path for
$pBasePathOnly bool TRUE / FALSE - specify whether you want full path or just base path
Returns:
path on success, FALSE on failure public

Definition at line 769 of file BitArticle.php.

References FALSE, isValid(), and BitBase::verifyId().

Referenced by expungeImage(), getArticleImageStorageUrl(), and BitArticleTopic::getTopicImageStoragePath().

Here is the call graph for this function:

BitArticle::getArticleImageStorageUrl ( pArticleId = NULL,
pBasePathOnly = FALSE,
pForceRefresh = FALSE 
)

Work out the URL to the image for this article

Parameters:
$pArticleId id of the article we need the image path for
$pBasePathOnly bool TRUE / FALSE - specify whether you want full path or just base path
Returns:
URL on success, FALSE on failure public

Definition at line 801 of file BitArticle.php.

References $gBitSystem, $url, FALSE, getArticleImageStorageName(), getArticleImageStoragePath(), isValid(), and BitBase::verifyId().

Referenced by getImageUrl(), and BitArticleTopic::getTopicImageStorageUrl().

Here is the call graph for this function:

BitArticle::getDisplayUrl ( pArticleId = NULL  ) 

Generates the URL to the article

Returns:
the link to the full article

Definition at line 661 of file BitArticle.php.

References $gBitSystem, $ret, isValid(), and BitBase::verifyId().

Referenced by getList(), and load().

Here is the call graph for this function:

BitArticle::getExpiredList ( &$  pParamHash  ) 

Get list of articles that have expired and are not displayed on the site anymore

Parameters:
array $pParamHash contains listing options - same as getList() public
Returns:
array of articles

Definition at line 652 of file BitArticle.php.

References $pParamHash, and getList().

Here is the call graph for this function:

BitArticle::getFutureList ( &$  pParamHash  ) 

Get a list of articles that are to be published in the future

Parameters:
array $pParamHash contains listing options - same as getList() public
Returns:
array of articles

Definition at line 640 of file BitArticle.php.

References $pParamHash, and getList().

Here is the call graph for this function:

BitArticle::getImageUrl ( pParamHash,
&$  pIsTopicImage,
pLoadAttachment = FALSE 
)

Get the URL for any given article image

Parameters:
$pParamHash pass in full set of data returned from article query
Returns:
url to image public

Definition at line 413 of file BitArticle.php.

References $attachment, $image, $pParamHash, $ret, getArticleImageStorageUrl(), LibertyAttachable::getAttachment(), BitArticleTopic::getTopicImageStorageUrl(), and BitBase::verifyId().

Referenced by getList(), load(), BitBlogPost::preparePreview(), and preparePreview().

Here is the call graph for this function:

BitArticle::getList ( &$  pParamHash  ) 

This function generates a list of records from the liberty_content database for use in a list page

Parameters:
$pParamHash contains an array of conditions to sort by
Returns:
array of articles public

Definition at line 477 of file BitArticle.php.

References $comment, $find, $gBitSystem, $gBitUser, $gLibertySystem, $now, $pParamHash, $query, $res, $result, $ret, FALSE, LibertyContent::getDisplayLink(), getDisplayUrl(), getImageUrl(), LibertyContent::getServicesSql(), liberty_fetch_thumbnail_url(), mDb, LibertyContent::parseSplit(), BitBase::postGetList(), LibertyContent::prepGetList(), title, and BitBase::verifyId().

Referenced by getExpiredList(), and getFutureList().

Here is the call graph for this function:

BitArticle::getRenderFile (  ) 

Returns include file that will setup vars for display

Returns:
the fully specified path to file to be included

Reimplemented from LibertyContent.

Definition at line 628 of file BitArticle.php.

BitArticle::getStatusList (  ) 

get a list of all available statuses

Returns:
an array of available statuses public

Definition at line 687 of file BitArticle.php.

References $gBitSystem, $query, and $result.

BitArticle::isValid (  ) 

Check if there is an article loaded

Returns:
bool TRUE on success, FALSE on failure public

Reimplemented from LibertyContent.

Definition at line 467 of file BitArticle.php.

References mContentId, and BitBase::verifyId().

Referenced by expunge(), expungeImage(), getArticleImageStorageName(), getArticleImageStoragePath(), getArticleImageStorageUrl(), getDisplayUrl(), setStatus(), store(), and verify().

Here is the call graph for this function:

BitArticle::load ( pVersion = 0  ) 

Load the data from the database public

Reimplemented from LibertyAttachable.

Definition at line 74 of file BitArticle.php.

References $comment, $gBitSystem, $query, $result, editor, getDisplayUrl(), getImageUrl(), LibertyContent::getServicesSql(), LibertyAttachable::load(), mContentId, mDb, mInfo, LibertyContent::parseData(), and BitBase::verifyId().

Referenced by store(), and verify().

Here is the call graph for this function:

BitArticle::preparePreview ( pParamHash  ) 

Deal with images and text, modify them apprpriately that they can be returned to the form.

Parameters:
$previewData data submitted by form - generally $_REQUEST
Returns:
array of data compatible with article form public

Definition at line 319 of file BitArticle.php.

References $data, $gBitSystem, $gBitUser, $pParamHash, $query, getImageUrl(), mDb, mInfo, LibertyContent::parseData(), verify(), and BitBase::verifyId().

Here is the call graph for this function:

BitArticle::setStatus ( pStatusId,
pArticleId = NULL,
pContentId = NULL 
)

set the status of an article

Parameters:
$pStatusId new status id of the article
$pArticleId of the article that is being changed - if not set, it will attemtp to change the currently loaded article
Returns:
new status of article on success - else returns NULL public

Definition at line 701 of file BitArticle.php.

References $gBitSystem, $rs, $sql, delete_index(), FALSE, isValid(), mContentId, mDb, refresh_index(), and BitBase::verifyId().

Here is the call graph for this function:

BitArticle::store ( &$  pParamHash  ) 

Store article data after submission

Parameters:
array pParamHash of values that will be used to store the page
Returns:
bool TRUE on success, FALSE if store could not occur. If FALSE, $this->mErrors will have reason why public

Reimplemented from LibertyAttachable.

Definition at line 145 of file BitArticle.php.

References $gBitSystem, $pParamHash, $result, isValid(), load(), mDb, LibertyAttachable::store(), and verify().

Here is the call graph for this function:

BitArticle::verify ( &$  pParamHash  ) 

Make sure the data is safe to store

Parameters:
pParamHash be sure to pass by reference in case we need to make modifcations to the hash
array pParams reference to hash of values that will be used to store the page, they will be modified where necessary
Returns:
bool TRUE on success, FALSE if verify failed. If FALSE, $this->mErrors will have reason why private

Reimplemented from LibertyAttachable.

Definition at line 178 of file BitArticle.php.

References $gBitSystem, $gBitUser, $pParamHash, $prefs, $timestamp, isValid(), load(), mInfo, title, and BitBase::verifyId().

Referenced by preparePreview(), and store().

Here is the call graph for this function:


Member Data Documentation

BitArticle::$mArticleId

Primary key for articles public

Definition at line 38 of file BitArticle.php.

BitArticle::$mTopicId

Definition at line 40 of file BitArticle.php.

BitArticle::$mTypeId

Definition at line 39 of file BitArticle.php.


The documentation for this class was generated from the following file:
Generated on Wed Aug 22 19:34:02 2007 for bitweaver by  doxygen 1.5.2