liquid_feedback_frontend

annotate config/default.lua @ 286:c587d8762e62

Registration process updated for Core 2.0, lockable member fields, notification settings
author bsw
date Sat Feb 25 11:51:37 2012 +0100 (2012-02-25)
parents 7196685f9dd7
children 07dc88da30cb
rev   line source
bsw/jbe@0 1 config.app_name = "LiquidFeedback"
bsw@226 2 config.app_version = "beta33"
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
jbe@232 12 config.use_terms = "=== Terms of Use ===\nNothing is allowed."
bsw@79 13 --config.use_terms_html = ""
bsw@79 14
bsw@79 15 config.use_terms_checkboxes = {
bsw@79 16 {
jbe@232 17 name = "terms_of_use_v1",
jbe@232 18 html = "I accept the terms of use.",
jbe@232 19 not_accepted_error = "You have to accept the terms of use to be able to register."
bsw@79 20 }
bsw@79 21 }
bsw@79 22
bsw@286 23 config.locked_profile_fields = {
bsw@286 24 field_name = true,
bsw@286 25 notify_email = true
bsw@286 26 }
bsw/jbe@6 27
bsw/jbe@52 28 config.member_image_content_type = "image/jpeg"
bsw/jbe@4 29 config.member_image_convert_func = {
bsw/jbe@4 30 avatar = function(data) return os.pfilter(data, "convert", "jpeg:-", "-thumbnail", "48x48", "jpeg:-") end,
bsw/jbe@4 31 photo = function(data) return os.pfilter(data, "convert", "jpeg:-", "-thumbnail", "240x240", "jpeg:-") end
bsw@2 32 }
bsw@2 33
bsw/jbe@4 34 config.member_image_default_file = {
bsw/jbe@4 35 avatar = "avatar.jpg",
bsw/jbe@4 36 photo = nil
bsw/jbe@4 37 }
bsw/jbe@4 38
poelzi@163 39 config.default_lang = "de"
poelzi@163 40
bsw@203 41 -- after how long is a user considered inactive and the trustee will see warning
bsw@204 42 -- notation is according to postgresql intervals
bsw@203 43 config.delegation_warning_time = '6 months'
poelzi@152 44
bsw/jbe@6 45 config.mail_subject_prefix = "[LiquidFeedback] "
bsw/jbe@6 46
bsw/jbe@4 47 config.fastpath_url_func = nil
bsw/jbe@4 48
bsw/jbe@6 49 config.download_dir = nil
bsw/jbe@6 50
bsw/jbe@6 51 config.download_use_terms = "=== Nutzungsbedingungen ===\nAlles ist verboten"
bsw/jbe@4 52
bsw@51 53 config.public_access = false -- Available options: "anonymous", "pseudonym"
bsw@51 54
bsw@186 55 config.api_enabled = true
bsw@51 56
bsw@75 57 config.feature_rss_enabled = false -- feature is broken
bsw/jbe@52 58
bsw@271 59 config.single_unit_id = false
bsw@261 60
bsw@51 61 -- OpenID authentication is not fully implemented yet, DO NOT USE BEFORE THIS NOTICE HAS BEEN REMOVED!
bsw@51 62 config.auth_openid_enabled = false
bsw@51 63 config.auth_openid_https_as_default = true
bsw@51 64 config.auth_openid_identifier_check_func = function(uri) return false end
bsw@51 65
bsw/jbe@19 66 request.set_allowed_json_request_slots{ "title", "actions", "support", "default", "trace", "system_error" }
bsw/jbe@19 67
bsw@51 68
bsw/jbe@19 69 if request.get_json_request_slots() then
bsw/jbe@19 70 request.force_absolute_baseurl()
bsw/jbe@19 71 end
bsw@8 72
bsw@8 73 request.set_404_route{ module = 'index', view = '404' }
bsw@8 74
bsw/jbe@0 75 -- uncomment the following two lines to use C implementations of chosen
bsw/jbe@0 76 -- functions and to disable garbage collection during the request, to
bsw/jbe@0 77 -- increase speed:
bsw/jbe@0 78 --
bsw/jbe@0 79 -- require 'webmcp_accelerator'
bsw/jbe@0 80 -- collectgarbage("stop")
bsw/jbe@0 81
bsw/jbe@0 82 -- open and set default database handle
bsw/jbe@0 83 db = assert(mondelefant.connect{
bsw/jbe@0 84 engine='postgresql',
bsw@273 85 dbname='liquid_feedback_p'
bsw/jbe@0 86 })
bsw/jbe@0 87 at_exit(function()
bsw/jbe@0 88 db:close()
bsw/jbe@0 89 end)
bsw/jbe@0 90 function mondelefant.class_prototype:get_db_conn() return db end
bsw/jbe@0 91
bsw/jbe@0 92 -- enable output of SQL commands in trace system
bsw/jbe@0 93 function db:sql_tracer(command)
bsw/jbe@0 94 return function(error_info)
bsw/jbe@0 95 local error_info = error_info or {}
bsw/jbe@0 96 trace.sql{ command = command, error_position = error_info.position }
bsw/jbe@0 97 end
bsw/jbe@0 98 end
bsw/jbe@0 99
bsw/jbe@6 100 request.set_absolute_baseurl(config.absolute_base_url)
bsw/jbe@0 101
bsw/jbe@0 102
bsw/jbe@0 103
bsw@2 104 -- TODO abstraction
bsw/jbe@0 105 -- get record by id
bsw/jbe@0 106 function mondelefant.class_prototype:by_id(id)
bsw/jbe@0 107 local selector = self:new_selector()
bsw/jbe@0 108 selector:add_where{ 'id = ?', id }
bsw/jbe@0 109 selector:optional_object_mode()
bsw/jbe@0 110 return selector:exec()
bsw/jbe@0 111 end
bsw/jbe@0 112
bsw@2 113

Impressum / About Us