liquid_feedback_frontend
annotate config/default.lua @ 81:134fce4bede3
Cache for rendered wiki texts; Accountless API keys; Reverse id order for initiative API
- Support for caching html version of drafts
- Using pre-rendered html versions of help messages
- Added Support for api keys not connected to an account
- Added order option "id_desc" to initiative API
- Support for caching html version of drafts
- Using pre-rendered html versions of help messages
- Added Support for api keys not connected to an account
- Added order option "id_desc" to initiative API
author | bsw |
---|---|
date | Sat Jul 24 17:22:05 2010 +0200 (2010-07-24) |
parents | 26c8177ef348 |
children | 1f06b1f97c60 |
rev | line source |
---|---|
bsw/jbe@0 | 1 config.app_name = "LiquidFeedback" |
bsw@81 | 2 config.app_version = "beta22" |
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/jbe@6 | 10 config.use_terms = "=== Nutzungsbedingungen ===\nAlles ist verboten" |
bsw@79 | 11 --config.use_terms_html = "" |
bsw@79 | 12 |
bsw@79 | 13 config.use_terms_checkboxes = { |
bsw@79 | 14 { |
bsw@79 | 15 name = "nutzungsbedingungen_v1", |
bsw@79 | 16 html = "Ich akzeptiere die Bedingungen.", |
bsw@79 | 17 not_accepted_error = "Du musst die Bedingungen akzeptieren, um dich zu registrieren." |
bsw@79 | 18 } |
bsw@79 | 19 } |
bsw@79 | 20 |
bsw/jbe@6 | 21 |
bsw/jbe@52 | 22 config.member_image_content_type = "image/jpeg" |
bsw/jbe@4 | 23 config.member_image_convert_func = { |
bsw/jbe@4 | 24 avatar = function(data) return os.pfilter(data, "convert", "jpeg:-", "-thumbnail", "48x48", "jpeg:-") end, |
bsw/jbe@4 | 25 photo = function(data) return os.pfilter(data, "convert", "jpeg:-", "-thumbnail", "240x240", "jpeg:-") end |
bsw@2 | 26 } |
bsw@2 | 27 |
bsw/jbe@4 | 28 config.member_image_default_file = { |
bsw/jbe@4 | 29 avatar = "avatar.jpg", |
bsw/jbe@4 | 30 photo = nil |
bsw/jbe@4 | 31 } |
bsw/jbe@4 | 32 |
bsw/jbe@6 | 33 config.mail_subject_prefix = "[LiquidFeedback] " |
bsw/jbe@6 | 34 |
bsw/jbe@4 | 35 config.fastpath_url_func = nil |
bsw/jbe@4 | 36 |
bsw/jbe@6 | 37 config.download_dir = nil |
bsw/jbe@6 | 38 |
bsw/jbe@6 | 39 config.download_use_terms = "=== Nutzungsbedingungen ===\nAlles ist verboten" |
bsw/jbe@4 | 40 |
bsw@51 | 41 config.public_access = false -- Available options: "anonymous", "pseudonym" |
bsw@51 | 42 |
bsw@51 | 43 config.api_enabled = false |
bsw@51 | 44 |
bsw@75 | 45 config.feature_rss_enabled = false -- feature is broken |
bsw/jbe@52 | 46 |
bsw@51 | 47 -- OpenID authentication is not fully implemented yet, DO NOT USE BEFORE THIS NOTICE HAS BEEN REMOVED! |
bsw@51 | 48 config.auth_openid_enabled = false |
bsw@51 | 49 config.auth_openid_https_as_default = true |
bsw@51 | 50 config.auth_openid_identifier_check_func = function(uri) return false end |
bsw@51 | 51 |
bsw/jbe@19 | 52 request.set_allowed_json_request_slots{ "title", "actions", "support", "default", "trace", "system_error" } |
bsw/jbe@19 | 53 |
bsw@51 | 54 |
bsw/jbe@19 | 55 if request.get_json_request_slots() then |
bsw/jbe@19 | 56 request.force_absolute_baseurl() |
bsw/jbe@19 | 57 end |
bsw@8 | 58 |
bsw@8 | 59 request.set_404_route{ module = 'index', view = '404' } |
bsw@8 | 60 |
bsw/jbe@0 | 61 -- uncomment the following two lines to use C implementations of chosen |
bsw/jbe@0 | 62 -- functions and to disable garbage collection during the request, to |
bsw/jbe@0 | 63 -- increase speed: |
bsw/jbe@0 | 64 -- |
bsw/jbe@0 | 65 -- require 'webmcp_accelerator' |
bsw/jbe@0 | 66 -- collectgarbage("stop") |
bsw/jbe@0 | 67 |
bsw/jbe@0 | 68 -- open and set default database handle |
bsw/jbe@0 | 69 db = assert(mondelefant.connect{ |
bsw/jbe@0 | 70 engine='postgresql', |
bsw/jbe@0 | 71 dbname='liquid_feedback' |
bsw/jbe@0 | 72 }) |
bsw/jbe@0 | 73 at_exit(function() |
bsw/jbe@0 | 74 db:close() |
bsw/jbe@0 | 75 end) |
bsw/jbe@0 | 76 function mondelefant.class_prototype:get_db_conn() return db end |
bsw/jbe@0 | 77 |
bsw/jbe@0 | 78 -- enable output of SQL commands in trace system |
bsw/jbe@0 | 79 function db:sql_tracer(command) |
bsw/jbe@0 | 80 return function(error_info) |
bsw/jbe@0 | 81 local error_info = error_info or {} |
bsw/jbe@0 | 82 trace.sql{ command = command, error_position = error_info.position } |
bsw/jbe@0 | 83 end |
bsw/jbe@0 | 84 end |
bsw/jbe@0 | 85 |
bsw/jbe@6 | 86 request.set_absolute_baseurl(config.absolute_base_url) |
bsw/jbe@0 | 87 |
bsw/jbe@0 | 88 |
bsw/jbe@0 | 89 |
bsw@2 | 90 -- TODO abstraction |
bsw/jbe@0 | 91 -- get record by id |
bsw/jbe@0 | 92 function mondelefant.class_prototype:by_id(id) |
bsw/jbe@0 | 93 local selector = self:new_selector() |
bsw/jbe@0 | 94 selector:add_where{ 'id = ?', id } |
bsw/jbe@0 | 95 selector:optional_object_mode() |
bsw/jbe@0 | 96 return selector:exec() |
bsw/jbe@0 | 97 end |
bsw/jbe@0 | 98 |
bsw@2 | 99 |