changelog shortlog tags branches files raw gz bz2 help

Mercurial > hg > werc / changeset: Anon posting for bridge.

changeset 595: 7fed1d335641
parent 594: a150ab6df4e2
child 596: 567845c30a05
author: uriel@vm41.cat-v.org
date: Tue, 20 Oct 2009 02:09:55 +0200
files: apps/bridge/app.rc apps/bridge/foot.tpl
description: Anon posting for bridge.
     1.1--- a/apps/bridge/app.rc	Mon Oct 19 23:49:11 2009 +0000
     1.2+++ b/apps/bridge/app.rc	Tue Oct 20 02:09:55 2009 +0200
     1.3@@ -5,6 +5,9 @@
     1.4         allow_new_user_comments=yes
     1.5         shift
     1.6     }
     1.7+    if not if(~ $1 -a) {
     1.8+        bridge_anon_comments=yes 
     1.9+    }
    1.10     enable_comments=yes
    1.11     groups_allowed_comments=$*
    1.12     conf_enable_app bridge
    1.13@@ -67,6 +70,12 @@
    1.14             if not
    1.15                 _status=$status
    1.16         }
    1.17+        if not if(! ~ $#bridge_anon_comments 0) {
    1.18+            if(~ $"post_arg_ima_robot 'not')
    1.19+                u='Glenda' # Anonymous
    1.20+            if not
    1.21+                _status='You are a robot!'
    1.22+        }
    1.23         if not
    1.24             _status='You need to log in to comment.'
    1.25     }
     2.1--- a/apps/bridge/foot.tpl	Mon Oct 19 23:49:11 2009 +0000
     2.2+++ b/apps/bridge/foot.tpl	Tue Oct 20 02:09:55 2009 +0200
     2.3@@ -6,7 +6,8 @@
     2.4     <br>
     2.5     <input type="submit" name="bridge_post" value="Post a comment">
     2.6 
     2.7-% if(~ $#logged_user 0 && ! ~ $#allow_new_user_comments 0) {
     2.8+% if(~ $#logged_user 0) {
     2.9+%   if(~ $#allow_new_user_comments 1) {
    2.10     <label>New user name:
    2.11         <input type="text" name="comment_user" value="%($"post_arg_comment_user%)">
    2.12     </label>
    2.13@@ -21,5 +22,14 @@
    2.14     <div style="font-size: 70%">
    2.15     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.
    2.16     </div>
    2.17+%   }
    2.18+%   if not if(~ $#bridge_anon_comments 1) {
    2.19+    <label>Are you a robot? 
    2.20+        <select>
    2.21+        <option value="yes">Yes</option>
    2.22+        <option value="no">No</option>
    2.23+        </select>
    2.24+    </label>
    2.25+%   }
    2.26 % }
    2.27 </form>