bsw@730: -- ======================================================================== bsw@813: -- MANDATORY (MUST BE CAREFULLY CHECKED AND PROPERLY SET!) bsw@730: -- ======================================================================== bsw@525: bsw@813: -- Name of this instance, defaults to name of config file bsw@813: -- ------------------------------------------------------------------------ bsw@813: config.instance_name = "Instance name" bsw@813: bsw@813: bsw@731: -- Information about service provider (HTML) bsw@730: -- ------------------------------------------------------------------------ bsw/jbe@0: config.app_service_provider = "Snake Oil
10000 Berlin
Germany" bsw/jbe@0: bsw@813: bsw@1045: -- A HTML formatted text the user has to accept while registering bsw@730: -- ------------------------------------------------------------------------ bsw@1045: config.use_terms = "

Terms of Use

Insert terms here

" bsw@88: bsw@813: bsw@729: -- Checkbox(es) the user has to accept while registering bsw@730: -- ------------------------------------------------------------------------ bsw@79: config.use_terms_checkboxes = { bsw@79: { jbe@232: name = "terms_of_use_v1", jbe@232: html = "I accept the terms of use.", jbe@232: not_accepted_error = "You have to accept the terms of use to be able to register." bsw@734: }, bsw@734: -- { bsw@734: -- name = "extra_terms_of_use_v1", bsw@734: -- html = "I accept the extra terms of use.", bsw@734: -- not_accepted_error = "You have to accept the extra terms of use to be able to register." bsw@734: -- } bsw@79: } bsw@813: bsw@735: bsw@813: -- Absolute base url of application bsw@813: -- ------------------------------------------------------------------------ bsw@813: config.absolute_base_url = "http://example.com/" bsw@813: bsw@813: bsw@813: -- Connection information for the LiquidFeedback database bsw@813: -- ------------------------------------------------------------------------ bsw@813: config.database = { engine='postgresql', dbname='liquid_feedback' } bsw@813: bsw@813: bsw@735: -- Location of the rocketwiki binaries bsw@735: -- ------------------------------------------------------------------------ bsw@1045: config.enforce_formatting_engine = "markdown2" 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: }, bsw@1045: { id = "compat", bsw@1045: name = "Traditional WIKI syntax", bsw@1045: executable = "/opt/rocketwiki-lqfb/rocketwiki-lqfb-compat" bsw@1045: }, bsw@1045: bsw@735: } bsw@79: bsw/jbe@6: bsw@813: -- Public access level bsw@734: -- ------------------------------------------------------------------------ bsw@813: -- Available options: bsw@813: -- "none" bsw@813: -- -> Closed user group, no public access at all bsw@813: -- (except login/registration/password reset) bsw@813: -- "anonymous" bsw@813: -- -> Shows only initiative/suggestions texts and aggregated bsw@813: -- supporter/voter counts bsw@813: -- "authors_pseudonymous" bsw@813: -- -> Like anonymous, but shows screen names of authors bsw@813: -- "all_pseudonymous" bsw@813: -- -> Show everything a member can see, except profile pages bsw@813: -- "everything" bsw@813: -- -> Show everything a member can see, including profile pages bsw@813: -- ------------------------------------------------------------------------ bsw@813: config.public_access = "none" bsw@734: bsw@737: bsw@732: bsw@737: -- ======================================================================== bsw@737: -- OPTIONAL bsw@737: -- Remove leading -- to use a option bsw@737: -- ======================================================================== bsw@731: bsw@1071: -- Disable registration bsw@1071: -- ------------------------------------------------------------------------ bsw@1071: -- Available options: bsw@1071: -- false: registration is enabled (default) bsw@1071: -- true: registration is disabled bsw@1071: -- ------------------------------------------------------------------------ bsw@1071: -- config.disable_registration = true bsw@1071: bsw@729: -- List of enabled languages, defaults to available languages bsw@730: -- ------------------------------------------------------------------------ bsw@1129: -- config.enabled_languages = { 'en', 'de', 'eo', 'el', 'hu', 'it', 'ka', 'nl', 'zh-Hans', 'zh-TW' } bsw@2: bsw@729: -- Default language, defaults to "en" bsw@730: -- ------------------------------------------------------------------------ bsw@729: -- config.default_lang = "en" poelzi@163: bsw@734: -- after how long is a user considered inactive and the trustee will see warning, bsw@734: -- notation is according to postgresql intervals, default: no warning at all bsw@730: -- ------------------------------------------------------------------------ bsw@729: -- config.delegation_warning_time = '6 months' bsw/jbe@6: bsw@988: -- after which time a user is advised (_soft) or forced (_hard) to check bsw@988: -- unit and area delegations. default: no check at all bsw@988: -- ------------------------------------------------------------------------ bsw@988: -- config.check_delegations_interval_hard = "6 months" bsw@988: -- config.check_delegations_interval_soft = "3 months" bsw@988: bsw@988: -- default option when checking delegations bsw@988: -- available options: "confirm", "revoke" and "none", default: "confirm" bsw@988: -- ------------------------------------------------------------------------ bsw@988: -- config.check_delegations_default = "confirm" bsw@988: bsw@734: -- Prefix of all automatic mails, defaults to "[Liquid Feedback] " bsw@730: -- ------------------------------------------------------------------------ bsw@729: -- config.mail_subject_prefix = "[LiquidFeedback] " bsw@734: bsw@734: -- Sender of all automatic mails, defaults to system defaults bsw@734: -- ------------------------------------------------------------------------ bsw@839: -- config.mail_envelope_from = "liquidfeedback@example.com" bsw@839: -- config.mail_from = { name = "LiquidFeedback", address = "liquidfeedback@example.com" } bsw@839: -- config.mail_reply_to = { name = "Support", address = "support@example.com" } bsw/jbe@6: bsw@905: -- Configuration of password hashing algorithm (defaults to "crypt_sha512") bsw@905: -- ------------------------------------------------------------------------ bsw@905: -- config.password_hash_algorithm = "crypt_sha512" bsw@905: -- config.password_hash_algorithm = "crypt_sha256" bsw@905: -- config.password_hash_algorithm = "crypt_md5" bsw@905: bsw@905: -- Number of rounds for crypt_sha* algorithms, minimum and maximum bsw@905: -- (defaults to minimum 10000 and maximum 20000) bsw@905: -- ------------------------------------------------------------------------ bsw@905: -- config.password_hash_min_rounds = 10000 bsw@905: -- config.password_hash_max_rounds = 20000 bsw@905: bsw@905: bsw@729: -- Supply custom url for avatar/photo delivery bsw@730: -- ------------------------------------------------------------------------ bsw@729: -- config.fastpath_url_func = nil bsw@51: bsw@729: -- Local directory for database dumps offered for download bsw@730: -- ------------------------------------------------------------------------ bsw@729: -- config.download_dir = nil bsw@51: bsw@729: -- Special use terms for database dump download bsw@730: -- ------------------------------------------------------------------------ bsw@729: -- config.download_use_terms = "=== Download use terms ===\n" bsw/jbe@52: bsw@734: -- Use custom image conversion, defaults to ImageMagick's convert bsw@730: -- ------------------------------------------------------------------------ bsw@729: --config.member_image_content_type = "image/jpeg" bsw@729: --config.member_image_convert_func = { bsw@729: -- avatar = function(data) return extos.pfilter(data, "convert", "jpeg:-", "-thumbnail", "48x48", "jpeg:-") end, bsw@729: -- photo = function(data) return extos.pfilter(data, "convert", "jpeg:-", "-thumbnail", "240x240", "jpeg:-") end bsw@729: --} bsw@51: bsw@1045: -- Display a html formatted public message of the day bsw@837: -- ------------------------------------------------------------------------ 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@837: bsw@835: -- Automatic issue related discussion URL bsw@835: -- ------------------------------------------------------------------------ bsw@835: -- config.issue_discussion_url_func = function(issue) bsw@835: -- return "http://example.com/discussion/issue_" .. tostring(issue.id) bsw@835: -- end bsw@835: bsw@734: -- Integration of Etherpad, disabled by default bsw@730: -- ------------------------------------------------------------------------ bsw@729: --config.etherpad = { bsw@729: -- base_url = "http://example.com:9001/", bsw@729: -- api_base = "http://localhost:9001/", bsw@729: -- api_key = "mysecretapikey", bsw@729: -- group_id = "mygroupname", bsw@729: -- cookie_path = "/" bsw@729: --} bsw@51: bsw@961: -- Free timings bsw@961: -- ------------------------------------------------------------------------ bsw@961: -- This example expects a date string entered in the free timing field bsw@961: -- by the user creating a poll, interpreting it as target date for then bsw@961: -- poll and splits the remaining time at the ratio of 4:1:2 bsw@961: -- Please note, polling policies never have an admission phase bsw@961: -- The available_func is optional, if not set any target date is allowed bsw@961: bsw@961: config.free_timing = { bsw@961: calculate_func = function(policy, timing_string) bsw@1166: local function interval_by_seconds(secs) bsw@961: local secs_per_day = 60 * 60 * 24 bsw@961: local days bsw@961: days = math.floor(secs / secs_per_day) bsw@961: secs = secs - days * secs_per_day bsw@961: return days .. " days " .. secs .. " seconds" bsw@961: end bsw@961: local target_date = parse.date(timing_string, atom.date) bsw@961: if not target_date then bsw@961: return false bsw@961: end bsw@961: local target_timestamp = target_date.midday bsw@961: local now = atom.timestamp:get_current() bsw@961: trace.debug(target_timestamp, now) bsw@961: local duration = target_timestamp - now bsw@961: if duration < 0 then bsw@961: return false bsw@961: end bsw@961: return { bsw@961: discussion = interval_by_seconds(duration / 7 * 4), bsw@961: verification = interval_by_seconds(duration / 7 * 1), bsw@961: voting = interval_by_seconds(duration / 7 * 2) bsw@961: } bsw@961: end, bsw@961: available_func = function(policy) bsw@961: return { bsw@961: { name = "End of 2013", id = '2013-12-31' }, bsw@961: { name = "End of 2014", id = '2014-12-31' }, bsw@961: { name = "End of 2015", id = '2015-12-31' } bsw@961: } bsw@961: end bsw@961: } bsw@961: bsw@1106: -- Admin logger bsw@1106: -- ------------------------------------------------------------------------ bsw@1106: -- Logging administrative activities bsw@1106: -- disabled by default bsw@1106: bsw@1106: --[[ bsw@1106: config.admin_logger = function(params) bsw@1106: bsw@1106: local adminid = app.session.member_id bsw@1106: local adminname = app.session.member.name bsw@1107: local url = params._webmcp_path bsw@1106: bsw@1106: -- do something (e.g. calling 'logger' via extos.pfilter) bsw@1106: bsw@1106: end bsw@1106: --]] bsw@1106: bsw@1106: bsw@729: -- WebMCP accelerator bsw/jbe@0: -- uncomment the following two lines to use C implementations of chosen bsw/jbe@0: -- functions and to disable garbage collection during the request, to bsw/jbe@0: -- increase speed: bsw@730: -- ------------------------------------------------------------------------ bsw@729: -- require 'webmcp_accelerator' bsw@806: -- if cgi then collectgarbage("stop") end bsw/jbe@0: bsw@868: -- Trace debug bsw@868: -- uncomment the following line to enable debug trace bsw@868: -- config.enable_debug_trace = true bsw/jbe@0: bsw@730: -- ======================================================================== bsw@734: -- Do main initialisation (DO NOT REMOVE FOLLOWING SECTION) bsw@730: -- ======================================================================== bsw@730: bsw@729: execute.config("init")