liquid_feedback_frontend
diff config/lf3.lua @ 1045:701a5cf6b067
Imported LiquidFeedback Frontend 3.0 branch
author | bsw |
---|---|
date | Thu Jul 10 01:19:48 2014 +0200 (2014-07-10) |
parents | |
children | 66da54c0ae6c |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/config/lf3.lua Thu Jul 10 01:19:48 2014 +0200 1.3 @@ -0,0 +1,290 @@ 1.4 +-- ======================================================================== 1.5 +-- MANDATORY (MUST BE CAREFULLY CHECKED AND PROPERLY SET!) 1.6 +-- ======================================================================== 1.7 + 1.8 +-- Name of this instance, defaults to name of config file 1.9 +-- ------------------------------------------------------------------------ 1.10 +config.instance_name = "Public Software Group e.V." 1.11 + 1.12 + 1.13 +-- Information about service provider (HTML) 1.14 +-- ------------------------------------------------------------------------ 1.15 +config.app_service_provider = [[ 1.16 +Public Software Group e. V.<br /> 1.17 +Johannisstr. 12<br /> 1.18 +10117 Berlin<br /> 1.19 +Germany<br /><br /> 1.20 +eingetragen im Vereinsregister des Amtsgerichtes Charlottenburg unter der 1.21 + Registernummer VR 28873 B<br /> 1.22 +vertreten durch die Vorstandsmitglieder Jan Behrens, Axel Kistner, Andreas 1.23 + Nitsche und Björn Swierczek jeweils mit Einzelvertretungsbefugnis 1.24 +]] 1.25 + 1.26 + 1.27 +-- A HTML formatted text the user has to accept while registering 1.28 +-- ------------------------------------------------------------------------ 1.29 +config.use_terms = [[ 1.30 +<h1>Terms of Use</h1> 1.31 +<p> 1.32 + All data display below and all data you enter later while using the system 1.33 + and all data you are submitting via the programming interface will be 1.34 + stored in the LiquidFeedback database and published. Every access to the 1.35 + system is subject of tracing and logging for development purposes. 1.36 +</p> 1.37 +<p> 1.38 + Please notice, this is a **public test dedicated to developers**: serious 1.39 + errors can happen or private data unintentionally published. 1.40 +</p> 1.41 +<p> 1.42 + Everything is <b>ON YOUR OWN RISK</b> 1.43 +</p> 1.44 +]] 1.45 + 1.46 +-- Checkbox(es) the user has to accept while registering 1.47 +-- ------------------------------------------------------------------------ 1.48 +config.use_terms_checkboxes = { 1.49 + { 1.50 + name = "terms_of_use_20140514", 1.51 + html = "I accept the terms of use.", 1.52 + not_accepted_error = "You have to accept the terms of use to be able to register." 1.53 + }, 1.54 +-- { 1.55 +-- name = "extra_terms_of_use_v1", 1.56 +-- html = "I accept the extra terms of use.", 1.57 +-- not_accepted_error = "You have to accept the extra terms of use to be able to register." 1.58 +-- } 1.59 +} 1.60 + 1.61 + 1.62 +-- Absolute base url of application 1.63 +-- ------------------------------------------------------------------------ 1.64 +config.absolute_base_url = "http://dev.liquidfeedback.org/lf3/" 1.65 + 1.66 + 1.67 +-- Connection information for the LiquidFeedback database 1.68 +-- ------------------------------------------------------------------------ 1.69 +config.database = { engine='postgresql', dbname='lf3' } 1.70 + 1.71 + 1.72 +-- Location of the rocketwiki binaries 1.73 +-- ------------------------------------------------------------------------ 1.74 +config.enforce_formatting_engine = "markdown2" 1.75 + 1.76 +config.formatting_engines = { 1.77 + { id = "markdown_py", 1.78 + name = "Python Markdown", 1.79 + executable = "markdown_py", 1.80 + args = {'/dev/stdin', '-s', 'escape', '-x', 'extra', '-x', 'nl2br', '-x', 'sane_lists'}, 1.81 + remove_images = true 1.82 + }, 1.83 + { id = "markdown2", 1.84 + name = "markdown2", 1.85 + executable = "markdown2", 1.86 + args = {'-s', 'escape', '-x', 'cuddled-lists,nofollow,wiki-tables'}, 1.87 + remove_images = true 1.88 + }, 1.89 + { id = "multimarkdown", 1.90 + name = "MultiMarkdown", 1.91 + executable = "multimarkdown", 1.92 + args = {'--filter-html', '--filter-styles', '--nolabels' ,'-x'} 1.93 + }, 1.94 + { id = "rocketwiki", 1.95 + name = "RocketWiki", 1.96 + executable = "/opt/liquid_feedback3/rocketwiki-lqfb/rocketwiki-lqfb", 1.97 + remove_images = false 1.98 + }, 1.99 + { id = "compat", 1.100 + name = "Traditional WIKI syntax", 1.101 + executable = "/opt/liquid_feedback3/rocketwiki-lqfb/rocketwiki-lqfb-compat", 1.102 + remove_images = false 1.103 + } 1.104 +} 1.105 + 1.106 +-- Public access level 1.107 +-- ------------------------------------------------------------------------ 1.108 +-- Available options: 1.109 +-- "none" 1.110 +-- -> Closed user group, no public access at all 1.111 +-- (except login/registration/password reset) 1.112 +-- "anonymous" 1.113 +-- -> Shows only initiative/suggestions texts and aggregated 1.114 +-- supporter/voter counts 1.115 +-- "authors_pseudonymous" 1.116 +-- -> Like anonymous, but shows screen names of authors 1.117 +-- "all_pseudonymous" 1.118 +-- -> Show everything a member can see, except profile pages 1.119 +-- "everything" 1.120 +-- -> Show everything a member can see, including profile pages 1.121 +-- ------------------------------------------------------------------------ 1.122 +config.public_access = "none" 1.123 + 1.124 + 1.125 + 1.126 +-- ======================================================================== 1.127 +-- OPTIONAL 1.128 +-- Remove leading -- to use a option 1.129 +-- ======================================================================== 1.130 + 1.131 +-- List of enabled languages, defaults to available languages 1.132 +-- ------------------------------------------------------------------------ 1.133 +-- config.enabled_languages = { 'en', 'de', 'eo', 'el', 'hu', 'it', 'nl', 'zh-TW' } 1.134 +config.enabled_languages = { 'en', 'de' } 1.135 + 1.136 +-- Default language, defaults to "en" 1.137 +-- ------------------------------------------------------------------------ 1.138 +-- config.default_lang = "de" 1.139 + 1.140 +-- after how long is a user considered inactive and the trustee will see warning, 1.141 +-- notation is according to postgresql intervals, default: no warning at all 1.142 +-- ------------------------------------------------------------------------ 1.143 +config.delegation_warning_time = '3 month' 1.144 + 1.145 +-- after which time a user is suggested to (_soft) or forced to (_hard) 1.146 +-- confirm unit and area delegations. default: no confirmation at all 1.147 +-- ------------------------------------------------------------------------ 1.148 +-- config.check_delegations_interval_hard = "1 day" 1.149 +-- config.check_delegations_interval_soft = "3 seconds" 1.150 + 1.151 +-- default options should be checked when confirming delegations 1.152 +-- options: "confirm", "revoke" and "none" 1.153 +-- ------------------------------------------------------------------------ 1.154 +-- config.check_delegations_default = "confirm" 1.155 + 1.156 +-- Prefix of all automatic mails, defaults to "[Liquid Feedback] " 1.157 +-- ------------------------------------------------------------------------ 1.158 +config.mail_subject_prefix = "[LiquidFeedback 3.0 Test] " 1.159 + 1.160 +-- Sender of all automatic mails, defaults to system defaults 1.161 +-- ------------------------------------------------------------------------ 1.162 +config.mail_envelope_from = "lqfb-maintainers@public-software-group.org" 1.163 +config.mail_from = { name = "LiquidFeedback", address = "lqfb-maintainers@public-software-group.org" } 1.164 +--config.mail_reply_to = { name = "Support", address = "support@example.com" } 1.165 + 1.166 +-- Configuration of password hashing algorithm (defaults to "crypt_sha512") 1.167 +-- ------------------------------------------------------------------------ 1.168 +-- config.password_hash_algorithm = "crypt_sha512" 1.169 +-- config.password_hash_algorithm = "crypt_sha256" 1.170 +-- config.password_hash_algorithm = "crypt_md5" 1.171 + 1.172 +-- Number of rounds for crypt_sha* algorithms, minimum and maximum 1.173 +-- (defaults to minimum 10000 and maximum 20000) 1.174 +-- ------------------------------------------------------------------------ 1.175 +-- config.password_hash_min_rounds = 10000 1.176 +-- config.password_hash_max_rounds = 20000 1.177 + 1.178 +-- Supply custom url for avatar/photo delivery 1.179 +-- ------------------------------------------------------------------------ 1.180 +-- config.fastpath_url_func = nil 1.181 + 1.182 +-- Local directory for database dumps offered for download 1.183 +-- ------------------------------------------------------------------------ 1.184 +-- config.download_dir = nil 1.185 + 1.186 +-- Special use terms for database dump download 1.187 +-- ------------------------------------------------------------------------ 1.188 +-- config.download_use_terms = "=== Download use terms ===\n" 1.189 + 1.190 +-- Use custom image conversion, defaults to ImageMagick's convert 1.191 +-- ------------------------------------------------------------------------ 1.192 +--config.member_image_content_type = "image/jpeg" 1.193 +--config.member_image_convert_func = { 1.194 +-- avatar = function(data) return extos.pfilter(data, "convert", "jpeg:-", "-thumbnail", "48x48", "jpeg:-") end, 1.195 +-- photo = function(data) return extos.pfilter(data, "convert", "jpeg:-", "-thumbnail", "240x240", "jpeg:-") end 1.196 +--} 1.197 + 1.198 +-- Display a html formatted public message of the day 1.199 +-- ------------------------------------------------------------------------ 1.200 +-- config.motd_public = "<h1>Message of the day (public)</h1><p>The MOTD is formatted with HTML</p>" 1.201 + 1.202 +-- Display a html formatted internal message of the day 1.203 +-- ------------------------------------------------------------------------ 1.204 +-- config.motd_public = "<h1>Message of the day (intern)</h1><p>The MOTD is formatted with HTML</p>" 1.205 + 1.206 +-- Automatic issue related discussion URL 1.207 +-- ------------------------------------------------------------------------ 1.208 +-- config.issue_discussion_url_func = function(issue) 1.209 +-- return "http://example.com/discussion/issue_" .. tostring(issue.id) 1.210 +-- end 1.211 + 1.212 +-- Configuration of "tell others" 1.213 +-- ------------------------------------------------------------------------ 1.214 +config.tell_others = { 1.215 + initiative = function (initiative) 1.216 + local text = "i" .. initiative.id .. ": " .. initiative.name .. " " .. request.get_absolute_baseurl() .. "initiative/" .. initiative.id .. ".html" 1.217 + return { 1.218 + { content = "Tweet this initiative", external = "https://twitter.com/intent/tweet?text=" .. encode.url_part(text) }, 1.219 + { content = "Send an eMail", external = "mailto:?subject=" .. encode.url_part(initiative.display_name) .. "&body=" .. encode.url_part(text) } 1.220 + } 1.221 + end 1.222 +} 1.223 + 1.224 +-- Integration of Etherpad, disabled by default 1.225 +-- ------------------------------------------------------------------------ 1.226 +--config.etherpad = { 1.227 +-- base_url = "http://example.com:9001/", 1.228 +-- api_base = "http://localhost:9001/", 1.229 +-- api_key = "mysecretapikey", 1.230 +-- group_id = "mygroupname", 1.231 +-- cookie_path = "/" 1.232 +--} 1.233 + 1.234 +-- Free timings, may be used together with polling policies 1.235 +-- ------------------------------------------------------------------------ 1.236 +-- This example expects a date string entered in the free timing field 1.237 +-- by the user creating a poll, interpreting it as target date for then 1.238 +-- poll and splits the remainig time at the ratio of 4:1:2 1.239 +-- Please note, polling policies never have an admission phase 1.240 + 1.241 + 1.242 +config.free_timing = { 1.243 + calculate_func = function(policy, timing_string) 1.244 + function interval_by_seconds(secs) 1.245 + local secs_per_day = 60 * 60 * 24 1.246 + local days 1.247 + days = math.floor(secs / secs_per_day) 1.248 + secs = secs - days * secs_per_day 1.249 + return days .. " days " .. secs .. " seconds" 1.250 + end 1.251 + local target_date = parse.date(timing_string, atom.date) 1.252 + if not target_date then 1.253 + return false 1.254 + end 1.255 + local target_timestamp = target_date.midday 1.256 + local now = atom.timestamp:get_current() 1.257 + trace.debug(target_timestamp, now) 1.258 + local duration = target_timestamp - now 1.259 + if duration < 0 then 1.260 + return false 1.261 + end 1.262 + return { 1.263 + discussion = interval_by_seconds(duration / 7 * 4), 1.264 + verification = interval_by_seconds(duration / 7 * 1), 1.265 + voting = interval_by_seconds(duration / 7 * 2) 1.266 + } 1.267 + end, 1.268 + available_func = function(policy) 1.269 + return { 1.270 + { name = "End of 2014", id = '2014-12-31' }, 1.271 + { name = "End of 2015", id = '2015-12-31' }, 1.272 + { name = "End of 2016", id = '2016-12-31' } 1.273 + } 1.274 + end 1.275 +} 1.276 + 1.277 + 1.278 +config.enable_debug_trace = true 1.279 + 1.280 +-- WebMCP accelerator 1.281 +-- uncomment the following two lines to use C implementations of chosen 1.282 +-- functions and to disable garbage collection during the request, to 1.283 +-- increase speed: 1.284 +-- ------------------------------------------------------------------------ 1.285 +-- require 'webmcp_accelerator' 1.286 +-- if cgi then collectgarbage("stop") end 1.287 + 1.288 + 1.289 +-- ======================================================================== 1.290 +-- Do main initialisation (DO NOT REMOVE FOLLOWING SECTION) 1.291 +-- ======================================================================== 1.292 + 1.293 +execute.config("init")