diff options
author | Kevin Chabowski <kevin@kch42.de> | 2012-02-18 14:47:04 +0100 |
---|---|---|
committer | Kevin Chabowski <kevin@kch42.de> | 2012-02-18 14:47:04 +0100 |
commit | fffbcc480c8afa679e3a9ffee8c145dc3d4f5a28 (patch) | |
tree | b246be90a632e5ae1e370dbe142f7e7ab26bd52f /ratatoeskr | |
parent | eb5f8764eebd5149ff4472d5a646943b9524f6b9 (diff) | |
download | ratatoeskr-cms-fffbcc480c8afa679e3a9ffee8c145dc3d4f5a28.tar.gz ratatoeskr-cms-fffbcc480c8afa679e3a9ffee8c145dc3d4f5a28.tar.bz2 ratatoeskr-cms-fffbcc480c8afa679e3a9ffee8c145dc3d4f5a28.zip |
Added embedding code generator for STE code.
Also fixed a bug that the pagetitle of the embedding code generator page
was not displayed.
Diffstat (limited to 'ratatoeskr')
-rw-r--r-- | ratatoeskr/backend.php | 6 | ||||
-rw-r--r-- | 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"] = "<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> |