日記
やっつけ1470footerEdit

RSSを配信したついでにmm_footerをやっつけで改造したけど、CSS周りとかいろいろ調整が必要なんで、自分で改造して使う根性がある人だけどうぞ。

add_body_leave_proc(Proc.new do |date|
oldest_date = Time.local(2005, 1, 11)
if date > oldest_date
if @mode == 'day' or @mode == 'latest'
userName = 'ishinao' # your 1470.net id
url = "http://1470.net/user/#{userName}/#{date.strftime('%Y/%m/%d')}"
rssurl = "http://1470.net/user/#{userName}/#{date.strftime('%Y/%m/%d')}/feed"
template_head = %Q[<div class="section mm_footer">\n<h3><a href="#{CGI.escapeHTML(url)}">今日のメモ</a> powered by <a href="http://1470.net/">1470.net</a></h3>\n<ul class="mm_footer">\n]
template_list = '<li>#{content.gsub(/href="\//, "href=\"http://1470.net\/")}</li>'
template_foot = "</ul>\n</div>\n"
cache_time = 3600;
if date.strftime('%Y-%m-%d') != Time.now.strftime('%Y-%m-%d')
cache_time = 3600 * 12;
end
rss_recent(rssurl, 50, cache_time, template_head, template_list, template_foot)
else
''
end
end
end)

Published At2006-07-05 00:00Updated At2006-07-05 00:00