liquid_feedback_frontend

view config/devel.lua @ 1205:2f510599c12f

Going to version 3.0.8
author bsw
date Sun Jul 12 20:51:37 2015 +0200 (2015-07-12)
parents fc9169c980d5
children d361a7a03ac1
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 = "Snake Oil<br/>10000 Berlin<br/>Germany"
15 -- A HTML formatted text the user has to accept while registering
16 -- ------------------------------------------------------------------------
17 config.use_terms = "<h1>Terms of Use</h1><p>Insert terms here</p>"
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://10.1.11.5:8080/"
39 config.localhost = false
42 -- Connection information for the LiquidFeedback database
43 -- ------------------------------------------------------------------------
44 config.database = { engine='postgresql', dbname='lf3' }
47 -- Location of the rocketwiki binaries
48 -- ------------------------------------------------------------------------
49 config.enforce_formatting_engine = "markdown2"
51 config.formatting_engines = {
52 { id = "markdown2",
53 name = "python-markdown2",
54 executable = "markdown2",
55 args = {'-s', 'escape', '-x', 'nofollow,wiki-tables'},
56 remove_images = true
57 },
58 { id = "markdown_py",
59 name = "Python Markdown",
60 executable = "markdown_py",
61 args = {'-s', 'escape', '-x', 'extra', '-x', 'nl2br', '-x', 'sane_lists'},
62 remove_images = true
63 },
64 { id = "rocketwiki",
65 name = "RocketWiki",
66 executable = "/opt/rocketwiki-lqfb/rocketwiki-lqfb",
67 remove_images = false
68 },
69 { id = "compat",
70 name = "Traditional WIKI syntax",
71 executable = "/opt/rocketwiki-lqfb/rocketwiki-lqfb-compat",
72 remove_images = false
73 }
74 }
76 -- Public access level
77 -- ------------------------------------------------------------------------
78 -- Available options:
79 -- "none"
80 -- -> Closed user group, no public access at all
81 -- (except login/registration/password reset)
82 -- "anonymous"
83 -- -> Shows only initiative/suggestions texts and aggregated
84 -- supporter/voter counts
85 -- "authors_pseudonymous"
86 -- -> Like anonymous, but shows screen names of authors
87 -- "all_pseudonymous"
88 -- -> Show everything a member can see, except profile pages
89 -- "everything"
90 -- -> Show everything a member can see, including profile pages
91 -- ------------------------------------------------------------------------
92 config.public_access = "all_pseudonymous"
96 -- ========================================================================
97 -- OPTIONAL
98 -- Remove leading -- to use a option
99 -- ========================================================================
101 -- List of enabled languages, defaults to available languages
102 -- ------------------------------------------------------------------------
103 -- config.enabled_languages = { 'en', 'de', 'eo', 'el', 'hu', 'it', 'nl', 'zh-TW' }
105 -- Default language, defaults to "en"
106 -- ------------------------------------------------------------------------
107 -- config.default_lang = "de"
109 -- after how long is a user considered inactive and the trustee will see warning,
110 -- notation is according to postgresql intervals, default: no warning at all
111 -- ------------------------------------------------------------------------
112 config.delegation_warning_time = '1 hour'
114 -- after which time a user is suggested to (_soft) or forced to (_hard)
115 -- confirm unit and area delegations. default: no confirmation at all
116 -- ------------------------------------------------------------------------
117 -- config.check_delegations_interval_hard = "1 day"
118 -- config.check_delegations_interval_soft = "3 seconds"
120 -- default options should be checked when confirming delegations
121 -- options: "confirm", "revoke" and "none"
122 -- ------------------------------------------------------------------------
123 -- config.check_delegations_default = "confirm"
125 -- Prefix of all automatic mails, defaults to "[Liquid Feedback] "
126 -- ------------------------------------------------------------------------
127 -- config.mail_subject_prefix = "[LiquidFeedback] "
129 -- Sender of all automatic mails, defaults to system defaults
130 -- ------------------------------------------------------------------------
131 -- config.mail_envelope_from = "liquidfeedback@example.com"
132 -- config.mail_from = { name = "LiquidFeedback", address = "liquidfeedback@example.com" }
133 -- config.mail_reply_to = { name = "Support", address = "support@example.com" }
135 -- Configuration of password hashing algorithm (defaults to "crypt_sha512")
136 -- ------------------------------------------------------------------------
137 -- config.password_hash_algorithm = "crypt_sha512"
138 -- config.password_hash_algorithm = "crypt_sha256"
139 -- config.password_hash_algorithm = "crypt_md5"
141 -- Number of rounds for crypt_sha* algorithms, minimum and maximum
142 -- (defaults to minimum 10000 and maximum 20000)
143 -- ------------------------------------------------------------------------
144 -- config.password_hash_min_rounds = 10000
145 -- config.password_hash_max_rounds = 20000
147 -- Supply custom url for avatar/photo delivery
148 -- ------------------------------------------------------------------------
149 -- config.fastpath_url_func = nil
151 -- Local directory for database dumps offered for download
152 -- ------------------------------------------------------------------------
153 -- config.download_dir = nil
155 -- Special use terms for database dump download
156 -- ------------------------------------------------------------------------
157 -- config.download_use_terms = "=== Download use terms ===\n"
159 -- Use custom image conversion, defaults to ImageMagick's convert
160 -- ------------------------------------------------------------------------
161 --config.member_image_content_type = "image/jpeg"
162 --config.member_image_convert_func = {
163 -- avatar = function(data) return extos.pfilter(data, "convert", "jpeg:-", "-thumbnail", "48x48", "jpeg:-") end,
164 -- photo = function(data) return extos.pfilter(data, "convert", "jpeg:-", "-thumbnail", "240x240", "jpeg:-") end
165 --}
167 config.member_image_content_type = "image/jpeg"
168 config.member_image_convert_func = {
169 avatar = function(data) return extos.pfilter(data, "convert",
170 "jpeg:-",
171 "-set", "option:distort:viewport",
172 "%[fx:min(w,h)]x%[fx:min(w,h)]+%[fx:max((w-h)/2,0)]+%[fx:max((h-w)/2,0)]",
173 "-filter", "point",
174 "-distort", "SRT", "0",
175 "+repage",
176 "-define", "filter:filter=Sinc",
177 "-define", "filter:window=Jinc",
178 "-define", "filter:lobes=3",
179 "-thumbnail", "48x48",
180 "jpeg:-"
181 ) end,
182 photo = function(data) return extos.pfilter(data, "convert",
183 "jpeg:-",
184 "-define", "filter:filter=Sinc",
185 "-define", "filter:window=Jinc",
186 "-define", "filter:lobes=3",
187 "-thumbnail", "240x240",
188 "jpeg:-"
189 ) end
190 }
193 -- Display a html formatted public message of the day
194 -- ------------------------------------------------------------------------
195 -- config.motd_public = "<h1>Message of the day (public)</h1><p>The MOTD is formatted with HTML</p>"
197 -- Display a html formatted internal message of the day
198 -- ------------------------------------------------------------------------
199 -- config.motd_intern = "<h1>Message of the day (intern)</h1><p>The MOTD is formatted with HTML</p>"
201 -- Automatic issue related discussion URL
202 -- ------------------------------------------------------------------------
203 -- config.issue_discussion_url_func = function(issue)
204 -- return "http://example.com/discussion/issue_" .. tostring(issue.id)
205 -- end
207 -- Configuration of "tell others"
208 -- ------------------------------------------------------------------------
209 config.tell_others = {
210 initiative = function (initiative)
211 local text = "i" .. initiative.id .. ": " .. initiative.name .. " " .. request.get_absolute_baseurl() .. "initiative/" .. initiative.id .. ".html"
212 return {
213 { content = "tweet this initiative", external = "https://twitter.com/intent/tweet?text=" .. encode.url_part(text) },
214 { content = "send link with e-mail", external = "mailto:?subject=" .. encode.url_part(initiative.display_name) .. "&body=" .. encode.url_part(text) }
215 }
216 end
217 }
219 -- Integration of Etherpad, disabled by default
220 -- ------------------------------------------------------------------------
221 --config.etherpad = {
222 -- base_url = "http://example.com:9001/",
223 -- api_base = "http://localhost:9001/",
224 -- api_key = "mysecretapikey",
225 -- group_id = "mygroupname",
226 -- cookie_path = "/"
227 --}
229 -- Free timings, may be used together with polling policies
230 -- ------------------------------------------------------------------------
231 -- This example expects a date string entered in the free timing field
232 -- by the user creating a poll, interpreting it as target date for then
233 -- poll and splits the remainig time at the ratio of 4:1:2
234 -- Please note, polling policies never have an admission phase
237 config.free_timing = {
238 calculate_func = function(policy, timing_string)
239 local function interval_by_seconds(secs)
240 local secs_per_day = 60 * 60 * 24
241 local days
242 days = math.floor(secs / secs_per_day)
243 secs = secs - days * secs_per_day
244 return days .. " days " .. secs .. " seconds"
245 end
246 local target_date = parse.date(timing_string, atom.date)
247 if not target_date then
248 return false
249 end
250 local target_timestamp = target_date.midday
251 local now = atom.timestamp:get_current()
252 trace.debug(target_timestamp, now)
253 local duration = target_timestamp - now
254 if duration < 0 then
255 return false
256 end
257 return {
258 discussion = interval_by_seconds(duration / 7 * 4),
259 verification = interval_by_seconds(duration / 7 * 1),
260 voting = interval_by_seconds(duration / 7 * 2)
261 }
262 end,
263 available_func = function(policy)
264 return {
265 { name = "End of 2013", id = '2013-12-31' },
266 { name = "End of 2014", id = '2014-12-31' },
267 { name = "End of 2015", id = '2015-12-31' }
268 }
269 end
270 }
273 config.enable_debug_trace = true
275 config.fork = { pre = 64, max = 256, delay = 0.01 }
278 -- WebMCP accelerator
279 -- uncomment the following two lines to use C implementations of chosen
280 -- functions and to disable garbage collection during the request, to
281 -- increase speed:
282 -- ------------------------------------------------------------------------
283 -- require 'webmcp_accelerator'
284 -- if cgi then collectgarbage("stop") end
287 -- ========================================================================
288 -- Do main initialisation (DO NOT REMOVE FOLLOWING SECTION)
289 -- ========================================================================
291 execute.config("init")

Impressum / About Us