liquid_feedback_frontend

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

Impressum / About Us