liquid_feedback_frontend

view config/example.lua @ 988:81bde33c2256

Added support for regular delegation check, fixed css for pagination
author bsw
date Sat Apr 20 18:40:34 2013 +0200 (2013-04-20)
parents 2141aef04ad7
children 701a5cf6b067
line source
1 -- ========================================================================
2 -- MANDATORY (MUST BE CAREFULLY CHECKED AND PROPERLY SET!)
3 -- ========================================================================
5 -- Name of this instance, defaults to name of config file
6 -- ------------------------------------------------------------------------
7 config.instance_name = "Instance name"
10 -- Information about service provider (HTML)
11 -- ------------------------------------------------------------------------
12 config.app_service_provider = "Snake Oil<br/>10000 Berlin<br/>Germany"
15 -- A rocketwiki formatted text the user has to accept while registering
16 -- ------------------------------------------------------------------------
17 config.use_terms = "=== Terms of Use ==="
20 -- Checkbox(es) the user has to accept while registering
21 -- ------------------------------------------------------------------------
22 config.use_terms_checkboxes = {
23 {
24 name = "terms_of_use_v1",
25 html = "I accept the terms of use.",
26 not_accepted_error = "You have to accept the terms of use to be able to register."
27 },
28 -- {
29 -- name = "extra_terms_of_use_v1",
30 -- html = "I accept the extra terms of use.",
31 -- not_accepted_error = "You have to accept the extra terms of use to be able to register."
32 -- }
33 }
36 -- Absolute base url of application
37 -- ------------------------------------------------------------------------
38 config.absolute_base_url = "http://example.com/"
41 -- Connection information for the LiquidFeedback database
42 -- ------------------------------------------------------------------------
43 config.database = { engine='postgresql', dbname='liquid_feedback' }
46 -- Location of the rocketwiki binaries
47 -- ------------------------------------------------------------------------
48 config.formatting_engine_executeables = {
49 rocketwiki= "/opt/rocketwiki-lqfb/rocketwiki-lqfb",
50 compat = "/opt/rocketwiki-lqfb/rocketwiki-lqfb-compat"
51 }
54 -- Public access level
55 -- ------------------------------------------------------------------------
56 -- Available options:
57 -- "none"
58 -- -> Closed user group, no public access at all
59 -- (except login/registration/password reset)
60 -- "anonymous"
61 -- -> Shows only initiative/suggestions texts and aggregated
62 -- supporter/voter counts
63 -- "authors_pseudonymous"
64 -- -> Like anonymous, but shows screen names of authors
65 -- "all_pseudonymous"
66 -- -> Show everything a member can see, except profile pages
67 -- "everything"
68 -- -> Show everything a member can see, including profile pages
69 -- ------------------------------------------------------------------------
70 config.public_access = "none"
74 -- ========================================================================
75 -- OPTIONAL
76 -- Remove leading -- to use a option
77 -- ========================================================================
79 -- List of enabled languages, defaults to available languages
80 -- ------------------------------------------------------------------------
81 -- config.enabled_languages = { 'en', 'de', 'eo', 'el', 'hu', 'it', 'nl', 'zh-Hans', 'zh-TW' }
83 -- Default language, defaults to "en"
84 -- ------------------------------------------------------------------------
85 -- config.default_lang = "en"
87 -- after how long is a user considered inactive and the trustee will see warning,
88 -- notation is according to postgresql intervals, default: no warning at all
89 -- ------------------------------------------------------------------------
90 -- config.delegation_warning_time = '6 months'
92 -- after which time a user is advised (_soft) or forced (_hard) to check
93 -- unit and area delegations. default: no check at all
94 -- ------------------------------------------------------------------------
95 -- config.check_delegations_interval_hard = "6 months"
96 -- config.check_delegations_interval_soft = "3 months"
98 -- default option when checking delegations
99 -- available options: "confirm", "revoke" and "none", default: "confirm"
100 -- ------------------------------------------------------------------------
101 -- config.check_delegations_default = "confirm"
103 -- Prefix of all automatic mails, defaults to "[Liquid Feedback] "
104 -- ------------------------------------------------------------------------
105 -- config.mail_subject_prefix = "[LiquidFeedback] "
107 -- Sender of all automatic mails, defaults to system defaults
108 -- ------------------------------------------------------------------------
109 -- config.mail_envelope_from = "liquidfeedback@example.com"
110 -- config.mail_from = { name = "LiquidFeedback", address = "liquidfeedback@example.com" }
111 -- config.mail_reply_to = { name = "Support", address = "support@example.com" }
113 -- Configuration of password hashing algorithm (defaults to "crypt_sha512")
114 -- ------------------------------------------------------------------------
115 -- config.password_hash_algorithm = "crypt_sha512"
116 -- config.password_hash_algorithm = "crypt_sha256"
117 -- config.password_hash_algorithm = "crypt_md5"
119 -- Number of rounds for crypt_sha* algorithms, minimum and maximum
120 -- (defaults to minimum 10000 and maximum 20000)
121 -- ------------------------------------------------------------------------
122 -- config.password_hash_min_rounds = 10000
123 -- config.password_hash_max_rounds = 20000
126 -- Supply custom url for avatar/photo delivery
127 -- ------------------------------------------------------------------------
128 -- config.fastpath_url_func = nil
130 -- Local directory for database dumps offered for download
131 -- ------------------------------------------------------------------------
132 -- config.download_dir = nil
134 -- Special use terms for database dump download
135 -- ------------------------------------------------------------------------
136 -- config.download_use_terms = "=== Download use terms ===\n"
138 -- Use custom image conversion, defaults to ImageMagick's convert
139 -- ------------------------------------------------------------------------
140 --config.member_image_content_type = "image/jpeg"
141 --config.member_image_convert_func = {
142 -- avatar = function(data) return extos.pfilter(data, "convert", "jpeg:-", "-thumbnail", "48x48", "jpeg:-") end,
143 -- photo = function(data) return extos.pfilter(data, "convert", "jpeg:-", "-thumbnail", "240x240", "jpeg:-") end
144 --}
146 -- Display a public message of the day
147 -- ------------------------------------------------------------------------
148 -- config.motd_public = "===Message of the day===\nThe MOTD is formatted with rocket wiki"
150 -- Automatic issue related discussion URL
151 -- ------------------------------------------------------------------------
152 -- config.issue_discussion_url_func = function(issue)
153 -- return "http://example.com/discussion/issue_" .. tostring(issue.id)
154 -- end
156 -- Integration of Etherpad, disabled by default
157 -- ------------------------------------------------------------------------
158 --config.etherpad = {
159 -- base_url = "http://example.com:9001/",
160 -- api_base = "http://localhost:9001/",
161 -- api_key = "mysecretapikey",
162 -- group_id = "mygroupname",
163 -- cookie_path = "/"
164 --}
166 -- Free timings
167 -- ------------------------------------------------------------------------
168 -- This example expects a date string entered in the free timing field
169 -- by the user creating a poll, interpreting it as target date for then
170 -- poll and splits the remaining time at the ratio of 4:1:2
171 -- Please note, polling policies never have an admission phase
172 -- The available_func is optional, if not set any target date is allowed
174 config.free_timing = {
175 calculate_func = function(policy, timing_string)
176 function interval_by_seconds(secs)
177 local secs_per_day = 60 * 60 * 24
178 local days
179 days = math.floor(secs / secs_per_day)
180 secs = secs - days * secs_per_day
181 return days .. " days " .. secs .. " seconds"
182 end
183 local target_date = parse.date(timing_string, atom.date)
184 if not target_date then
185 return false
186 end
187 local target_timestamp = target_date.midday
188 local now = atom.timestamp:get_current()
189 trace.debug(target_timestamp, now)
190 local duration = target_timestamp - now
191 if duration < 0 then
192 return false
193 end
194 return {
195 discussion = interval_by_seconds(duration / 7 * 4),
196 verification = interval_by_seconds(duration / 7 * 1),
197 voting = interval_by_seconds(duration / 7 * 2)
198 }
199 end,
200 available_func = function(policy)
201 return {
202 { name = "End of 2013", id = '2013-12-31' },
203 { name = "End of 2014", id = '2014-12-31' },
204 { name = "End of 2015", id = '2015-12-31' }
205 }
206 end
207 }
209 -- WebMCP accelerator
210 -- uncomment the following two lines to use C implementations of chosen
211 -- functions and to disable garbage collection during the request, to
212 -- increase speed:
213 -- ------------------------------------------------------------------------
214 -- require 'webmcp_accelerator'
215 -- if cgi then collectgarbage("stop") end
217 -- Trace debug
218 -- uncomment the following line to enable debug trace
219 -- config.enable_debug_trace = true
221 -- ========================================================================
222 -- Do main initialisation (DO NOT REMOVE FOLLOWING SECTION)
223 -- ========================================================================
225 execute.config("init")

Impressum / About Us