Changeset 29781

Show
Ignore:
Timestamp:
02/09/09 21:17:40 (4 years ago)
Author:
yasuyuki
Message:

コメント率ランキングを追加

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • config/pragger/yasuyuki/template.rhtml

    r27771 r29781  
    33                <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
    44    <base href="<%= config['host'] + config['root_dir'] %>"/> 
    5     <link rel="alternate" type="application/rss+xml" title="ニコニコ動画 タグ「<%=ERB::Util.h config['tag_name'] %>」新着動画" href="<%= config['new_arrival_feed_url'] %>"> 
    6                 <title>ニコニコ動画 タグ 「<%=ERB::Util.h config['tag_name'] %>」 マイリスト率ランキング(β1)</title> 
     5    <link rel="alternate" type="application/rss+xml" title="ニコニコ動画 タグ「<%=Erubis::XmlHelper.escape_xml config['tag_name'] %>」新着動画" href="<%= config['new_arrival_feed_url'] %>"> 
     6                <title>ニコニコ動画 タグ 「<%=Erubis::XmlHelper.escape_xml config['tag_name'] %>」 
     7    <%- if group_id == 0 then -%>マイリスト率<%- else -%>コメント率<%- end -%>ランキング(β1)</title> 
    78        </head> 
    89        <body> 
    9         <div class="generated_at"><%=ERB::Util.h now.strftime("%Y/%m/%d %H:%M:%S") %> 生成</div> 
    10         <h1><a href="http://www.nicovideo.jp/">ニコニコ動画</a> タグ 「<a href="http://www.nicovideo.jp/tag/<%= CGI.escape config['tag_name'] %>"><%=ERB::Util.h config['tag_name'] %></a>」 マイリスト率ランキング(β1)</h1> 
    11         このランキングは、アップロードされてから約24時間以内のマイリスト登録率を元に生成されています。このアイデアを考え出した<a href="http://www.nicovideo.jp/tag/%E7%A7%8B%E6%9C%88%E7%8E%87%E5%AD%90P">秋月率子P</a>、そして、動画を見て、マイリストに登録してくれたすべての方に感謝します。<br/> 
     10        <div class="generated_at"><%=Erubis::XmlHelper.escape_xml now.strftime("%Y/%m/%d %H:%M:%S") %> 生成</div> 
     11        <h1><a href="http://www.nicovideo.jp/">ニコニコ動画</a> タグ 
     12  「<a href="http://www.nicovideo.jp/tag/<%= CGI.escape config['tag_name'] %>"><%=Erubis::XmlHelper.escape_xml config['tag_name'] %></a>」 
     13  <%- if group_id == 0 then -%>マイリスト率<%- else -%>コメント率<%- end -%>ランキング(β1)</h1> 
     14        このランキングは、アップロードされてから約24時間以内のマイリスト登録率/コメント率を元に生成されています。このアイデアを考え出した<a href="http://www.nicovideo.jp/tag/%E7%A7%8B%E6%9C%88%E7%8E%87%E5%AD%90P">秋月率子P</a>、そして、動画を見て、マイリストに登録してくれたすべての方に感謝します。<br/> 
    1215        <a href="http://webgames.jp:3000/projects/nicolist-rank/boards">バグ報告・機能要望はこちらへ</a> 
    1316  <a href="<%= config['new_arrival_feed_url'] %>">タグ検索新着RSS</a> 
     17  <div> 
     18                <a href="<%= today_root %>1.html">マイリスト率</a> | 
     19                <a href="<%= today_root %>4.html">コメント率</a> 
     20  </div> 
    1421        <div> 
    15                 <a href="<%= tommorow_root %>1.html"<%= page == 0 ? ' rel="prev"' : "" %>>翌日</a> | 
    16                 <a href="<%= yesterday_root %>1.html"<%= (page + 1) * config['by_page'].to_i >= rank_data.length ? ' rel="next"' : "" %>>前日</a> 
     22                <a href="<%= tommorow_root %><%= from + 1 %>.html"<%= page == 0 ? ' rel="prev"' : "" %>>翌日</a> | 
     23                <a href="<%= yesterday_root %><%= from + 1 %>.html"<%= (page + 1) * config['by_page'].to_i >= rank_data.length ? ' rel="next"' : "" %>>前日</a> 
    1724        </div> 
    1825        <div> 
    19                 <a href="<%= today_root %>1.html">1~30</a> 
    20                 <a href="<%= today_root %>2.html">31~60</a> 
    21                 <a href="<%= today_root %>3.html">61~90</a> 
     26                <a href="<%= today_root %><%= from + 1 %>.html">1~30</a> 
     27                <a href="<%= today_root %><%= from + 2 %>.html">31~60</a> 
     28                <a href="<%= today_root %><%= from + 3 %>.html">61~90</a> 
    2229        </div> 
    2330  <div class="autopagerize_page_element"> 
    2431        <%      rank_data[(page * config['by_page'].to_i) ... ((page + 1) * config['by_page'].to_i)].each_with_index do |item, i| 
    2532                                break if i >= rank_data.length %> 
    26         <div class="xfolkentry"><%=     (page * config['by_page'].to_i) + i + 1 %>位:<a href="<%= item['link'] %>" class="taggedlink description"><%=ERB::Util.h item['title'] %></a></div> 
    27         <div>再生数:<%= item['viewed'].to_i %> マイリスト数:<%= item['mylisted'].to_i %> マイリスト率:<%= (item['viewed'] == 0 ? 0 : item['mylisted'] / item['viewed']) * 100 %>%</div> 
     33        <div class="xfolkentry"><%=     (page * config['by_page'].to_i) + i + 1 %>位:<a href="<%= item['link'] %>" class="taggedlink description"><%=Erubis::XmlHelper.escape_xml item['title'] %></a></div> 
     34        <div> 
     35    再生数:<%= item['viewed'].to_i %> 
     36    コメント数:<%= item['comment_num'].to_i %> 
     37    マイリスト数:<%= item['mylisted'].to_i %> 
     38    コメント率:<%= sprintf "%4.2f", (item['viewed'] == 0 ? 0 : item['comment_num'] / item['viewed']) * 100 %>% 
     39    マイリスト率:<%= sprintf "%4.2f", (item['viewed'] == 0 ? 0 : item['mylisted'] / item['viewed']) * 100 %>% 
     40  </div> 
    2841        <iframe width="760" height="160" src="http://www.nicovideo.jp/thumb/<%= item['link'].scan(/\/([^\/]+)$/)[0] %>" scrolling="no" style="border:solid 1px #CCC;" frameborder="0"></iframe> 
    2942        <%      end %> 
    3043        </div> 
    3144        <div class="autopagerize_insert_before"> 
    32                 <a href="<%= today_root %>1.html"<%= page == 1 ? ' rel="prev"' : "" %>>1~30</a> 
    33                 <a href="<%= today_root %>2.html"<%= page == 0 && (page + 1) * config['by_page'].to_i < rank_data.length ? ' rel="next"' : "" %><%= page == 2 ? ' rel="prev"' : "" %>>31~60</a> 
    34                 <a href="<%= today_root %>3.html"<%= page == 1 && (page + 1) * config['by_page'].to_i < rank_data.length ? ' rel="next"' : "" %>>61~90</a> 
     45                <a href="<%= today_root %><%= from + 1 %>.html"<%= page == 1 ? ' rel="prev"' : "" %>>1~30</a> 
     46                <a href="<%= today_root %><%= from + 2 %>.html"<%= page == 0 && (page + 1) * config['by_page'].to_i < rank_data.length ? ' rel="next"' : "" %><%= page == 2 ? ' rel="prev"' : "" %>>31~60</a> 
     47                <a href="<%= today_root %><%= from + 3 %>.html"<%= page == 1 && (page + 1) * config['by_page'].to_i < rank_data.length ? ' rel="next"' : "" %>>61~90</a> 
    3548        </div> 
    3649        <div style="align:right"><a href="http://twitter.com/YaSuYuKi">Profile</a></div>