liquid_feedback_frontend

view config/default.lua @ 84:1f06b1f97c60

Changed version to beta23
author bsw
date Wed Jul 28 17:21:24 2010 +0200 (2010-07-28)
parents 134fce4bede3
children 1f1f8c78ba3a
line source
1 config.app_name = "LiquidFeedback"
2 config.app_version = "beta23"
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"
11 --config.use_terms_html = ""
13 config.use_terms_checkboxes = {
14 {
15 name = "nutzungsbedingungen_v1",
16 html = "Ich akzeptiere die Bedingungen.",
17 not_accepted_error = "Du musst die Bedingungen akzeptieren, um dich zu registrieren."
18 }
19 }
22 config.member_image_content_type = "image/jpeg"
23 config.member_image_convert_func = {
24 avatar = function(data) return os.pfilter(data, "convert", "jpeg:-", "-thumbnail", "48x48", "jpeg:-") end,
25 photo = function(data) return os.pfilter(data, "convert", "jpeg:-", "-thumbnail", "240x240", "jpeg:-") end
26 }
28 config.member_image_default_file = {
29 avatar = "avatar.jpg",
30 photo = nil
31 }
33 config.mail_subject_prefix = "[LiquidFeedback] "
35 config.fastpath_url_func = nil
37 config.download_dir = nil
39 config.download_use_terms = "=== Nutzungsbedingungen ===\nAlles ist verboten"
41 config.public_access = false -- Available options: "anonymous", "pseudonym"
43 config.api_enabled = false
45 config.feature_rss_enabled = false -- feature is broken
47 -- OpenID authentication is not fully implemented yet, DO NOT USE BEFORE THIS NOTICE HAS BEEN REMOVED!
48 config.auth_openid_enabled = false
49 config.auth_openid_https_as_default = true
50 config.auth_openid_identifier_check_func = function(uri) return false end
52 request.set_allowed_json_request_slots{ "title", "actions", "support", "default", "trace", "system_error" }
55 if request.get_json_request_slots() then
56 request.force_absolute_baseurl()
57 end
59 request.set_404_route{ module = 'index', view = '404' }
61 -- uncomment the following two lines to use C implementations of chosen
62 -- functions and to disable garbage collection during the request, to
63 -- increase speed:
64 --
65 -- require 'webmcp_accelerator'
66 -- collectgarbage("stop")
68 -- open and set default database handle
69 db = assert(mondelefant.connect{
70 engine='postgresql',
71 dbname='liquid_feedback'
72 })
73 at_exit(function()
74 db:close()
75 end)
76 function mondelefant.class_prototype:get_db_conn() return db end
78 -- enable output of SQL commands in trace system
79 function db:sql_tracer(command)
80 return function(error_info)
81 local error_info = error_info or {}
82 trace.sql{ command = command, error_position = error_info.position }
83 end
84 end
86 request.set_absolute_baseurl(config.absolute_base_url)
90 -- TODO abstraction
91 -- get record by id
92 function mondelefant.class_prototype:by_id(id)
93 local selector = self:new_selector()
94 selector:add_where{ 'id = ?', id }
95 selector:optional_object_mode()
96 return selector:exec()
97 end

Impressum / About Us