-
Notifications
You must be signed in to change notification settings - Fork 14
/
init.rb
60 lines (44 loc) · 3.01 KB
/
init.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
require_plugin 'viking'
require_plugin 'acts_as_scribe'
# require the will_paginate as a gem. This could be ´config.gem´ as well.
require "will_paginate"
Tog::Plugins.settings :tog_core, 'language.default' => "en",
'host.name' => "0.0.0.0",
'host.port' => 3000,
'site.name' => "toginstallation.com",
'mail.system_from_address' => "Tog Admin <[email protected]>",
'mail.default_subject' => "[Tog Installation] ",
'patch_field_error_proc' => true,
'pagination_size' => 50
Tog::Plugins.settings :tog_core, 'spam.engine' => '', # 'defensio' || 'akismet'
'spam.key' => '', # api key
'spam.url' => '' # url registered in spam engine
Tog::Plugins.settings :tog_core, 'sanitized.allowed_tags' => (ActionView::Base.sanitized_allowed_tags.to_a + %w( object param embed )).join(' '),
'sanitized.allowed_attributes' => (ActionView::Base.sanitized_allowed_attributes.to_a + %w( name width height value src href )).join(' '),
'sanitized.comments.allowed_tags' => ActionView::Base.sanitized_allowed_tags.to_a.join(' '),
'sanitized.comments.allowed_attributes' => ActionView::Base.sanitized_allowed_attributes.to_a.join(' ')
Tog::Plugins.settings :tog_core, 'storage' => 'filesystem',
'storage.filesystem.path' => ':rails_root/public/system/:class/:attachment/:id/:style_:basename.:extension'
# Comment out this lines to enable s3
# Tog::Plugins.settings :tog_core, 'storage' => 's3',
# 'storage.s3.path' => 'system/:class/:attachment/:id/:style_:basename.:extension',
# 'storage.s3.url' => ":s3_domain_url",
# 'storage.s3.bucket' => 'tog',
# 'storage.s3.access_key_id' => 'YOUR_KEY_HERE',
# 'storage.s3.secret_access_key' => 'YOUR_KEY_HERE'
require "active_record_helper_patch"
require "acts_as_commentable_patch"
require "reloadable_plugins_patch"
require "url_writer_retardase_inhibitor"
require "i18n" unless defined?(I18n)
Dir[File.dirname(__FILE__) + '/locale/**/*.yml'].each do |file|
I18n.load_path << file
end
Tog::Plugins.helpers CoreHelper
Tog::Interface.sections(:admin).add "Home", "/admin/dashboard"
manage = Tog::Interface.sections(:admin).add "Manage", "/admin/configuration"
manage.add_item "Configuration", "/admin/configuration"
manage.add_item "Comments", "/admin/comments"
manage.add_item "Abuses", "/admin/manage_abuses"
Tog::Interface.sections(:member).add "Home", "/"
Tog::Interface.sections(:site).add "Home", "/"