liquid_feedback_frontend

view config/default.lua @ 728:f49cdfb72567

Migration of extos calls from os.* to extos.* comleted
author bsw
date Thu Jun 28 16:31:02 2012 +0200 (2012-06-28)
parents df92aebce0f6
children f52f918b38b8
line source
2 config.app_name = "LiquidFeedback"
3 config.app_version = "2.beta12"
5 config.instance_name = request.get_config_name()
7 config.app_title = config.app_name .. " " .. config.instance_name
9 config.app_logo = nil
11 config.app_service_provider = "Snake Oil<br/>10000 Berlin<br/>Germany"
13 --config.footer_html = '<a href="somewhere">some link</a>'
15 config.use_terms = "=== Terms of Use ===\nNothing is allowed."
16 --config.use_terms_html = ""
18 config.use_terms_checkboxes = {
19 {
20 name = "terms_of_use_v1",
21 html = "I accept the terms of use.",
22 not_accepted_error = "You have to accept the terms of use to be able to register."
23 }
24 }
26 config.locked_profile_fields = {
27 field_name = true,
28 }
30 config.member_image_content_type = "image/jpeg"
31 config.member_image_convert_func = {
32 avatar = function(data) return extos.pfilter(data, "convert", "jpeg:-", "-thumbnail", "48x48", "jpeg:-") end,
33 photo = function(data) return extos.pfilter(data, "convert", "jpeg:-", "-thumbnail", "240x240", "jpeg:-") end
34 }
36 config.member_image_default_file = {
37 avatar = "avatar.jpg",
38 photo = nil
39 }
41 config.available_languages = { 'en', 'de', 'eo', 'el', 'hu' }
43 config.default_lang = "de"
45 -- after how long is a user considered inactive and the trustee will see warning
46 -- notation is according to postgresql intervals
47 config.delegation_warning_time = '6 months'
49 config.mail_subject_prefix = "[LiquidFeedback] "
51 config.fastpath_url_func = nil
53 config.download_dir = nil
55 config.download_use_terms = "=== Nutzungsbedingungen ===\nAlles ist verboten"
57 config.public_access = false -- Available options: "anonymous", "pseudonym"
59 config.api_enabled = true
61 config.feature_rss_enabled = false -- feature is broken
63 config.single_unit_id = false
65 -- OpenID authentication is not fully implemented yet, DO NOT USE BEFORE THIS NOTICE HAS BEEN REMOVED!
66 config.auth_openid_enabled = false
67 config.auth_openid_https_as_default = true
68 config.auth_openid_identifier_check_func = function(uri) return false end
70 request.set_allowed_json_request_slots{ "title", "actions", "support", "default", "trace", "system_error" }
73 if request.get_json_request_slots() then
74 request.force_absolute_baseurl()
75 end
77 request.set_404_route{ module = 'index', view = '404' }
79 -- uncomment the following two lines to use C implementations of chosen
80 -- functions and to disable garbage collection during the request, to
81 -- increase speed:
82 --
83 require 'webmcp_accelerator'
84 collectgarbage("stop")
86 -- open and set default database handle
87 db = assert(mondelefant.connect{
88 engine='postgresql',
89 dbname='liquid_feedback'
90 })
91 at_exit(function()
92 db:close()
93 end)
94 function mondelefant.class_prototype:get_db_conn() return db end
96 -- enable output of SQL commands in trace system
97 function db:sql_tracer(command)
98 return function(error_info)
99 local error_info = error_info or {}
100 trace.sql{ command = command, error_position = error_info.position }
101 end
102 end
104 request.set_absolute_baseurl(config.absolute_base_url)
108 -- TODO abstraction
109 -- get record by id
110 function mondelefant.class_prototype:by_id(id)
111 local selector = self:new_selector()
112 selector:add_where{ 'id = ?', id }
113 selector:optional_object_mode()
114 return selector:exec()
115 end

Impressum / About Us