Geeklog
[ class tree: Geeklog ] [ index: Geeklog ] [ all elements ]

Procedural File: lib-comment.php

Source Location: /system/lib-comment.php



Page Details:



Includes:

require_once($_CONF['path_system'].'lib-user.php') [line 45]
only needed for the USER_getPhoto function






CMT_CID [line 51]

CMT_CID = $prefix.'cid'

[ Top ]



CMT_MODE [line 57]

CMT_MODE = $prefix.'mode'

[ Top ]



CMT_PID [line 53]

CMT_PID = $prefix.'pid'

[ Top ]



CMT_SID [line 52]

CMT_SID = $prefix.'sid'

[ Top ]



CMT_TYPE [line 55]

CMT_TYPE = $prefix.'type'

[ Top ]



CMT_UID [line 54]

CMT_UID = $prefix.'uid'

[ Top ]



CMT_USERNAME [line 56]

CMT_USERNAME = $prefix.'username'

[ Top ]



COMMENT_ON_SAME_PAGE [line 48]

COMMENT_ON_SAME_PAGE = ($_CONF['comment_on_same_page']&&!CMT_isCommentPage())

[ Top ]




CMT_approveModeration [line 2027]

string CMT_approveModeration( int $cid)

Moves comment from submission table to comments table



Tags:

return:  of story id
author:  Jared Wenerd, wenerd87 AT gmail DOT com
copyright:  Jared Wenerd 2008


Parameters

int   $cid   cid comment id
[ Top ]



CMT_commentBar [line 74]

string CMT_commentBar( string $sid, string $title, string $type, string $order, string $mode, [int $ccode = 0])

This function displays the comment control bar

Prints the control that allows the user to interact with Geeklog Comments




Tags:

return:  HTML Formated comment bar
see:  CMT_userComments()


Parameters

string   $sid   ID of item in question
string   $title   Title of item
string   $type   Type of item (i.e. article, photo, etc)
string   $order   Order that comments are displayed in
string   $mode   Mode (nested, flat, etc.)
int   $ccode   Comment code: -1=no comments, 0=allowed, 1=closed
[ Top ]



CMT_commentForm [line 841]

string CMT_commentForm( string $title, string $comment, string $sid, [int $pid = '0'], string $type, string $mode, string $postmode, [string $format = ''], [string $order = ''], [int $page = ''])

Displays the comment form



Tags:

return:  HTML for comment form


Parameters

string   $title   Title of comment
string   $comment   Text of comment
string   $sid   ID of object comment belongs to
int   $pid   ID of parent comment
string   $type   Type of object comment is posted to
string   $mode   Mode, e.g. 'preview'
string   $postmode   Indicates if comment is plain text or HTML
string   $format   'threaded', 'nested', or 'flat'
string   $order   'ASC' or 'DESC' or blank
int   $page   Page number of comments to display
[ Top ]



CMT_deleteComment [line 1585]

string CMT_deleteComment( int $cid, string $sid, string $type)

Deletes a given comment

The function expects the calling function to check to make sure the requesting user has the correct permissions and that the comment exits for the specified $type and $sid.




Tags:

return:  0 indicates success, >0 identifies problem
author:  Vincent Furia, vinny01 AT users DOT sourceforge DOT net


Parameters

string   $type   article, or plugin identifier
string   $sid   id of object comment belongs to
int   $cid   Comment ID
[ Top ]



CMT_getComment [line 237]

string CMT_getComment( array &$comments, string $mode, string $type, string $order, [boolean $delete_option = false], [boolean $preview = false], [int $ccode = 0], [int $cpage = 1])

This function prints &$comments (db results set of comments) in comment format -For previews, &$comments is assumed to be an associative array containing data for a single comment.



Tags:

return:  HTML Formated Comment


Parameters

array   &$comments   Database result set of comments to be printed
string   $mode   'flat', 'threaded', etc
string   $type   Type of item (article, polls, etc.)
string   $order   How to order the comments 'ASC' or 'DESC'
boolean   $delete_option   if current user can delete comments
boolean   $preview   Preview display (for edit) or not
int   $ccode   Comment code: -1=no comments, 0=allowed, 1=closed
int   $cpage   page number of comments to display
[ Top ]



CMT_getCommentUrlId [line 2698]

array CMT_getCommentUrlId( string $type)

Get view URL and name of unique identifier



Tags:

return:  string of URL of view page, name of unique identifier
see:  PLG_getCommentUrlId()


Parameters

string   $type   Plugin to delete comment
[ Top ]



CMT_handleCancel [line 2135]

string CMT_handleCancel( )

Handles a comment submission



