/usr/share/tdiary/contrib/plugin/zenback.rb is in tdiary-contrib 5.0.8-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | # -*- coding: utf-8 -*-
# Copyright (C) 2011, KADO Masanori <kdmsnr@gmail.com>
# You can redistribute it and/or modify it under GPL.
def insert_zenback
return if feed?
@conf['zenback.script'] || ''
end
if @mode == 'day' and (respond_to?(:section_mode?) ? section_mode? : true)
add_title_proc do |date, title|
"#{title}<!-- zenback_date #{date.strftime '%Y-%m-%d'} -->"
end
add_body_enter_proc do
"<!-- zenback_body_begin -->"
end
if defined? add_comment_leave_proc
add_comment_leave_proc do
"<!-- zenback_body_end -->" +
insert_zenback
end
else
add_body_leave_proc do
"<!-- zenback_body_end -->" +
insert_zenback
end
end
end
add_conf_proc( 'zenback', 'zenback', 'etc' ) do
if @mode == 'saveconf' then
@conf['zenback.script'] = @cgi.params['zenback.script'][0]
end
<<-HTML
<h3>Script Code</h3>
<p><input size="88" name="zenback.script" value="#{h @conf['zenback.script']}"></p>
HTML
end
# Local Variables:
# mode: ruby
# indent-tabs-mode: t
# tab-width: 3
# ruby-indent-level: 3
# End:
# vim: ts=3
|