From fffbcc480c8afa679e3a9ffee8c145dc3d4f5a28 Mon Sep 17 00:00:00 2001 From: Kevin Chabowski Date: Sat, 18 Feb 2012 14:47:04 +0100 Subject: Added embedding code generator for STE code. Also fixed a bug that the pagetitle of the embedding code generator page was not displayed. --- ratatoeskr/backend.php | 6 ++++-- ratatoeskr/templates/src/systemtemplates/image_list.html | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ratatoeskr/backend.php b/ratatoeskr/backend.php index c24497e..bf7bb44 100644 --- a/ratatoeskr/backend.php +++ b/ratatoeskr/backend.php @@ -678,9 +678,9 @@ $backend_subactions = url_action_subactions(array( throw new NotFoundError(); else { - if(($imageaction == "markdown") or ($imageaction == "html")) + if(($imageaction == "markdown") or ($imageaction == "html") or ($imageaction == "ste")) { - $ste->vars["pagetitle"] = $translations["generate_embed_code"]; + $ste->vars["pagetitle"] = $translation["generate_embed_code"]; $ste->vars["image_id"] = $image->get_id(); $ste->vars["markup_variant"] = $imageaction; if(isset($_POST["img_alt"])) @@ -689,6 +689,8 @@ $backend_subactions = url_action_subactions(array( $ste->vars["embed_code"] = "![" . str_replace("]", "\\]", $_POST["img_alt"]) . "](%root%/images/" . str_replace(")", "\\)", urlencode($image->get_filename())) . ")"; elseif($imageaction == "html") $ste->vars["embed_code"] = "get_filename())) . "\" alt=\"" . htmlesc($_POST["img_alt"]) . "\" />"; + elseif($imageaction == "ste") + $ste->vars["embed_code"] = "get_filename())) . "\" alt=\"" . htmlesc($_POST["img_alt"]) . "\" />"; } echo $ste->exectemplate("/systemtemplates/image_embed.html"); diff --git a/ratatoeskr/templates/src/systemtemplates/image_list.html b/ratatoeskr/templates/src/systemtemplates/image_list.html index 189c214..7b40ddc 100644 --- a/ratatoeskr/templates/src/systemtemplates/image_list.html +++ b/ratatoeskr/templates/src/systemtemplates/image_list.html @@ -35,7 +35,7 @@ $image[name] - Markdown - HTML + Markdown - HTML - STE -- cgit v1.2.3-70-g09d2