shithub: werc

Download patch

ref: b3ffcf4a85cade4a89981cb731d59b82286d9df2
parent: b9a1531ee8e6e352a0c6d9d40a9835bd92b82b93
parent: 2a3ed328ea89c07e3a03e7e8fd2089667be384e1
author: uriel <uriel@vm41.cat-v.org>
date: Mon Oct 19 22:13:23 EDT 2009

Merge more from 'stable'.

diff: cannot open b/sites/tst.cat-v.org/apps/bridge/a/_werc//null: file does not exist: 'b/sites/tst.cat-v.org/apps/bridge/a/_werc//null' diff: cannot open b/sites/tst.cat-v.org/apps/bridge/a//null: file does not exist: 'b/sites/tst.cat-v.org/apps/bridge/a//null' diff: cannot open b/sites/tst.cat-v.org/apps/bridge//null: file does not exist: 'b/sites/tst.cat-v.org/apps/bridge//null'
--- a/apps/bridge/app.rc
+++ b/apps/bridge/app.rc
@@ -5,6 +5,9 @@
         allow_new_user_comments=yes
         shift
     }
+    if not if(~ $1 -a) {
+        bridge_anon_comments=yes 
+    }
     enable_comments=yes
     groups_allowed_comments=$*
     conf_enable_app bridge
@@ -66,6 +69,12 @@
             }
             if not
                 _status=$status
+        }
+        if not if(! ~ $#bridge_anon_comments 0) {
+            if(~ $"post_arg_ima_robot 'not')
+                u='Glenda' # Anonymous
+            if not
+                _status='You are a robot!'
         }
         if not
             _status='You need to log in to comment.'
--- a/apps/bridge/foot.tpl
+++ b/apps/bridge/foot.tpl
@@ -6,7 +6,8 @@
     <br>
     <input type="submit" name="bridge_post" value="Post a comment">
 
-% if(~ $#logged_user 0 && ! ~ $#allow_new_user_comments 0) {
+% if(~ $#logged_user 0) {
+%   if(~ $#allow_new_user_comments 1) {
     <label>New user name:
         <input type="text" name="comment_user" value="%($"post_arg_comment_user%)">
     </label>
@@ -21,5 +22,14 @@
     <div style="font-size: 70%">
     Enter your desired user name/password and after your comment has been reviewed by an admin it will be posted and your account will be enabled. If you are already registered please <a href="/_users/login" rel="nofollow">login</a> before posting.
     </div>
+%   }
+%   if not if(~ $#bridge_anon_comments 1) {
+    <label>Are you a robot? 
+        <select>
+        <option value="yes">Yes</option>
+        <option value="no">No</option>
+        </select>
+    </label>
+%   }
 % }
 </form>
--- /dev/null
+++ b/sites/tst.cat-v.org/apps/bridge/a/_werc/config
@@ -1,0 +1,1 @@
+conf_enable_comments -a