Sha256: b2ff2c1aa21f07e4408946fda2eab38a011a7da440d8578222c7f89acc5362f0

Contents?: true

Size: 1.01 KB

Versions: 36

Compression:

Stored size: 1.01 KB

Contents

#
# hide-mail-field.rb: Hide E-mail field in TSUKKOMI form against spams.
#
# To enable this plugin effective, you have to add '@' or '.*' into E-mail
# address field in spamfilter plugin.
#
# Copyright (C) 2007 by TADA Tadahi <sho@spc.gr.jp>
# Distributed under GPL2 or any later version.
#
add_header_proc do
	if @mode == 'day'
		<<-STYLE
		<style type="text/css"><!--
			form.comment div.mail { display: none; }
		--></style>
		STYLE
	else
		''
	end
end

add_footer_proc do
	if @mode == 'day'
		<<-SCRIPT
		<script type="text/javascript"><!--
			document.getElementsByName("mail")[0].value = "";
		//--></script>
		SCRIPT
	else
		''
	end
end

def comment_form_mobile_mail_field
	%Q|<INPUT NAME="mail" TYPE="hidden">|
end

add_conf_proc( 'hide-mail-field', @hide_mail_field_label_conf, 'security' ) do
	if @mode == 'saveconf'
		@conf['comment_description'] = @cgi.params['comment_description'][0]
	end
	hide_mail_field_conf_html
end

# Local Variables:
# mode: ruby
# indent-tabs-mode: t
# tab-width: 3
# ruby-indent-level: 3
# End:

Version data entries

36 entries across 25 versions & 1 rubygems

Version Path
tdiary-5.1.7 misc/plugin/hide-mail-field.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/tdiary-5.1.4/misc/plugin/hide-mail-field.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/misc/plugin/hide-mail-field.rb
tdiary-5.1.6 misc/plugin/hide-mail-field.rb
tdiary-5.1.5 vendor/bundle/ruby/3.0.0/gems/tdiary-5.1.4/misc/plugin/hide-mail-field.rb
tdiary-5.1.5 misc/plugin/hide-mail-field.rb
tdiary-5.1.4 misc/plugin/hide-mail-field.rb
tdiary-5.1.3 misc/plugin/hide-mail-field.rb
tdiary-5.1.2 misc/plugin/hide-mail-field.rb
tdiary-5.1.2 vendor/bundle/ruby/2.6.0/gems/tdiary-5.0.14/misc/plugin/hide-mail-field.rb
tdiary-5.1.1 vendor/bundle/ruby/2.6.0/gems/tdiary-5.0.14/misc/plugin/hide-mail-field.rb
tdiary-5.1.1 misc/plugin/hide-mail-field.rb
tdiary-5.1.0 misc/plugin/hide-mail-field.rb
tdiary-5.0.14 misc/plugin/hide-mail-field.rb
tdiary-5.0.13 misc/plugin/hide-mail-field.rb
tdiary-5.0.12.1 misc/plugin/hide-mail-field.rb
tdiary-5.0.11 misc/plugin/hide-mail-field.rb
tdiary-5.0.10 misc/plugin/hide-mail-field.rb
tdiary-5.0.9 misc/plugin/hide-mail-field.rb
tdiary-5.0.8 misc/plugin/hide-mail-field.rb