このサイト固有の変更

Post-it: New Post-it (help)

Text color: [_][_][_][_]

Background: [_][_][_][_][_][_]

Draw Line:

x: y:

セクションの編集

mcomment

ログイン済みなら「お名前」にユーザ名をプリセット。

hao@sheeva% diff -uw act-comment.rb-20101226 act-comment.rb                                             [/usr/lib/ruby/1.8/qwik]
--- act-comment.rb-20101226     2010-12-26 14:11:58.000000000 +0900
+++ act-comment.rb      2010-12-26 14:57:47.000000000 +0900
@@ -185,7 +185,7 @@
       style = style.to_i
       style = 0 if style != 1
       action = "#{@req.base}.#{num}.#{style}.mcomment"
-      user = @req.user
+      ruser = @req.user

       content = ''
       content = yield if block_given?
@@ -219,8 +219,8 @@
        [:table,
          [:tr,
            [:th, _('Name')],
-           #[:td, [:input, {:name=>'u', :size=>'30'}]]],
-           [:td, user]],
+           [:td, [:input, {:name=>'u', :value => ruser, :size=>'30'}]]],
+           #[:td, user]],
          [:tr,
            [:th, _('Comment')],
            [:td, [:textarea, {:name=>'m', :cols=>cols, :rows=>rows}, '']]],
@@ -247,11 +247,12 @@
       style = @req.ext_args[1].to_i
       style = 0 if style != 1

-      user = MailAddress.obfuscate(@req.user)
-      if (user.nil? || user.empty?)
         user = @req.query['u']
+      if user.nil? || user.empty?
+        user = _('Anonymous')
+      else
+        user = MailAddress.obfuscate(user)
       end
-      user = _('Anonymous') if user.nil? || user.empty?

       msg = @req.query['m']
       return c_nerror(_('No message')) if msg.nil? || msg.empty?
セクションの編集

clearプラグイン

root@dti-vps-srv33# diff -uw act-file.rb-20110321 act-file.rb
--- act-file.rb-20110321        2011-03-21 14:15:35.000000000 +0900
+++ act-file.rb 2011-03-21 14:13:04.000000000 +0900
@@ -116,6 +116,10 @@
       ]]
     end
 
+    def plg_clear
+      return [:br, {:style=>"clear: both;"}] 
+    end
+
     # ============================== thumbnail
     def thumb_generate(f)
       files = @site.files(@req.base)
Last modified: 2011-03-21 by Unknown