Packageindex Classtrees Modulegroups Elementlist Report XML Files

File: /home/inri/public_html/daCode-HEAD/daCode/src/phplib/submitComments.php3
daCode -

SubmitComments

SubmitComments

This class handles all submitting of comments.

 

private class SubmitComments

This class handles all submitting of comments.
Currently only news are supported...
but sooner webcam, tips, and poll will be :)

daCode http://www.dacode.org/
src/phplib/submitComments.php3
$Id: submitComments.php3,v 1.29 2002/05/13 21:34:03 jbcombes Exp $

 

Public Method Summary

void

SubmitComments()

Constructor
string

remindTopic(int $res_type, int $res_id)

reminds the topic to be commented
string

previewComment(int $com_id, array $table)

Previews the comment, includes previous comment if applicable
string

displayForm(int $com_id)

Displays the form to submit a comment

Private Method Summary

void

setResource(int $res_id, int $res_type)

Sets the resource ID and resource type to comment...
mixed

isAllowed(integer $res_id, [ integer $com_id ])

Check if the resource is to be commented. FIXME: Does not check wether
string

submit_confirm(array $table)

Add a new comment. Called from /comments/add.php3

Private Field Summary

object Comments

$comments

The comments class used for rendering
object Utils

$utils

The utils class. Used for debug functions
int

$res_id

The resource ID to comment
int

$res_type

The resource type to comment
int

$com_id

The comment to be replied to

Public Method Details

SubmitComments

public void SubmitComments( )

  Constructor

Returns void


remindTopic

public string remindTopic( int $res_type, int $res_id )

  reminds the topic to be commented

Parameter
int $res_type
the resource type
int $res_id
the resource ID to be commented
Returns string

the HTML to be displayed


previewComment

public string previewComment( int $com_id, array $table )

  Previews the comment, includes previous comment if applicable

Parameter
int $com_id
id of the comment to be replied to
array $table
previous answers
Returns string

the HTML to be displayed


displayForm

public string displayForm( int $com_id )

  Displays the form to submit a comment

Parameter
int $com_id
the comment's id we're replying to
Returns string

the HTML to be displayed


Private Method Details

setResource

private void setResource( int $res_id, int $res_type )

  Sets the resource ID and resource type to comment...
Initialize the comments class...

Parameter
int $res_id
the resource ID
int $res_type
the resource type
Returns void


isAllowed

private mixed isAllowed( integer $res_id, [ integer $com_id ] )

  Check if the resource is to be commented. FIXME: Does not check wether
the comment has the correct ressource type.

Parameter
integer $res_id
the id of the commented item
integer $com_id = >>0<<
the id of the comment to which we reply.
Returns mixed

NULL if successfull, string (error message) if not.


submit_confirm

private string submit_confirm( array $table )

  Add a new comment. Called from /comments/add.php3

Parameter
array $table
table resulting from form submission
Returns string

the HTML to be displayed


Private Field Details

$comments

private object Comments $comments

>><<

The comments class used for rendering


$utils

private object Utils $utils

>><<

The utils class. Used for debug functions


$res_id

private int $res_id

>><<

The resource ID to comment


$res_type

private int $res_type

>><<

The resource type to comment


$com_id

private int $com_id

>><<

The comment to be replied to



Packageindex Classtrees Modulegroups Elementlist Report XML Files
PHPDoc 1.0beta