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 ++++++--- ratatoeskr/translations/de.php | 2 ++ ratatoeskr/translations/en.php | 2 ++ 3 files changed, 10 insertions(+), 3 deletions(-) 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( diff --git a/ratatoeskr/translations/de.php b/ratatoeskr/translations/de.php index 66c68d8..ecf94b8 100644 --- a/ratatoeskr/translations/de.php +++ b/ratatoeskr/translations/de.php @@ -33,6 +33,8 @@ $translation = array( "comment_form_name" => "Dein Name", "comment_form_mail" => "Deine E-Mailadresse", "comment_form_text" => "Dein Kommentar (Markdown Format)", + "comment_form_submit" => "Kommentar senden", + "comment_form_preview" => "Vorschau", "page_prev" => "<-- vorherige Seite", "page_next" => "nächste Seite -->", "e404_details" => "Die Seite [[URL]] konte nicht gefunden werden. Das tut uns leid.", diff --git a/ratatoeskr/translations/en.php b/ratatoeskr/translations/en.php index 27374c6..b2755fc 100644 --- a/ratatoeskr/translations/en.php +++ b/ratatoeskr/translations/en.php @@ -33,6 +33,8 @@ $translation = array( "comment_form_name" => "Your name", "comment_form_mail" => "Your E-Mailaddress", "comment_form_text" => "Your comment (Markdown format)", + "comment_form_submit" => "Submit comment", + "comment_form_preview" => "Preview", "page_prev" => "<-- previous page", "page_next" => "next page -->", "e404_details" => "The page [[URL]] could not be found. Sorry.", -- cgit v1.2.3-70-g09d2