Tags:

return:  HTML (possibly a refresh)
author:  Vincent Furia, vinny01 AT users DOT sourceforge DOT net
copyright:  Vincent Furia 2005


[ Top ]



CMT_handleComment [line 2373]

string CMT_handleComment( [string $mode = ''], [string $type = ''], [string $title = ''], [string $sid = ''], [string $format = ''])

Handles comment processing



Tags:

return:  HTML formated


Parameters

string   $mode   Mode of comment processing
string   $type   Type of item (article, polls, etc.)
string   $title   Title of item
string   $sid   ID for item to show comments for
string   $format   'threaded', 'nested', or 'flat'
[ Top ]



CMT_handleDelete [line 2193]

string CMT_handleDelete( $sid, $type, $formtype)

Hanldes a comment submission



Tags:

return:  HTML (possibly a refresh)
author:  Vincent Furia <AT users DOT sourceforge DOT net vinny01 AT users DOT sourceforge DOT net>
copyright:  Vincent Furia 2005


Parameters

   $sid  
   $type  
   $formtype  
[ Top ]



CMT_handleEdit [line 2280]

string CMT_handleEdit( [string $mode = ''], [ $postmode = ''], string $format, string $order, int $page)

Handles a comment edit submission



Tags:

return:  HTML (possibly a refresh)
author:  Jared Wenerd, wenerd87 AT gmail DOT com
copyright:  Jared Wenerd 2008


Parameters

string   $mode   'edit' or 'editsubmission'
string   $format   'threaded', 'nested', or 'flat'
string   $order   'ASC' or 'DESC' or blank
int   $page   Page number of comments to display
   $postmode  
[ Top ]



CMT_handleEditSubmit [line 1786]

string CMT_handleEditSubmit( [string $mode = null])

Handles a comment edit submission



Tags:

return:  HTML (possibly a refresh)
author:  Jared Wenerd, wenerd87 AT gmail DOT com
copyright:  Jared Wenerd 2008


Parameters

string   $mode   whether to store edited comment in the queue
[ Top ]



CMT_handleSubmit [line 2174]

string CMT_handleSubmit( $title, $sid, $pid, $type, $postmode, $uid)

Handles a comment submission



Tags:

return:  HTML (possibly a refresh)
author:  Vincent Furia <AT users DOT sourceforge DOT net vinny01 AT users DOT sourceforge DOT net>
copyright:  Vincent Furia 2005


Parameters

   $title  
   $sid  
   $pid  
   $type  
   $postmode  
   $uid  
[ Top ]



CMT_handleView [line 2231]

string CMT_handleView( string $format, string $order, int $page, [boolean $view = true])

Handles a comment view request



Tags:

return:  HTML (possibly a refresh)
author:  Vincent Furia, vinny01 AT users DOT sourceforge DOT net
copyright:  Vincent Furia 2005


Parameters

string   $format   'threaded', 'nested', or 'flat'
string   $order   'ASC' or 'DESC' or blank
int   $page   Page number of comments to display
boolean   $view   View or display (true for view)
[ Top ]



CMT_isCommentPage [line 2678]

boolean CMT_isCommentPage( )

Check if we're on Geeklog's comment page



Tags:

return:  true: on comment page, false: on other page


[ Top ]



CMT_prepareText [line 1895]

string CMT_prepareText( string $comment, string $postmode, string $type, [boolean $edit = false], [int $cid = null])

Filters comment text and appends necessary tags (sig and/or edit)



Tags:

return:  of comment text
author:  Jared Wenerd, wenerd87 AT gmail DOT com
copyright:  Jared Wenerd 2008


Parameters

string   $comment   comment text
string   $postmode   ('html', 'plaintext', ...)
string   $type   Type of item (article, polls, etc.)
boolean   $edit   if true append edit tag
int   $cid   commentid if editing comment (for proper sig)
[ Top ]



CMT_rebuildTree [line 2001]

int CMT_rebuildTree( string $sid, [int $pid = 0], [int $left = 0])

Rebuilds hierarchical data of comments after moderation using recursion.



Tags:

return:  id of right-hand successor
author:  Jared Wenerd, wenerd87 AT gmail DOT com
copyright:  Jared Wenerd 2008
see:  CMT_deleteComment()


Parameters

string   $sid   id of object comment belongs to
int   $pid   id of parent comment
int   $left   id of left-hand successor
[ Top ]



CMT_reportAbusiveComment [line 1645]

string CMT_reportAbusiveComment( string $cid, string $type)

Display form to report abusive comment.



Tags:

return:  HTML for the form (or error message)


Parameters

