shithub: werc

Download patch

ref: 0761bf698ce2a3f300633532b2999d48f5a220c8
parent: b3ffcf4a85cade4a89981cb731d59b82286d9df2
author: uriel <[email protected]>
date: Mon Oct 19 22:28:10 EDT 2009

Fix anon posting, make 'pseudo-captcha' more fun and slightly harder.

--- a/apps/bridge/app.rc
+++ b/apps/bridge/app.rc
@@ -20,7 +20,7 @@
         if(~ $REQUEST_METHOD GET && test -d $comments_dir)
             ll_add handlers_body_foot template apps/bridge/comments_list.tpl
 
-        if(check_user $groups_allowed_comments || {~ $#logged_user 0 && ! ~ $#allow_new_user_comments 0}) {
+        if(check_user $groups_allowed_comments || {~ $#logged_user 0 && ~ 1 $#allow_new_user_comments $#bridge_anon_comments}) {
 
             if(~ $#post_arg_bridge_post 1) {
                 ll_add handlers_body_foot template apps/bridge/foot.tpl
--- a/apps/bridge/foot.tpl
+++ b/apps/bridge/foot.tpl
@@ -24,10 +24,12 @@
     </div>
 %   }
 %   if not if(~ $#bridge_anon_comments 1) {
-    <label>Are you a robot? 
-        <select>
-        <option value="yes">Yes</option>
-        <option value="no">No</option>
+    <label>Is <a href="http://glenda.cat-v.org">Glenda a cute bunny</a>?
+        <select name='ima_robot'>
+        <option value="yes">No</option>
+        <option value="not">Yes</option>
+        <option value="foobar">I hate bunnies!</option>
+        <option value="robot">I'm a robot!</option>
         </select>
     </label>
 %   }