liquid_feedback_frontend
diff config/example.lua @ 326:75ce92899049
Work on "config/example.lua" as complete example configuration; Removed config.absolute_base_url
author | jbe |
---|---|
date | Tue Feb 28 17:59:42 2012 +0100 (2012-02-28) |
parents | |
children | 63d6549cc00b 9447ea555398 |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/config/example.lua Tue Feb 28 17:59:42 2012 +0100 1.3 @@ -0,0 +1,127 @@ 1.4 +request.set_absolute_baseurl(request.get_relative_baseurl()) 1.5 +-- request.set_absolute_baseurl("http://www.example.com/lf/") 1.6 + 1.7 +config.app_name = "LiquidFeedback" 1.8 +config.app_version = "2.beta1" 1.9 + 1.10 +config.app_title = config.app_name .. " (" .. request.get_config_name() .. " environment)" 1.11 + 1.12 +config.app_logo = nil 1.13 + 1.14 +config.app_service_provider = "Snake Oil<br/>10000 Berlin<br/>Germany" 1.15 + 1.16 +--config.footer_html = '<a href="somewhere">some link</a>' 1.17 + 1.18 +config.use_terms = "=== Terms of Use ===\nNothing is allowed." 1.19 +--config.use_terms_html = "" 1.20 + 1.21 +config.use_terms_checkboxes = { 1.22 + { 1.23 + name = "terms_of_use_v1", 1.24 + html = "I accept the terms of use.", 1.25 + not_accepted_error = "You have to accept the terms of use to be able to register." 1.26 + } 1.27 +} 1.28 + 1.29 +config.locked_profile_fields = { 1.30 + login = false, 1.31 + notify_email = false, 1.32 + name = false, 1.33 + organizational_unit = false, 1.34 + internal_posts = false, 1.35 + realname = false, 1.36 + birthday = false, 1.37 + address = false, 1.38 + email = false 1.39 +} 1.40 + 1.41 +config.member_image_content_type = "image/jpeg" 1.42 +config.member_image_convert_func = { 1.43 + avatar = function(data) return os.pfilter(data, "convert", "jpeg:-", "-thumbnail", "48x48", "jpeg:-") end, 1.44 + photo = function(data) return os.pfilter(data, "convert", "jpeg:-", "-thumbnail", "240x240", "jpeg:-") end 1.45 +} 1.46 + 1.47 +config.member_image_default_file = { 1.48 + avatar = "avatar.jpg", 1.49 + photo = nil 1.50 +} 1.51 + 1.52 +config.default_lang = "en" 1.53 + 1.54 +-- after how long is a user considered inactive and the trustee will see warning 1.55 +-- notation is according to postgresql intervals 1.56 +config.delegation_warning_time = '6 months' 1.57 + 1.58 +config.mail_subject_prefix = "[LiquidFeedback] " 1.59 + 1.60 +config.fastpath_url_func = nil 1.61 + 1.62 +config.download_dir = nil 1.63 + 1.64 +config.download_use_terms = "=== Nutzungsbedingungen ===\nAlles ist verboten" 1.65 + 1.66 +config.public_access = false -- Available options: "anonymous", "pseudonym" 1.67 + 1.68 +config.api_enabled = true 1.69 + 1.70 +config.feature_rss_enabled = false -- feature is broken 1.71 + 1.72 +config.single_unit_id = false 1.73 + 1.74 +-- OpenID authentication is not fully implemented yet, DO NOT USE BEFORE THIS NOTICE HAS BEEN REMOVED! 1.75 +config.auth_openid_enabled = false 1.76 +config.auth_openid_https_as_default = true 1.77 +config.auth_openid_identifier_check_func = function(uri) return false end 1.78 + 1.79 +request.set_allowed_json_request_slots{ "title", "actions", "support", "default", "trace", "system_error" } 1.80 + 1.81 +if request.get_json_request_slots() then 1.82 + request.force_absolute_baseurl() 1.83 +end 1.84 + 1.85 +request.set_404_route{ module = 'index', view = '404' } 1.86 + 1.87 +-- uncomment the following two lines to use C implementations of chosen 1.88 +-- functions and to disable garbage collection during the request, to 1.89 +-- increase speed: 1.90 +-- 1.91 +-- require 'webmcp_accelerator' 1.92 +-- collectgarbage("stop") 1.93 + 1.94 +-- open and set default database handle 1.95 +db = assert(mondelefant.connect{ 1.96 + engine='postgresql', 1.97 + dbname='liquid_feedback_p' 1.98 +}) 1.99 +at_exit(function() 1.100 + db:close() 1.101 +end) 1.102 +function mondelefant.class_prototype:get_db_conn() return db end 1.103 + 1.104 +-- enable output of SQL commands in trace system 1.105 +function db:sql_tracer(command) 1.106 + return function(error_info) 1.107 + local error_info = error_info or {} 1.108 + trace.sql{ command = command, error_position = error_info.position } 1.109 + end 1.110 +end 1.111 + 1.112 + 1.113 +-- TODO abstraction 1.114 +-- get record by id 1.115 +function mondelefant.class_prototype:by_id(id) 1.116 + local selector = self:new_selector() 1.117 + selector:add_where{ 'id = ?', id } 1.118 + selector:optional_object_mode() 1.119 + return selector:exec() 1.120 +end 1.121 + 1.122 +config.formatting_engine_executeables = { 1.123 + rocketwiki= "/opt/rocketwiki-lqfb/rocketwiki-lqfb", 1.124 + compat = "/opt/rocketwiki-lqfb/rocketwiki-lqfb-compat" 1.125 +} 1.126 + 1.127 +config.fastpath_url_func = function(member_id, image_type) 1.128 + return request.get_absolute_baseurl() .. "fastpath/getpic?" .. tostring(member_id) .. "+" .. tostring(image_type) 1.129 +end 1.130 +