bsw@1045: -- ======================================================================== bsw@1045: -- MANDATORY (MUST BE CAREFULLY CHECKED AND PROPERLY SET!) bsw@1045: -- ======================================================================== bsw@1045: bsw@1045: -- Name of this instance, defaults to name of config file bsw@1045: -- ------------------------------------------------------------------------ bsw@1045: config.instance_name = "Public Software Group e.V." bsw@1045: bsw@1045: bsw@1045: -- Information about service provider (HTML) bsw@1045: -- ------------------------------------------------------------------------ bsw@1045: config.app_service_provider = "Snake Oil
10000 Berlin
Germany" bsw@1045: bsw@1045: bsw@1045: -- A HTML formatted text the user has to accept while registering bsw@1045: -- ------------------------------------------------------------------------ bsw@1045: config.use_terms = "

Terms of Use

Insert terms here

" bsw@1045: bsw@1045: bsw@1045: -- Checkbox(es) the user has to accept while registering bsw@1045: -- ------------------------------------------------------------------------ bsw@1045: config.use_terms_checkboxes = { bsw@1045: { bsw@1045: name = "terms_of_use_v1", bsw@1045: html = "I accept the terms of use.", bsw@1045: not_accepted_error = "You have to accept the terms of use to be able to register." bsw@1045: }, bsw@1045: -- { bsw@1045: -- name = "extra_terms_of_use_v1", bsw@1045: -- html = "I accept the extra terms of use.", bsw@1045: -- not_accepted_error = "You have to accept the extra terms of use to be able to register." bsw@1045: -- } bsw@1045: } bsw@1045: bsw@1045: bsw@1045: -- Absolute base url of application bsw@1045: -- ------------------------------------------------------------------------ bsw@1205: config.absolute_base_url = "http://10.1.11.5:8080/" bsw@1205: config.localhost = false bsw@1045: bsw@1045: bsw@1045: -- Connection information for the LiquidFeedback database bsw@1045: -- ------------------------------------------------------------------------ bsw@1139: config.database = { engine='postgresql', dbname='lf3' } bsw@1045: bsw@1045: bsw@1045: -- Location of the rocketwiki binaries bsw@1045: -- ------------------------------------------------------------------------ bsw@1045: config.enforce_formatting_engine = "markdown2" bsw@1045: bsw@1045: config.formatting_engines = { bsw@1045: { id = "markdown2", bsw@1045: name = "python-markdown2", bsw@1045: executable = "markdown2", bsw@1052: args = {'-s', 'escape', '-x', 'nofollow,wiki-tables'}, bsw@1045: remove_images = true bsw@1045: }, bsw@1045: { id = "markdown_py", bsw@1045: name = "Python Markdown", bsw@1045: executable = "markdown_py", bsw@1045: args = {'-s', 'escape', '-x', 'extra', '-x', 'nl2br', '-x', 'sane_lists'}, bsw@1045: remove_images = true bsw@1045: }, bsw@1045: { id = "rocketwiki", bsw@1045: name = "RocketWiki", bsw@1045: executable = "/opt/rocketwiki-lqfb/rocketwiki-lqfb", bsw@1045: remove_images = false bsw@1045: }, bsw@1045: { id = "compat", bsw@1045: name = "Traditional WIKI syntax", bsw@1045: executable = "/opt/rocketwiki-lqfb/rocketwiki-lqfb-compat", bsw@1045: remove_images = false bsw@1045: } bsw@1045: } bsw@1045: bsw@1045: -- Public access level bsw@1045: -- ------------------------------------------------------------------------ bsw@1045: -- Available options: bsw@1045: -- "none" bsw@1045: -- -> Closed user group, no public access at all bsw@1045: -- (except login/registration/password reset) bsw@1045: -- "anonymous" bsw@1045: -- -> Shows only initiative/suggestions texts and aggregated bsw@1045: -- supporter/voter counts bsw@1045: -- "authors_pseudonymous" bsw@1045: -- -> Like anonymous, but shows screen names of authors bsw@1045: -- "all_pseudonymous" bsw@1045: -- -> Show everything a member can see, except profile pages bsw@1045: -- "everything" bsw@1045: -- -> Show everything a member can see, including profile pages bsw@1045: -- ------------------------------------------------------------------------ bsw@1045: config.public_access = "all_pseudonymous" bsw@1045: bsw@1045: bsw@1045: bsw@1045: -- ======================================================================== bsw@1045: -- OPTIONAL bsw@1045: -- Remove leading -- to use a option bsw@1045: -- ======================================================================== bsw@1045: bsw@1045: -- List of enabled languages, defaults to available languages bsw@1045: -- ------------------------------------------------------------------------ bsw@1045: -- config.enabled_languages = { 'en', 'de', 'eo', 'el', 'hu', 'it', 'nl', 'zh-TW' } bsw@1045: bsw@1045: -- Default language, defaults to "en" bsw@1045: -- ------------------------------------------------------------------------ bsw@1045: -- config.default_lang = "de" bsw@1045: bsw@1045: -- after how long is a user considered inactive and the trustee will see warning, bsw@1045: -- notation is according to postgresql intervals, default: no warning at all bsw@1045: -- ------------------------------------------------------------------------ bsw@1045: config.delegation_warning_time = '1 hour' bsw@1045: bsw@1045: -- after which time a user is suggested to (_soft) or forced to (_hard) bsw@1045: -- confirm unit and area delegations. default: no confirmation at all bsw@1045: -- ------------------------------------------------------------------------ bsw@1045: -- config.check_delegations_interval_hard = "1 day" bsw@1045: -- config.check_delegations_interval_soft = "3 seconds" bsw@1045: bsw@1045: -- default options should be checked when confirming delegations bsw@1045: -- options: "confirm", "revoke" and "none" bsw@1045: -- ------------------------------------------------------------------------ bsw@1045: -- config.check_delegations_default = "confirm" bsw@1045: bsw@1045: -- Prefix of all automatic mails, defaults to "[Liquid Feedback] " bsw@1045: -- ------------------------------------------------------------------------ bsw@1045: -- config.mail_subject_prefix = "[LiquidFeedback] " bsw@1045: bsw@1045: -- Sender of all automatic mails, defaults to system defaults bsw@1045: -- ------------------------------------------------------------------------ bsw@1045: -- config.mail_envelope_from = "liquidfeedback@example.com" bsw@1045: -- config.mail_from = { name = "LiquidFeedback", address = "liquidfeedback@example.com" } bsw@1045: -- config.mail_reply_to = { name = "Support", address = "support@example.com" } bsw@1045: bsw@1045: -- Configuration of password hashing algorithm (defaults to "crypt_sha512") bsw@1045: -- ------------------------------------------------------------------------ bsw@1045: -- config.password_hash_algorithm = "crypt_sha512" bsw@1045: -- config.password_hash_algorithm = "crypt_sha256" bsw@1045: -- config.password_hash_algorithm = "crypt_md5" bsw@1045: bsw@1045: -- Number of rounds for crypt_sha* algorithms, minimum and maximum bsw@1045: -- (defaults to minimum 10000 and maximum 20000) bsw@1045: -- ------------------------------------------------------------------------ bsw@1045: -- config.password_hash_min_rounds = 10000 bsw@1045: -- config.password_hash_max_rounds = 20000 bsw@1045: bsw@1045: -- Supply custom url for avatar/photo delivery bsw@1045: -- ------------------------------------------------------------------------ bsw@1045: -- config.fastpath_url_func = nil bsw@1045: bsw@1045: -- Local directory for database dumps offered for download bsw@1045: -- ------------------------------------------------------------------------ bsw@1045: -- config.download_dir = nil bsw@1045: bsw@1045: -- Special use terms for database dump download bsw@1045: -- ------------------------------------------------------------------------ bsw@1045: -- config.download_use_terms = "=== Download use terms ===\n" bsw@1045: bsw@1045: -- Use custom image conversion, defaults to ImageMagick's convert bsw@1045: -- ------------------------------------------------------------------------ bsw@1045: --config.member_image_content_type = "image/jpeg" bsw@1045: --config.member_image_convert_func = { bsw@1045: -- avatar = function(data) return extos.pfilter(data, "convert", "jpeg:-", "-thumbnail", "48x48", "jpeg:-") end, bsw@1045: -- photo = function(data) return extos.pfilter(data, "convert", "jpeg:-", "-thumbnail", "240x240", "jpeg:-") end bsw@1045: --} bsw@1045: bsw@1045: config.member_image_content_type = "image/jpeg" bsw@1045: config.member_image_convert_func = { bsw@1045: avatar = function(data) return extos.pfilter(data, "convert", bsw@1045: "jpeg:-", bsw@1045: "-set", "option:distort:viewport", bsw@1045: "%[fx:min(w,h)]x%[fx:min(w,h)]+%[fx:max((w-h)/2,0)]+%[fx:max((h-w)/2,0)]", bsw@1045: "-filter", "point", bsw@1045: "-distort", "SRT", "0", bsw@1045: "+repage", bsw@1045: "-define", "filter:filter=Sinc", bsw@1045: "-define", "filter:window=Jinc", bsw@1045: "-define", "filter:lobes=3", bsw@1045: "-thumbnail", "48x48", bsw@1045: "jpeg:-" bsw@1045: ) end, bsw@1045: photo = function(data) return extos.pfilter(data, "convert", bsw@1045: "jpeg:-", bsw@1045: "-define", "filter:filter=Sinc", bsw@1045: "-define", "filter:window=Jinc", bsw@1045: "-define", "filter:lobes=3", bsw@1045: "-thumbnail", "240x240", bsw@1045: "jpeg:-" bsw@1045: ) end bsw@1045: } bsw@1045: bsw@1045: bsw@1045: -- Display a html formatted public message of the day bsw@1045: -- ------------------------------------------------------------------------ bsw@1045: -- config.motd_public = "

