Comment Comment(
[
$db_row = NULL]
)
|
|
Constructor
Parameters:
Template function: display anchor for permalinks to refer to
void author(
[string
$before = ''], [string
$after = '#'], [string
$before_user = ''], [string
$after_user = '#'], [string
$format = 'htmlbody'], [boolean
$makelink = false]
)
|
|
Template function: display author of comment
Parameters:
|
string |
$before: |
String to display before author name if not a user |
|
string |
$after: |
String to display after author name if not a user |
|
string |
$before_user: |
String to display before author name if he's a user |
|
string |
$after_user: |
String to display after author name if he's a user |
|
string |
$format: |
Output format, see format_to_output() |
|
boolean |
$makelink: |
true for link, false if you want NO html link |
void author_email(
[string
$linktext = ''], [string
$before = ''], [string
$after = ''], [boolean
$makelink = true]
)
|
|
Template function: display link to comment author's provided email
Parameters:
|
string |
$linktext: |
String to display for link: leave empty to display email |
|
string |
$before: |
String to display before email, if email exists |
|
string |
$after: |
String to display after email, if email exists |
|
boolean |
$makelink: |
false if you want NO html link |
void author_ip(
[string
$before = ''], [string
$after = '']
)
|
|
Template function: display comment's author's IP
Parameters:
|
string |
$before: |
String to display before IP, if IP exists |
|
string |
$after: |
String to display after IP, if IP exists |
boolean author_url(
[string
$linktext = ''], [string
$before = ''], [string
$after = ''], [boolean
$makelink = true]
)
|
|
Template function: display link to comment author's provided URL
Parameters:
|
string |
$linktext: |
String to display for link: leave empty to display URL |
|
string |
$before: |
String to display before link, if link exists |
|
string |
$after: |
String to display after link, if link exists |
|
boolean |
$makelink: |
false if you want NO html link |
API Tags:
| Return: | true if URL has been displayed |
void content(
[string
$format = 'htmlbody']
)
|
|
Template function: display content of comment
Parameters:
void date(
[string
$format = ''], [boolean
$useGM = false]
)
|
|
Template function: display date (datetime) of comment
Parameters:
|
string |
$format: |
date/time format: leave empty to use locale default date format |
|
boolean |
$useGM: |
true if you want GMT |
Trigger event AfterCommentDelete after calling parent method.
API Tags:
Redefinition of:
- DataObject::dbdelete()
- Delete object from DB.
Get karma and set it before adding the Comment to DB.
API Tags:
| Return: | true on success, false if it did not get inserted |
Redefinition of:
- DataObject::dbinsert()
- Insert object into DB based on previously recorded changes.
Trigger event AfterCommentUpdate after calling parent method.
API Tags:
Redefinition of:
- DataObject::dbupdate()
- Update the DB based on previously recorded changes
void delete_link(
[string
$before = ' '], [string
$after = ' '], [string
$text = '#'], [string
$title = '#'], [string
$class = ''], [boolean
$button = false]
)
|
|
Displays button for deleeing the Comment if user has proper rights
Parameters:
|
string |
$before: |
to display before link |
|
string |
$after: |
to display after link |
|
string |
$text: |
link text |
|
string |
$title: |
link title |
|
string |
$class: |
class name |
|
boolean |
$button: |
true to make this a button instead of a link |
void deprecate_link(
[string
$before = ' '], [string
$after = ' '], [string
$text = '#'], [string
$title = '#'], [string
$class = ''], [string
$glue = '&'], [boolean
$save_context = false]
)
|
|
Display link to deprecate a comment if user has edit rights
Parameters:
|
string |
$before: |
to display before link |
|
string |
$after: |
to display after link |
|
string |
$text: |
link text |
|
string |
$title: |
link title |
|
string |
$class: |
class name |
|
string |
$glue: |
glue between url params |
|
boolean |
$save_context: |
save context? |
boolean edit_link(
[string
$before = ' '], [string
$after = ' '], [string
$text = '#'], [string
$title = '#'], [string
$class = '']
)
|
|
Provide link to edit a comment if user has edit rights
Parameters:
|
string |
$before: |
to display before link |
|
string |
$after: |
to display after link |
|
string |
$text: |
link text |
|
string |
$title: |
link title |
|
string |
$class: |
class name |
mixed get(
mixed
$parname
)
|
|
Get a member param by its name
Parameters:
|
mixed |
$parname: |
Name of parameter |
API Tags:
| Return: | Value of parameter |
Redefinition of:
- DataObject::get()
- Get a member param by its name
Get the anchor-ID of the comment
string get_author_email(
)
|
|
Get the EMail of the comment's author.
string get_author_name(
)
|
|
Get the comment author's name.
Get the URL of the comment's author.
Get the author User of the comment. This is NULL for anonymous visitors.
string get_content(
[string
$format = 'htmlbody']
)
|
|
Template function: get content of comment
Parameters:
void get_deprecate_link(
[string
$before = ' '], [string
$after = ' '], [string
$text = '#'], [string
$title = '#'], [string
$class = ''], [string
$glue = '&'], [boolean
$save_context = false]
)
|
|
Provide link to deprecate a comment if user has edit rights
Parameters:
|
string |
$before: |
to display before link |
|
string |
$after: |
to display after link |
|
string |
$text: |
link text |
|
string |
$title: |
link title |
|
string |
$class: |
class name |
|
string |
$glue: |
glue between url params |
|
boolean |
$save_context: |
save context? |
Get the Item this comment relates to
void get_permanent_link(
[string
$text = '#'], [string
$title = '#'], [string
$class = '']
)
|
|
Returns a permalink link to the Comment
Note: If you only want the permalink URL, use Comment::get_permanent_url()
Parameters:
|
string |
$text: |
link text or special value: '#', '#icon#', '#text#' |
|
string |
$title: |
link title |
|
string |
$class: |
class name |
void get_permanent_url(
[string
$mode = ''], [string
$blogurl = '']
)
|
|
Generate permalink to this comment.
Note: This actually only returns the URL, to get a real link, use Comment::get_permanent_link()
Parameters:
|
string |
$mode: |
'urltitle', 'pid', 'archive#id' or 'archive#title' |
|
string |
$blogurl: |
url to use |
void get_publish_link(
[string
$before = ' '], [string
$after = ' '], [string
$text = '#'], [string
$title = '#'], [string
$class = ''], [string
$glue = '&'], [boolean
$save_context = false]
)
|
|
Provide link to publish a comment if user has edit rights
Parameters:
|
string |
$before: |
to display before link |
|
string |
$after: |
to display after link |
|
string |
$text: |
link text |
|
string |
$title: |
link title |
|
string |
$class: |
class name |
|
string |
$glue: |
glue between url params |
|
boolean |
$save_context: |
save context? |
void msgform_link(
string
$form_url, [string
$before = ' '], [string
$after = ' '], [string
$text = '#'], [string
$title = '#'], [string
$class = '']
)
|
|
Provide link to message form for this comment's author
Parameters:
|
string |
$form_url: |
url of the message form |
|
string |
$before: |
to display before link |
|
string |
$after: |
to display after link |
|
string |
$text: |
link text |
|
string |
$title: |
link title |
|
string |
$class: |
class name |
void permanent_link(
[string
$text = '#'], [string
$title = '#'], [string
$class = '']
)
|
|
Displays a permalink link to the Comment
Note: If you only want the permalink URL, use Comment::permanent_url()
Parameters:
|
string |
$text: |
link text |
|
string |
$title: |
link title |
|
string |
$class: |
class name |
void permanent_url(
[string
$mode = ''], [string
$blogurl = '']
)
|
|
Template function: display permalink to this comment
Note: This actually only returns the URL, to get a real link, use Comment::permanent_link()
Parameters:
|
string |
$mode: |
'urltitle', 'pid', 'archive#id' or 'archive#title' |
|
string |
$blogurl: |
url to use |
void publish_link(
[string
$before = ' '], [string
$after = ' '], [string
$text = '#'], [string
$title = '#'], [string
$class = ''], [string
$glue = '&'], [boolean
$save_context = false]
)
|
|
Display link to publish a comment if user has edit rights
Parameters:
|
string |
$before: |
to display before link |
|
string |
$after: |
to display after link |
|
string |
$text: |
link text |
|
string |
$title: |
link title |
|
string |
$class: |
class name |
|
string |
$glue: |
glue between url params |
|
boolean |
$save_context: |
save context? |
void send_email_notifications(
)
|
|
Send email notifications to subscribed users:
Information Tags:
| Todo: | shall we notify suscribers of blog were this is in extra-cat? |
| Todo: | cache message by locale like Item::send_email_notifications() |
| Todo: | Indicator in url to see where the user came from (&from=subnote ["subscription notification"]) - Problem: too long urls. |
| Todo: | "Beautify" like Item::send_email_notifications() ? |
| Todo: | Should include "visibility status" in the mail to the Item's Author |
boolean set(
string
$parname, mixed
$parvalue
)
|
|
Set param value
Parameters:
|
string |
$parname: |
parameter name |
|
mixed |
$parvalue: |
parameter value |
API Tags:
| Return: | true, if a value has been set; false if it has not changed |
Redefinition of:
- DataObject::set()
- Set param value
void set_author_User(
&$author_User
)
|
|
Set author User of this comment
Parameters:
void set_Item(
Item
&$Item
)
|
|
Set Item this comment relates to
Parameters:
void set_spam_karma(
integer
$spam_karma
)
|
|
Set the spam karma, as a number.
Parameters:
|
integer |
$spam_karma: |
Spam karma (-100 - 100) |
API Tags:
void spam_karma(
[string
$template = '%s%'], [string
$template_unknown = NULL]
)
|
|
Template function: display spam karma of the comment (in percent)
"%s" gets replaced by the karma value
Parameters:
|
string |
$template: |
Template string to display, if we have a karma value |
|
string |
$template_unknown: |
Template string to display, if we have no karma value (pre-Phoenix) |
void status(
[string
$format = 'htmlbody']
)
|
|
Template function: display status of comment
Statuses:
- published
- deprecated
- protected
- private
- draft
Parameters:
void time(
[string
$format = ''], [boolean
$useGM = false]
)
|
|
Template function: display time (datetime) of comment
Parameters:
|
string |
$format: |
date/time format: leave empty to use locale default time format |
|
boolean |
$useGM: |
true if you want GMT |