class CDiscussions extends CArticles

^ INDEX

Table of contents

CDiscussions
GetDiscussion
GetDiscussionComment
GetDiscussionDate
GetDiscussionEmail
GetDiscussionName
GetDiscussionTime
GetDiscussionURL
IsDiscussionDisabled
SubmitSpam
TestSpam

^ Top

CDiscussions()

absolutengine

Discussions class for handling all discussion/comment-related functions

^ Top

GetDiscussion($settings="all")

Retrieve discussion/comments for the article
function accepts two styles of parameters due to backward compatiblity
NEW FORMAT:
"commentnumber"=>int number of comments to be displayed
"offset"=>int offset to show articles from
"fromdate"=>string articles to be shown from date (date format in settings.php)
"todate"=>string articles to be shown up to date (date format as in settings.php)
"articleID"=>int ID of article for which discussion should to be displayed
"order"=>string use MySQL format ("priority DESC, adate DESC, atime DESC" etc.)

int $settings number of comments to be displayed - OLD FORMAT - DO NOT USE!
array $settings list of parameters, see below:

^ Top

GetDiscussionComment()

Print comment text

^ Top

GetDiscussionDate()

Print date of comment entry

^ Top

GetDiscussionEmail($antispam=1)

Return email of an author of comment

boolean $antispam TRUE by default - converts email address to prevent spam

^ Top

GetDiscussionName()

Print name of an author of comment

^ Top

GetDiscussionTime()

Print time of comment entry

^ Top

GetDiscussionURL()

Retrieve URL of an author/website

^ Top

IsDiscussionDisabled($articleID)

Find whether article discussion is disabled (discussion is enabled or disabled)

int $articleID ID of article

^ Top

SubmitSpam($author,$email,$url,$body,$permalink,$IPaddress)

Test comment for spam

string $author author of comment
string $email email of comment
string $url url of comment
string $body text of comment
string $permalink clean URL to article
string $IPaddress IP address of comment submitter

^ Top

TestSpam($author,$email,$url,$body,$permalink)

Test comment for spam

string $author author of comment
string $email email of comment
string $url url of comment
string $body text of comment
string $permalink clean URL to article

^ Top