File: commentsize.rb

package info (click to toggle)
tdiary-contrib 5.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,772 kB
  • sloc: ruby: 17,305; javascript: 8,263; lisp: 562; xml: 451; php: 61; sql: 40; makefile: 18
file content (12 lines) | stat: -rw-r--r-- 374 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
add_conf_proc( 'comment_size' , @comment_size_conf, 'security') do
	if @mode == 'saveconf' then
		@conf['comment.size'] = @cgi.params['comment.size'][0]
	end
	@conf['comment.size'] = 0 unless @conf['comment.size']

	result = <<-HTML
	<h3>#{@comment_size}</h3>
	<p>#{@comment_size_desc}</p>
	<p><input name="comment.size" value="#{@conf['comment.size']}">Bytes</p>
	HTML
end