Sha256: 74566101597031b72c62ced76f6293c6f561deaba440750a032e598b596f278c

Contents?: true

Size: 1.03 KB

Versions: 46

Compression:

Stored size: 1.03 KB

Contents

# -*- 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

Version data entries

46 entries across 40 versions & 2 rubygems

Version Path
tdiary-contrib-5.3.0 plugin/zenback.rb
tdiary-contrib-5.2.4 plugin/zenback.rb
tdiary-contrib-5.2.3 plugin/zenback.rb
tdiary-contrib-5.2.2 plugin/zenback.rb
tdiary-contrib-5.2.1 plugin/zenback.rb
tdiary-contrib-5.2.0 plugin/zenback.rb
tdiary-contrib-5.1.7 plugin/zenback.rb
tdiary-contrib-5.1.6 plugin/zenback.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/tdiary-contrib-5.1.4/plugin/zenback.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/bundler/gems/tdiary-contrib-d1e41204db13/plugin/zenback.rb
tdiary-contrib-5.1.5 plugin/zenback.rb
tdiary-5.1.5 vendor/bundle/ruby/3.0.0/gems/tdiary-contrib-5.1.4/plugin/zenback.rb
tdiary-contrib-5.1.4 plugin/zenback.rb
tdiary-contrib-5.1.3 plugin/zenback.rb
tdiary-contrib-5.1.2 plugin/zenback.rb
tdiary-contrib-5.1.1 plugin/zenback.rb
tdiary-contrib-5.1.0 plugin/zenback.rb
tdiary-contrib-5.0.13 plugin/zenback.rb
tdiary-contrib-5.0.12 plugin/zenback.rb
tdiary-contrib-5.0.11 plugin/zenback.rb