aboutsummaryrefslogtreecommitdiff
path: root/ratatoeskr
diff options
context:
space:
mode:
Diffstat (limited to 'ratatoeskr')
-rw-r--r--ratatoeskr/backend.php6
-rw-r--r--ratatoeskr/templates/src/systemtemplates/image_list.html2
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"] = "<img src=\"%root%/images/" . htmlesc(urlencode($image->get_filename())) . "\" alt=\"" . htmlesc($_POST["img_alt"]) . "\" />";
+ elseif($imageaction == "ste")
+ $ste->vars["embed_code"] = "<img src=\"\$rel_path_to_root/images/" . htmlesc(urlencode($image->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 @@
<td><img src="$rel_path_to_root/images/previews/${image[id]}.png" alt="" /></td>
<td><a href="$rel_path_to_root/images/$image[file]"><ste:escape>$image[name]</ste:escape></a></td>
<td>
- <a href="$rel_path_to_root/backend/content/images/$image[id]/markdown">Markdown</a> - <a href="$rel_path_to_root/backend/content/images/$image[id]/html">HTML</a>
+ <a href="$rel_path_to_root/backend/content/images/$image[id]/markdown">Markdown</a> - <a href="$rel_path_to_root/backend/content/images/$image[id]/html">HTML</a> - <a href="$rel_path_to_root/backend/content/images/$image[id]/ste">STE</a>
</td>
</tr>
</ste:foreach>