liquid_feedback_frontend
diff config/default.lua @ 729:f52f918b38b8
Cleanup of config and orphaned code
author | bsw |
---|---|
date | Thu Jun 28 17:07:00 2012 +0200 (2012-06-28) |
parents | f49cdfb72567 |
children | 2496ac5368ad |
line diff
1.1 --- a/config/default.lua Thu Jun 28 16:31:02 2012 +0200 1.2 +++ b/config/default.lua Thu Jun 28 17:07:00 2012 +0200 1.3 @@ -1,20 +1,25 @@ 1.4 - 1.5 -config.app_name = "LiquidFeedback" 1.6 -config.app_version = "2.beta12" 1.7 +--------------------------------------------------------------------------- 1.8 +-- Include defaults (DO NOT REMOVE THIS SECTION) 1.9 +--------------------------------------------------------------------------- 1.10 +execute.config("defaults") 1.11 1.12 -config.instance_name = request.get_config_name() 1.13 +--------------------------------------------------------------------------- 1.14 +-- MANDATORY CONFIG OPTIONS 1.15 +--------------------------------------------------------------------------- 1.16 1.17 -config.app_title = config.app_name .. " " .. config.instance_name 1.18 +-- Name of this instance, defaults to name of config file 1.19 +-- config.instance_name = "Instance name" 1.20 1.21 -config.app_logo = nil 1.22 - 1.23 +-- Information about service provider 1.24 +--------------------------------------------------------------------------- 1.25 config.app_service_provider = "Snake Oil<br/>10000 Berlin<br/>Germany" 1.26 1.27 ---config.footer_html = '<a href="somewhere">some link</a>' 1.28 +-- A rocketwiki formatted text the user has to accept while registering 1.29 +--------------------------------------------------------------------------- 1.30 +config.use_terms = "=== Terms of Use ===" 1.31 1.32 -config.use_terms = "=== Terms of Use ===\nNothing is allowed." 1.33 ---config.use_terms_html = "" 1.34 - 1.35 +-- Checkbox(es) the user has to accept while registering 1.36 +--------------------------------------------------------------------------- 1.37 config.use_terms_checkboxes = { 1.38 { 1.39 name = "terms_of_use_v1", 1.40 @@ -23,93 +28,76 @@ 1.41 } 1.42 } 1.43 1.44 -config.locked_profile_fields = { 1.45 - field_name = true, 1.46 -} 1.47 +--------------------------------------------------------------------------- 1.48 +-- Optional config options 1.49 +--------------------------------------------------------------------------- 1.50 1.51 -config.member_image_content_type = "image/jpeg" 1.52 -config.member_image_convert_func = { 1.53 - avatar = function(data) return extos.pfilter(data, "convert", "jpeg:-", "-thumbnail", "48x48", "jpeg:-") end, 1.54 - photo = function(data) return extos.pfilter(data, "convert", "jpeg:-", "-thumbnail", "240x240", "jpeg:-") end 1.55 -} 1.56 +-- List of enabled languages, defaults to available languages 1.57 +--------------------------------------------------------------------------- 1.58 +-- config.enabled_languages = { 'en', 'de', 'eo', 'el', 'hu' } 1.59 1.60 -config.member_image_default_file = { 1.61 - avatar = "avatar.jpg", 1.62 - photo = nil 1.63 -} 1.64 - 1.65 -config.available_languages = { 'en', 'de', 'eo', 'el', 'hu' } 1.66 - 1.67 -config.default_lang = "de" 1.68 +-- Default language, defaults to "en" 1.69 +--------------------------------------------------------------------------- 1.70 +-- config.default_lang = "en" 1.71 1.72 -- after how long is a user considered inactive and the trustee will see warning 1.73 -- notation is according to postgresql intervals 1.74 -config.delegation_warning_time = '6 months' 1.75 - 1.76 -config.mail_subject_prefix = "[LiquidFeedback] " 1.77 +--------------------------------------------------------------------------- 1.78 +-- config.delegation_warning_time = '6 months' 1.79 1.80 -config.fastpath_url_func = nil 1.81 - 1.82 -config.download_dir = nil 1.83 +-- Sender and prefix of all automatic mails, default to "[Liquid Feedback] " 1.84 +--------------------------------------------------------------------------- 1.85 +-- config.mail_subject_prefix = "[LiquidFeedback] " 1.86 +-- config.mail_envelope_from = "liquid-support@example.com" 1.87 +-- config.mail_from = "LiquidFeedback" 1.88 +-- config.mail_reply_to = "liquid-support@example.com" 1.89 1.90 -config.download_use_terms = "=== Nutzungsbedingungen ===\nAlles ist verboten" 1.91 - 1.92 -config.public_access = false -- Available options: "anonymous", "pseudonym" 1.93 +-- Supply custom url for avatar/photo delivery 1.94 +--------------------------------------------------------------------------- 1.95 +-- config.fastpath_url_func = nil 1.96 1.97 -config.api_enabled = true 1.98 +-- Local directory for database dumps offered for download 1.99 +--------------------------------------------------------------------------- 1.100 +-- config.download_dir = nil 1.101 1.102 -config.feature_rss_enabled = false -- feature is broken 1.103 +-- Special use terms for database dump download 1.104 +--------------------------------------------------------------------------- 1.105 +-- config.download_use_terms = "=== Download use terms ===\n" 1.106 1.107 -config.single_unit_id = false 1.108 +-- Set public access level 1.109 +-- Available options: false, "anonymous", "pseudonym", "full" 1.110 +--------------------------------------------------------------------------- 1.111 +-- config.public_access = "full" 1.112 1.113 --- OpenID authentication is not fully implemented yet, DO NOT USE BEFORE THIS NOTICE HAS BEEN REMOVED! 1.114 -config.auth_openid_enabled = false 1.115 -config.auth_openid_https_as_default = true 1.116 -config.auth_openid_identifier_check_func = function(uri) return false end 1.117 +-- Use custom image conversion 1.118 +--------------------------------------------------------------------------- 1.119 +--config.member_image_content_type = "image/jpeg" 1.120 +--config.member_image_convert_func = { 1.121 +-- avatar = function(data) return extos.pfilter(data, "convert", "jpeg:-", "-thumbnail", "48x48", "jpeg:-") end, 1.122 +-- photo = function(data) return extos.pfilter(data, "convert", "jpeg:-", "-thumbnail", "240x240", "jpeg:-") end 1.123 +--} 1.124 1.125 -request.set_allowed_json_request_slots{ "title", "actions", "support", "default", "trace", "system_error" } 1.126 - 1.127 +-- Integration of Etherpad 1.128 +--------------------------------------------------------------------------- 1.129 +--config.etherpad = { 1.130 +-- base_url = "http://example.com:9001/", 1.131 +-- api_base = "http://localhost:9001/", 1.132 +-- api_key = "mysecretapikey", 1.133 +-- group_id = "mygroupname", 1.134 +-- cookie_path = "/" 1.135 +--} 1.136 1.137 -if request.get_json_request_slots() then 1.138 - request.force_absolute_baseurl() 1.139 -end 1.140 - 1.141 -request.set_404_route{ module = 'index', view = '404' } 1.142 - 1.143 +-- WebMCP accelerator 1.144 +--------------------------------------------------------------------------- 1.145 -- uncomment the following two lines to use C implementations of chosen 1.146 -- functions and to disable garbage collection during the request, to 1.147 -- increase speed: 1.148 -- 1.149 -require 'webmcp_accelerator' 1.150 -collectgarbage("stop") 1.151 - 1.152 --- open and set default database handle 1.153 -db = assert(mondelefant.connect{ 1.154 - engine='postgresql', 1.155 - dbname='liquid_feedback' 1.156 -}) 1.157 -at_exit(function() 1.158 - db:close() 1.159 -end) 1.160 -function mondelefant.class_prototype:get_db_conn() return db end 1.161 - 1.162 --- enable output of SQL commands in trace system 1.163 -function db:sql_tracer(command) 1.164 - return function(error_info) 1.165 - local error_info = error_info or {} 1.166 - trace.sql{ command = command, error_position = error_info.position } 1.167 - end 1.168 -end 1.169 - 1.170 -request.set_absolute_baseurl(config.absolute_base_url) 1.171 +-- require 'webmcp_accelerator' 1.172 +-- collectgarbage("stop") 1.173 1.174 1.175 - 1.176 --- TODO abstraction 1.177 --- get record by id 1.178 -function mondelefant.class_prototype:by_id(id) 1.179 - local selector = self:new_selector() 1.180 - selector:add_where{ 'id = ?', id } 1.181 - selector:optional_object_mode() 1.182 - return selector:exec() 1.183 -end 1.184 +--------------------------------------------------------------------------- 1.185 +-- Do main initialisation (DO NOT REMOVE THIS SECTION) 1.186 +--------------------------------------------------------------------------- 1.187 +execute.config("init")