liquid_feedback_frontend

annotate config/default.lua @ 580:878081c51189

Removed greek again for the present
author bsw
date Wed Jun 20 13:30:47 2012 +0200 (2012-06-20)
parents a06634d17718
children c4e11c003b0c
rev   line source
bsw@525 1 -- forward compatibility for webmcp 1.2
bsw@525 2 if not os.pfilter then
bsw@525 3 os.pfilter = extos.pfilter
bsw@525 4 end
bsw@525 5 if not os.listdir then
bsw@525 6 os.listdir = extos.listdir
bsw@525 7 end
bsw@525 8 if not os.crypt then
bsw@525 9 os.crypt = extos.crypt
bsw@525 10 end
bsw@525 11
bsw/jbe@0 12 config.app_name = "LiquidFeedback"
bsw@565 13 config.app_version = "2.beta10"
bsw/jbe@0 14
bsw@525 15 config.instance_name = request.get_config_name()
bsw@525 16
bsw@525 17 config.app_title = config.app_name .. " " .. config.instance_name
bsw/jbe@0 18
bsw/jbe@4 19 config.app_logo = nil
bsw/jbe@4 20
bsw/jbe@0 21 config.app_service_provider = "Snake Oil<br/>10000 Berlin<br/>Germany"
bsw/jbe@0 22
bsw@88 23 --config.footer_html = '<a href="somewhere">some link</a>'
bsw@88 24
jbe@232 25 config.use_terms = "=== Terms of Use ===\nNothing is allowed."
bsw@79 26 --config.use_terms_html = ""
bsw@79 27
bsw@79 28 config.use_terms_checkboxes = {
bsw@79 29 {
jbe@232 30 name = "terms_of_use_v1",
jbe@232 31 html = "I accept the terms of use.",
jbe@232 32 not_accepted_error = "You have to accept the terms of use to be able to register."
bsw@79 33 }
bsw@79 34 }
bsw@79 35
bsw@286 36 config.locked_profile_fields = {
bsw@286 37 field_name = true,
bsw@286 38 }
bsw/jbe@6 39
bsw/jbe@52 40 config.member_image_content_type = "image/jpeg"
bsw/jbe@4 41 config.member_image_convert_func = {
bsw/jbe@4 42 avatar = function(data) return os.pfilter(data, "convert", "jpeg:-", "-thumbnail", "48x48", "jpeg:-") end,
bsw/jbe@4 43 photo = function(data) return os.pfilter(data, "convert", "jpeg:-", "-thumbnail", "240x240", "jpeg:-") end
bsw@2 44 }
bsw@2 45
bsw/jbe@4 46 config.member_image_default_file = {
bsw/jbe@4 47 avatar = "avatar.jpg",
bsw/jbe@4 48 photo = nil
bsw/jbe@4 49 }
bsw/jbe@4 50
bsw@580 51 config.available_languages = { 'en', 'de', 'eo' }
bsw@579 52
poelzi@163 53 config.default_lang = "de"
poelzi@163 54
bsw@203 55 -- after how long is a user considered inactive and the trustee will see warning
bsw@204 56 -- notation is according to postgresql intervals
bsw@203 57 config.delegation_warning_time = '6 months'
poelzi@152 58
bsw/jbe@6 59 config.mail_subject_prefix = "[LiquidFeedback] "
bsw/jbe@6 60
bsw/jbe@4 61 config.fastpath_url_func = nil
bsw/jbe@4 62
bsw/jbe@6 63 config.download_dir = nil
bsw/jbe@6 64
bsw/jbe@6 65 config.download_use_terms = "=== Nutzungsbedingungen ===\nAlles ist verboten"
bsw/jbe@4 66
bsw@51 67 config.public_access = false -- Available options: "anonymous", "pseudonym"
bsw@51 68
bsw@186 69 config.api_enabled = true
bsw@51 70
bsw@75 71 config.feature_rss_enabled = false -- feature is broken
bsw/jbe@52 72
bsw@271 73 config.single_unit_id = false
bsw@261 74
bsw@51 75 -- OpenID authentication is not fully implemented yet, DO NOT USE BEFORE THIS NOTICE HAS BEEN REMOVED!
bsw@51 76 config.auth_openid_enabled = false
bsw@51 77 config.auth_openid_https_as_default = true
bsw@51 78 config.auth_openid_identifier_check_func = function(uri) return false end
bsw@51 79
bsw/jbe@19 80 request.set_allowed_json_request_slots{ "title", "actions", "support", "default", "trace", "system_error" }
bsw/jbe@19 81
bsw@51 82
bsw/jbe@19 83 if request.get_json_request_slots() then
bsw/jbe@19 84 request.force_absolute_baseurl()
bsw/jbe@19 85 end
bsw@8 86
bsw@8 87 request.set_404_route{ module = 'index', view = '404' }
bsw@8 88
bsw/jbe@0 89 -- uncomment the following two lines to use C implementations of chosen
bsw/jbe@0 90 -- functions and to disable garbage collection during the request, to
bsw/jbe@0 91 -- increase speed:
bsw/jbe@0 92 --
bsw@525 93 require 'webmcp_accelerator'
bsw@525 94 collectgarbage("stop")
bsw/jbe@0 95
bsw/jbe@0 96 -- open and set default database handle
bsw/jbe@0 97 db = assert(mondelefant.connect{
bsw/jbe@0 98 engine='postgresql',
bsw/jbe@0 99 dbname='liquid_feedback'
bsw/jbe@0 100 })
bsw/jbe@0 101 at_exit(function()
bsw/jbe@0 102 db:close()
bsw/jbe@0 103 end)
bsw/jbe@0 104 function mondelefant.class_prototype:get_db_conn() return db end
bsw/jbe@0 105
bsw/jbe@0 106 -- enable output of SQL commands in trace system
bsw/jbe@0 107 function db:sql_tracer(command)
bsw/jbe@0 108 return function(error_info)
bsw/jbe@0 109 local error_info = error_info or {}
bsw/jbe@0 110 trace.sql{ command = command, error_position = error_info.position }
bsw/jbe@0 111 end
bsw/jbe@0 112 end
bsw/jbe@0 113
bsw/jbe@6 114 request.set_absolute_baseurl(config.absolute_base_url)
bsw/jbe@0 115
bsw/jbe@0 116
bsw/jbe@0 117
bsw@2 118 -- TODO abstraction
bsw/jbe@0 119 -- get record by id
bsw/jbe@0 120 function mondelefant.class_prototype:by_id(id)
bsw/jbe@0 121 local selector = self:new_selector()
bsw/jbe@0 122 selector:add_where{ 'id = ?', id }
bsw/jbe@0 123 selector:optional_object_mode()
bsw/jbe@0 124 return selector:exec()
bsw/jbe@0 125 end

Impressum / About Us