Description Usage Arguments Author(s) Examples
This function allows a comment to be posted to a Drupal node.
1 | drupalr.postComment(d_url, d_path, body, params, c)
|
d_url |
The base URL of teh Drupal site. |
d_path |
The path to the node you are commenting on. |
body |
The comment body. |
params |
Additional CURL parameter for optional fields. |
c |
A CURL handler for the authenticated user. |
Ed Baker
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function(d_url, d_path, body, params, curl) {
comment_params = list(
op="Save",
'comment_body[und][0][value]' = body,
'comment_body[und][0][format]' = 'comment_filtered_html'
);
params <- c(params, comment_params);
drupalr.postForm(d_url, d_path, "comment_form", params, curl);
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.