From 71e6e63f2712d2075eca7fff5a45c73f1cfa383f Mon Sep 17 00:00:00 2001 From: Kevin Chabowski Date: Mon, 21 May 2012 23:11:02 +0200 Subject: ste:comment_form can now generate a previewbtn by default. --- ratatoeskr/frontend.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'ratatoeskr/frontend.php') diff --git a/ratatoeskr/frontend.php b/ratatoeskr/frontend.php index 0bc083b..038485a 100644 --- a/ratatoeskr/frontend.php +++ b/ratatoeskr/frontend.php @@ -392,8 +392,9 @@ $ste->register_tag("article_comments", function($ste, $params, $sub) * Generates a HTML form tag that allows the visitor to write a comment. * * Parameters: - * article - (mandatory) The name of the variable, where the article is stored at. - * default - (optional) If not empty, a default formular with the mandatory fields will be generated. + * article - (mandatory) The name of the variable, where the article is stored at. + * default - (optional) If not empty, a default formular with the mandatory fields will be generated. + * previewbtn - (optional) If not empty and default form is choosen, a preview button will also be generated. * * Tag Content: * The tag's content will be written into the HTML form tag. @@ -446,11 +447,13 @@ $ste->register_tag("comment_form", function($ste, $params, $sub) $form_header = "
"; + $previewbtn = $ste->evalbool(@$params["previewbtn"]) ? " " : ""; + if($ste->evalbool(@$params["default"])) $form_body = "

{$translation["comment_form_name"]}:

{$translation["comment_form_mail"]}:

{$translation["comment_form_text"]}:

-

"; +

$previewbtn

"; else { $ste->vars["current"]["oldcomment"] = array( -- cgit v1.2.3-70-g09d2