Permalink
Browse files

Added automatic return to Jekyll site

NOTE: Uses the `comment_received.html` page and requires PHP, so it is not possible to place this page on the static Jekyll site.
  • Loading branch information...
1 parent 6c9de08 commit a10051e6cdfcfeff8b4039ce27d02dafb12473ab @IQAndreas IQAndreas committed May 20, 2012
Showing with 16 additions and 7 deletions.
  1. +15 −7 comment_received.html
  2. +1 −0 comment_template.html
View
@@ -2,14 +2,22 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
- <title>
- Comment Received
- </title>
- </head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+ <?php if (isset($_POST['return_url']))
+ {
+ $return_url = $_POST['return_url'];
+ $return_delay = 5; //Number of seconds to linger on this page before redirecting back to the static site
+ echo '<meta http-equiv="refresh" content="'.$return_delay.';url="'.$return_url.'" />';
+ } ?>
+ <title>Comment Received</title>
+ </head>
<body>
<h1>Comment Received</h1>
-<p>
-Thankyou for your comment. It will be reviewed and published shortly.
-</p>
+ <p>Thank you for your comment. It will be reviewed and published shortly.</p>
+ <?php if (isset($return_url))
+ {
+ echo '<p>You are now returning to the page you were on. Click the link if you are not redirected automatically.</p>';
+ echo '<p><a href="'.$return_url.'">'.$return_url.'</a></p>';
+ } ?>
</body>
</html>
View
@@ -28,6 +28,7 @@
</p>
<form id="commentform" method="POST" action="{{site.url}}/commentsubmit.php">
<input type="hidden" name="post_id" value="{{page.id}}" />
+ <input type="hidden" name="return_url" value="{{site.url}}{{page.url}}" />
<table>
<tr>
<th>Name:</th>

0 comments on commit a10051e

Please sign in to comment.