Skip to content

Commit

Permalink
Added automatic return to Jekyll site
Browse files Browse the repository at this point in the history
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
IQAndreas committed May 20, 2012
1 parent 6c9de08 commit a10051e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
22 changes: 15 additions & 7 deletions comment_received.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
1 change: 1 addition & 0 deletions comment_template.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ <h1>Post a comment</h1>
</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>
Expand Down

0 comments on commit a10051e

Please sign in to comment.