liquid_feedback_frontend

annotate config/default.lua @ 150:eaf3db89a6e1

implement initiative pager in content_navigation

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
rev   line source
bsw/jbe@0 1 config.app_name = "LiquidFeedback"
bsw@101 2 config.app_version = "beta28"
bsw/jbe@0 3
bsw/jbe@0 4 config.app_title = config.app_name .. " (" .. request.get_config_name() .. " environment)"
bsw/jbe@0 5
bsw/jbe@4 6 config.app_logo = nil
bsw/jbe@4 7
bsw/jbe@0 8 config.app_service_provider = "Snake Oil<br/>10000 Berlin<br/>Germany"
bsw/jbe@0 9
bsw@88 10 --config.footer_html = '<a href="somewhere">some link</a>'
bsw@88 11
bsw/jbe@6 12 config.use_terms = "=== Nutzungsbedingungen ===\nAlles ist verboten"
bsw@79 13 --config.use_terms_html = ""
bsw@79 14
bsw@79 15 config.use_terms_checkboxes = {
bsw@79 16 {
bsw@79 17 name = "nutzungsbedingungen_v1",
bsw@79 18 html = "Ich akzeptiere die Bedingungen.",
bsw@79 19 not_accepted_error = "Du musst die Bedingungen akzeptieren, um dich zu registrieren."
bsw@79 20 }
bsw@79 21 }
bsw@79 22
bsw/jbe@6 23
bsw/jbe@52 24 config.member_image_content_type = "image/jpeg"
bsw/jbe@4 25 config.member_image_convert_func = {
bsw/jbe@4 26 avatar = function(data) return os.pfilter(data, "convert", "jpeg:-", "-thumbnail", "48x48", "jpeg:-") end,
bsw/jbe@4 27 photo = function(data) return os.pfilter(data, "convert", "jpeg:-", "-thumbnail", "240x240", "jpeg:-") end
bsw@2 28 }
bsw@2 29
bsw/jbe@4 30 config.member_image_default_file = {
bsw/jbe@4 31 avatar = "avatar.jpg",
bsw/jbe@4 32 photo = nil
bsw/jbe@4 33 }
bsw/jbe@4 34
poelzi@148 35 config.auto_support = true
poelzi@148 36
bsw/jbe@6 37 config.mail_subject_prefix = "[LiquidFeedback] "
bsw/jbe@6 38
bsw/jbe@4 39 config.fastpath_url_func = nil
bsw/jbe@4 40
bsw/jbe@6 41 config.download_dir = nil
bsw/jbe@6 42
bsw/jbe@6 43 config.download_use_terms = "=== Nutzungsbedingungen ===\nAlles ist verboten"
bsw/jbe@4 44
bsw@51 45 config.public_access = false -- Available options: "anonymous", "pseudonym"
bsw@51 46
bsw@51 47 config.api_enabled = false
bsw@51 48
bsw@75 49 config.feature_rss_enabled = false -- feature is broken
bsw/jbe@52 50
bsw@51 51 -- OpenID authentication is not fully implemented yet, DO NOT USE BEFORE THIS NOTICE HAS BEEN REMOVED!
bsw@51 52 config.auth_openid_enabled = false
bsw@51 53 config.auth_openid_https_as_default = true
bsw@51 54 config.auth_openid_identifier_check_func = function(uri) return false end
bsw@51 55
bsw/jbe@19 56 request.set_allowed_json_request_slots{ "title", "actions", "support", "default", "trace", "system_error" }
bsw/jbe@19 57
bsw@51 58
bsw/jbe@19 59 if request.get_json_request_slots() then
bsw/jbe@19 60 request.force_absolute_baseurl()
bsw/jbe@19 61 end
bsw@8 62
bsw@8 63 request.set_404_route{ module = 'index', view = '404' }
bsw@8 64
bsw/jbe@0 65 -- uncomment the following two lines to use C implementations of chosen
bsw/jbe@0 66 -- functions and to disable garbage collection during the request, to
bsw/jbe@0 67 -- increase speed:
bsw/jbe@0 68 --
bsw/jbe@0 69 -- require 'webmcp_accelerator'
bsw/jbe@0 70 -- collectgarbage("stop")
bsw/jbe@0 71
bsw/jbe@0 72 -- open and set default database handle
bsw/jbe@0 73 db = assert(mondelefant.connect{
bsw/jbe@0 74 engine='postgresql',
bsw/jbe@0 75 dbname='liquid_feedback'
bsw/jbe@0 76 })
bsw/jbe@0 77 at_exit(function()
bsw/jbe@0 78 db:close()
bsw/jbe@0 79 end)
bsw/jbe@0 80 function mondelefant.class_prototype:get_db_conn() return db end
bsw/jbe@0 81
bsw/jbe@0 82 -- enable output of SQL commands in trace system
bsw/jbe@0 83 function db:sql_tracer(command)
bsw/jbe@0 84 return function(error_info)
bsw/jbe@0 85 local error_info = error_info or {}
bsw/jbe@0 86 trace.sql{ command = command, error_position = error_info.position }
bsw/jbe@0 87 end
bsw/jbe@0 88 end
bsw/jbe@0 89
bsw/jbe@6 90 request.set_absolute_baseurl(config.absolute_base_url)
bsw/jbe@0 91
bsw/jbe@0 92
bsw/jbe@0 93
bsw@2 94 -- TODO abstraction
bsw/jbe@0 95 -- get record by id
bsw/jbe@0 96 function mondelefant.class_prototype:by_id(id)
bsw/jbe@0 97 local selector = self:new_selector()
bsw/jbe@0 98 selector:add_where{ 'id = ?', id }
bsw/jbe@0 99 selector:optional_object_mode()
bsw/jbe@0 100 return selector:exec()
bsw/jbe@0 101 end
bsw/jbe@0 102
bsw@2 103

Impressum / About Us