string   $cid   comment id
string   $type   type of comment ('article', 'polls', ...)
[ Top ]



CMT_saveComment [line 1278]

int CMT_saveComment( string $title, string $comment, string $sid, int $pid, string $type, string $postmode)

Save a comment



Tags:

return:  -1 == queued, 0 == comment saved, > 0 indicates error
author:  Vincent Furia, vinny01 AT users DOT sourceforge DOT net


Parameters

string   $title   Title of comment
string   $comment   Text of comment
string   $sid   ID of object receiving comment
int   $pid   ID of parent comment
string   $type   Type of comment this is (article, polls, etc)
string   $postmode   Indicates if text is HTML or plain text
[ Top ]



CMT_sendNotification [line 1508]

boolean CMT_sendNotification( $title $title, $comment $comment, $uid $uid, $username $username, $ipaddress $ipaddress, $type $type, $cid $cid)

Send an email notification for a new comment submission.



Tags:

return:  true if successfully sent, otherwise false


Parameters

$title   $title   string comment title
$comment   $comment   string text of the comment
$uid   $uid   int user id
$username   $username   string optional name of anonymous user
$ipaddress   $ipaddress   string poster's IP address
$type   $type   string type of comment ('article', 'polls', ...)
$cid   $cid   int comment id (or 0 when in submission queue)
[ Top ]



CMT_sendReplyNotification [line 2101]

void CMT_sendReplyNotification( array $A, [boolean $send_self = false])

Sends a notification of new comment reply



Tags:

author:  Jared Wenerd, wenerd87 AT gmail DOT com
copyright:  Jared Wenerd 2008


Parameters

array   $A   contains cid, uid, and deletekey
boolean   $send_self   send notification when replying to self?
[ Top ]



CMT_sendReport [line 1707]

string CMT_sendReport( string $cid, string $type)

Send report about abusive comment



Tags:

return:  Meta refresh or HTML for error message


Parameters

string   $cid   comment id
string   $type   type of comment ('article', 'polls', ...)
[ Top ]



CMT_updateCommentcodes [line 1965]

void CMT_updateCommentcodes( )

Disables comments for all stories where current time is past comment expire time and enables comments for certain number of most recent stories.



Tags:

author:  Jared Wenerd, wenerd87 AT gmail DOT com
copyright:  Jared Wenerd 2008


[ Top ]



CMT_userComments [line 649]

string CMT_userComments( string $sid, string $title, [string $type = 'article'], [string $order = ''], [string $mode = ''], [int $pid = 0], [int $page = 1], [boolean $cid = false], [boolean $delete_option = false], [int $ccode = 0])

This function displays the comments in a high level format.

Begins displaying user comments for an item




Tags:

return:  HTML Formated Comments
see:  CMT_commentBar()


Parameters

string   $sid   ID for item to show comments for
string   $title   Title of item
string   $type   Type of item (article, polls, etc.)
string   $order   How to order the comments 'ASC' or 'DESC'
string   $mode   comment mode (nested, flat, etc.)
int   $pid   id of parent comment
int   $page   page number of comments to display
boolean   $cid   true if $pid should be interpreted as a cid instead
boolean   $delete_option   if current user can delete comments
int   $ccode   Comment code: -1=no comments, 0=allowed, 1=closed
[ Top ]



plugin_feedupdatecheck_comment [line 2849]

boolean plugin_feedupdatecheck_comment( int $feed, string $topic, string $update_data, string $limit, [string $updated_type = ''], [string $updated_topic = ''], [string $updated_id = ''])

Checking if comment feeds are up to date



Tags:

return:  true: feed data is up to date; false: isn't


Parameters

int   $feed   id of feed to be checked
string   $topic   topic
string   $update_data   data describing current feed contents
string   $limit   number of entries or number of hours
string   $updated_type   (optional) type of feed to be updated
string   $updated_topic   (optional) feed's "topic" to be updated
string   $updated_id   (optional) id of entry that has changed
[ Top ]



plugin_getfeedcontent_comment [line 2754]

array plugin_getfeedcontent_comment( int $feed, &$link, &$update, ref $link, ref $update)

Provide feed data



Tags:

return:  feed entries


Parameters

int   $feed   feed ID
ref   $link  
ref   $update  
   &$link  
   &$update  
[ Top ]



plugin_getfeednames_comment [line 2724]

array plugin_getfeednames_comment( )

Do we support comment feeds? (use plugin api)



Tags:

return:  id/name pairs of all supported feeds


[ Top ]



Documentation generated on Sun, 02 Oct 2016 07:51:13 +0000 by phpDocumentor 1.4.3