OPEN SOURCE SOCIAL NETWORK 6.6
Loading...
Searching...
No Matches
OssnComments Class Reference
Inheritance diagram for OssnComments:
OssnAnnotation OssnEntities OssnDatabase OssnBase OssnSession

Public Member Functions

 PostComment ($subject_id, $guid, $comment, $type='post')
 
 GetComment ($id)
 
 countComments ($subject_id, $type='post')
 
 GetComments ($subject, $type='post', $filter=true)
 
 commentsDeleteAll ($subject, $type='post')
 
 deleteComment ($comment)
 
 getParticipant ($subject_id, $type='post')
 
 getCommentId ()
 
 photoURL ()
 
 getPhotoFile ()
 
- Public Member Functions inherited from OssnAnnotation
 initAttributes ()
 
 addAnnotation ()
 
 getAnnotationById ()
 
 getAnnotationsByType ()
 
 getAnnotationsByOwner ()
 
 annon_delete_by_subject ($subject, $type)
 
 getAnnotationBySubject ()
 
 deleteAnnotation ($annotation=0)
 
 deleteAnnotationByOwner ($ownerguid)
 
 getAnnotationId ()
 
 searchAnnotation (array $params=array())
 
 canChange ($user='')
 
 save ()
 
- Public Member Functions inherited from OssnEntities
 add ()
 
 get_entity ()
 
 save ()
 
 get_entities ()
 
 AddedEntityGuid ()
 
 updateEntity ()
 
 deleteByOwnerGuid ($guid, $type)
 
 deleteEntity ($guid='')
 
 searchEntities (array $params=array())
 
 canChange ($user='')
 
 destruct ()
 
- Public Member Functions inherited from OssnDatabase
 __construct ()
 
 Connect ()
 
 insert ($params)
 
 statement ($query)
 
 execute ($values=array())
 
 update ($params=array())
 
 select ($params, $multi='')
 
 fetch ($data=false)
 
 delete ($params)
 
 getLastEntry ()
 
 constructWheres (array $array, $operator="AND")
 
 generateLimit ($data_limit=false, $page_limit=false, $offset=false)
 
 clearVars ()
 
 __destruct ()
 
- Public Member Functions inherited from OssnBase
 getGUID ()
 
 getID ()
 
 getParam ($param)
 
 isParam ($param)
 
 __call ($method, $args)
 

Static Public Member Functions

static getType ($object)
 
- Static Public Member Functions inherited from OssnSession
static start ()
 
static assign ($name='', $value='')
 
static unassign ($name='')
 
static isSession ($name='')
 
static getSession ($name='')
 

Member Function Documentation

◆ commentsDeleteAll()

commentsDeleteAll (   $subject,
  $type = 'post' 
)

Delete All Comments by Subject id

@params $subject: Subject id

Note
[B]getting orphan like records from comments when deleting a post #1687
fixed $type as getComments appends comment: itself
Returns
bool

◆ countComments()

countComments (   $subject_id,
  $type = 'post' 
)

Count Total Comments on Subject

Parameters
integer$subject_idSubject id
string$typeComments type
Returns
integer

◆ deleteComment()

deleteComment (   $comment)

Delete Comment

@params $comment: Comment id

Returns
bool

◆ GetComment()

GetComment (   $id)

Get Comment

Parameters
integer$idComment Id
Returns
boolean|object

◆ getCommentId()

getCommentId ( )

Get newly created comment id

Returns
int

◆ GetComments()

GetComments (   $subject,
  $type = 'post',
  $filter = true 
)

Get Comments

Parameters
integer$subject_idId of item on which users comment
integer$typePost or Entity
integer$filterShow filterd comments (blocked users don't see each other)
Returns
boolean|array

◆ getParticipant()

getParticipant (   $subject_id,
  $type = 'post' 
)

Get participants for subject

Parameters
integer$subject_idSubject GUID
string$typepost/object/entity
Returns
boolean|array

◆ getPhotoFile()

getPhotoFile ( )

Get comment photo file

Returns
boolean|object

◆ getType()

static getType (   $object)
static

Get a comment type from object

Returns
string

◆ photoURL()

photoURL ( )

Get comment photo

Returns
string|boolean

◆ PostComment()

PostComment (   $subject_id,
  $guid,
  $comment,
  $type = 'post' 
)

Post Comment

Parameters
integer$subject_idId of item on which user comment
integer$guidUser id
string$commentComment
string$typePost or Entity
Returns
boolean|integer

The documentation for this class was generated from the following file: