liquid_feedback_frontend

view config/lf3.lua @ 1052:66da54c0ae6c

Removed cuddled-lists option from markdown2 arguments to fit formatting help
author bsw
date Tue Jul 15 21:36:00 2014 +0200 (2014-07-15)
parents 701a5cf6b067
children 6639b4188d7d
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 = "Public Software Group e.V."
10 -- Information about service provider (HTML)
11 -- ------------------------------------------------------------------------
12 config.app_service_provider = [[
13 Public Software Group e. V.<br />
14 Johannisstr. 12<br />
15 10117 Berlin<br />
16 Germany<br /><br />
17 eingetragen im Vereinsregister des Amtsgerichtes Charlottenburg unter der
18 Registernummer VR 28873 B<br />
19 vertreten durch die Vorstandsmitglieder Jan Behrens, Axel Kistner, Andreas
20 Nitsche und Björn Swierczek jeweils mit Einzelvertretungsbefugnis
21 ]]
24 -- A HTML formatted text the user has to accept while registering
25 -- ------------------------------------------------------------------------
26 config.use_terms = [[
27 <h1>Terms of Use</h1>
28 <p>
29 All data display below and all data you enter later while using the system
30 and all data you are submitting via the programming interface will be
31 stored in the LiquidFeedback database and published. Every access to the
32 system is subject of tracing and logging for development purposes.
33 </p>
34 <p>
35 Please notice, this is a **public test dedicated to developers**: serious
36 errors can happen or private data unintentionally published.
37 </p>
38 <p>
39 Everything is <b>ON YOUR OWN RISK</b>
40 </p>
41 ]]
43 -- Checkbox(es) the user has to accept while registering
44 -- ------------------------------------------------------------------------
45 config.use_terms_checkboxes = {
46 {
47 name = "terms_of_use_20140514",
48 html = "I accept the terms of use.",
49 not_accepted_error = "You have to accept the terms of use to be able to register."
50 },
51 -- {
52 -- name = "extra_terms_of_use_v1",
53 -- html = "I accept the extra terms of use.",
54 -- not_accepted_error = "You have to accept the extra terms of use to be able to register."
55 -- }
56 }
59 -- Absolute base url of application
60 -- ------------------------------------------------------------------------
61 config.absolute_base_url = "http://dev.liquidfeedback.org/lf3/"
64 -- Connection information for the LiquidFeedback database
65 -- ------------------------------------------------------------------------
66 config.database = { engine='postgresql', dbname='lf3' }
69 -- Location of the rocketwiki binaries
70 -- ------------------------------------------------------------------------
71 config.enforce_formatting_engine = "markdown2"
73 config.formatting_engines = {
74 { id = "markdown_py",
75 name = "Python Markdown",
76 executable = "markdown_py",
77 args = {'/dev/stdin', '-s', 'escape', '-x', 'extra', '-x', 'nl2br', '-x', 'sane_lists'},
78 remove_images = true
79 },
80 { id = "markdown2",
81 name = "markdown2",
82 executable = "markdown2",
83 args = {'-s', 'escape', '-x', 'nofollow,wiki-tables'},
84 remove_images = true
85 },
86 { id = "multimarkdown",
87 name = "MultiMarkdown",
88 executable = "multimarkdown",
89 args = {'--filter-html', '--filter-styles', '--nolabels' ,'-x'}
90 },
91 { id = "rocketwiki",
92 name = "RocketWiki",
93 executable = "/opt/liquid_feedback3/rocketwiki-lqfb/rocketwiki-lqfb",
94 remove_images = false
95 },
96 { id = "compat",
97 name = "Traditional WIKI syntax",
98 executable = "/opt/liquid_feedback3/rocketwiki-lqfb/rocketwiki-lqfb-compat",
99 remove_images = false
100 }
101 }
103 -- Public access level
104 -- ------------------------------------------------------------------------
105 -- Available options:
106 -- "none"
107 -- -> Closed user group, no public access at all
108 -- (except login/registration/password reset)
109 -- "anonymous"
110 -- -> Shows only initiative/suggestions texts and aggregated
111 -- supporter/voter counts
112 -- "authors_pseudonymous"
113 -- -> Like anonymous, but shows screen names of authors
114 -- "all_pseudonymous"
115 -- -> Show everything a member can see, except profile pages
116 -- "everything"
117 -- -> Show everything a member can see, including profile pages
118 -- ------------------------------------------------------------------------
119 config.public_access = "none"
123 -- ========================================================================
124 -- OPTIONAL
125 -- Remove leading -- to use a option
126 -- ========================================================================
128 -- List of enabled languages, defaults to available languages
129 -- ------------------------------------------------------------------------
130 -- config.enabled_languages = { 'en', 'de', 'eo', 'el', 'hu', 'it', 'nl', 'zh-TW' }
131 config.enabled_languages = { 'en', 'de' }
133 -- Default language, defaults to "en"
134 -- ------------------------------------------------------------------------
135 -- config.default_lang = "de"
137 -- after how long is a user considered inactive and the trustee will see warning,
138 -- notation is according to postgresql intervals, default: no warning at all
139 -- ------------------------------------------------------------------------
140 config.delegation_warning_time = '3 month'
142 -- after which time a user is suggested to (_soft) or forced to (_hard)
143 -- confirm unit and area delegations. default: no confirmation at all
144 -- ------------------------------------------------------------------------
145 -- config.check_delegations_interval_hard = "1 day"
146 -- config.check_delegations_interval_soft = "3 seconds"
148 -- default options should be checked when confirming delegations
149 -- options: "confirm", "revoke" and "none"
150 -- ------------------------------------------------------------------------
151 -- config.check_delegations_default = "confirm"
153 -- Prefix of all automatic mails, defaults to "[Liquid Feedback] "
154 -- ------------------------------------------------------------------------
155 config.mail_subject_prefix = "[LiquidFeedback 3.0 Test] "
157 -- Sender of all automatic mails, defaults to system defaults
158 -- ------------------------------------------------------------------------
159 config.mail_envelope_from = "lqfb-maintainers@public-software-group.org"
160 config.mail_from = { name = "LiquidFeedback", address = "lqfb-maintainers@public-software-group.org" }
161 --config.mail_reply_to = { name = "Support", address = "support@example.com" }
163 -- Configuration of password hashing algorithm (defaults to "crypt_sha512")
164 -- ------------------------------------------------------------------------
165 -- config.password_hash_algorithm = "crypt_sha512"
166 -- config.password_hash_algorithm = "crypt_sha256"
167 -- config.password_hash_algorithm = "crypt_md5"
169 -- Number of rounds for crypt_sha* algorithms, minimum and maximum
170 -- (defaults to minimum 10000 and maximum 20000)
171 -- ------------------------------------------------------------------------
172 -- config.password_hash_min_rounds = 10000
173 -- config.password_hash_max_rounds = 20000
175 -- Supply custom url for avatar/photo delivery
176 -- ------------------------------------------------------------------------
177 -- config.fastpath_url_func = nil
179 -- Local directory for database dumps offered for download
180 -- ------------------------------------------------------------------------
181 -- config.download_dir = nil
183 -- Special use terms for database dump download
184 -- ------------------------------------------------------------------------
185 -- config.download_use_terms = "=== Download use terms ===\n"
187 -- Use custom image conversion, defaults to ImageMagick's convert
188 -- ------------------------------------------------------------------------
189 --config.member_image_content_type = "image/jpeg"
190 --config.member_image_convert_func = {
191 -- avatar = function(data) return extos.pfilter(data, "convert", "jpeg:-", "-thumbnail", "48x48", "jpeg:-") end,
192 -- photo = function(data) return extos.pfilter(data, "convert", "jpeg:-", "-thumbnail", "240x240", "jpeg:-") end
193 --}
195 -- Display a html formatted public message of the day
196 -- ------------------------------------------------------------------------
197 -- config.motd_public = "<h1>Message of the day (public)</h1><p>The MOTD is formatted with HTML</p>"
199 -- Display a html formatted internal message of the day
200 -- ------------------------------------------------------------------------
201 -- config.motd_public = "<h1>Message of the day (intern)</h1><p>The MOTD is formatted with HTML</p>"
203 -- Automatic issue related discussion URL
204 -- ------------------------------------------------------------------------
205 -- config.issue_discussion_url_func = function(issue)
206 -- return "http://example.com/discussion/issue_" .. tostring(issue.id)
207 -- end
209 -- Configuration of "tell others"
210 -- ------------------------------------------------------------------------
211 config.tell_others = {
212 initiative = function (initiative)
213 local text = "i" .. initiative.id .. ": " .. initiative.name .. " " .. request.get_absolute_baseurl() .. "initiative/" .. initiative.id .. ".html"
214 return {
215 { content = "Tweet this initiative", external = "https://twitter.com/intent/tweet?text=" .. encode.url_part(text) },
216 { content = "Send an eMail", external = "mailto:?subject=" .. encode.url_part(initiative.display_name) .. "&body=" .. encode.url_part(text) }
217 }
218 end
219 }
221 -- Integration of Etherpad, disabled by default
222 -- ------------------------------------------------------------------------
223 --config.etherpad = {
224 -- base_url = "http://example.com:9001/",
225 -- api_base = "http://localhost:9001/",
226 -- api_key = "mysecretapikey",
227 -- group_id = "mygroupname",
228 -- cookie_path = "/"
229 --}
231 -- Free timings, may be used together with polling policies
232 -- ------------------------------------------------------------------------
233 -- This example expects a date string entered in the free timing field
234 -- by the user creating a poll, interpreting it as target date for then
235 -- poll and splits the remainig time at the ratio of 4:1:2
236 -- Please note, polling policies never have an admission phase
239 config.free_timing = {
240 calculate_func = function(policy, timing_string)
241 function interval_by_seconds(secs)
242 local secs_per_day = 60 * 60 * 24
243 local days
244 days = math.floor(secs / secs_per_day)
245 secs = secs - days * secs_per_day
246 return days .. " days " .. secs .. " seconds"
247 end
248 local target_date = parse.date(timing_string, atom.date)
249 if not target_date then
250 return false
251 end
252 local target_timestamp = target_date.midday
253 local now = atom.timestamp:get_current()
254 trace.debug(target_timestamp, now)
255 local duration = target_timestamp - now
256 if duration < 0 then
257 return false
258 end
259 return {
260 discussion = interval_by_seconds(duration / 7 * 4),
261 verification = interval_by_seconds(duration / 7 * 1),
262 voting = interval_by_seconds(duration / 7 * 2)
263 }
264 end,
265 available_func = function(policy)
266 return {
267 { name = "End of 2014", id = '2014-12-31' },
268 { name = "End of 2015", id = '2015-12-31' },
269 { name = "End of 2016", id = '2016-12-31' }
270 }
271 end
272 }
275 config.enable_debug_trace = true
277 -- WebMCP accelerator
278 -- uncomment the following two lines to use C implementations of chosen
279 -- functions and to disable garbage collection during the request, to
280 -- increase speed:
281 -- ------------------------------------------------------------------------
282 -- require 'webmcp_accelerator'
283 -- if cgi then collectgarbage("stop") end
286 -- ========================================================================
287 -- Do main initialisation (DO NOT REMOVE FOLLOWING SECTION)
288 -- ========================================================================
290 execute.config("init")

Impressum / About Us