Permalink
Browse files

Additional trivial counter-spam measure, a hidden box!

  • Loading branch information...
jbarrett committed Nov 13, 2013
1 parent 640cdd0 commit 7d8b205c7ef0acb245e95957d4b31739175299f0
Showing with 15 additions and 2 deletions.
  1. +1 −2 lib/Wjournal.pm
  2. +5 −0 public/css/wjournal.css
  3. +9 −0 views/commentform.tt
View
@@ -100,7 +100,6 @@ get '/search/:terms/:page?' => sub {
"/search/" . param('terms') . '/' . (param('page') - 1) :
undef);
-
render_posts(
posts => $posts || undef,
older => $old_link,
@@ -244,7 +243,7 @@ post '/post/:post_id/:post_key?' => sub {
$schema->resultset('Comment')->create({
post_id => $post_id,
name => "" . param('name'),
- approved => (param('level1')) ? 0 : 1,
+ approved => (param('level1') || param('mysterybox')) ? 0 : 1,
date => time,
email => "" . param('email'),
website => "" . param('website'),
View
@@ -50,6 +50,11 @@ img.gravatar {
margin-bottom: 10px;
}
+
+div.mysterybox {
+ display:none;
+}
+
a.title_link {
text-decoration: none;
}
View
@@ -36,6 +36,15 @@
</div>
</div>
+ <div class="row remove-bottom mysterybox">
+ <div class="three columns alpha">
+ Mystery box, leave it alone!
+ </div>
+ <div class="seven columns omega">
+ <input type="text" name="mysterybox" class="fullwidth" />
+ </div>
+ </div>
+
<div class="row remove-bottom">
<textarea name="two_cents" rows="8" class="fullwidth">[% two_cents %]</textarea>
</div>

0 comments on commit 7d8b205

Please sign in to comment.