liquid_feedback_frontend
view config/default.lua @ 150:eaf3db89a6e1
implement initiative pager in content_navigation
this allows you to swtich between the initiatives very quickly
this allows you to swtich between the initiatives very quickly
author | Daniel Poelzleithner <poelzi@poelzi.org> |
---|---|
date | Fri Oct 08 04:29:20 2010 +0200 (2010-10-08) |
parents | 034f96181e59 |
children | ccdf197b3f9b |
line source
1 config.app_name = "LiquidFeedback"
2 config.app_version = "beta28"
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.footer_html = '<a href="somewhere">some link</a>'
12 config.use_terms = "=== Nutzungsbedingungen ===\nAlles ist verboten"
13 --config.use_terms_html = ""
15 config.use_terms_checkboxes = {
16 {
17 name = "nutzungsbedingungen_v1",
18 html = "Ich akzeptiere die Bedingungen.",
19 not_accepted_error = "Du musst die Bedingungen akzeptieren, um dich zu registrieren."
20 }
21 }
24 config.member_image_content_type = "image/jpeg"
25 config.member_image_convert_func = {
26 avatar = function(data) return os.pfilter(data, "convert", "jpeg:-", "-thumbnail", "48x48", "jpeg:-") end,
27 photo = function(data) return os.pfilter(data, "convert", "jpeg:-", "-thumbnail", "240x240", "jpeg:-") end
28 }
30 config.member_image_default_file = {
31 avatar = "avatar.jpg",
32 photo = nil
33 }
35 config.auto_support = true
37 config.mail_subject_prefix = "[LiquidFeedback] "
39 config.fastpath_url_func = nil
41 config.download_dir = nil
43 config.download_use_terms = "=== Nutzungsbedingungen ===\nAlles ist verboten"
45 config.public_access = false -- Available options: "anonymous", "pseudonym"
47 config.api_enabled = false
49 config.feature_rss_enabled = false -- feature is broken
51 -- OpenID authentication is not fully implemented yet, DO NOT USE BEFORE THIS NOTICE HAS BEEN REMOVED!
52 config.auth_openid_enabled = false
53 config.auth_openid_https_as_default = true
54 config.auth_openid_identifier_check_func = function(uri) return false end
56 request.set_allowed_json_request_slots{ "title", "actions", "support", "default", "trace", "system_error" }
59 if request.get_json_request_slots() then
60 request.force_absolute_baseurl()
61 end
63 request.set_404_route{ module = 'index', view = '404' }
65 -- uncomment the following two lines to use C implementations of chosen
66 -- functions and to disable garbage collection during the request, to
67 -- increase speed:
68 --
69 -- require 'webmcp_accelerator'
70 -- collectgarbage("stop")
72 -- open and set default database handle
73 db = assert(mondelefant.connect{
74 engine='postgresql',
75 dbname='liquid_feedback'
76 })
77 at_exit(function()
78 db:close()
79 end)
80 function mondelefant.class_prototype:get_db_conn() return db end
82 -- enable output of SQL commands in trace system
83 function db:sql_tracer(command)
84 return function(error_info)
85 local error_info = error_info or {}
86 trace.sql{ command = command, error_position = error_info.position }
87 end
88 end
90 request.set_absolute_baseurl(config.absolute_base_url)
94 -- TODO abstraction
95 -- get record by id
96 function mondelefant.class_prototype:by_id(id)
97 local selector = self:new_selector()
98 selector:add_where{ 'id = ?', id }
99 selector:optional_object_mode()
100 return selector:exec()
101 end