[RNA]
SUPER RNA

isnot.jp/wiki [Permalink] [編集] [差分]

最終更新:2005-04-30 18:27:31

What's New

ご意見・ご感想などありましたら、お気軽にをどうぞ


カスタマイズ・メモ

CGI

rna-alliance.cgi

ハンドラ追加

 ############## Modified by naoto
 # 2004.1.28
     elsif($action =~ /sendPing/i){
     # SendPing
         &send_ping(rna=>$friend_rna_uri, rpc => $friend_rna_xmlrpc_uri, 
             blog_name => $config->{Owner}, blog_url => $config->{BaseURI});
     }
 ############## END Modified by naoto

get_date

 #   print &http_header(type=>'text/plain');
 ############## Modified by naoto
 # 2003.12.04
     print &http_header(type=>'text/html', -charset => $config->{Encoding});
 ############## END Modified by naoto

send_ping

 ############## Modified by naoto
 # 2004.2.23
 # &send_ping(rna=>$friend_rna_uri, rpc => $friend_rna_xmlrpc_uri, blog_name => $config->{Owner}, blog_url => $config->{BaseURI});
 
 sub send_ping
 {
     my %arg = @_;
     my $rna_uri = $arg{rna};
     my $rpc_uri = $arg{rpc};
     my $blog_name = $arg{blog_name};
     my $blog_url = $arg{blog_url};
     
     # HTTP header
     my $http_header = 
         $cgi->header(-type=>'text/html', -charset => $config->{Encoding});
 
     # getDate
     my $peer_last_updated = eval{XMLRPC::Lite->proxy($rpc_uri)->call('rna.getDate')->result};
     if($@) {
         &die_handler($@);
     }
 
     # 30 min. check
     require Time::Local;
     $peer_last_updated =~ /(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})/;
     my($Y, $m, $d, $H, $M, $S) = ($1, $2, $3, $4, $5, $6);
     my $delta = time() - &Time::Local::timelocal($S, $M, $H, $d, --$m, $Y);
 
     if($delta < 1800) {
         &die_handler('It seems that has just been updated. ' . $peer_last_updated);
     }
 
     # send ping
     my $result = eval{
         XMLRPC::Lite
             ->proxy($rpc_uri)
             ->call('weblogUpdates.ping' => $blog_name, $blog_url)
             ->result;
     };
     if($@) {
         &die_handler($@);
     }
 
     # print result. It looks like Debuging mode. need more?
     print $http_header . "Response ...<br />\n";
     foreach (sort keys %$result){
         print "$_ => $result->{$_}<br />\n" if defined $result->{$_};
     }
 }
 
 ############## END Modified by naoto

ライブラリ

lib/RNA/Config.pm

 my %template_element = (
 
 ############## Modified by naoto
 # 2004.1.23
 	RNARecentEntryXMLURI => $base_uri . $recent_entry_xml,
 	RNAOwner => $antenna_owner,
 ############## END Modified by naoto
 );

テンプレート

template/index_template

tDiaryテーマ準拠に変更

template/clip_template

ClipPad装備
Bookmarkletからのクエリを受け取り
Bookmarkletテンプレート
MenuExt?テンプレート

template/alliance_template

Goボタン
Pingボタン

 <form action="<$RNAAllianceCGIURI$>" method="POST" name="form1">
 <input type="hidden" name="blog_name" value="<$RNAOwner$>" />
 <input type="hidden" name="blog_uri" value="<$RNABaseURI$>" />
 <script type="text/javascript">
 function ping_window(uri,blog_name,blog_uri)
 {
	window.open('<$RNAAllianceCGIURI$>?rna_uri=' + uri + '&blog_name=' + escape(blog_name) + '&blog_uri=' + blog_uri + '&action=sendPing',
	'date', 'width=400,height=100,scrollbars=yes,resizable=yes,status=yes');
 }
 function goto_uri(uri)
 {
	location.href = uri;
 }
 </script>
 <input type="button" name="action" value="Go" alt="Go" onClick="goto_uri(this.form.rna_uri.value);"/>&nbsp;
 <input type="button" name="action" value="Ping" alt="Ping" onClick="ping_window(this.form.rna_uri.value, this.form.blog_name.value, this.form.blog_uri.value)"/>&nbsp;

template/recent_template

日付を残して全削除

template/rna_template

日付を残して全削除
テンプレートのリスト

template/js_default_template

ショートモード

CSS

XSLT

設定ファイル

登録

[FrontPage]

いしだなおと it@isnot.jp