Update of /cvsroot/tmda/tmda/TMDA
In directory sc8-pr-cvs1:/tmp/cvs-serv27090

Modified Files:
        Defaults.py 
Log Message:
Added a host of CGI_* default variables -- none of which are set unless
CGI_ACTIVE is defined to a non-zero value in /etc/tmdarc, ~/.tmdarc, or
~/.tmda/config.

Here's a summary of the other CGI_* defaults:
CGI_CLEANUP_ODDS    - How often old sessions are cleaned.
CGI_DATE_FORMAT     - Date format string for dates in pending e-mails list.
CGI_PAGER_SIZE      - Number of pending e-mails per page.
CGI_PATH_TO_PENDING - Path used to locate tmda-pending
CGI_SESSION_EXP     - Seconds a session before a session can be cleaned.
CGI_SESSION_PREFIX  - Prefix for session filenames.
CGI_USE_JS_CONFIRM  - Enables Javascript confirmation of delete & blacklist.


Index: Defaults.py
===================================================================
RCS file: /cvsroot/tmda/tmda/TMDA/Defaults.py,v
retrieving revision 1.155
retrieving revision 1.156
diff -u -r1.155 -r1.156
--- Defaults.py 21 Nov 2002 23:57:40 -0000      1.155
+++ Defaults.py 23 Nov 2002 05:53:26 -0000      1.156
@@ -433,6 +433,105 @@
 if not vars().has_key('BARE_APPEND'):
     BARE_APPEND = None
 
+# CGI_ACTIVE
+# All defaults beginning with "CGI_" configure the behavior of tmda-cgi.
+# tmda-cgi is provided as a contrib package for web-based monitoring and
+# configuration of TMDA accounts.  To use tmda-cgi, you must define
+# CGI_ACTIVE to enable default values for the CGI_* variables.
+#
+# Example:
+# CGI_ACTIVE = 1
+#
+# No default
+if vars().has_key('CGI_ACTIVE'):
+    
+    # CGI_CLEANUP_ODDS
+    # Chance of cleaning up old sessions when a session object is
+    # instantiated.  Keeping this value small will minimize overhead on
+    # each page fetch.  Larger values will tidy up the temporary files
+    # more often.
+    #
+    # Example:
+    # CGI_CLEANUP_ODDS = 0.1
+    #
+    # Default is 0.01 (1%).
+    if not vars().has_key('CGI_CLEANUP_ODDS'):
+        CGI_CLEANUP_ODDS = 0.01
+
+    # CGI_DATE_FORMAT
+    # Format string for time.strftime() used when displaying message dates
+    # in pending list view.
+    #
+    # Example:
+    # CGI_DATE_FORMAT = "%m/%d/%y"
+    #
+    # Default is "%a %1m/%d" (which generates text like: "Mon 12/31")
+    if not vars().has_key('CGI_DATE_FORMAT'):
+        CGI_DATE_FORMAT = '%a %1m/%d'
+    
+    # CGI_PAGER_SIZE
+    # Number of pending e-mails shown in list format on one page.
+    #
+    # Example:
+    # CGI_PAGER_SIZE = 10
+    #
+    # Default is 25.
+    if not vars().has_key('CGI_PAGER_SIZE'):
+        CGI_PAGER_SIZE = 25
+
+    # CGI_PATH_TO_PENDING
+    # *REQUIRED* path to tmda-pending.  tmda-cgi will not function if this
+    # variable is set wrong.
+    #
+    # Example:
+    # CGI_PATH_TO_PENDING = "/usr/bin/tmda-pending"
+    #
+    # Default is "../../bin/tmda-pending" (which assumes you are running
+    # directly out of the source tree).
+    if not vars().has_key('CGI_PATH_TO_PENDING'):
+        CGI_PATH_TO_PENDING = os.path.split(os.path.dirname(PARENTDIR))[0] # '../../'
+        CGI_PATH_TO_PENDING = os.path.join(CGI_PATH_TO_PENDING, 'bin', 'tmda-pending')
+
+    # CGI_SESSION_EXP
+    # Number of seconds a session is guaranteed to remain on the system
+    # before there is a chance of it being cleaned up.  Users who are
+    # logged into tmda-cgi and spend more than this amount of time between
+    # page accesses may have to log in again.
+    #
+    # Example:
+    # CGI_SESSION_EXP = 600
+    #
+    # Default is 300 (5 minutes).
+    if not vars().has_key('CGI_SESSION_EXP'):
+        CGI_SESSION_EXP = 300
+
+    # CGI_SESSION_PREFIX
+    # Session data is stored in temporary files between page hits.
+    # CGI_SESSION_PREFIX describes where these files will be stored and how
+    # they should be prefixed.  The actual session number will be appended
+    # to the prefix to form the file name (ex: /tmp/PySess.jI92Xzo8).
+    # The files should be stored in a world-writable directory like /tmp.
+    #
+    # Example:
+    # CGI_SESSION_PREFIX = "/tmp/sess"
+    #
+    # Default is "/tmp/PySess.".
+    if not vars().has_key('CGI_SESSION_PREFIX'):
+        CGI_SESSION_PREFIX = "/tmp/PySess."
+
+    # CGI_USE_JS_CONFIRM
+    # Enables a pop-up confirmation box before any message is deleted or
+    # blacklisted.  Must be disabled if you will be surfing tmda-cgi in
+    # a browser without Javascript or where Javascript is disabled.
+    # Otherwise you will not be able to delete or blacklist messages.
+    #
+    # Example:
+    # CGI_USE_JS_CONFIRM = 0
+    #
+    # Default is 1.
+    if not vars().has_key('CGI_USE_JS_CONFIRM'):
+        CGI_USE_JS_CONFIRM = 1
+
 # CONFIRM_ADDRESS
 # An optional e-mail address to use for creating confirmation
 # addresses.  Normally, the recipient address is used, but in some

_______________________________________
tmda-cvs mailing list
http://tmda.net/lists/listinfo/tmda-cvs

Reply via email to