liquid_feedback_frontend
annotate config/default.lua @ 4:80c215dbf076
Version alpha5
Many optical changes and improved usability
Support for different wiki-formatting-engines
Help system
Many optical changes and improved usability
Support for different wiki-formatting-engines
Help system
| author | bsw/jbe |
|---|---|
| date | Thu Dec 10 12:00:00 2009 +0100 (2009-12-10) |
| parents | 768faea1096d |
| children | afd9f769c7ae |
| rev | line source |
|---|---|
| bsw/jbe@0 | 1 config.app_name = "LiquidFeedback" |
| bsw/jbe@4 | 2 config.app_version = "alpha5" |
| 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@4 | 10 config.member_image_convert_func = { |
| bsw/jbe@4 | 11 avatar = function(data) return os.pfilter(data, "convert", "jpeg:-", "-thumbnail", "48x48", "jpeg:-") end, |
| bsw/jbe@4 | 12 photo = function(data) return os.pfilter(data, "convert", "jpeg:-", "-thumbnail", "240x240", "jpeg:-") end |
| bsw@2 | 13 } |
| bsw@2 | 14 |
| bsw/jbe@4 | 15 config.member_image_default_file = { |
| bsw/jbe@4 | 16 avatar = "avatar.jpg", |
| bsw/jbe@4 | 17 photo = nil |
| bsw/jbe@4 | 18 } |
| bsw/jbe@4 | 19 |
| bsw/jbe@4 | 20 config.fastpath_url_func = nil |
| bsw/jbe@4 | 21 |
| bsw/jbe@4 | 22 |
| bsw/jbe@0 | 23 -- uncomment the following two lines to use C implementations of chosen |
| bsw/jbe@0 | 24 -- functions and to disable garbage collection during the request, to |
| bsw/jbe@0 | 25 -- increase speed: |
| bsw/jbe@0 | 26 -- |
| bsw/jbe@0 | 27 -- require 'webmcp_accelerator' |
| bsw/jbe@0 | 28 -- collectgarbage("stop") |
| bsw/jbe@0 | 29 |
| bsw/jbe@0 | 30 -- open and set default database handle |
| bsw/jbe@0 | 31 db = assert(mondelefant.connect{ |
| bsw/jbe@0 | 32 engine='postgresql', |
| bsw/jbe@0 | 33 dbname='liquid_feedback' |
| bsw/jbe@0 | 34 }) |
| bsw/jbe@0 | 35 at_exit(function() |
| bsw/jbe@0 | 36 db:close() |
| bsw/jbe@0 | 37 end) |
| bsw/jbe@0 | 38 function mondelefant.class_prototype:get_db_conn() return db end |
| bsw/jbe@0 | 39 |
| bsw/jbe@0 | 40 -- enable output of SQL commands in trace system |
| bsw/jbe@0 | 41 function db:sql_tracer(command) |
| bsw/jbe@0 | 42 return function(error_info) |
| bsw/jbe@0 | 43 local error_info = error_info or {} |
| bsw/jbe@0 | 44 trace.sql{ command = command, error_position = error_info.position } |
| bsw/jbe@0 | 45 end |
| bsw/jbe@0 | 46 end |
| bsw/jbe@0 | 47 |
| bsw/jbe@0 | 48 -- 'request.get_relative_baseurl()' should be replaced by the absolute |
| bsw/jbe@0 | 49 -- base URL of the application, as otherwise HTTP redirects will not be |
| bsw/jbe@0 | 50 -- standard compliant |
| bsw/jbe@0 | 51 request.set_absolute_baseurl(request.get_relative_baseurl()) |
| bsw/jbe@0 | 52 |
| bsw/jbe@0 | 53 |
| bsw/jbe@0 | 54 |
| bsw@2 | 55 -- TODO abstraction |
| bsw/jbe@0 | 56 -- get record by id |
| bsw/jbe@0 | 57 function mondelefant.class_prototype:by_id(id) |
| bsw/jbe@0 | 58 local selector = self:new_selector() |
| bsw/jbe@0 | 59 selector:add_where{ 'id = ?', id } |
| bsw/jbe@0 | 60 selector:optional_object_mode() |
| bsw/jbe@0 | 61 return selector:exec() |
| bsw/jbe@0 | 62 end |
| bsw/jbe@0 | 63 |
| bsw@2 | 64 |