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

Static Public Member Functions

static isEditable (dcRecord $rs)
 
static isDeletable (dcRecord $rs)
 
static firstPostOfDay (dcRecord $rs)
 
static lastPostOfDay (dcRecord $rs)
 
static commentsActive (dcRecord $rs)
 
static trackbacksActive (dcRecord $rs)
 
static hasComments (dcRecord $rs)
 
static hasTrackbacks (dcRecord $rs)
 
static isRepublished (dcRecord $rs)
 
static getURL (dcRecord $rs)
 
static getCategoryURL (dcRecord $rs)
 
static isExtended (dcRecord $rs)
 
static getTS (dcRecord $rs, string $type='')
 
static getISO8601Date (dcRecord $rs, string $type='')
 
static getRFC822Date (dcRecord $rs, string $type='')
 
static getDate (dcRecord $rs, ?string $format, string $type='')
 
static getTime (dcRecord $rs, ?string $format, string $type='')
 
static getAuthorCN (dcRecord $rs)
 
static getAuthorLink (dcRecord $rs)
 
static getAuthorEmail (dcRecord $rs, bool $encoded=true)
 
static getFeedID (dcRecord $rs)
 
static getTrackbackData (dcRecord $rs, string $format='html')
 
static getTrackbackLink (dcRecord $rs)
 
static getContent (dcRecord $rs, bool $absolute_urls=false)
 
static getExcerpt (dcRecord $rs, bool $absolute_urls=false)
 
static countMedia (dcRecord $rs, ?string $link_type=null)
 
static underCat (dcRecord $rs, string $cat_url)
 

Member Function Documentation

◆ isEditable()

static isEditable ( dcRecord  $rs)
static

Determines whether the specified post is editable.

Parameters
dcRecord$rsInvisible parameter
Returns
bool True if the specified rs is editable, False otherwise.

References dcCore\app(), dcRecord\exists(), dcAuth\PERMISSION_CONTENT_ADMIN, and dcAuth\PERMISSION_USAGE.

◆ isDeletable()

static isDeletable ( dcRecord  $rs)
static

Determines whether the specified post is deletable.

Parameters
dcRecord$rsInvisible parameter
Returns
bool True if the specified rs is deletable, False otherwise.

References dcCore\app(), dcRecord\exists(), dcAuth\PERMISSION_CONTENT_ADMIN, and dcAuth\PERMISSION_DELETE.

◆ firstPostOfDay()

static firstPostOfDay ( dcRecord  $rs)
static

Returns whether post is the first one of its day.

Parameters
dcRecord$rsInvisible parameter
Returns
bool

References dcRecord\isStart(), dcRecord\moveNext(), and dcRecord\movePrev().

◆ lastPostOfDay()

static lastPostOfDay ( dcRecord  $rs)
static

Returns whether post is the last one of its day.

Parameters
dcRecord$rsInvisible parameter
Returns
bool

References dcRecord\isEnd(), dcRecord\moveNext(), and dcRecord\movePrev().

◆ commentsActive()

static commentsActive ( dcRecord  $rs)
static

Returns whether comments are enabled on post.

Parameters
dcRecord$rsInvisible parameter
Returns
bool

References dcCore\app().

◆ trackbacksActive()

static trackbacksActive ( dcRecord  $rs)
static

Returns whether trackbacks are enabled on post.

Parameters
dcRecord$rsInvisible parameter
Returns
bool

References dcCore\app().

◆ hasComments()

static hasComments ( dcRecord  $rs)
static

Returns whether post has at least one comment.

Parameters
dcRecord$rsInvisible parameter
Returns
bool

◆ hasTrackbacks()

static hasTrackbacks ( dcRecord  $rs)
static

Returns whether post has at least one trackbacks.

Parameters
dcRecord$rsInvisible parameter
Returns
bool

◆ isRepublished()

static isRepublished ( dcRecord  $rs)
static

Returns whether post has been updated since publication.

Parameters
dcRecord$rsInvisible parameter
Returns
bool

References dt\getTimeOffset().

◆ getURL()

static getURL ( dcRecord  $rs)
static

Gets the full post url.

Parameters
dcRecord$rsInvisible parameter
Returns
string The url.

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

◆ getCategoryURL()

static getCategoryURL ( dcRecord  $rs)
static

Returns full post category URL.

Parameters
dcRecord$rsInvisible parameter
Returns
string The category url.

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

◆ isExtended()

static isExtended ( dcRecord  $rs)
static

Returns whether post has an excerpt.

Parameters
dcRecord$rsInvisible parameter
Returns
bool

◆ getTS()

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

Gets the post timestamp.

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

◆ getISO8601Date()

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

Returns post date formating according to the ISO 8601 standard.

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

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

◆ getRFC822Date()

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

Returns post date formating according to RFC 822.

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

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

◆ getDate()

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

Returns post 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|creadt) defaults to post_dt
Returns
string The date.

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

◆ getTime()

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

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

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

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

◆ getAuthorCN()

static getAuthorCN ( dcRecord  $rs)
static

Returns author common name using user_id, user_name, user_firstname and user_displayname fields.

Parameters
dcRecord$rsInvisible parameter
Returns
string The author common name.

References dcUtils\getUserCN().

◆ getAuthorLink()

static getAuthorLink ( dcRecord  $rs)
static

Returns author common name with a link if he specified one in its preferences.

Parameters
dcRecord$rsInvisible parameter
Returns
string

References html\escapeHTML().

◆ getAuthorEmail()

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

Returns 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 author email.

◆ getFeedID()

static getFeedID ( dcRecord  $rs)
static

Gets the post feed unique id.

Parameters
dcRecord$rsInvisible parameter
Returns
string The feed id.

References dcCore\app().

◆ getTrackbackData()

static getTrackbackData ( dcRecord  $rs,
string  $format = 'html' 
)
static

Returns trackback RDF information block in HTML comment.

Parameters
dcRecord$rsInvisible parameter
string$formatThe format (html|xml)
Returns
string

◆ getTrackbackLink()

static getTrackbackLink ( dcRecord  $rs)
static

Gets the post trackback full URL.

Parameters
dcRecord$rsInvisible parameter
Returns
string The trackback link.

References dcCore\app().

◆ getContent()

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

Returns post 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().

◆ getExcerpt()

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

Returns post excerpt. 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 excerpt.

References html\absoluteURLs().

◆ countMedia()

static countMedia ( dcRecord  $rs,
?string  $link_type = null 
)
static

Returns post media count using a subquery.

Parameters
dcRecord$rsInvisible parameter
string$link_typeThe link type
Returns
integer Number of media.

References dcCore\app(), if, dcRecord\index(), and dcPostMedia\POST_MEDIA_TABLE_NAME.

◆ underCat()

static underCat ( dcRecord  $rs,
string  $cat_url 
)
static

Returns true if current category if in given cat_url subtree

Parameters
dcRecord$rsInvisible parameter
string$cat_urlThe cat url
Returns
bool true if current cat is in given cat subtree

References dcCore\app().


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