Dotclear 2.24
Loading...
Searching...
No Matches
rsExtComment Class Reference

Dotclear comment record helpers. More...

Static Public Member Functions

static getDate (dcRecord $rs, ?string $format, string $type='')
 
static getTime (dcRecord $rs, ?string $format, string $type='')
 
static getTS (dcRecord $rs, string $type='')
 
static getISO8601Date (dcRecord $rs, string $type='')
 
static getRFC822Date (dcRecord $rs, string $type='')
 
static getContent (dcRecord $rs, bool $absolute_urls=false)
 
static getAuthorURL (dcRecord $rs)
 
static getPostURL (dcRecord $rs)
 
static getAuthorLink (dcRecord $rs)
 
static getEmail (dcRecord $rs, bool $encoded=true)
 
static getTrackbackTitle (dcRecord $rs)
 
static getTrackbackContent (dcRecord $rs)
 
static getFeedID (dcRecord $rs)
 
static isMe (dcRecord $rs)
 

Detailed Description

Dotclear comment record helpers.

This class adds new methods to database comment results. You can call them on every record comming from dcBlog::getComments and similar methods.

Warning
You should not give the first argument (usualy $rs) of every described function.

Member Function Documentation

◆ getDate()

static getDate ( dcRecord  $rs,
?string  $format,
string  $type = '' 
)
static

Returns comment date with $format as formatting pattern. If format is empty, uses date_format blog setting.

Parameters
dcRecord$rsInvisible parameter
string$formatThe date format pattern
string$typeThe type, (dt|upddt) defaults to comment_dt
Returns
string The date.

References dcCore\app(), and dt\dt2str().

◆ getTime()

static getTime ( dcRecord  $rs,
?string  $format,
string  $type = '' 
)
static

Returns comment time with $format as formatting pattern. If format is empty, uses time_format blog setting.

Parameters
dcRecord$rsInvisible parameter
string$formatThe date format pattern
string$typeThe type, (dt|upddt) defaults to comment_dt
Returns
string The time.

References dcCore\app(), and dt\dt2str().

◆ getTS()

static getTS ( dcRecord  $rs,
string  $type = '' 
)
static

Returns comment timestamp.

Parameters
dcRecord$rsInvisible parameter
string$typeThe type, (dt|upddt) defaults to comment_dt
Returns
integer The timestamp.

◆ getISO8601Date()

static getISO8601Date ( dcRecord  $rs,
string  $type = '' 
)
static

Returns comment date formating according to the ISO 8601 standard.

Parameters
dcRecord$rsInvisible parameter
string$typeThe type, (dt|upddt) defaults to comment_dt
Returns
string The iso 8601 date.

References dt\getTimeOffset(), and dt\iso8601().

◆ getRFC822Date()

static getRFC822Date ( dcRecord  $rs,
string  $type = '' 
)
static

Returns comment date formating according to RFC 822.

Parameters
dcRecord$rsInvisible parameter
string$typeThe type, (dt|upddt) defaults to comment_dt
Returns
string The rfc 822 date.

References dt\getTimeOffset(), and dt\rfc822().

◆ getContent()

static getContent ( dcRecord  $rs,
bool  $absolute_urls = false 
)
static

Returns comment content. If $absolute_urls is true, appends full blog URL to each relative post URLs.

Parameters
dcRecord$rsInvisible parameter
bool$absolute_urlsWith absolute URLs
Returns
string The content.

References html\absoluteURLs(), dcCore\app(), and if.

◆ getAuthorURL()

static getAuthorURL ( dcRecord  $rs)
static

Returns comment author link to his website if he specified one.

Parameters
dcRecord$rsInvisible parameter
Returns
mixed The author url.

◆ getPostURL()

static getPostURL ( dcRecord  $rs)
static

Returns comment post full URL.

Parameters
dcRecord$rsInvisible parameter
Returns
string The comment post url.

References dcCore\app(), and html\sanitizeURL().

◆ getAuthorLink()

static getAuthorLink ( dcRecord  $rs)
static

Returns comment author name in a link to his website if he specified one.

Parameters
dcRecord$rsInvisible parameter
Returns
string The author link.

References dcCore\app(), and html\escapeHTML().

◆ getEmail()

static getEmail ( dcRecord  $rs,
bool  $encoded = true 
)
static

Returns comment author e-mail address. If $encoded is true, "@" sign is replaced by "%40" and "." by "%2e".

Parameters
dcRecord$rsInvisible parameter
bool$encodedEncode address
Returns
string The email.

◆ getTrackbackTitle()

static getTrackbackTitle ( dcRecord  $rs)
static

Returns trackback site title if comment is a trackback.

Parameters
dcRecord$rsInvisible parameter
Returns
string The trackback title.

References html\decodeEntities().

◆ getTrackbackContent()

static getTrackbackContent ( dcRecord  $rs)
static

Returns trackback content if comment is a trackback.

Parameters
dcRecord$rsInvisible parameter
Returns
string The trackback content.

◆ getFeedID()

static getFeedID ( dcRecord  $rs)
static

Returns comment feed unique ID.

Parameters
dcRecord$rsInvisible parameter
Returns
string The feed id.

References dcCore\app().

◆ isMe()

static isMe ( dcRecord  $rs)
static

Determines whether the specified comment is from the post author.

Parameters
dcRecord$rsInvisible parameter
Returns
bool True if the specified comment is from the post author, False otherwise.

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