FrontPage

準備

開発元 http://i.loveruby.net/w/tdiarysearch.html のページからソースを取得。 今回は開発版を選んだ。

cvs -d :pserver:anonymous@cvs.tdiary.sf.net:/cvsroot/tdiary co contrib/util/tdiarysearch

設置

home/d/_USER_/search.cgi に次のスクリプトを置き chmod 710 。

#!/virtual/_IP_ADDRSSS_/cgi-bin/ruby/bin/ruby
require '/virtual/_IP_ADDRESS_/cgi-bin/tdiary/search.rb'

search.rb に以下の変更をしてcgi-bin/tdiary に置く。

*** /home/tito/w/cvs.sourcehorge.net/tdiary/contrib/util/tdiarysearch/search.rb	Mon Feb 16 22:51:01 2004
--- search.rb	Tue Mar  2 08:15:01 2004
***************
*** 17,23 ****
  # Static Configurations
  #
  
! LOGGING = false
  LOGFILE_NAME = 'search.log'
  DEBUG = $DEBUG
  
--- 17,23 ----
  # Static Configurations
  #
  
! LOGGING = true
  LOGFILE_NAME = 'search.log'
  DEBUG = $DEBUG
  
***************
*** 36,43 ****
      <meta http-equiv="Content-Type" content="text/html; charset=euc-jp">
      <meta http-equiv="Content-Language" content="ja-JP">
      <meta name="robots" content="noindex">
!     <link rel="stylesheet" href="theme/base.css" type="text/css" media="all">
!     <link rel="stylesheet" href="theme/<%= theme %>/<%= theme %>.css" title="<%= theme %>" type="text/css" media="all">
      <title>tDiary Search</title>
    </head>
    <body>
--- 36,43 ----
      <meta http-equiv="Content-Type" content="text/html; charset=euc-jp">
      <meta http-equiv="Content-Language" content="ja-JP">
      <meta name="robots" content="noindex">
!     <link rel="stylesheet" href="../../tito/d/theme/base.css" type="text/css" media="all">
!     <link rel="stylesheet" href="../../tito/d/theme/tito-sky/tito-sky.css" title="<%= theme %>" type="text/css" media="all">
      <title>tDiary Search</title>
    </head>
    <body>
***************
*** 49,55 ****
  EOS
  
  SEARCH_FORM = unindent(<<"EOS", 2)
!   <form method="post" action="#{File.basename(__FILE__)}">
    <input type="text" name="q" size="20" value="<%= patterns.map {|re| escape(re.source) }.join(' ') %>">
    <input type="submit" value="Search">
    <%
--- 49,55 ----
  EOS
  
  SEARCH_FORM = unindent(<<"EOS", 2)
!   <form method="post" action="search.cgi">
    <input type="text" name="q" size="20" value="<%= patterns.map {|re| escape(re.source) }.join(' ') %>">
    <input type="submit" value="Search">
    <%

問題点

ユーザーごとのテーマが反映されない。

ログ

perl -pe 's/^([0-9][0-9]*):/localtime($1).":"/e;s/\\([0-9][0-9]*)/pack("C",oct($1))/eg' < search.log

トップ   差分 バックアップ リロード   一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2010-02-16 (火) 11:41:49 (5177d)