liquid_feedback_frontend

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

Impressum / About Us