liquid_feedback_frontend
diff config/init.lua @ 731:0015fa6eb637
Made config easier
author | bsw |
---|---|
date | Thu Jun 28 17:21:16 2012 +0200 (2012-06-28) |
parents | f52f918b38b8 |
children | 3a61d21618f6 |
line diff
1.1 --- a/config/init.lua Thu Jun 28 17:08:52 2012 +0200 1.2 +++ b/config/init.lua Thu Jun 28 17:21:16 2012 +0200 1.3 @@ -1,3 +1,44 @@ 1.4 +config.app_version = "2.beta12" 1.5 + 1.6 +if not config.instance_name then 1.7 + config.instance_name = request.get_config_name() 1.8 +end 1.9 + 1.10 +if 1.11 + not config.app_service_provider or 1.12 + not config.use_terms or 1.13 + not config.use_terms_checkboxes 1.14 +then 1.15 + error("Missing mandatory config option") 1.16 +end 1.17 + 1.18 +if config.enabled_languages == nil then 1.19 + config.enabled_languages = { 'en', 'de', 'eo', 'el', 'hu' } 1.20 +end 1.21 + 1.22 +if config.default_lang == nil then 1.23 + config.default_lang = "en" 1.24 +end 1.25 + 1.26 +if config.mail_subject_prefix == nil then 1.27 + config.mail_subject_prefix = "[LiquidFeedback] " 1.28 +end 1.29 + 1.30 +if config.absolute_base_url == nil then 1.31 + config.absolute_base_url = request.get_relative_baseurl() 1.32 +end 1.33 + 1.34 +if config.member_image_content_type == nil then 1.35 + config.member_image_content_type = "image/jpeg" 1.36 +end 1.37 + 1.38 +if config.member_image_convert_func == nil then 1.39 + config.member_image_convert_func = { 1.40 + avatar = function(data) return extos.pfilter(data, "convert", "jpeg:-", "-thumbnail", "48x48", "jpeg:-") end, 1.41 + photo = function(data) return extos.pfilter(data, "convert", "jpeg:-", "-thumbnail", "240x240", "jpeg:-") end 1.42 + } 1.43 +end 1.44 + 1.45 request.set_404_route{ module = 'index', view = '404' } 1.46 1.47 -- open and set default database handle