liquid_feedback_frontend

view config/default.lua @ 69:c553898f64cb

Moved motd from locale/motd/*-files to configuration setting
author bsw
date Fri Apr 23 14:13:08 2010 +0200 (2010-04-23)
parents 7bc629bc1c20
children 733f65c0c0a0
line source
1 config.app_name = "LiquidFeedback"
2 config.app_version = "beta18"
4 config.app_title = config.app_name .. " (" .. request.get_config_name() .. " environment)"
6 config.app_logo = nil
8 config.app_service_provider = "Snake Oil<br/>10000 Berlin<br/>Germany"
10 config.use_terms = "=== Nutzungsbedingungen ===\nAlles ist verboten"
12 config.member_image_content_type = "image/jpeg"
13 config.member_image_convert_func = {
14 avatar = function(data) return os.pfilter(data, "convert", "jpeg:-", "-thumbnail", "48x48", "jpeg:-") end,
15 photo = function(data) return os.pfilter(data, "convert", "jpeg:-", "-thumbnail", "240x240", "jpeg:-") end
16 }
18 config.member_image_default_file = {
19 avatar = "avatar.jpg",
20 photo = nil
21 }
23 config.mail_subject_prefix = "[LiquidFeedback] "
25 config.fastpath_url_func = nil
27 config.download_dir = nil
29 config.download_use_terms = "=== Nutzungsbedingungen ===\nAlles ist verboten"
31 config.public_access = false -- Available options: "anonymous", "pseudonym"
33 config.api_enabled = false
35 config.feature_rss_enabled = true
37 -- OpenID authentication is not fully implemented yet, DO NOT USE BEFORE THIS NOTICE HAS BEEN REMOVED!
38 config.auth_openid_enabled = false
39 config.auth_openid_https_as_default = true
40 config.auth_openid_identifier_check_func = function(uri) return false end
42 request.set_allowed_json_request_slots{ "title", "actions", "support", "default", "trace", "system_error" }
45 if request.get_json_request_slots() then
46 request.force_absolute_baseurl()
47 end
49 request.set_404_route{ module = 'index', view = '404' }
51 -- uncomment the following two lines to use C implementations of chosen
52 -- functions and to disable garbage collection during the request, to
53 -- increase speed:
54 --
55 -- require 'webmcp_accelerator'
56 -- collectgarbage("stop")
58 -- open and set default database handle
59 db = assert(mondelefant.connect{
60 engine='postgresql',
61 dbname='liquid_feedback'
62 })
63 at_exit(function()
64 db:close()
65 end)
66 function mondelefant.class_prototype:get_db_conn() return db end
68 -- enable output of SQL commands in trace system
69 function db:sql_tracer(command)
70 return function(error_info)
71 local error_info = error_info or {}
72 trace.sql{ command = command, error_position = error_info.position }
73 end
74 end
76 request.set_absolute_baseurl(config.absolute_base_url)
80 -- TODO abstraction
81 -- get record by id
82 function mondelefant.class_prototype:by_id(id)
83 local selector = self:new_selector()
84 selector:add_where{ 'id = ?', id }
85 selector:optional_object_mode()
86 return selector:exec()
87 end

Impressum / About Us