liquid_feedback_frontend
annotate config/default.lua @ 5:afd9f769c7ae
Version beta1
Final voting with Schulze-Method is now possible
Many bug fixes and code cleanup
Registration with invite codes
More sort and filter options
Seperated display of "supporters" and "potential supporters"
Optical changes
Flood limit / initiative contigent is now checked by frontend
Neccessary changes to access core beta11
Final voting with Schulze-Method is now possible
Many bug fixes and code cleanup
Registration with invite codes
More sort and filter options
Seperated display of "supporters" and "potential supporters"
Optical changes
Flood limit / initiative contigent is now checked by frontend
Neccessary changes to access core beta11
| author | bsw/jbe | 
|---|---|
| date | Fri Dec 25 12:00:00 2009 +0100 (2009-12-25) | 
| parents | 80c215dbf076 | 
| children | 8d91bccab0bf | 
| rev | line source | 
|---|---|
| bsw/jbe@0 | 1 config.app_name = "LiquidFeedback" | 
| bsw/jbe@5 | 2 config.app_version = "beta1" | 
| 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 |