Copyright © 2010-2011 Marc Worrell Date: 2010-01-15
Behaviours: zotonic_model.
Authors: Marc Worrell (marc@worrell.nl).
delete/2 | Delete a comment. |
get/2 | Fetch a specific comment from the database. |
gravatar_code/1 | Return the gravatar code of an email address. |
insert/6 | Insert a new comment. |
is_deletable/2 | Check if a comment can be deleted. |
list_rsc/2 | List all comments of the resource. |
m_get/3 | Fetch the value for the key from a model source. |
merge/3 | Move all comments from one resource to another. |
search/3 | Return the search as used by z_search and the search model. |
toggle/2 | Toggle the visibility of a comment, return the new visibility. |
delete(CommentId, Context) -> any()
Delete a comment. Only possible if the user has edit permission on the page.
get(CommentId::int(), Context) -> PropList
Fetch a specific comment from the database.
gravatar_code(Email) -> list()
Return the gravatar code of an email address. See also http://gravatar.com/
insert(RscId::m_rsc:resource(), Name::string(), Email::string(), Message::string(), Is_visible::boolean(), Context::z:context()) -> {ok, pos_integer()} | {error, any()}
Insert a new comment. Fetches the submitter information from the Context.
is_deletable(CommentId, Context) -> any()
Check if a comment can be deleted
list_rsc(RscId::m_rsc:resource(), Context::z:context()) -> list()
List all comments of the resource.
m_get(Rest::list(), Msg::zotonic_model:opt_msg(), Context::z:context()) -> zotonic_model:return()
Fetch the value for the key from a model source
merge(WinnerId::m_rsc:resource(), LoserId::m_rsc:resource(), Context::z:context()) -> ok
Move all comments from one resource to another
search(X1, OfffsetLimit, Context) -> any()
Return the search as used by z_search and the search model.
toggle(CommentId, Context) -> any()
Toggle the visibility of a comment, return the new visibility
Generated by EDoc