#
# tdiary.conf for Heroku
#
require 'tempfile'
@data_path = Dir.tmpdir

@style = 'Wiki'

@io_class = TDiary::IO::MongoDB
@database_url = ENV['MONGODB_URI'] || ENV['MONGOLAB_URI']

@index = './'
@update = 'update.rb'
@logger = Logger.new($stderr)

@accesskey_enabled = false
@options['bot'] = [
	'^BlogLines/',
	'^blogmap',
	'MI[CK]AN/',
	'^NG/',
	'^samidare',
	'^TAMATEBAKO/'
]

@options['apply_plugin'] = true
@options['sp.path'] = ['misc/plugin']
@options['sp.selected'] = %w(amazon.rb append-css.rb calendar2.rb comment_ajax.rb comment_mail-smtp.rb dropdown_calendar.rb footnote.rb highlight.rb html_anchor.rb jdate.rb makerss.rb kw.rb my-ex.rb select-style.rb theme_online.rb ).join("\n")

# dropdown_calendarの先頭に表示するテキスト
# @options['dropdown_calendar.label'] = '過去の日記'

@options['comment_mail.smtp_host'] = 'smtp.sendgrid.net'
@options['comment_mail.smtp_port'] = 587
@options['comment_mail.user_name'] = ENV['SENDGRID_USERNAME']
@options['comment_mail.password'] = ENV['SENDGRID_PASSWORD']
@options['comment_mail.authentication'] = :plain
@options['comment_mail.starttls'] = true

@options['amazon.access_key'] = ENV['AMAZON_ACCESS_KEY']
@options['amazon.secret_key'] = ENV['AMAZON_SECRET_KEY']

@options['spamfilter.bad_comment_patts'] = "(href=|casino|gambling|betting|fastsearch\\.eu\\.com|ganzao|poker|holdem|hold.em|roulette|drug|tramadol|viagra|fioricet|oxycontin|biaxin|aldara|business cards|home depot|slot.?machine|insurance|getblog2|video-game|Good site|internet-all\\.com|deai|tdfms|comu2|omaha)\r\n"
@options['spamfilter.bad_ip_addrs'] = ""
@options['spamfilter.bad_mail_patts'] = "(mu@alloha\\.info|mumu2004@mail\\.com|zhongleibo|dfd@12\\.com|anonimous|aol\\.|yahoo\\.|google\\.|hotmail\\.|msn\\.|leroy\\.|ablare\\.|gmx\\.|lorazepam|\\.co$)"
@options['spamfilter.bad_uri_patts'] = ""
@options['spamfilter.bad_uri_patts_for_mails'] = false
@options['spamfilter.debug_file'] = ""
@options['spamfilter.debug_mode'] = false
@options['spamfilter.filter_mode'] = true
@options['spamfilter.max_uris'] = "2"
@options['spamfilter.resolv_check'] = false
@options['spamfilter.resolv_check_mode'] = false
@options['spamlookup.domain.list'] = "bsb.spamlookup.net\r\nsc.surbl.org\r\nrbl.bulkfeeds.jp"
@options['spamlookup.safe_domain.list'] = "search.yahoo.co.jp\r\nwww.google.com\r\nwww.google.co.jp\r\nsearch.msn.co.jp"

@html_title = %Q[【日記のタイトル】]
@header = <<HEADER
<%= navi %>
<h1><%= @html_title %></h1>
<div class="main">
HEADER
@footer = <<FOOTER
</div>
<div class="sidebar">
<div style="text-align: center">
<%= calendar2 %>
<%= calendar %>
</div>
</div>
FOOTER

@date_format = '%Y年%m月%d日'
@section_anchor = '<span class="sanchor">_</span>'
@comment_anchor = '<span class="canchor">_</span>'
@latest_limit = 10
@theme = 'default'
@show_comment = true
@comment_limit = 3
@show_referer = false
@referer_day_only = true
@hour_offset = 9
@show_nyear = true

load_cgi_conf
@style = @options2['style'] if @options2 && @options2['style']