Message of the day (public)

The MOTD is formatted with HTML

" bsw@1045: bsw@1045: -- Display a html formatted internal message of the day bsw@1045: -- ------------------------------------------------------------------------ bsw@1045: -- config.motd_intern = "

Message of the day (intern)

The MOTD is formatted with HTML

" bsw@1045: bsw@1045: -- Automatic issue related discussion URL bsw@1045: -- ------------------------------------------------------------------------ bsw@1045: -- config.issue_discussion_url_func = function(issue) bsw@1045: -- return "http://example.com/discussion/issue_" .. tostring(issue.id) bsw@1045: -- end bsw@1045: bsw@1045: -- Configuration of "tell others" bsw@1045: -- ------------------------------------------------------------------------ bsw@1045: config.tell_others = { bsw@1045: initiative = function (initiative) bsw@1045: local text = "i" .. initiative.id .. ": " .. initiative.name .. " " .. request.get_absolute_baseurl() .. "initiative/" .. initiative.id .. ".html" bsw@1045: return { bsw@1045: { content = "tweet this initiative", external = "https://twitter.com/intent/tweet?text=" .. encode.url_part(text) }, bsw@1045: { content = "send link with e-mail", external = "mailto:?subject=" .. encode.url_part(initiative.display_name) .. "&body=" .. encode.url_part(text) } bsw@1045: } bsw@1045: end bsw@1045: } bsw@1045: bsw@1045: -- Integration of Etherpad, disabled by default bsw@1045: -- ------------------------------------------------------------------------ bsw@1045: --config.etherpad = { bsw@1045: -- base_url = "http://example.com:9001/", bsw@1045: -- api_base = "http://localhost:9001/", bsw@1045: -- api_key = "mysecretapikey", bsw@1045: -- group_id = "mygroupname", bsw@1045: -- cookie_path = "/" bsw@1045: --} bsw@1045: bsw@1045: -- Free timings, may be used together with polling policies bsw@1045: -- ------------------------------------------------------------------------ bsw@1045: -- This example expects a date string entered in the free timing field bsw@1045: -- by the user creating a poll, interpreting it as target date for then bsw@1045: -- poll and splits the remainig time at the ratio of 4:1:2 bsw@1045: -- Please note, polling policies never have an admission phase bsw@1045: bsw@1045: bsw@1045: config.free_timing = { bsw@1045: calculate_func = function(policy, timing_string) bsw@1166: local function interval_by_seconds(secs) bsw@1045: local secs_per_day = 60 * 60 * 24 bsw@1045: local days bsw@1045: days = math.floor(secs / secs_per_day) bsw@1045: secs = secs - days * secs_per_day bsw@1045: return days .. " days " .. secs .. " seconds" bsw@1045: end bsw@1045: local target_date = parse.date(timing_string, atom.date) bsw@1045: if not target_date then bsw@1045: return false bsw@1045: end bsw@1045: local target_timestamp = target_date.midday bsw@1045: local now = atom.timestamp:get_current() bsw@1045: trace.debug(target_timestamp, now) bsw@1045: local duration = target_timestamp - now bsw@1045: if duration < 0 then bsw@1045: return false bsw@1045: end bsw@1045: return { bsw@1045: discussion = interval_by_seconds(duration / 7 * 4), bsw@1045: verification = interval_by_seconds(duration / 7 * 1), bsw@1045: voting = interval_by_seconds(duration / 7 * 2) bsw@1045: } bsw@1045: end, bsw@1045: available_func = function(policy) bsw@1045: return { bsw@1045: { name = "End of 2013", id = '2013-12-31' }, bsw@1045: { name = "End of 2014", id = '2014-12-31' }, bsw@1045: { name = "End of 2015", id = '2015-12-31' } bsw@1045: } bsw@1045: end bsw@1045: } bsw@1045: bsw@1045: bsw@1045: config.enable_debug_trace = true bsw@1045: bsw@1158: config.fork = { pre = 64, max = 256, delay = 0.01 } bsw@1158: bsw@1158: bsw@1045: -- WebMCP accelerator bsw@1045: -- uncomment the following two lines to use C implementations of chosen bsw@1045: -- functions and to disable garbage collection during the request, to bsw@1045: -- increase speed: bsw@1045: -- ------------------------------------------------------------------------ bsw@1045: -- require 'webmcp_accelerator' bsw@1045: -- if cgi then collectgarbage("stop") end bsw@1045: bsw@1045: bsw@1045: -- ======================================================================== bsw@1045: -- Do main initialisation (DO NOT REMOVE FOLLOWING SECTION) bsw@1045: -- ======================================================================== bsw@1045: bsw@1045: execute.config("init")