liquid_feedback_frontend

annotate config/default.lua @ 152:ccdf197b3f9b

add support for considering long not used accounts as broken
author Daniel Poelzleithner <poelzi@poelzi.org>
date Fri Oct 08 06:06:13 2010 +0200 (2010-10-08)
parents 034f96181e59
children 89c4f2239442
rev   line source
bsw/jbe@0 1 config.app_name = "LiquidFeedback"
bsw@101 2 config.app_version = "beta28"
bsw/jbe@0 3
bsw/jbe@0 4 config.app_title = config.app_name .. " (" .. request.get_config_name() .. " environment)"
bsw/jbe@0 5
bsw/jbe@4 6 config.app_logo = nil
bsw/jbe@4 7
bsw/jbe@0 8 config.app_service_provider = "Snake Oil<br/>10000 Berlin<br/>Germany"
bsw/jbe@0 9
bsw@88 10 --config.footer_html = '<a href="somewhere">some link</a>'
bsw@88 11
bsw/jbe@6 12 config.use_terms = "=== Nutzungsbedingungen ===\nAlles ist verboten"
bsw@79 13 --config.use_terms_html = ""
bsw@79 14
bsw@79 15 config.use_terms_checkboxes = {
bsw@79 16 {
bsw@79 17 name = "nutzungsbedingungen_v1",
bsw@79 18 html = "Ich akzeptiere die Bedingungen.",
bsw@79 19 not_accepted_error = "Du musst die Bedingungen akzeptieren, um dich zu registrieren."
bsw@79 20 }
bsw@79 21 }
bsw@79 22
bsw/jbe@6 23
bsw/jbe@52 24 config.member_image_content_type = "image/jpeg"
bsw/jbe@4 25 config.member_image_convert_func = {
bsw/jbe@4 26 avatar = function(data) return os.pfilter(data, "convert", "jpeg:-", "-thumbnail", "48x48", "jpeg:-") end,
bsw/jbe@4 27 photo = function(data) return os.pfilter(data, "convert", "jpeg:-", "-thumbnail", "240x240", "jpeg:-") end
bsw@2 28 }
bsw@2 29
bsw/jbe@4 30 config.member_image_default_file = {
bsw/jbe@4 31 avatar = "avatar.jpg",
bsw/jbe@4 32 photo = nil
bsw/jbe@4 33 }
bsw/jbe@4 34
poelzi@148 35 config.auto_support = true
poelzi@148 36
poelzi@152 37 -- after how long is a user considered inactive and the trustee will see warning
poelzi@152 38 config.delegation_warning_time = '6 weeks'
poelzi@152 39
bsw/jbe@6 40 config.mail_subject_prefix = "[LiquidFeedback] "
bsw/jbe@6 41
bsw/jbe@4 42 config.fastpath_url_func = nil
bsw/jbe@4 43
bsw/jbe@6 44 config.download_dir = nil
bsw/jbe@6 45
bsw/jbe@6 46 config.download_use_terms = "=== Nutzungsbedingungen ===\nAlles ist verboten"
bsw/jbe@4 47
bsw@51 48 config.public_access = false -- Available options: "anonymous", "pseudonym"
bsw@51 49
bsw@51 50 config.api_enabled = false
bsw@51 51
bsw@75 52 config.feature_rss_enabled = false -- feature is broken
bsw/jbe@52 53
bsw@51 54 -- OpenID authentication is not fully implemented yet, DO NOT USE BEFORE THIS NOTICE HAS BEEN REMOVED!
bsw@51 55 config.auth_openid_enabled = false
bsw@51 56 config.auth_openid_https_as_default = true
bsw@51 57 config.auth_openid_identifier_check_func = function(uri) return false end
bsw@51 58
bsw/jbe@19 59 request.set_allowed_json_request_slots{ "title", "actions", "support", "default", "trace", "system_error" }
bsw/jbe@19 60
bsw@51 61
bsw/jbe@19 62 if request.get_json_request_slots() then
bsw/jbe@19 63 request.force_absolute_baseurl()
bsw/jbe@19 64 end
bsw@8 65
bsw@8 66 request.set_404_route{ module = 'index', view = '404' }
bsw@8 67
bsw/jbe@0 68 -- uncomment the following two lines to use C implementations of chosen
bsw/jbe@0 69 -- functions and to disable garbage collection during the request, to
bsw/jbe@0 70 -- increase speed:
bsw/jbe@0 71 --
bsw/jbe@0 72 -- require 'webmcp_accelerator'
bsw/jbe@0 73 -- collectgarbage("stop")
bsw/jbe@0 74
bsw/jbe@0 75 -- open and set default database handle
bsw/jbe@0 76 db = assert(mondelefant.connect{
bsw/jbe@0 77 engine='postgresql',
bsw/jbe@0 78 dbname='liquid_feedback'
bsw/jbe@0 79 })
bsw/jbe@0 80 at_exit(function()
bsw/jbe@0 81 db:close()
bsw/jbe@0 82 end)
bsw/jbe@0 83 function mondelefant.class_prototype:get_db_conn() return db end
bsw/jbe@0 84
bsw/jbe@0 85 -- enable output of SQL commands in trace system
bsw/jbe@0 86 function db:sql_tracer(command)
bsw/jbe@0 87 return function(error_info)
bsw/jbe@0 88 local error_info = error_info or {}
bsw/jbe@0 89 trace.sql{ command = command, error_position = error_info.position }
bsw/jbe@0 90 end
bsw/jbe@0 91 end
bsw/jbe@0 92
bsw/jbe@6 93 request.set_absolute_baseurl(config.absolute_base_url)
bsw/jbe@0 94
bsw/jbe@0 95
bsw/jbe@0 96
bsw@2 97 -- TODO abstraction
bsw/jbe@0 98 -- get record by id
bsw/jbe@0 99 function mondelefant.class_prototype:by_id(id)
bsw/jbe@0 100 local selector = self:new_selector()
bsw/jbe@0 101 selector:add_where{ 'id = ?', id }
bsw/jbe@0 102 selector:optional_object_mode()
bsw/jbe@0 103 return selector:exec()
bsw/jbe@0 104 end
bsw/jbe@0 105
bsw@2 106

Impressum / About Us